• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Denied Rain source

Status
Not open for further replies.

Jack_08

Verified Member
As the title says, it would make sense for waterbenders to be able to bend rain, so is it possible to allow waterbenders to have the ability to use SURFACE air blocks when it's raining as water sources, with the exception of deserts and other biomes where it doesn't rain? ;). (Ive seen katara use rain to make ice spikes against yon rha) if is not possible yet, I highly suggest this feature to make waterbending more usefull,
 

Sobki

Staff member
Lead Developer
Plugin Developer
Verified Member
I kind of like this ability & might make an addon for it when I get time! :)
 

SuperBower118

Verified Member
As the title says, it would make sense for waterbenders to be able to bend rain, so is it possible to allow waterbenders to have the ability to use SURFACE air blocks when it's raining as water sources, with the exception of deserts and other biomes where it doesn't rain? ;). (Ive seen katara use rain to make ice spikes against yon rha) if is not possible yet, I highly suggest this feature to make waterbending more usefull,
Obviously, most moves would need to be downgraded. It'd have to take a considerable amount of water to even create something like a full-blown Water Manipulation.
 

Jack_08

Verified Member
Obviously, most moves would need to be downgraded. It'd have to take a considerable amount of water to even create something like a full-blown Water Manipulation.
plant bending is already included in the game, one leaf block can be use as a normal water source without downgrading the ability, I'm pretty sure there's more water in rain than there are in a leaf block
 

YourAverageNerd

Verified Member
is it not possible to test for if any other blocks is on top of that airblock?
Java:
private boolean isExposedToRain(Block block) {
    if (!block.getWorld().hadStorm())
        return false;
    if (biomesWithoutRain.contains(block.getBiome())
        return false;
    for (int y = block.getY(); y < 256; y++) {
        Block secondBlock = block.getLocation().setY(y).getBlock();
        if (GeneralMethods.isSolid(secondBlock))
            return false;
}
    return true;
}
Something like that :p
 

SuperBower118

Verified Member
plant bending is already included in the game, one leaf block can be use as a normal water source without downgrading the ability, I'm pretty sure there's more water in rain than there are in a leaf block
Who said that plantbending was realistic? Because it certainly is not.
 

OmniCypher

Staff member
Lead Developer
Administrator
Plugin Developer
Java:
private boolean isExposedToRain(Block block) {
    if (!block.getWorld().hadStorm())
        return false;
    if (biomesWithoutRain.contains(block.getBiome())
        return false;
    for (int y = block.getY(); y < 256; y++) {
        Block secondBlock = block.getLocation().setY(y).getBlock();
        if (GeneralMethods.isSolid(secondBlock))
            return false;
}
    return true;
}
Something like that :p
For the record it is possible to detect whether a player is in rain, hence the reason my old addon Condensation was possible. Additionally, you do have the gist of the idea but could make it a little simpler.

The important thing to note here is that the way sourcing is set up we couldn't do this. It would require us to have the option of not supplying a source to a move.

Code:
// It is important to note that there is no way to accurately determine if the player is in rain or snow.
public boolean isInWeather (Player player) {

    Location location = player.getLocation();
    Block block = player.getWorld().getHighestBlockAt(location.getBlockX(), location.getBlockZ());
  
    // Offset the location for the player's height.
    location.setY(location.getY() + 2.0D);

    // Rough list of the biomes where rain/snow don't occur.
    Biome[] invalidBiomes = { Biome.DESERT, Biome.DESERT_HILLS, Biome.DESERT_MOUNTAINS, Biome.SAVANNA, Biome.SAVANNA_MOUNTAINS, Biome.SAVANNA_PLATEAU, Biome.SAVANNA_PLATEAU_MOUNTAINS, Biome.MESA, Biome.MESA_BRYCE, Biome.MESA_PLATEAU, Biome.MESA_PLATEAU_FOREST,  Biome.MESA_PLATEAU_FOREST_MOUNTAINS, Biome.MESA_PLATEAU_MOUNTAINS};

    // Make sure it is raining in the world.
    if(player.getWorld().hasStorm()) {
        // Make sure the player isn't in an invalid biome.
        if(!Arrays.asList(invalidBiomes).contains(player.getWorld().getBiome(pLoc.getBlockX(), pLoc.getBlockZ())) {
            // Make sure the player is above the highest block at that coordinate.
            if (location.getBlockY() > block.getY()) {
                return true;
            }
        }
    }
          
    return false;
}
 

YourAverageNerd

Verified Member
For the record it is possible to detect whether a player is in rain, hence the reason my old addon Condensation was possible. Additionally, you do have the gist of the idea but could make it a little simpler.

The important thing to note here is that the way sourcing is set up we couldn't do this. It would require us to have the option of not supplying a source to a move.

Code:
// It is important to note that there is no way to accurately determine if the player is in rain or snow.
public boolean isInWeather (Player player) {

    Location location = player.getLocation();
    Block block = player.getWorld().getHighestBlockAt(location.getBlockX(), location.getBlockZ());
 
    // Offset the location for the player's height.
    location.setY(location.getY() + 2.0D);

    // Rough list of the biomes where rain/snow don't occur.
    Biome[] invalidBiomes = { Biome.DESERT, Biome.DESERT_HILLS, Biome.DESERT_MOUNTAINS, Biome.SAVANNA, Biome.SAVANNA_MOUNTAINS, Biome.SAVANNA_PLATEAU, Biome.SAVANNA_PLATEAU_MOUNTAINS, Biome.MESA, Biome.MESA_BRYCE, Biome.MESA_PLATEAU, Biome.MESA_PLATEAU_FOREST,  Biome.MESA_PLATEAU_FOREST_MOUNTAINS, Biome.MESA_PLATEAU_MOUNTAINS};

    // Make sure it is raining in the world.
    if(player.getWorld().hasStorm()) {
        // Make sure the player isn't in an invalid biome.
        if(!Arrays.asList(invalidBiomes).contains(player.getWorld().getBiome(pLoc.getBlockX(), pLoc.getBlockZ())) {
            // Make sure the player is above the highest block at that coordinate.
            if (location.getBlockY() > block.getY()) {
                return true;
            }
        }
    }
         
    return false;
}
Welll, getHighestBlockAt() also uses a for-loop to get the highest block, both methods are kinda the same :p
Who wins? YOU DECIDE! *points at other users*
 

Vahagn

Staff member
Plugin Developer
Verified Member
Welll, getHighestBlockAt() also uses a for-loop to get the highest block, both methods are kinda the same :p
Who wins? YOU DECIDE! *points at other users*
Omni's code is cleaner, it explains what each section does, and for non coders its easier to understand, therefore he wins

:)
 

MeskenasBoii

Verified Member
As the title says, it would make sense for waterbenders to be able to bend rain, so is it possible to allow waterbenders to have the ability to use SURFACE air blocks when it's raining as water sources, with the exception of deserts and other biomes where it doesn't rain? ;). (Ive seen katara use rain to make ice spikes against yon rha) if is not possible yet, I highly suggest this feature to make waterbending more usefull,
You oughta used the search box next time before posting the repeatetive idea over again to look if already exists. That creates a lot of spammy threads :B
 

Elias

Verified Member
This seemed to be turned down due to the less practical way you described it, and I guess you could wait on Sobki to make an add-on. I'll be marking this denied for now though.
 
Last edited:
Status
Not open for further replies.
Top