From 3d1c68210c779deadfcab9f37e3d3d77dcad6b11 Mon Sep 17 00:00:00 2001 From: Sen Date: Thu, 20 Mar 2025 00:29:25 +0100 Subject: [PATCH] fix some function names --- java/src/game/ai/EntityAIFollowOwner.java | 31 +---- .../src/game/ai/EntityAIRestrictOpenDoor.java | 2 +- .../BehaviorDefaultDispenseItem.java | 4 +- .../game/enchantment/EnchantmentHelper.java | 4 +- .../enchantment/EnchantmentProtection.java | 24 ++-- java/src/game/entity/animal/EntitySquid.java | 8 +- .../entity/attributes/AttributeInstance.java | 4 +- .../game/entity/attributes/Attributes.java | 2 +- .../game/entity/item/EntityHopperCart.java | 4 +- java/src/game/gui/container/GuiContainer.java | 6 +- java/src/game/gui/container/GuiEnchant.java | 130 +++++++++--------- java/src/game/init/CraftingRegistry.java | 6 +- java/src/game/inventory/Container.java | 12 +- .../game/inventory/ContainerEnchantment.java | 10 +- .../game/network/NetHandlerPlayClient.java | 10 +- java/src/game/packet/S14PacketEntity.java | 24 ++-- .../packet/S20PacketEntityProperties.java | 2 +- .../game/pathfinding/SwimNodeProcessor.java | 4 +- .../game/renderer/VertexFormatElement.java | 6 +- java/src/game/village/VillageDoorInfo.java | 2 +- java/src/game/world/Explosion.java | 2 +- 21 files changed, 133 insertions(+), 164 deletions(-) diff --git a/java/src/game/ai/EntityAIFollowOwner.java b/java/src/game/ai/EntityAIFollowOwner.java index d3cb9d0..8805538 100755 --- a/java/src/game/ai/EntityAIFollowOwner.java +++ b/java/src/game/ai/EntityAIFollowOwner.java @@ -95,14 +95,7 @@ public class EntityAIFollowOwner extends EntityAIBase this.petPathfinder.clearPathEntity(); ((PathNavigateGround)this.thePet.getNavigator()).setAvoidsWater(true); } - - private boolean func_181065_a(BlockPos p_181065_1_) - { - State iblockstate = this.theWorld.getState(p_181065_1_); - Block block = iblockstate.getBlock(); - return block == Blocks.air ? true : !block.isFullCube(); - } - + /** * Updates the task */ @@ -119,28 +112,6 @@ public class EntityAIFollowOwner extends EntityAIBase if (!this.petPathfinder.tryMoveToEntityLiving(this.theOwner, this.followSpeed)) { this.petPathfinder.clearPathEntity(); -// if (!this.thePet.getLeashed()) -// { -// if (this.thePet.getDistanceSqToEntity(this.theOwner) >= 144.0D) -// { -// int i = ExtMath.floord(this.theOwner.posX) - 2; -// int j = ExtMath.floord(this.theOwner.posZ) - 2; -// int k = ExtMath.floord(this.theOwner.getEntityBoundingBox().minY); -// -// for (int l = 0; l <= 4; ++l) -// { -// for (int i1 = 0; i1 <= 4; ++i1) -// { -// if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.isBlockSolid(new BlockPos(i + l, k - 1, j + i1)) && this.func_181065_a(new BlockPos(i + l, k, j + i1)) && this.func_181065_a(new BlockPos(i + l, k + 1, j + i1))) -// { -// this.thePet.setLocationAndAngles((double)((float)(i + l) + 0.5F), (double)k, (double)((float)(j + i1) + 0.5F), this.thePet.rotYaw, this.thePet.rotPitch); -// this.petPathfinder.clearPathEntity(); -// return; -// } -// } -// } -// } -// } } } } diff --git a/java/src/game/ai/EntityAIRestrictOpenDoor.java b/java/src/game/ai/EntityAIRestrictOpenDoor.java index 3ceddb9..94991dc 100755 --- a/java/src/game/ai/EntityAIRestrictOpenDoor.java +++ b/java/src/game/ai/EntityAIRestrictOpenDoor.java @@ -53,7 +53,7 @@ public class EntityAIRestrictOpenDoor extends EntityAIBase */ public boolean continueExecuting() { - return ((WorldServer)this.entityObj.worldObj).isDaytime() ? false : !this.frontDoor.getIsDetachedFromVillageFlag() && this.frontDoor.func_179850_c(new BlockPos(this.entityObj)); + return ((WorldServer)this.entityObj.worldObj).isDaytime() ? false : !this.frontDoor.getIsDetachedFromVillageFlag() && this.frontDoor.isIndoorSide(new BlockPos(this.entityObj)); } /** diff --git a/java/src/game/dispenser/BehaviorDefaultDispenseItem.java b/java/src/game/dispenser/BehaviorDefaultDispenseItem.java index 7b17f88..50057a4 100755 --- a/java/src/game/dispenser/BehaviorDefaultDispenseItem.java +++ b/java/src/game/dispenser/BehaviorDefaultDispenseItem.java @@ -70,10 +70,10 @@ public class BehaviorDefaultDispenseItem implements IBehaviorDispenseItem */ protected void spawnDispenseParticles(IBlockSource source, Facing facingIn) { - source.getWorld().playAuxSFX(2000, source.getBlockPos(), this.func_82488_a(facingIn)); + source.getWorld().playAuxSFX(2000, source.getBlockPos(), this.getOffsetId(facingIn)); } - private int func_82488_a(Facing facingIn) + private int getOffsetId(Facing facingIn) { return facingIn.getFrontOffsetX() + 1 + (facingIn.getFrontOffsetZ() + 1) * 3; } diff --git a/java/src/game/enchantment/EnchantmentHelper.java b/java/src/game/enchantment/EnchantmentHelper.java index 25d6fa9..74ac5ce 100755 --- a/java/src/game/enchantment/EnchantmentHelper.java +++ b/java/src/game/enchantment/EnchantmentHelper.java @@ -408,7 +408,7 @@ public class EnchantmentHelper return p_77504_1_; } - public static List buildEnchantmentList(Random randomIn, ItemStack itemStackIn, int p_77513_2_) + public static List buildEnchantmentList(Random randomIn, ItemStack itemStackIn, int level) { Item item = itemStackIn.getItem(); int i = item.getItemEnchantability(); @@ -421,7 +421,7 @@ public class EnchantmentHelper { i = i / 2; i = randomIn.roll((i >> 1) + 1) + randomIn.zrange((i >> 1) + 1); - int j = i + p_77513_2_; + int j = i + level; float f = (randomIn.floatv() + randomIn.floatv() - 1.0F) * 0.15F; int k = (int)((float)j * (1.0F + f) + 0.5F); diff --git a/java/src/game/enchantment/EnchantmentProtection.java b/java/src/game/enchantment/EnchantmentProtection.java index df78365..9c4d0fb 100755 --- a/java/src/game/enchantment/EnchantmentProtection.java +++ b/java/src/game/enchantment/EnchantmentProtection.java @@ -31,12 +31,12 @@ public class EnchantmentProtection extends Enchantment */ public final int protectionType; - public EnchantmentProtection(int p_i45765_1_, String p_i45765_2_, int p_i45765_3_, int p_i45765_4_) + public EnchantmentProtection(int id, String name, int weight, int type) { - super(p_i45765_1_, p_i45765_2_, p_i45765_3_, EnumEnchantmentType.ARMOR); - this.protectionType = p_i45765_4_; + super(id, name, weight, EnumEnchantmentType.ARMOR); + this.protectionType = type; - if (p_i45765_4_ == 2) + if (type == 2) { this.type = EnumEnchantmentType.ARMOR_FEET; } @@ -106,27 +106,27 @@ public class EnchantmentProtection extends Enchantment /** * Gets the amount of ticks an entity should be set fire, adjusted for fire protection. */ - public static int getFireTimeForEntity(Entity p_92093_0_, int p_92093_1_) + public static int getFireTimeForEntity(Entity entity, int duration) { - int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.fireProtection.effectId, p_92093_0_.getInventory()); + int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.fireProtection.effectId, entity.getInventory()); if (i > 0) { - p_92093_1_ -= ExtMath.floorf((float)p_92093_1_ * (float)i * 0.15F); + duration -= ExtMath.floorf((float)duration * (float)i * 0.15F); } - return p_92093_1_; + return duration; } - public static double func_92092_a(Entity p_92092_0_, double p_92092_1_) + public static double getKnockbackFactor(Entity entity, double strength) { - int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.blastProtection.effectId, p_92092_0_.getInventory()); + int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.blastProtection.effectId, entity.getInventory()); if (i > 0) { - p_92092_1_ -= (double)ExtMath.floord(p_92092_1_ * (double)((float)i * 0.15F)); + strength -= (double)ExtMath.floord(strength * (double)((float)i * 0.15F)); } - return p_92092_1_; + return strength; } } diff --git a/java/src/game/entity/animal/EntitySquid.java b/java/src/game/entity/animal/EntitySquid.java index 4111318..22ccf33 100755 --- a/java/src/game/entity/animal/EntitySquid.java +++ b/java/src/game/entity/animal/EntitySquid.java @@ -237,14 +237,14 @@ public class EntitySquid extends EntityWaterMob } } - public void func_175568_b(float randomMotionVecXIn, float randomMotionVecYIn, float randomMotionVecZIn) + public void setRandomMotion(float randomMotionVecXIn, float randomMotionVecYIn, float randomMotionVecZIn) { this.randomMotionVecX = randomMotionVecXIn; this.randomMotionVecY = randomMotionVecYIn; this.randomMotionVecZ = randomMotionVecZIn; } - public boolean func_175567_n() + public boolean hasRandomMotion() { return this.randomMotionVecX != 0.0F || this.randomMotionVecY != 0.0F || this.randomMotionVecZ != 0.0F; } @@ -280,13 +280,13 @@ public class EntitySquid extends EntityWaterMob // this.squid.func_175568_b(0.0F, 0.0F, 0.0F); // } // else - if (this.squid.getRNG().chance(50) || !this.squid.inLiquid || !this.squid.func_175567_n()) + if (this.squid.getRNG().chance(50) || !this.squid.inLiquid || !this.squid.hasRandomMotion()) { float f = this.squid.getRNG().floatv() * (float)Math.PI * 2.0F; float f1 = ExtMath.cos(f) * 0.2F; float f2 = -0.1F + this.squid.getRNG().floatv() * 0.2F; float f3 = ExtMath.sin(f) * 0.2F; - this.squid.func_175568_b(f1, f2, f3); + this.squid.setRandomMotion(f1, f2, f3); } } } diff --git a/java/src/game/entity/attributes/AttributeInstance.java b/java/src/game/entity/attributes/AttributeInstance.java index 7b29c4c..332cb3d 100755 --- a/java/src/game/entity/attributes/AttributeInstance.java +++ b/java/src/game/entity/attributes/AttributeInstance.java @@ -51,7 +51,7 @@ public class AttributeInstance // return (Collection)this.mapByOperation.get(operation); // } - public Collection func_111122_c() + public Collection getModifiers() { Set set = Sets.newHashSet(); @@ -132,7 +132,7 @@ public class AttributeInstance public void removeAllModifiers() { - Collection collection = this.func_111122_c(); + Collection collection = this.getModifiers(); if (collection != null) { diff --git a/java/src/game/entity/attributes/Attributes.java b/java/src/game/entity/attributes/Attributes.java index a98d0ad..cf4736b 100755 --- a/java/src/game/entity/attributes/Attributes.java +++ b/java/src/game/entity/attributes/Attributes.java @@ -61,7 +61,7 @@ public class Attributes Attribute iattribute = instance.getAttribute(); nbttagcompound.setString("Name", iattribute.getUnlocalizedName()); nbttagcompound.setDouble("Base", instance.getBaseValue()); - Collection collection = instance.func_111122_c(); + Collection collection = instance.getModifiers(); if (collection != null && !collection.isEmpty()) { diff --git a/java/src/game/entity/item/EntityHopperCart.java b/java/src/game/entity/item/EntityHopperCart.java index ba0aabe..0be650b 100755 --- a/java/src/game/entity/item/EntityHopperCart.java +++ b/java/src/game/entity/item/EntityHopperCart.java @@ -157,7 +157,7 @@ public class EntityHopperCart extends EntityCartContainer implements IHopper { this.setTransferTicker(0); - if (this.func_96112_aD()) + if (this.collectItems()) { this.setTransferTicker(Config.hopperCartDelay); this.markDirty(); @@ -166,7 +166,7 @@ public class EntityHopperCart extends EntityCartContainer implements IHopper } } - public boolean func_96112_aD() + public boolean collectItems() { if (TileEntityHopper.captureDroppedItems(this)) { diff --git a/java/src/game/gui/container/GuiContainer.java b/java/src/game/gui/container/GuiContainer.java index a827e90..5ac44bf 100755 --- a/java/src/game/gui/container/GuiContainer.java +++ b/java/src/game/gui/container/GuiContainer.java @@ -912,14 +912,14 @@ public abstract class GuiContainer extends Gui // else if (this.dragSplitting && !this.dragSplittingSlots.isEmpty()) { - this.handleMouseClick((Slot)null, -999, Container.func_94534_d(0, this.dragSplittingLimit), 5); + this.handleMouseClick((Slot)null, -999, Container.getDragCode(0, this.dragSplittingLimit), 5); for (Slot slot1 : this.dragSplittingSlots) { - this.handleMouseClick(slot1, slot1.slotNumber, Container.func_94534_d(1, this.dragSplittingLimit), 5); + this.handleMouseClick(slot1, slot1.slotNumber, Container.getDragCode(1, this.dragSplittingLimit), 5); } - this.handleMouseClick((Slot)null, -999, Container.func_94534_d(2, this.dragSplittingLimit), 5); + this.handleMouseClick((Slot)null, -999, Container.getDragCode(2, this.dragSplittingLimit), 5); } else if (this.gm.thePlayer.inventory.getItemStack() != null) { diff --git a/java/src/game/gui/container/GuiEnchant.java b/java/src/game/gui/container/GuiEnchant.java index 44386de..dcf2632 100755 --- a/java/src/game/gui/container/GuiEnchant.java +++ b/java/src/game/gui/container/GuiEnchant.java @@ -4,10 +4,8 @@ import game.color.TextColor; import game.enchantment.Enchantment; import game.inventory.ContainerEnchantment; import game.inventory.InventoryPlayer; -import game.item.ItemStack; import game.rng.Random; import game.tileentity.IWorldNameable; -import game.util.ExtMath; import game.world.World; public class GuiEnchant extends GuiContainer @@ -23,14 +21,14 @@ public class GuiEnchant extends GuiContainer private final ContainerEnchantment container; private final IWorldNameable table; - public int field_147073_u; - public float field_147071_v; - public float field_147069_w; - public float field_147082_x; - public float field_147081_y; - public float field_147080_z; - public float field_147076_A; - ItemStack field_147077_B; +// public int field_147073_u; +// public float field_147071_v; +// public float field_147069_w; +// public float field_147082_x; +// public float field_147081_y; +// public float field_147080_z; +// public float field_147076_A; +// ItemStack field_147077_B; public GuiEnchant(InventoryPlayer inventory, World worldIn, IWorldNameable table) { @@ -49,14 +47,14 @@ public class GuiEnchant extends GuiContainer this.drawString(this.playerInventory.getCommandName(), 8, this.ySize - 96 + 2); } - /** - * Called from the main game loop to update the screen. - */ - public void updateScreen() - { - super.updateScreen(); - this.func_147068_g(); - } +// /** +// * Called from the main game loop to update the screen. +// */ +// public void updateScreen() +// { +// super.updateScreen(); +// this.updateAnimation(); +// } /** * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton @@ -239,52 +237,52 @@ public class GuiEnchant extends GuiContainer return s; } - private void func_147068_g() - { - ItemStack itemstack = this.inventorySlots.getSlot(0).getStack(); - - if (!ItemStack.areItemStacksEqual(itemstack, this.field_147077_B)) - { - this.field_147077_B = itemstack; - - while (true) - { - this.field_147082_x += (float)(this.random.zrange(4) - this.random.zrange(4)); - - if (this.field_147071_v > this.field_147082_x + 1.0F || this.field_147071_v < this.field_147082_x - 1.0F) - { - break; - } - } - } - - ++this.field_147073_u; - this.field_147069_w = this.field_147071_v; - this.field_147076_A = this.field_147080_z; - boolean flag = false; - - for (int i = 0; i < 3; ++i) - { - if (this.container.enchantLevels[i] != 0) - { - flag = true; - } - } - - if (flag) - { - this.field_147080_z += 0.2F; - } - else - { - this.field_147080_z -= 0.2F; - } - - this.field_147080_z = ExtMath.clampf(this.field_147080_z, 0.0F, 1.0F); - float f1 = (this.field_147082_x - this.field_147071_v) * 0.4F; - float f = 0.2F; - f1 = ExtMath.clampf(f1, -f, f); - this.field_147081_y += (f1 - this.field_147081_y) * 0.9F; - this.field_147071_v += this.field_147081_y; - } +// private void updateAnimation() +// { +// ItemStack itemstack = this.inventorySlots.getSlot(0).getStack(); +// +// if (!ItemStack.areItemStacksEqual(itemstack, this.field_147077_B)) +// { +// this.field_147077_B = itemstack; +// +// while (true) +// { +// this.field_147082_x += (float)(this.random.zrange(4) - this.random.zrange(4)); +// +// if (this.field_147071_v > this.field_147082_x + 1.0F || this.field_147071_v < this.field_147082_x - 1.0F) +// { +// break; +// } +// } +// } +// +// ++this.field_147073_u; +// this.field_147069_w = this.field_147071_v; +// this.field_147076_A = this.field_147080_z; +// boolean flag = false; +// +// for (int i = 0; i < 3; ++i) +// { +// if (this.container.enchantLevels[i] != 0) +// { +// flag = true; +// } +// } +// +// if (flag) +// { +// this.field_147080_z += 0.2F; +// } +// else +// { +// this.field_147080_z -= 0.2F; +// } +// +// this.field_147080_z = ExtMath.clampf(this.field_147080_z, 0.0F, 1.0F); +// float f1 = (this.field_147082_x - this.field_147071_v) * 0.4F; +// float f = 0.2F; +// f1 = ExtMath.clampf(f1, -f, f); +// this.field_147081_y += (f1 - this.field_147081_y) * 0.9F; +// this.field_147071_v += this.field_147081_y; +// } } diff --git a/java/src/game/init/CraftingRegistry.java b/java/src/game/init/CraftingRegistry.java index c3cbcd7..d9d9ea7 100755 --- a/java/src/game/init/CraftingRegistry.java +++ b/java/src/game/init/CraftingRegistry.java @@ -682,7 +682,7 @@ public abstract class CraftingRegistry } else { - return this.func_179533_c(inv) != null; + return this.getBannerPattern(inv) != null; } } @@ -702,7 +702,7 @@ public abstract class CraftingRegistry } } - TileEntityBanner.EnumBannerPattern tileentitybanner$enumbannerpattern = this.func_179533_c(inv); + TileEntityBanner.EnumBannerPattern tileentitybanner$enumbannerpattern = this.getBannerPattern(inv); if (tileentitybanner$enumbannerpattern != null) { @@ -768,7 +768,7 @@ public abstract class CraftingRegistry return aitemstack; } - private TileEntityBanner.EnumBannerPattern func_179533_c(InventoryCrafting p_179533_1_) + private TileEntityBanner.EnumBannerPattern getBannerPattern(InventoryCrafting p_179533_1_) { for (TileEntityBanner.EnumBannerPattern tileentitybanner$enumbannerpattern : TileEntityBanner.EnumBannerPattern.values()) { diff --git a/java/src/game/inventory/Container.java b/java/src/game/inventory/Container.java index 230729c..b1f3195 100755 --- a/java/src/game/inventory/Container.java +++ b/java/src/game/inventory/Container.java @@ -689,22 +689,22 @@ public abstract class Container /** * Extracts the drag mode. Args : eventButton. Return (0 : evenly split, 1 : one item by slot, 2 : not used ?) */ - public static int extractDragMode(int p_94529_0_) + public static int extractDragMode(int dragCode) { - return p_94529_0_ >> 2 & 3; + return dragCode >> 2 & 3; } /** * Args : clickedButton, Returns (0 : start drag, 1 : add slot, 2 : end drag) */ - public static int getDragEvent(int p_94532_0_) + public static int getDragEvent(int dragCode) { - return p_94532_0_ & 3; + return dragCode & 3; } - public static int func_94534_d(int p_94534_0_, int p_94534_1_) + public static int getDragCode(int dragEvent, int dragMode) { - return p_94534_0_ & 3 | (p_94534_1_ & 3) << 2; + return dragEvent & 3 | (dragMode & 3) << 2; } public static boolean isValidDragMode(int dragModeIn, EntityNPC player) diff --git a/java/src/game/inventory/ContainerEnchantment.java b/java/src/game/inventory/ContainerEnchantment.java index 99552ea..4e7bcea 100755 --- a/java/src/game/inventory/ContainerEnchantment.java +++ b/java/src/game/inventory/ContainerEnchantment.java @@ -211,7 +211,7 @@ public class ContainerEnchantment extends Container { if (this.enchantLevels[j1] > 0) { - List list = this.func_178148_a(itemstack, j1, this.enchantLevels[j1]); + List list = this.getRandomEnchantments(itemstack, j1, this.enchantLevels[j1]); if (list != null && !list.isEmpty()) { @@ -253,7 +253,7 @@ public class ContainerEnchantment extends Container { if (!this.worldPointer.client) { - List list = this.func_178148_a(itemstack, id, this.enchantLevels[id]); + List list = this.getRandomEnchantments(itemstack, id, this.enchantLevels[id]); boolean flag = itemstack.getItem() == Items.book; if (list != null) @@ -304,10 +304,10 @@ public class ContainerEnchantment extends Container } } - private List func_178148_a(ItemStack stack, int p_178148_2_, int p_178148_3_) + private List getRandomEnchantments(ItemStack stack, int id, int level) { - this.rand.setSeed((long)(this.xpSeed + p_178148_2_)); - List list = EnchantmentHelper.buildEnchantmentList(this.rand, stack, p_178148_3_); + this.rand.setSeed((long)(this.xpSeed + id)); + List list = EnchantmentHelper.buildEnchantmentList(this.rand, stack, level); if (stack.getItem() == Items.book && list != null && list.size() > 1) { diff --git a/java/src/game/network/NetHandlerPlayClient.java b/java/src/game/network/NetHandlerPlayClient.java index bb0a827..82764c3 100755 --- a/java/src/game/network/NetHandlerPlayClient.java +++ b/java/src/game/network/NetHandlerPlayClient.java @@ -535,14 +535,14 @@ public class NetHandlerPlayClient extends NetHandler if (entity != null) { - entity.serverPosX += packetIn.func_149062_c(); - entity.serverPosY += packetIn.func_149061_d(); - entity.serverPosZ += packetIn.func_149064_e(); + entity.serverPosX += packetIn.getPosX(); + entity.serverPosY += packetIn.getPosY(); + entity.serverPosZ += packetIn.getPosZ(); double d0 = (double)entity.serverPosX / 32.0D; double d1 = (double)entity.serverPosY / 32.0D; double d2 = (double)entity.serverPosZ / 32.0D; - float f = packetIn.func_149060_h() ? (float)(packetIn.func_149066_f() * 360) / 256.0F : entity.rotYaw; - float f1 = packetIn.func_149060_h() ? (float)(packetIn.func_149063_g() * 360) / 256.0F : entity.rotPitch; + float f = packetIn.hasRotations() ? (float)(packetIn.getYaw() * 360) / 256.0F : entity.rotYaw; + float f1 = packetIn.hasRotations() ? (float)(packetIn.getPitch() * 360) / 256.0F : entity.rotPitch; entity.setPositionAndRotation2(d0, d1, d2, f, f1, 3, false); entity.onGround = packetIn.getOnGround(); } diff --git a/java/src/game/packet/S14PacketEntity.java b/java/src/game/packet/S14PacketEntity.java index 985cbc2..fccdfb6 100755 --- a/java/src/game/packet/S14PacketEntity.java +++ b/java/src/game/packet/S14PacketEntity.java @@ -17,7 +17,7 @@ public class S14PacketEntity implements Packet protected byte yaw; protected byte pitch; protected boolean onGround; - protected boolean field_149069_g; + protected boolean rotation; public S14PacketEntity() { @@ -62,34 +62,34 @@ public class S14PacketEntity implements Packet return worldIn.getEntityByID(this.entityId); } - public byte func_149062_c() + public byte getPosX() { return this.posX; } - public byte func_149061_d() + public byte getPosY() { return this.posY; } - public byte func_149064_e() + public byte getPosZ() { return this.posZ; } - public byte func_149066_f() + public byte getYaw() { return this.yaw; } - public byte func_149063_g() + public byte getPitch() { return this.pitch; } - public boolean func_149060_h() + public boolean hasRotations() { - return this.field_149069_g; + return this.rotation; } public boolean getOnGround() @@ -135,7 +135,7 @@ public class S14PacketEntity implements Packet { public S16PacketEntityLook() { - this.field_149069_g = true; + this.rotation = true; } public S16PacketEntityLook(int entityIdIn, byte yawIn, byte pitchIn, boolean onGroundIn) @@ -143,7 +143,7 @@ public class S14PacketEntity implements Packet super(entityIdIn); this.yaw = yawIn; this.pitch = pitchIn; - this.field_149069_g = true; + this.rotation = true; this.onGround = onGroundIn; } @@ -168,7 +168,7 @@ public class S14PacketEntity implements Packet { public S17PacketEntityLookMove() { - this.field_149069_g = true; + this.rotation = true; } public S17PacketEntityLookMove(int p_i45973_1_, byte p_i45973_2_, byte p_i45973_3_, byte p_i45973_4_, byte p_i45973_5_, byte p_i45973_6_, boolean p_i45973_7_) @@ -180,7 +180,7 @@ public class S14PacketEntity implements Packet this.yaw = p_i45973_5_; this.pitch = p_i45973_6_; this.onGround = p_i45973_7_; - this.field_149069_g = true; + this.rotation = true; } public void readPacketData(PacketBuffer buf) throws IOException diff --git a/java/src/game/packet/S20PacketEntityProperties.java b/java/src/game/packet/S20PacketEntityProperties.java index 99110b9..f35f9ad 100755 --- a/java/src/game/packet/S20PacketEntityProperties.java +++ b/java/src/game/packet/S20PacketEntityProperties.java @@ -27,7 +27,7 @@ public class S20PacketEntityProperties implements Packet for (AttributeInstance iattributeinstance : p_i45236_2_) { - this.field_149444_b.add(new S20PacketEntityProperties.Snapshot(iattributeinstance.getAttribute().getUnlocalizedName(), iattributeinstance.getBaseValue(), iattributeinstance.func_111122_c())); + this.field_149444_b.add(new S20PacketEntityProperties.Snapshot(iattributeinstance.getAttribute().getUnlocalizedName(), iattributeinstance.getBaseValue(), iattributeinstance.getModifiers())); } } diff --git a/java/src/game/pathfinding/SwimNodeProcessor.java b/java/src/game/pathfinding/SwimNodeProcessor.java index 22251d3..4790091 100755 --- a/java/src/game/pathfinding/SwimNodeProcessor.java +++ b/java/src/game/pathfinding/SwimNodeProcessor.java @@ -61,11 +61,11 @@ public class SwimNodeProcessor extends NodeProcessor */ private PathPoint getSafePoint(Entity entityIn, int x, int y, int z) { - int i = this.func_176186_b(entityIn, x, y, z); + int i = this.findNonLiquid(entityIn, x, y, z); return i == -1 ? this.openPoint(x, y, z) : null; } - private int func_176186_b(Entity entityIn, int x, int y, int z) + private int findNonLiquid(Entity entityIn, int x, int y, int z) { BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); diff --git a/java/src/game/renderer/VertexFormatElement.java b/java/src/game/renderer/VertexFormatElement.java index e0f7181..58804dd 100755 --- a/java/src/game/renderer/VertexFormatElement.java +++ b/java/src/game/renderer/VertexFormatElement.java @@ -13,7 +13,7 @@ public class VertexFormatElement public VertexFormatElement(int indexIn, VertexFormatElement.EnumType typeIn, VertexFormatElement.EnumUsage usageIn, int count) { - if (!this.func_177372_a(indexIn, usageIn)) + if (!this.isValid(indexIn, usageIn)) { Log.JNI.warn("Mehrere Vertex-Elemente des gleichen Typs außer UVs sind nicht unterstützt. Erzwinge Typ UV."); this.usage = VertexFormatElement.EnumUsage.UV; @@ -28,9 +28,9 @@ public class VertexFormatElement this.elementCount = count; } - private final boolean func_177372_a(int p_177372_1_, VertexFormatElement.EnumUsage p_177372_2_) + private final boolean isValid(int index, VertexFormatElement.EnumUsage usage) { - return p_177372_1_ == 0 || p_177372_2_ == VertexFormatElement.EnumUsage.UV; + return index == 0 || usage == VertexFormatElement.EnumUsage.UV; } public final VertexFormatElement.EnumType getType() diff --git a/java/src/game/village/VillageDoorInfo.java b/java/src/game/village/VillageDoorInfo.java index d35e9a0..4a27a2d 100755 --- a/java/src/game/village/VillageDoorInfo.java +++ b/java/src/game/village/VillageDoorInfo.java @@ -51,7 +51,7 @@ public class VillageDoorInfo return (int)this.insideBlock.distanceSq(pos); } - public boolean func_179850_c(BlockPos pos) + public boolean isIndoorSide(BlockPos pos) { int i = pos.getX() - this.doorBlockPos.getX(); int j = pos.getZ() - this.doorBlockPos.getY(); diff --git a/java/src/game/world/Explosion.java b/java/src/game/world/Explosion.java index 1f74d1b..a497eac 100755 --- a/java/src/game/world/Explosion.java +++ b/java/src/game/world/Explosion.java @@ -245,7 +245,7 @@ public class Explosion double d10 = (1.0D - d12) * d14; if(this.worldObj.client || Config.damageExplosion) entity.attackEntityFrom(DamageSource.causeExplosionDamage(this), ((int)((d10 * d10 + d10) / 2.0D * 8.0D * (double)f3 + 1.0D))); - double d11 = EnchantmentProtection.func_92092_a(entity, d10); + double d11 = EnchantmentProtection.getKnockbackFactor(entity, d10); entity.motionX += d5 * d11; entity.motionY += d7 * d11; entity.motionZ += d9 * d11;