Get rid of some of the many stupid parXX parameter names

This commit is contained in:
Vincent Lee committed 2016-06-11 14:42:18 -05:00
1 parent ece95aca1c
commit 8bca8bb5f6
91 files changed
+584 -584

No files matched your search

@@ -35,36 +35,36 @@ public class ItemFertilizer extends ItemMod {
@Nonnull
@Override
public EnumActionResult onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10) {
public EnumActionResult onItemUse(ItemStack par1ItemStack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10) {
final int range = 3;
if(!par3World.isRemote) {
if(!world.isRemote) {
List<BlockPos> validCoords = new ArrayList<>();
for(int i = -range - 1; i < range; i++)
for(int j = -range - 1; j < range; j++) {
for(int k = 2; k >= -2; k--) {
BlockPos pos_ = pos.add(i + 1, k + 1, j + 1);
if(par3World.isAirBlock(pos_) && (!par3World.provider.getHasNoSky() || pos_.getY() < 255) && ModBlocks.flower.canPlaceBlockAt(par3World, pos_))
if(world.isAirBlock(pos_) && (!world.provider.getHasNoSky() || pos_.getY() < 255) && ModBlocks.flower.canPlaceBlockAt(world, pos_))
validCoords.add(pos_);
}
}
int flowerCount = Math.min(validCoords.size(), par3World.rand.nextBoolean() ? 3 : 4);
int flowerCount = Math.min(validCoords.size(), world.rand.nextBoolean() ? 3 : 4);
for(int i = 0; i < flowerCount; i++) {
BlockPos coords = validCoords.get(par3World.rand.nextInt(validCoords.size()));
BlockPos coords = validCoords.get(world.rand.nextInt(validCoords.size()));
validCoords.remove(coords);
par3World.setBlockState(coords, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.byMetadata(par3World.rand.nextInt(16))), 1 | 2);
world.setBlockState(coords, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.byMetadata(world.rand.nextInt(16))), 1 | 2);
}
par1ItemStack.stackSize--;
} else {
for(int i = 0; i < 15; i++) {
double x = pos.getX() - range + par3World.rand.nextInt(range * 2 + 1) + Math.random();
double x = pos.getX() - range + world.rand.nextInt(range * 2 + 1) + Math.random();
double y = pos.getY() + 1;
double z = pos.getZ() - range + par3World.rand.nextInt(range * 2 + 1) + Math.random();
double z = pos.getZ() - range + world.rand.nextInt(range * 2 + 1) + Math.random();
float red = (float) Math.random();
float green = (float) Math.random();
float blue = (float) Math.random();
Botania.proxy.wispFX(par3World, x, y, z, red, green, blue, 0.15F + (float) Math.random() * 0.25F, -(float) Math.random() * 0.1F - 0.05F);
Botania.proxy.wispFX(world, x, y, z, red, green, blue, 0.15F + (float) Math.random() * 0.25F, -(float) Math.random() * 0.1F - 0.05F);
}
}