Skip to content

Commit

Permalink
more adjustments to effects
Browse files Browse the repository at this point in the history
  • Loading branch information
2piradians committed Jan 7, 2017
1 parent 87f85ef commit 9ed3d09
Showing 1 changed file with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,19 +721,13 @@ else if (set.block == Blocks.SNOW && player.isSneaking()) {
for (int x=-radius/2; x<=radius/2; x++)
for (int z=-radius/2; z<=radius/2; z++)
for (int y=0; y<=2; y++)
if (player.isAllowEdit() && world.rand.nextInt(100) == 0 && world.isAirBlock(new BlockPos(player.posX+x, player.posY+y, player.posZ+z))) {
if (world.getBlockState(new BlockPos(player.posX+x, player.posY+y-1,
player.posZ+z)).getBlock().isVisuallyOpaque())
world.setBlockState(new BlockPos(player.posX+x, player.posY+y,
player.posZ+z), Blocks.SNOW_LAYER.getDefaultState());
else if (world.getBlockState(new BlockPos(player.posX+x, player.posY+y-1,
player.posZ+z)).getBlock() == Blocks.WATER)
world.setBlockState(new BlockPos(player.posX+x, player.posY+y-1,
player.posZ+z), Blocks.FROSTED_ICE.getDefaultState());
else if (world.getBlockState(new BlockPos(player.posX+x, player.posY+y-1,
player.posZ+z)).getBlock() == Blocks.FROSTED_ICE)
world.setBlockState(new BlockPos(player.posX+x, player.posY+y-1,
player.posZ+z), Blocks.FROSTED_ICE.getDefaultState());
if (player.isAllowEdit() && world.rand.nextInt(100) == 0 && world.isAirBlock(new BlockPos(player).add(x, y, z))) {
if (world.getBlockState(new BlockPos(player).add(x, y-1, z)).getBlock().isVisuallyOpaque())
world.setBlockState(new BlockPos(player).add(x, y, z), Blocks.SNOW_LAYER.getDefaultState());
else if (world.getBlockState(new BlockPos(player).add(x, y-1, z)).getBlock() == Blocks.WATER)
world.setBlockState(new BlockPos(player).add(x, y-1, z), Blocks.FROSTED_ICE.getDefaultState());
else if (world.getBlockState(new BlockPos(player).add(x, y-1, z)).getBlock() == Blocks.FROSTED_ICE)
world.setBlockState(new BlockPos(player).add(x, y-1, z), Blocks.FROSTED_ICE.getDefaultState());
}
//spawn snowballs
if (world.rand.nextInt(100) == 0) {
Expand Down

0 comments on commit 9ed3d09

Please sign in to comment.