From 2f734ce598126e83807ae217f0db51cc3f382e61 Mon Sep 17 00:00:00 2001 From: "agentkid20@gmail.com" Date: Fri, 15 Mar 2013 23:05:45 -0400 Subject: [PATCH] Update for Minecraft 1.5. Untested. --- .../net/citizensnpcs/npc/CitizensNPC.java | 4 +- .../citizensnpcs/npc/MobEntityController.java | 6 +- .../npc/ai/AStarNavigationStrategy.java | 2 +- .../net/citizensnpcs/npc/ai/BlockBreaker.java | 28 ++++----- .../npc/ai/MCNavigationStrategy.java | 6 +- .../citizensnpcs/npc/ai/MCTargetStrategy.java | 8 +-- .../npc/entity/BatController.java | 22 +++---- .../npc/entity/BlazeController.java | 20 +++---- .../npc/entity/CaveSpiderController.java | 24 ++++---- .../npc/entity/ChickenController.java | 20 +++---- .../npc/entity/CowController.java | 20 +++---- .../npc/entity/CreeperController.java | 22 +++---- .../npc/entity/EnderDragonController.java | 20 +++---- .../npc/entity/EndermanController.java | 24 ++++---- .../npc/entity/EntityHumanNPC.java | 60 +++++++++---------- .../npc/entity/GhastController.java | 20 +++---- .../npc/entity/GiantController.java | 20 +++---- .../npc/entity/HumanController.java | 6 +- .../npc/entity/IronGolemController.java | 20 +++---- .../npc/entity/MagmaCubeController.java | 24 ++++---- .../npc/entity/MushroomCowController.java | 20 +++---- .../npc/entity/OcelotController.java | 20 +++---- .../npc/entity/PigController.java | 22 +++---- .../npc/entity/PigZombieController.java | 24 ++++---- .../npc/entity/SheepController.java | 20 +++---- .../npc/entity/SilverfishController.java | 24 ++++---- .../npc/entity/SkeletonController.java | 20 +++---- .../npc/entity/SlimeController.java | 24 ++++---- .../npc/entity/SnowmanController.java | 20 +++---- .../npc/entity/SpiderController.java | 24 ++++---- .../npc/entity/SquidController.java | 20 +++---- .../npc/entity/VillagerController.java | 30 +++++----- .../npc/entity/WitchController.java | 20 +++---- .../npc/entity/WitherController.java | 20 +++---- .../npc/entity/WolfController.java | 20 +++---- .../npc/entity/ZombieController.java | 20 +++---- .../npc/network/EmptyNetHandler.java | 32 +++++----- .../npc/network/EmptyNetworkManager.java | 11 ++-- .../net/citizensnpcs/trait/Controllable.java | 8 +-- .../waypoint/EntityEnderCrystalMarker.java | 10 ++-- src/main/java/net/citizensnpcs/util/NMS.java | 54 ++++++++--------- .../citizensnpcs/util/PlayerAnimation.java | 12 ++-- 42 files changed, 426 insertions(+), 425 deletions(-) diff --git a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index dc42bcd0b..e40125f31 100644 --- a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -22,11 +22,11 @@ import net.citizensnpcs.trait.CurrentLocation; import net.citizensnpcs.util.Messages; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityLiving; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; import org.bukkit.entity.LivingEntity; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.metadata.FixedMetadataValue; diff --git a/src/main/java/net/citizensnpcs/npc/MobEntityController.java b/src/main/java/net/citizensnpcs/npc/MobEntityController.java index 8bcbfc572..bd80615b4 100644 --- a/src/main/java/net/citizensnpcs/npc/MobEntityController.java +++ b/src/main/java/net/citizensnpcs/npc/MobEntityController.java @@ -5,12 +5,12 @@ import java.util.Map; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.util.NMS; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Location; import org.bukkit.block.BlockFace; -import org.bukkit.craftbukkit.v1_4_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_5_R1.CraftWorld; import org.bukkit.entity.LivingEntity; import com.google.common.collect.Maps; diff --git a/src/main/java/net/citizensnpcs/npc/ai/AStarNavigationStrategy.java b/src/main/java/net/citizensnpcs/npc/ai/AStarNavigationStrategy.java index 2b182dcad..bb2cdeada 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/AStarNavigationStrategy.java +++ b/src/main/java/net/citizensnpcs/npc/ai/AStarNavigationStrategy.java @@ -10,7 +10,7 @@ import net.citizensnpcs.api.astar.pathfinder.VectorGoal; import net.citizensnpcs.api.astar.pathfinder.VectorNode; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.util.NMS; -import net.minecraft.server.v1_4_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityLiving; import org.bukkit.Effect; import org.bukkit.Location; diff --git a/src/main/java/net/citizensnpcs/npc/ai/BlockBreaker.java b/src/main/java/net/citizensnpcs/npc/ai/BlockBreaker.java index d66ecba4d..dac850a16 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/BlockBreaker.java +++ b/src/main/java/net/citizensnpcs/npc/ai/BlockBreaker.java @@ -1,17 +1,17 @@ package net.citizensnpcs.npc.ai; import net.citizensnpcs.util.PlayerAnimation; -import net.minecraft.server.v1_4_R1.Block; -import net.minecraft.server.v1_4_R1.Enchantment; -import net.minecraft.server.v1_4_R1.EnchantmentManager; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.ItemStack; -import net.minecraft.server.v1_4_R1.Material; -import net.minecraft.server.v1_4_R1.MobEffectList; +import net.minecraft.server.v1_5_R1.Block; +import net.minecraft.server.v1_5_R1.Enchantment; +import net.minecraft.server.v1_5_R1.EnchantmentManager; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.ItemStack; +import net.minecraft.server.v1_5_R1.Material; +import net.minecraft.server.v1_5_R1.MobEffectList; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; -import org.bukkit.craftbukkit.v1_4_R1.inventory.CraftItemStack; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.inventory.CraftItemStack; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -39,19 +39,19 @@ public class BlockBreaker implements Runnable { } isDigging = false; currentDamage = -1; - entity.world.g(entity.id, x, y, z, -1); + entity.world.f(entity.id, x, y, z, -1); } private double distanceSquared() { return Math.pow(entity.locX - x, 2) + Math.pow(entity.locY - y, 2) + Math.pow(entity.locZ - z, 2); } - private net.minecraft.server.v1_4_R1.ItemStack getCurrentItem() { + private net.minecraft.server.v1_5_R1.ItemStack getCurrentItem() { return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item()) : entity.getEquipment(0); } private float getStrength(Block block) { - float base = block.m(null, 0, 0, 0); + float base = block.l(null, 0, 0, 0); return base < 0.0F ? 0.0F : (!isDestroyable(block) ? 1.0F / base / 100.0F : strengthMod(block) / base / 30.0F); } @@ -101,7 +101,7 @@ public class BlockBreaker implements Runnable { } private void setBlockDamage(int modifiedDamage) { - entity.world.g(entity.id, x, y, z, modifiedDamage); + entity.world.f(entity.id, x, y, z, modifiedDamage); } private float strengthMod(Block block) { diff --git a/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java b/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java index 936f00be7..98c7df897 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java +++ b/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java @@ -4,11 +4,11 @@ import net.citizensnpcs.api.ai.NavigatorParameters; import net.citizensnpcs.api.ai.TargetType; import net.citizensnpcs.api.ai.event.CancelReason; import net.citizensnpcs.api.npc.NPC; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.Navigation; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.Navigation; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; public class MCNavigationStrategy extends AbstractPathStrategy { private final Navigation navigation; diff --git a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java index 1e7c4f8e8..d844dabe5 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java +++ b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java @@ -8,12 +8,12 @@ import net.citizensnpcs.api.ai.event.CancelReason; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.PlayerAnimation; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.Navigation; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.Navigation; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; import org.bukkit.entity.LivingEntity; public class MCTargetStrategy implements PathStrategy, EntityTarget { diff --git a/src/main/java/net/citizensnpcs/npc/entity/BatController.java b/src/main/java/net/citizensnpcs/npc/entity/BatController.java index 26d4c9300..de67751bb 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/BatController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/BatController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityBat; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityBat; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftBat; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftBat; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Bat; import org.bukkit.util.Vector; @@ -58,12 +58,12 @@ public class BatController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { + public void bo() { if (npc == null) super.bl(); else { @@ -73,7 +73,7 @@ public class BatController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); @@ -116,8 +116,8 @@ public class BatController extends MobEntityController { } @Override - public void j_() { - super.j_(); + public void l_() { + super.l_(); if (npc != null) npc.update(); } diff --git a/src/main/java/net/citizensnpcs/npc/entity/BlazeController.java b/src/main/java/net/citizensnpcs/npc/entity/BlazeController.java index 9412186f3..69ea68f7d 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/BlazeController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/BlazeController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityBlaze; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityBlaze; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftBlaze; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftBlaze; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Blaze; import org.bukkit.util.Vector; @@ -57,22 +57,22 @@ public class BlazeController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bn() { + public void bq() { if (npc != null) { NMS.updateAI(this); npc.update(); } else { - super.bn(); + super.bq(); } } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/CaveSpiderController.java b/src/main/java/net/citizensnpcs/npc/entity/CaveSpiderController.java index 39f1a413b..dc012f070 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CaveSpiderController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CaveSpiderController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityCaveSpider; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityCaveSpider; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftCaveSpider; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftCaveSpider; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.CaveSpider; import org.bukkit.util.Vector; @@ -58,21 +58,21 @@ public class CaveSpiderController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -80,7 +80,7 @@ public class CaveSpiderController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/ChickenController.java b/src/main/java/net/citizensnpcs/npc/entity/ChickenController.java index eb1e606ed..8d7f02a2d 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/ChickenController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/ChickenController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityChicken; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityChicken; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftChicken; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftChicken; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Chicken; import org.bukkit.util.Vector; @@ -58,19 +58,19 @@ public class ChickenController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/CowController.java b/src/main/java/net/citizensnpcs/npc/entity/CowController.java index 2d6b9b8d4..a60ed5808 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CowController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CowController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityCow; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityCow; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftCow; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftCow; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Cow; import org.bukkit.util.Vector; @@ -58,19 +58,19 @@ public class CowController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/CreeperController.java b/src/main/java/net/citizensnpcs/npc/entity/CreeperController.java index 4bbc4dc93..b9d18de41 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CreeperController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CreeperController.java @@ -7,14 +7,14 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityCreeper; -import net.minecraft.server.v1_4_R1.EntityLightning; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityCreeper; +import net.minecraft.server.v1_5_R1.EntityLightning; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftCreeper; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftCreeper; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Creeper; import org.bukkit.util.Vector; @@ -64,19 +64,19 @@ public class CreeperController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/EnderDragonController.java b/src/main/java/net/citizensnpcs/npc/entity/EnderDragonController.java index 9187cdc26..9086af333 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EnderDragonController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EnderDragonController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityEnderDragon; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityEnderDragon; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEnderDragon; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEnderDragon; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.EnderDragon; import org.bukkit.util.Vector; @@ -57,14 +57,14 @@ public class EnderDragonController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); } @Override @@ -83,7 +83,7 @@ public class EnderDragonController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/EndermanController.java b/src/main/java/net/citizensnpcs/npc/entity/EndermanController.java index 10775e047..04c30a4ce 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EndermanController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EndermanController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityEnderman; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityEnderman; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEnderman; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEnderman; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; import org.bukkit.entity.Enderman; import org.bukkit.util.Vector; @@ -57,21 +57,21 @@ public class EndermanController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -89,7 +89,7 @@ public class EndermanController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java index cbb763750..521c7a4ae 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java @@ -13,23 +13,23 @@ import net.citizensnpcs.npc.network.EmptyNetworkManager; import net.citizensnpcs.npc.network.EmptySocket; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.Connection; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.EnumGamemode; -import net.minecraft.server.v1_4_R1.MathHelper; -import net.minecraft.server.v1_4_R1.MinecraftServer; -import net.minecraft.server.v1_4_R1.Navigation; -import net.minecraft.server.v1_4_R1.NetworkManager; -import net.minecraft.server.v1_4_R1.Packet; -import net.minecraft.server.v1_4_R1.Packet35EntityHeadRotation; -import net.minecraft.server.v1_4_R1.Packet5EntityEquipment; -import net.minecraft.server.v1_4_R1.PlayerInteractManager; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.Connection; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.EnumGamemode; +import net.minecraft.server.v1_5_R1.MathHelper; +import net.minecraft.server.v1_5_R1.MinecraftServer; +import net.minecraft.server.v1_5_R1.Navigation; +import net.minecraft.server.v1_5_R1.NetworkManager; +import net.minecraft.server.v1_5_R1.Packet; +import net.minecraft.server.v1_5_R1.Packet35EntityHeadRotation; +import net.minecraft.server.v1_5_R1.Packet5EntityEquipment; +import net.minecraft.server.v1_5_R1.PlayerInteractManager; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPlayer; import org.bukkit.metadata.MetadataValue; import org.bukkit.plugin.Plugin; import org.bukkit.util.Vector; @@ -51,12 +51,12 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); @@ -102,7 +102,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { Socket socket = new EmptySocket(); NetworkManager conn = null; try { - conn = new EmptyNetworkManager(socket, "npc mgr", new Connection() { + conn = new EmptyNetworkManager(server.getLogger(), socket, "npc mgr", new Connection() { @Override public boolean a() { return false; @@ -126,8 +126,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { } @Override - public void j_() { - super.j_(); + public void l_() { + super.l_(); if (npc == null) return; boolean navigating = npc.getNavigator().isNavigating(); @@ -162,26 +162,26 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { private void moveOnCurrentHeading() { NMS.updateAI(this); // taken from EntityLiving update method - if (bF) { + if (bG) { /* boolean inLiquid = H() || J(); if (inLiquid) { motY += 0.04; } else //(handled elsewhere)*/ - if (onGround && bV == 0) { - bi(); - bV = 10; + if (onGround && bX == 0) { + bl(); + bX = 10; } } else - bV = 0; + bX = 0; - bC *= 0.98F; + bF *= 0.98F; bD *= 0.98F; bE *= 0.9F; - float prev = aN; - aN *= bB(); - e(bC, bD); // movement method - aN = prev; + float prev = aO; + aO *= bE(); + e(bF, bD); // movement method + aO = prev; NMS.setHeadYaw(this, yaw); } diff --git a/src/main/java/net/citizensnpcs/npc/entity/GhastController.java b/src/main/java/net/citizensnpcs/npc/entity/GhastController.java index 448ecdc83..a94138751 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/GhastController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/GhastController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityGhast; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityGhast; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftGhast; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftGhast; import org.bukkit.entity.Ghast; import org.bukkit.util.Vector; @@ -43,20 +43,20 @@ public class GhastController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bn() { + public void bq() { if (npc != null) npc.update(); else - super.bn(); + super.bq(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/GiantController.java b/src/main/java/net/citizensnpcs/npc/entity/GiantController.java index 65e4b8875..7e4fcad3f 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/GiantController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/GiantController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityGiantZombie; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityGiantZombie; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftGiant; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftGiant; import org.bukkit.entity.Giant; import org.bukkit.util.Vector; @@ -44,20 +44,20 @@ public class GiantController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/HumanController.java b/src/main/java/net/citizensnpcs/npc/entity/HumanController.java index fbb36dadf..0e5b87b6c 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/HumanController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/HumanController.java @@ -6,12 +6,12 @@ import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.util.Colorizer; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.util.NMS; -import net.minecraft.server.v1_4_R1.PlayerInteractManager; -import net.minecraft.server.v1_4_R1.WorldServer; +import net.minecraft.server.v1_5_R1.PlayerInteractManager; +import net.minecraft.server.v1_5_R1.WorldServer; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_5_R1.CraftWorld; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; diff --git a/src/main/java/net/citizensnpcs/npc/entity/IronGolemController.java b/src/main/java/net/citizensnpcs/npc/entity/IronGolemController.java index 85978b0bf..4969429d9 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/IronGolemController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/IronGolemController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityIronGolem; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityIronGolem; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftIronGolem; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftIronGolem; import org.bukkit.entity.IronGolem; import org.bukkit.util.Vector; @@ -43,19 +43,19 @@ public class IronGolemController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java b/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java index bf29b1091..897a50da0 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityMagmaCube; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityMagmaCube; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftMagmaCube; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftMagmaCube; import org.bukkit.entity.MagmaCube; import org.bukkit.util.Vector; @@ -45,21 +45,21 @@ public class MagmaCubeController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -67,7 +67,7 @@ public class MagmaCubeController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/MushroomCowController.java b/src/main/java/net/citizensnpcs/npc/entity/MushroomCowController.java index 5cf9e9031..4047f9499 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/MushroomCowController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/MushroomCowController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityMushroomCow; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityMushroomCow; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftMushroomCow; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftMushroomCow; import org.bukkit.entity.MushroomCow; import org.bukkit.util.Vector; @@ -45,19 +45,19 @@ public class MushroomCowController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/OcelotController.java b/src/main/java/net/citizensnpcs/npc/entity/OcelotController.java index 366c3e04a..45f85b74c 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/OcelotController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/OcelotController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityOcelot; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityOcelot; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftOcelot; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftOcelot; import org.bukkit.entity.Ocelot; import org.bukkit.util.Vector; @@ -44,19 +44,19 @@ public class OcelotController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/PigController.java b/src/main/java/net/citizensnpcs/npc/entity/PigController.java index 9311f59b0..b68d59be6 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/PigController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/PigController.java @@ -7,14 +7,14 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityLightning; -import net.minecraft.server.v1_4_R1.EntityPig; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityLightning; +import net.minecraft.server.v1_5_R1.EntityPig; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPig; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPig; import org.bukkit.entity.Pig; import org.bukkit.util.Vector; @@ -50,19 +50,19 @@ public class PigController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/PigZombieController.java b/src/main/java/net/citizensnpcs/npc/entity/PigZombieController.java index 507941686..687df080b 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/PigZombieController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/PigZombieController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityPigZombie; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityPigZombie; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPigZombie; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPigZombie; import org.bukkit.entity.PigZombie; import org.bukkit.util.Vector; @@ -45,21 +45,21 @@ public class PigZombieController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -67,7 +67,7 @@ public class PigZombieController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SheepController.java b/src/main/java/net/citizensnpcs/npc/entity/SheepController.java index dc04255b2..7ec9cce7a 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SheepController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SheepController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySheep; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySheep; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSheep; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSheep; import org.bukkit.entity.Sheep; import org.bukkit.util.Vector; @@ -44,19 +44,19 @@ public class SheepController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SilverfishController.java b/src/main/java/net/citizensnpcs/npc/entity/SilverfishController.java index 148340b2a..3e37c5de0 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SilverfishController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SilverfishController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySilverfish; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySilverfish; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSilverfish; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSilverfish; import org.bukkit.entity.Silverfish; import org.bukkit.util.Vector; @@ -44,21 +44,21 @@ public class SilverfishController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -66,7 +66,7 @@ public class SilverfishController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SkeletonController.java b/src/main/java/net/citizensnpcs/npc/entity/SkeletonController.java index 91732bae8..b16694d84 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SkeletonController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SkeletonController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySkeleton; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySkeleton; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSkeleton; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSkeleton; import org.bukkit.entity.Skeleton; import org.bukkit.util.Vector; @@ -44,19 +44,19 @@ public class SkeletonController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SlimeController.java b/src/main/java/net/citizensnpcs/npc/entity/SlimeController.java index 2639bed22..ba91991c5 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SlimeController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SlimeController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySlime; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySlime; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSlime; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSlime; import org.bukkit.entity.Slime; import org.bukkit.util.Vector; @@ -46,21 +46,21 @@ public class SlimeController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { npc.update(); NMS.updateAI(this); @@ -68,7 +68,7 @@ public class SlimeController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SnowmanController.java b/src/main/java/net/citizensnpcs/npc/entity/SnowmanController.java index 90e425cd7..7db4d9574 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SnowmanController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SnowmanController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySnowman; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySnowman; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSnowman; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSnowman; import org.bukkit.entity.Snowman; import org.bukkit.util.Vector; @@ -44,19 +44,19 @@ public class SnowmanController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SpiderController.java b/src/main/java/net/citizensnpcs/npc/entity/SpiderController.java index d508d36cc..829c3a48c 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SpiderController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SpiderController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySpider; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySpider; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSpider; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSpider; import org.bukkit.entity.Spider; import org.bukkit.util.Vector; @@ -44,21 +44,21 @@ public class SpiderController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void bn() { + public void bq() { if (npc == null) - super.bn(); + super.bq(); else { NMS.updateAI(this); npc.update(); @@ -66,7 +66,7 @@ public class SpiderController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/SquidController.java b/src/main/java/net/citizensnpcs/npc/entity/SquidController.java index 26008abaf..097e8d699 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/SquidController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/SquidController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntitySquid; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntitySquid; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftSquid; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftSquid; import org.bukkit.entity.Squid; import org.bukkit.util.Vector; @@ -44,20 +44,20 @@ public class SquidController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bn() { + public void bq() { if (npc != null) { npc.update(); } else - super.bn(); + super.bq(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/VillagerController.java b/src/main/java/net/citizensnpcs/npc/entity/VillagerController.java index 8804edaaa..e18707182 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/VillagerController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/VillagerController.java @@ -7,14 +7,15 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityHuman; -import net.minecraft.server.v1_4_R1.EntityVillager; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityAgeable; +import net.minecraft.server.v1_5_R1.EntityHuman; +import net.minecraft.server.v1_5_R1.EntityVillager; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftVillager; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftVillager; import org.bukkit.entity.Villager; import org.bukkit.util.Vector; @@ -34,8 +35,7 @@ public class VillagerController extends MobEntityController { public EntityVillagerNPC(World world) { this(world, null); } - - public EntityVillagerNPC(World world, NPC npc) { + public EntityVillagerNPC(World world, NPC npc) { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { @@ -45,26 +45,26 @@ public class VillagerController extends MobEntityController { } @Override - public boolean a(EntityHuman entityhuman) { + public boolean a_(EntityHuman entityhuman) { if (npc == null) - return super.a(entityhuman); + return super.a_(entityhuman); return false; // block trades } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/WitchController.java b/src/main/java/net/citizensnpcs/npc/entity/WitchController.java index d7f7b27a5..9b1b4eb3d 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/WitchController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/WitchController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityWitch; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityWitch; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftWitch; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftWitch; import org.bukkit.entity.Witch; import org.bukkit.util.Vector; @@ -43,19 +43,19 @@ public class WitchController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/WitherController.java b/src/main/java/net/citizensnpcs/npc/entity/WitherController.java index 26e6c6fe9..03755687e 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/WitherController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/WitherController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityWither; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityWither; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftWither; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftWither; import org.bukkit.entity.Wither; import org.bukkit.util.Vector; @@ -43,13 +43,13 @@ public class WitherController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @@ -61,7 +61,7 @@ public class WitherController extends MobEntityController { } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/WolfController.java b/src/main/java/net/citizensnpcs/npc/entity/WolfController.java index 9dd80588c..0e631f7cc 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/WolfController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/WolfController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityWolf; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityWolf; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftWolf; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftWolf; import org.bukkit.entity.Wolf; import org.bukkit.util.Vector; @@ -44,19 +44,19 @@ public class WolfController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/entity/ZombieController.java b/src/main/java/net/citizensnpcs/npc/entity/ZombieController.java index a747cd8ea..128a45252 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/ZombieController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/ZombieController.java @@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityZombie; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.EntityZombie; +import net.minecraft.server.v1_5_R1.World; import org.bukkit.Bukkit; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftZombie; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftZombie; import org.bukkit.entity.Zombie; import org.bukkit.util.Vector; @@ -43,19 +43,19 @@ public class ZombieController extends MobEntityController { } @Override - public float bB() { - return NMS.modifiedSpeed(super.bB(), npc); + public float bE() { + return NMS.modifiedSpeed(super.bE(), npc); } @Override - public void bl() { - super.bl(); + public void bo() { + super.bo(); if (npc != null) npc.update(); } @Override - public void collide(net.minecraft.server.v1_4_R1.Entity entity) { + public void collide(net.minecraft.server.v1_5_R1.Entity entity) { // this method is called by both the entities involved - cancelling // it will not stop the NPC from moving. super.collide(entity); diff --git a/src/main/java/net/citizensnpcs/npc/network/EmptyNetHandler.java b/src/main/java/net/citizensnpcs/npc/network/EmptyNetHandler.java index 5aa1043e9..96c611c9d 100644 --- a/src/main/java/net/citizensnpcs/npc/network/EmptyNetHandler.java +++ b/src/main/java/net/citizensnpcs/npc/network/EmptyNetHandler.java @@ -1,21 +1,21 @@ package net.citizensnpcs.npc.network; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.MinecraftServer; -import net.minecraft.server.v1_4_R1.NetworkManager; -import net.minecraft.server.v1_4_R1.Packet; -import net.minecraft.server.v1_4_R1.Packet102WindowClick; -import net.minecraft.server.v1_4_R1.Packet106Transaction; -import net.minecraft.server.v1_4_R1.Packet10Flying; -import net.minecraft.server.v1_4_R1.Packet130UpdateSign; -import net.minecraft.server.v1_4_R1.Packet14BlockDig; -import net.minecraft.server.v1_4_R1.Packet15Place; -import net.minecraft.server.v1_4_R1.Packet16BlockItemSwitch; -import net.minecraft.server.v1_4_R1.Packet255KickDisconnect; -import net.minecraft.server.v1_4_R1.Packet28EntityVelocity; -import net.minecraft.server.v1_4_R1.Packet3Chat; -import net.minecraft.server.v1_4_R1.Packet51MapChunk; -import net.minecraft.server.v1_4_R1.PlayerConnection; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.MinecraftServer; +import net.minecraft.server.v1_5_R1.NetworkManager; +import net.minecraft.server.v1_5_R1.Packet; +import net.minecraft.server.v1_5_R1.Packet102WindowClick; +import net.minecraft.server.v1_5_R1.Packet106Transaction; +import net.minecraft.server.v1_5_R1.Packet10Flying; +import net.minecraft.server.v1_5_R1.Packet130UpdateSign; +import net.minecraft.server.v1_5_R1.Packet14BlockDig; +import net.minecraft.server.v1_5_R1.Packet15Place; +import net.minecraft.server.v1_5_R1.Packet16BlockItemSwitch; +import net.minecraft.server.v1_5_R1.Packet255KickDisconnect; +import net.minecraft.server.v1_5_R1.Packet28EntityVelocity; +import net.minecraft.server.v1_5_R1.Packet3Chat; +import net.minecraft.server.v1_5_R1.Packet51MapChunk; +import net.minecraft.server.v1_5_R1.PlayerConnection; public class EmptyNetHandler extends PlayerConnection { public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) { diff --git a/src/main/java/net/citizensnpcs/npc/network/EmptyNetworkManager.java b/src/main/java/net/citizensnpcs/npc/network/EmptyNetworkManager.java index 0e1709bf5..b385c500f 100644 --- a/src/main/java/net/citizensnpcs/npc/network/EmptyNetworkManager.java +++ b/src/main/java/net/citizensnpcs/npc/network/EmptyNetworkManager.java @@ -5,14 +5,15 @@ import java.net.Socket; import java.security.PrivateKey; import net.citizensnpcs.util.NMS; -import net.minecraft.server.v1_4_R1.Connection; -import net.minecraft.server.v1_4_R1.NetworkManager; -import net.minecraft.server.v1_4_R1.Packet; +import net.minecraft.server.v1_5_R1.Connection; +import net.minecraft.server.v1_5_R1.IConsoleLogManager; +import net.minecraft.server.v1_5_R1.NetworkManager; +import net.minecraft.server.v1_5_R1.Packet; public class EmptyNetworkManager extends NetworkManager { - public EmptyNetworkManager(Socket socket, String string, Connection conn, PrivateKey key) throws IOException { - super(socket, string, conn, key); + public EmptyNetworkManager(IConsoleLogManager logManager, Socket socket, String string, Connection conn, PrivateKey key) throws IOException { + super(logManager, socket, string, conn, key); NMS.stopNetworkThreads(this); } diff --git a/src/main/java/net/citizensnpcs/trait/Controllable.java b/src/main/java/net/citizensnpcs/trait/Controllable.java index 10bd2064a..6978f92f4 100644 --- a/src/main/java/net/citizensnpcs/trait/Controllable.java +++ b/src/main/java/net/citizensnpcs/trait/Controllable.java @@ -12,11 +12,11 @@ import net.citizensnpcs.api.trait.Trait; import net.citizensnpcs.api.trait.trait.Owner; import net.citizensnpcs.api.util.DataKey; import net.citizensnpcs.util.Util; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityPlayer; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; diff --git a/src/main/java/net/citizensnpcs/trait/waypoint/EntityEnderCrystalMarker.java b/src/main/java/net/citizensnpcs/trait/waypoint/EntityEnderCrystalMarker.java index d259cee7e..c6e3fddce 100644 --- a/src/main/java/net/citizensnpcs/trait/waypoint/EntityEnderCrystalMarker.java +++ b/src/main/java/net/citizensnpcs/trait/waypoint/EntityEnderCrystalMarker.java @@ -1,8 +1,8 @@ package net.citizensnpcs.trait.waypoint; -import net.minecraft.server.v1_4_R1.DamageSource; -import net.minecraft.server.v1_4_R1.EntityEnderCrystal; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.DamageSource; +import net.minecraft.server.v1_5_R1.EntityEnderCrystal; +import net.minecraft.server.v1_5_R1.World; public class EntityEnderCrystalMarker extends EntityEnderCrystal { public EntityEnderCrystalMarker(World world) { @@ -15,11 +15,11 @@ public class EntityEnderCrystalMarker extends EntityEnderCrystal { } @Override - public void j_() { + public void l_() { } @Override - public boolean L() { + public boolean K() { return false; } } diff --git a/src/main/java/net/citizensnpcs/util/NMS.java b/src/main/java/net/citizensnpcs/util/NMS.java index c0b4ed9b7..316fb43fe 100644 --- a/src/main/java/net/citizensnpcs/util/NMS.java +++ b/src/main/java/net/citizensnpcs/util/NMS.java @@ -11,32 +11,32 @@ import java.util.WeakHashMap; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.util.Messaging; -import net.minecraft.server.v1_4_R1.ControllerJump; -import net.minecraft.server.v1_4_R1.ControllerLook; -import net.minecraft.server.v1_4_R1.DamageSource; -import net.minecraft.server.v1_4_R1.EnchantmentManager; -import net.minecraft.server.v1_4_R1.Entity; -import net.minecraft.server.v1_4_R1.EntityHuman; -import net.minecraft.server.v1_4_R1.EntityLiving; -import net.minecraft.server.v1_4_R1.EntityMonster; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.EntityTypes; -import net.minecraft.server.v1_4_R1.MathHelper; -import net.minecraft.server.v1_4_R1.MobEffectList; -import net.minecraft.server.v1_4_R1.Navigation; -import net.minecraft.server.v1_4_R1.NetworkManager; -import net.minecraft.server.v1_4_R1.Packet; -import net.minecraft.server.v1_4_R1.PathfinderGoalSelector; -import net.minecraft.server.v1_4_R1.World; +import net.minecraft.server.v1_5_R1.ControllerJump; +import net.minecraft.server.v1_5_R1.ControllerLook; +import net.minecraft.server.v1_5_R1.DamageSource; +import net.minecraft.server.v1_5_R1.EnchantmentManager; +import net.minecraft.server.v1_5_R1.Entity; +import net.minecraft.server.v1_5_R1.EntityHuman; +import net.minecraft.server.v1_5_R1.EntityLiving; +import net.minecraft.server.v1_5_R1.EntityMonster; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.EntityTypes; +import net.minecraft.server.v1_5_R1.MathHelper; +import net.minecraft.server.v1_5_R1.MobEffectList; +import net.minecraft.server.v1_5_R1.Navigation; +import net.minecraft.server.v1_5_R1.NetworkManager; +import net.minecraft.server.v1_5_R1.Packet; +import net.minecraft.server.v1_5_R1.PathfinderGoalSelector; +import net.minecraft.server.v1_5_R1.World; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.Location; -import org.bukkit.craftbukkit.v1_4_R1.CraftServer; -import org.bukkit.craftbukkit.v1_4_R1.CraftWorld; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftLivingEntity; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_5_R1.CraftServer; +import org.bukkit.craftbukkit.v1_5_R1.CraftWorld; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftLivingEntity; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPlayer; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -174,7 +174,7 @@ public class NMS { public static boolean inWater(LivingEntity entity) { EntityLiving mcEntity = getHandle(entity); - return mcEntity.I() || mcEntity.J(); + return mcEntity.H() || mcEntity.I(); } public static void loadPlugins() { @@ -182,7 +182,7 @@ public class NMS { } public static void look(ControllerLook controllerLook, EntityLiving handle, EntityLiving target) { - controllerLook.a(target, 10.0F, handle.bp()); + controllerLook.a(target, 10.0F, handle.bs()); } public static void look(LivingEntity bukkitEntity, float yaw, float pitch) { @@ -361,7 +361,7 @@ public class NMS { } public static void updateSenses(EntityLiving entity) { - entity.aA().a(); + entity.aD().a(); } static { @@ -381,8 +381,8 @@ public class NMS { MOVEMENT_SPEEDS.put(EntityType.PLAYER, 1F); MOVEMENT_SPEEDS.put(EntityType.VILLAGER, 0.3F); - LAND_SPEED_MODIFIER_FIELD = getField(EntityLiving.class, "bP"); - SPEED_FIELD = getField(EntityLiving.class, "bH"); + LAND_SPEED_MODIFIER_FIELD = getField(EntityLiving.class, "bQ"); + SPEED_FIELD = getField(EntityLiving.class, "bI"); NAVIGATION_WORLD_FIELD = getField(Navigation.class, "b"); PATHFINDING_RANGE = getField(Navigation.class, "e"); GOAL_FIELD = getField(PathfinderGoalSelector.class, "a"); diff --git a/src/main/java/net/citizensnpcs/util/PlayerAnimation.java b/src/main/java/net/citizensnpcs/util/PlayerAnimation.java index adf024efa..19d2d05ff 100644 --- a/src/main/java/net/citizensnpcs/util/PlayerAnimation.java +++ b/src/main/java/net/citizensnpcs/util/PlayerAnimation.java @@ -2,13 +2,13 @@ package net.citizensnpcs.util; import java.util.Arrays; -import net.minecraft.server.v1_4_R1.EntityPlayer; -import net.minecraft.server.v1_4_R1.Packet; -import net.minecraft.server.v1_4_R1.Packet17EntityLocationAction; -import net.minecraft.server.v1_4_R1.Packet18ArmAnimation; -import net.minecraft.server.v1_4_R1.Packet40EntityMetadata; +import net.minecraft.server.v1_5_R1.EntityPlayer; +import net.minecraft.server.v1_5_R1.Packet; +import net.minecraft.server.v1_5_R1.Packet17EntityLocationAction; +import net.minecraft.server.v1_5_R1.Packet18ArmAnimation; +import net.minecraft.server.v1_5_R1.Packet40EntityMetadata; -import org.bukkit.craftbukkit.v1_4_R1.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPlayer; import org.bukkit.entity.Player; public enum PlayerAnimation {