This commit is contained in:
fullwall 2013-07-09 11:32:55 +08:00
parent bfe891495a
commit e370fedd3c
48 changed files with 399 additions and 395 deletions

View File

@ -431,5 +431,5 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return false; return false;
} }
private static final String COMPATIBLE_MC_VERSION = "1.6.1"; private static final String COMPATIBLE_MC_VERSION = "1.6.2";
} }

View File

@ -22,11 +22,11 @@ import net.citizensnpcs.trait.CurrentLocation;
import net.citizensnpcs.util.Messages; import net.citizensnpcs.util.Messages;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;

View File

@ -5,12 +5,12 @@ import java.util.Map;
import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_6_R1.CraftWorld; import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;

View File

@ -10,7 +10,7 @@ import net.citizensnpcs.api.astar.pathfinder.VectorGoal;
import net.citizensnpcs.api.astar.pathfinder.VectorNode; import net.citizensnpcs.api.astar.pathfinder.VectorNode;
import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;

View File

@ -3,17 +3,17 @@ package net.citizensnpcs.npc.ai;
import net.citizensnpcs.api.ai.tree.BehaviorGoalAdapter; import net.citizensnpcs.api.ai.tree.BehaviorGoalAdapter;
import net.citizensnpcs.api.ai.tree.BehaviorStatus; import net.citizensnpcs.api.ai.tree.BehaviorStatus;
import net.citizensnpcs.util.PlayerAnimation; import net.citizensnpcs.util.PlayerAnimation;
import net.minecraft.server.v1_6_R1.Block; import net.minecraft.server.v1_6_R2.Block;
import net.minecraft.server.v1_6_R1.Enchantment; import net.minecraft.server.v1_6_R2.Enchantment;
import net.minecraft.server.v1_6_R1.EnchantmentManager; import net.minecraft.server.v1_6_R2.EnchantmentManager;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.ItemStack; import net.minecraft.server.v1_6_R2.ItemStack;
import net.minecraft.server.v1_6_R1.Material; import net.minecraft.server.v1_6_R2.Material;
import net.minecraft.server.v1_6_R1.MobEffectList; import net.minecraft.server.v1_6_R2.MobEffectList;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -39,7 +39,7 @@ public class BlockBreaker extends BehaviorGoalAdapter {
return Math.pow(entity.locX - x, 2) + Math.pow(entity.locY - y, 2) + Math.pow(entity.locZ - z, 2); return Math.pow(entity.locX - x, 2) + Math.pow(entity.locY - y, 2) + Math.pow(entity.locZ - z, 2);
} }
private net.minecraft.server.v1_6_R1.ItemStack getCurrentItem() { private net.minecraft.server.v1_6_R2.ItemStack getCurrentItem() {
return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item()) : entity.getEquipment(0); return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item()) : entity.getEquipment(0);
} }

View File

@ -5,11 +5,11 @@ import net.citizensnpcs.api.ai.TargetType;
import net.citizensnpcs.api.ai.event.CancelReason; import net.citizensnpcs.api.ai.event.CancelReason;
import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.Navigation; import net.minecraft.server.v1_6_R2.Navigation;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
public class MCNavigationStrategy extends AbstractPathStrategy { public class MCNavigationStrategy extends AbstractPathStrategy {
private final Navigation navigation; private final Navigation navigation;

View File

@ -12,16 +12,16 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.PlayerAnimation; import net.citizensnpcs.util.PlayerAnimation;
import net.citizensnpcs.util.nms.PlayerNavigation; import net.citizensnpcs.util.nms.PlayerNavigation;
import net.minecraft.server.v1_6_R1.AttributeInstance; import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.Navigation; import net.minecraft.server.v1_6_R2.Navigation;
import net.minecraft.server.v1_6_R1.PathEntity; import net.minecraft.server.v1_6_R2.PathEntity;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
public class MCTargetStrategy implements PathStrategy, EntityTarget { public class MCTargetStrategy implements PathStrategy, EntityTarget {
@ -175,14 +175,14 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
try { try {
if (navigation instanceof PlayerNavigation) { if (navigation instanceof PlayerNavigation) {
if (P_NAV_E != null) if (P_NAV_E != null)
range = (float) ((AttributeInstance) P_NAV_E.get(navigation)).e(); range = (float) ((AttributeInstance) P_NAV_E.get(navigation)).getValue();
if (P_NAV_J != null) if (P_NAV_J != null)
j = P_NAV_J.getBoolean(navigation); j = P_NAV_J.getBoolean(navigation);
if (P_NAV_M != null) if (P_NAV_M != null)
m = P_NAV_M.getBoolean(navigation); m = P_NAV_M.getBoolean(navigation);
} else { } else {
if (E_NAV_E != null) if (E_NAV_E != null)
range = (float) ((AttributeInstance) E_NAV_E.get(navigation)).e(); range = (float) ((AttributeInstance) E_NAV_E.get(navigation)).getValue();
if (E_NAV_J != null) if (E_NAV_J != null)
j = E_NAV_J.getBoolean(navigation); j = E_NAV_J.getBoolean(navigation);
if (E_NAV_M != null) if (E_NAV_M != null)

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityBat; import net.minecraft.server.v1_6_R2.EntityBat;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftBat; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftBat;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Bat; import org.bukkit.entity.Bat;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -58,9 +58,9 @@ public class BatController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
if (npc == null) if (npc == null)
super.be(); super.bh();
else { else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -68,7 +68,7 @@ public class BatController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityBlaze; import net.minecraft.server.v1_6_R2.EntityBlaze;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftBlaze; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Blaze; import org.bukkit.entity.Blaze;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -57,17 +57,17 @@ public class BlazeController extends MobEntityController {
} }
@Override @Override
public void bh() { public void bk() {
if (npc != null) { if (npc != null) {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
} else { } else {
super.bh(); super.bk();
} }
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityCaveSpider; import net.minecraft.server.v1_6_R2.EntityCaveSpider;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftCaveSpider; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.CaveSpider; import org.bukkit.entity.CaveSpider;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -58,16 +58,16 @@ public class CaveSpiderController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) if (npc == null)
super.bh(); super.bk();
else { else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -75,7 +75,7 @@ public class CaveSpiderController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityChicken; import net.minecraft.server.v1_6_R2.EntityChicken;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftChicken; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Chicken; import org.bukkit.entity.Chicken;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -57,14 +57,14 @@ public class ChickenController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityCow; import net.minecraft.server.v1_6_R2.EntityCow;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftCow; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCow;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Cow; import org.bukkit.entity.Cow;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -58,14 +58,14 @@ public class CowController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,14 +7,14 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityCreeper; import net.minecraft.server.v1_6_R2.EntityCreeper;
import net.minecraft.server.v1_6_R1.EntityLightning; import net.minecraft.server.v1_6_R2.EntityLightning;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftCreeper; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Creeper; import org.bukkit.entity.Creeper;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -65,14 +65,14 @@ public class CreeperController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityEnderDragon; import net.minecraft.server.v1_6_R2.EntityEnderDragon;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEnderDragon; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.EnderDragon; import org.bukkit.entity.EnderDragon;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -57,9 +57,9 @@ public class EnderDragonController extends MobEntityController {
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) { if (npc == null) {
super.bh(); super.bk();
} }
} }
@ -79,7 +79,7 @@ public class EnderDragonController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityEnderman; import net.minecraft.server.v1_6_R2.EntityEnderman;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEnderman; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.entity.Enderman; import org.bukkit.entity.Enderman;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -57,16 +57,16 @@ public class EndermanController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) if (npc == null)
super.bh(); super.bk();
else { else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -84,7 +84,7 @@ public class EndermanController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -19,27 +19,27 @@ import net.citizensnpcs.util.nms.PlayerControllerLook;
import net.citizensnpcs.util.nms.PlayerControllerMove; import net.citizensnpcs.util.nms.PlayerControllerMove;
import net.citizensnpcs.util.nms.PlayerEntitySenses; import net.citizensnpcs.util.nms.PlayerEntitySenses;
import net.citizensnpcs.util.nms.PlayerNavigation; import net.citizensnpcs.util.nms.PlayerNavigation;
import net.minecraft.server.v1_6_R1.AttributeInstance; import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R1.Connection; import net.minecraft.server.v1_6_R2.Connection;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.EnumGamemode; import net.minecraft.server.v1_6_R2.EnumGamemode;
import net.minecraft.server.v1_6_R1.GenericAttributes; import net.minecraft.server.v1_6_R2.GenericAttributes;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
import net.minecraft.server.v1_6_R1.MinecraftServer; import net.minecraft.server.v1_6_R2.MinecraftServer;
import net.minecraft.server.v1_6_R1.Navigation; import net.minecraft.server.v1_6_R2.Navigation;
import net.minecraft.server.v1_6_R1.NetworkManager; import net.minecraft.server.v1_6_R2.NetworkManager;
import net.minecraft.server.v1_6_R1.Packet; import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R1.Packet35EntityHeadRotation; import net.minecraft.server.v1_6_R2.Packet35EntityHeadRotation;
import net.minecraft.server.v1_6_R1.Packet5EntityEquipment; import net.minecraft.server.v1_6_R2.Packet5EntityEquipment;
import net.minecraft.server.v1_6_R1.PlayerInteractManager; import net.minecraft.server.v1_6_R2.PlayerInteractManager;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
import org.bukkit.metadata.MetadataValue; import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -68,7 +68,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);
@ -142,11 +142,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
} catch (IOException ex) { } catch (IOException ex) {
// swallow // swallow
} }
AttributeInstance range = this.aT().a(GenericAttributes.b); AttributeInstance range = this.getAttributeInstance(GenericAttributes.b);
if (range == null) { if (range == null) {
range = this.aT().b(GenericAttributes.b); range = this.aW().b(GenericAttributes.b);
} }
range.a(Setting.DEFAULT_PATHFINDING_RANGE.asDouble()); range.setValue(Setting.DEFAULT_PATHFINDING_RANGE.asDouble());
controllerJump = new PlayerControllerJump(this); controllerJump = new PlayerControllerJump(this);
controllerLook = new PlayerControllerLook(this); controllerLook = new PlayerControllerLook(this);
controllerMove = new PlayerControllerMove(this); controllerMove = new PlayerControllerMove(this);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityGhast; import net.minecraft.server.v1_6_R2.EntityGhast;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftGhast; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftGhast;
import org.bukkit.entity.Ghast; import org.bukkit.entity.Ghast;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,15 +43,15 @@ public class GhastController extends MobEntityController {
} }
@Override @Override
public void bh() { public void bk() {
if (npc != null) { if (npc != null) {
npc.update(); npc.update();
} else } else
super.bh(); super.bk();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityGiantZombie; import net.minecraft.server.v1_6_R2.EntityGiantZombie;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftGiant; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftGiant;
import org.bukkit.entity.Giant; import org.bukkit.entity.Giant;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,9 +43,9 @@ public class GiantController extends MobEntityController {
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) { if (npc == null) {
super.bh(); super.bk();
} else { } else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -53,7 +53,7 @@ public class GiantController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityHorse; import net.minecraft.server.v1_6_R2.EntityHorse;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftHorse; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHorse;
import org.bukkit.entity.Horse; import org.bukkit.entity.Horse;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -51,7 +51,7 @@ public class HorseController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -6,12 +6,12 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.util.Colorizer; import net.citizensnpcs.api.util.Colorizer;
import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.PlayerInteractManager; import net.minecraft.server.v1_6_R2.PlayerInteractManager;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.CraftWorld; import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityIronGolem; import net.minecraft.server.v1_6_R2.EntityIronGolem;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftIronGolem; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftIronGolem;
import org.bukkit.entity.IronGolem; import org.bukkit.entity.IronGolem;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,14 @@ public class IronGolemController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityMagmaCube; import net.minecraft.server.v1_6_R2.EntityMagmaCube;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftMagmaCube; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftMagmaCube;
import org.bukkit.entity.MagmaCube; import org.bukkit.entity.MagmaCube;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,16 +44,16 @@ public class MagmaCubeController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) if (npc == null)
super.bh(); super.bk();
else { else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -61,7 +61,7 @@ public class MagmaCubeController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityMushroomCow; import net.minecraft.server.v1_6_R2.EntityMushroomCow;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftMushroomCow; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftMushroomCow;
import org.bukkit.entity.MushroomCow; import org.bukkit.entity.MushroomCow;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,14 +44,14 @@ public class MushroomCowController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityOcelot; import net.minecraft.server.v1_6_R2.EntityOcelot;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftOcelot; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftOcelot;
import org.bukkit.entity.Ocelot; import org.bukkit.entity.Ocelot;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,14 +44,14 @@ public class OcelotController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,14 +7,14 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityLightning; import net.minecraft.server.v1_6_R2.EntityLightning;
import net.minecraft.server.v1_6_R1.EntityPig; import net.minecraft.server.v1_6_R2.EntityPig;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPig; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPig;
import org.bukkit.entity.Pig; import org.bukkit.entity.Pig;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -50,14 +50,14 @@ public class PigController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityPigZombie; import net.minecraft.server.v1_6_R2.EntityPigZombie;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPigZombie; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPigZombie;
import org.bukkit.entity.PigZombie; import org.bukkit.entity.PigZombie;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,16 +44,16 @@ public class PigZombieController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) { if (npc == null) {
super.bh(); super.bk();
} else { } else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -61,7 +61,7 @@ public class PigZombieController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySheep; import net.minecraft.server.v1_6_R2.EntitySheep;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSheep; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSheep;
import org.bukkit.entity.Sheep; import org.bukkit.entity.Sheep;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,14 +44,14 @@ public class SheepController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySilverfish; import net.minecraft.server.v1_6_R2.EntitySilverfish;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSilverfish; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSilverfish;
import org.bukkit.entity.Silverfish; import org.bukkit.entity.Silverfish;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -44,16 +44,16 @@ public class SilverfishController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) { if (npc == null) {
super.bh(); super.bk();
} else { } else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -61,7 +61,7 @@ public class SilverfishController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySkeleton; import net.minecraft.server.v1_6_R2.EntitySkeleton;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSkeleton; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSkeleton;
import org.bukkit.entity.Skeleton; import org.bukkit.entity.Skeleton;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,14 @@ public class SkeletonController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySlime; import net.minecraft.server.v1_6_R2.EntitySlime;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSlime; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSlime;
import org.bukkit.entity.Slime; import org.bukkit.entity.Slime;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -45,16 +45,16 @@ public class SlimeController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) { if (npc == null) {
super.bh(); super.bk();
} else { } else {
npc.update(); npc.update();
NMS.updateAI(this); NMS.updateAI(this);
@ -62,7 +62,7 @@ public class SlimeController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySnowman; import net.minecraft.server.v1_6_R2.EntitySnowman;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSnowman; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSnowman;
import org.bukkit.entity.Snowman; import org.bukkit.entity.Snowman;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,14 @@ public class SnowmanController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySpider; import net.minecraft.server.v1_6_R2.EntitySpider;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSpider; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSpider;
import org.bukkit.entity.Spider; import org.bukkit.entity.Spider;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,16 +43,16 @@ public class SpiderController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void bh() { public void bk() {
if (npc == null) if (npc == null)
super.bh(); super.bk();
else { else {
NMS.updateAI(this); NMS.updateAI(this);
npc.update(); npc.update();
@ -60,7 +60,7 @@ public class SpiderController extends MobEntityController {
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntitySquid; import net.minecraft.server.v1_6_R2.EntitySquid;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftSquid; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftSquid;
import org.bukkit.entity.Squid; import org.bukkit.entity.Squid;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,15 +43,15 @@ public class SquidController extends MobEntityController {
} }
@Override @Override
public void bh() { public void bk() {
if (npc != null) { if (npc != null) {
npc.update(); npc.update();
} else } else
super.bh(); super.bk();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,14 +7,14 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityHuman; import net.minecraft.server.v1_6_R2.EntityHuman;
import net.minecraft.server.v1_6_R1.EntityVillager; import net.minecraft.server.v1_6_R2.EntityVillager;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftVillager; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftVillager;
import org.bukkit.entity.Villager; import org.bukkit.entity.Villager;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -51,14 +51,14 @@ public class VillagerController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityWitch; import net.minecraft.server.v1_6_R2.EntityWitch;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftWitch; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWitch;
import org.bukkit.entity.Witch; import org.bukkit.entity.Witch;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,14 @@ public class WitchController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null)
npc.update(); npc.update();
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityWither; import net.minecraft.server.v1_6_R2.EntityWither;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftWither; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWither;
import org.bukkit.entity.Wither; import org.bukkit.entity.Wither;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,20 +43,22 @@ public class WitherController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null) {
npc.update(); npc.update();
}
} }
@Override @Override
public void c() { public void c() {
if (npc == null) if (npc == null) {
super.c(); super.c();
}
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityWolf; import net.minecraft.server.v1_6_R2.EntityWolf;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftWolf; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftWolf;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,15 @@ public class WolfController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null) {
npc.update(); npc.update();
}
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -7,13 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityZombie; import net.minecraft.server.v1_6_R2.EntityZombie;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftZombie; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftZombie;
import org.bukkit.entity.Zombie; import org.bukkit.entity.Zombie;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -43,14 +43,15 @@ public class ZombieController extends MobEntityController {
} }
@Override @Override
public void be() { public void bh() {
super.be(); super.bh();
if (npc != null) if (npc != null) {
npc.update(); npc.update();
}
} }
@Override @Override
public void collide(net.minecraft.server.v1_6_R1.Entity entity) { public void collide(net.minecraft.server.v1_6_R2.Entity entity) {
// this method is called by both the entities involved - cancelling // this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving. // it will not stop the NPC from moving.
super.collide(entity); super.collide(entity);

View File

@ -1,21 +1,21 @@
package net.citizensnpcs.npc.network; package net.citizensnpcs.npc.network;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.MinecraftServer; import net.minecraft.server.v1_6_R2.MinecraftServer;
import net.minecraft.server.v1_6_R1.NetworkManager; import net.minecraft.server.v1_6_R2.NetworkManager;
import net.minecraft.server.v1_6_R1.Packet; import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R1.Packet102WindowClick; import net.minecraft.server.v1_6_R2.Packet102WindowClick;
import net.minecraft.server.v1_6_R1.Packet106Transaction; import net.minecraft.server.v1_6_R2.Packet106Transaction;
import net.minecraft.server.v1_6_R1.Packet10Flying; import net.minecraft.server.v1_6_R2.Packet10Flying;
import net.minecraft.server.v1_6_R1.Packet130UpdateSign; import net.minecraft.server.v1_6_R2.Packet130UpdateSign;
import net.minecraft.server.v1_6_R1.Packet14BlockDig; import net.minecraft.server.v1_6_R2.Packet14BlockDig;
import net.minecraft.server.v1_6_R1.Packet15Place; import net.minecraft.server.v1_6_R2.Packet15Place;
import net.minecraft.server.v1_6_R1.Packet16BlockItemSwitch; import net.minecraft.server.v1_6_R2.Packet16BlockItemSwitch;
import net.minecraft.server.v1_6_R1.Packet255KickDisconnect; import net.minecraft.server.v1_6_R2.Packet255KickDisconnect;
import net.minecraft.server.v1_6_R1.Packet28EntityVelocity; import net.minecraft.server.v1_6_R2.Packet28EntityVelocity;
import net.minecraft.server.v1_6_R1.Packet3Chat; import net.minecraft.server.v1_6_R2.Packet3Chat;
import net.minecraft.server.v1_6_R1.Packet51MapChunk; import net.minecraft.server.v1_6_R2.Packet51MapChunk;
import net.minecraft.server.v1_6_R1.PlayerConnection; import net.minecraft.server.v1_6_R2.PlayerConnection;
public class EmptyNetHandler extends PlayerConnection { public class EmptyNetHandler extends PlayerConnection {
public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) { public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) {

View File

@ -5,10 +5,10 @@ import java.net.Socket;
import java.security.PrivateKey; import java.security.PrivateKey;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.Connection; import net.minecraft.server.v1_6_R2.Connection;
import net.minecraft.server.v1_6_R1.IConsoleLogManager; import net.minecraft.server.v1_6_R2.IConsoleLogManager;
import net.minecraft.server.v1_6_R1.NetworkManager; import net.minecraft.server.v1_6_R2.NetworkManager;
import net.minecraft.server.v1_6_R1.Packet; import net.minecraft.server.v1_6_R2.Packet;
public class EmptyNetworkManager extends NetworkManager { public class EmptyNetworkManager extends NetworkManager {
public EmptyNetworkManager(IConsoleLogManager logManager, Socket socket, String string, Connection conn, public EmptyNetworkManager(IConsoleLogManager logManager, Socket socket, String string, Connection conn,

View File

@ -14,12 +14,12 @@ import net.citizensnpcs.api.trait.trait.Owner;
import net.citizensnpcs.api.util.DataKey; import net.citizensnpcs.api.util.DataKey;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util; import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_6_R1.EntityEnderDragon; import net.minecraft.server.v1_6_R2.EntityEnderDragon;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,8 +1,8 @@
package net.citizensnpcs.trait.waypoint; package net.citizensnpcs.trait.waypoint;
import net.minecraft.server.v1_6_R1.DamageSource; import net.minecraft.server.v1_6_R2.DamageSource;
import net.minecraft.server.v1_6_R1.EntityEnderCrystal; import net.minecraft.server.v1_6_R2.EntityEnderCrystal;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
public class EntityEnderCrystalMarker extends EntityEnderCrystal { public class EntityEnderCrystalMarker extends EntityEnderCrystal {
public EntityEnderCrystalMarker(World world) { public EntityEnderCrystalMarker(World world) {

View File

@ -12,32 +12,32 @@ import java.util.WeakHashMap;
import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.util.Messaging; import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.npc.entity.EntityHumanNPC; import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_6_R1.AttributeInstance; import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R1.ControllerJump; import net.minecraft.server.v1_6_R2.ControllerJump;
import net.minecraft.server.v1_6_R1.DamageSource; import net.minecraft.server.v1_6_R2.DamageSource;
import net.minecraft.server.v1_6_R1.EnchantmentManager; import net.minecraft.server.v1_6_R2.EnchantmentManager;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityHuman; import net.minecraft.server.v1_6_R2.EntityHuman;
import net.minecraft.server.v1_6_R1.EntityInsentient; import net.minecraft.server.v1_6_R2.EntityInsentient;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.EntityTypes; import net.minecraft.server.v1_6_R2.EntityTypes;
import net.minecraft.server.v1_6_R1.GenericAttributes; import net.minecraft.server.v1_6_R2.GenericAttributes;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
import net.minecraft.server.v1_6_R1.MobEffectList; import net.minecraft.server.v1_6_R2.MobEffectList;
import net.minecraft.server.v1_6_R1.Navigation; import net.minecraft.server.v1_6_R2.Navigation;
import net.minecraft.server.v1_6_R1.NetworkManager; import net.minecraft.server.v1_6_R2.NetworkManager;
import net.minecraft.server.v1_6_R1.Packet; import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R1.PathfinderGoalSelector; import net.minecraft.server.v1_6_R2.PathfinderGoalSelector;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R1.CraftServer; import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
import org.bukkit.craftbukkit.v1_6_R1.CraftWorld; import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -63,8 +63,8 @@ public class NMS {
} }
public static void attack(EntityLiving handle, Entity target) { public static void attack(EntityLiving handle, Entity target) {
AttributeInstance attribute = handle.a(GenericAttributes.e); AttributeInstance attribute = handle.getAttributeInstance(GenericAttributes.e);
float damage = (float) (attribute == null ? 1D : attribute.e()); float damage = (float) (attribute == null ? 1D : attribute.getValue());
if (handle.hasEffect(MobEffectList.INCREASE_DAMAGE)) { if (handle.hasEffect(MobEffectList.INCREASE_DAMAGE)) {
damage += 3 << handle.getEffect(MobEffectList.INCREASE_DAMAGE).getAmplifier(); damage += 3 << handle.getEffect(MobEffectList.INCREASE_DAMAGE).getAmplifier();
@ -171,7 +171,7 @@ public class NMS {
public static void look(EntityLiving handle, Entity target) { public static void look(EntityLiving handle, Entity target) {
if (handle instanceof EntityInsentient) { if (handle instanceof EntityInsentient) {
((EntityInsentient) handle).getControllerLook().a(target, 10.0F, ((EntityInsentient) handle).bl()); ((EntityInsentient) handle).getControllerLook().a(target, 10.0F, ((EntityInsentient) handle).bp());
} else if (handle instanceof EntityHumanNPC) { } else if (handle instanceof EntityHumanNPC) {
((EntityHumanNPC) handle).setTargetLook(target, 10F, 40); ((EntityHumanNPC) handle).setTargetLook(target, 10F, 40);
} }
@ -284,7 +284,7 @@ public class NMS {
} }
} }
public static boolean shouldJump(net.minecraft.server.v1_6_R1.Entity entity) { public static boolean shouldJump(net.minecraft.server.v1_6_R2.Entity entity) {
if (JUMP_FIELD == null || !(entity instanceof EntityLiving)) if (JUMP_FIELD == null || !(entity instanceof EntityLiving))
return false; return false;
try { try {
@ -387,7 +387,7 @@ public class NMS {
Navigation navigation = handle.getNavigation(); Navigation navigation = handle.getNavigation();
try { try {
AttributeInstance inst = (AttributeInstance) PATHFINDING_RANGE.get(navigation); AttributeInstance inst = (AttributeInstance) PATHFINDING_RANGE.get(navigation);
inst.a(pathfindingRange); inst.setValue(pathfindingRange);
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {

View File

@ -2,13 +2,13 @@ package net.citizensnpcs.util;
import java.util.Arrays; import java.util.Arrays;
import net.minecraft.server.v1_6_R1.EntityPlayer; import net.minecraft.server.v1_6_R2.EntityPlayer;
import net.minecraft.server.v1_6_R1.Packet; import net.minecraft.server.v1_6_R2.Packet;
import net.minecraft.server.v1_6_R1.Packet17EntityLocationAction; import net.minecraft.server.v1_6_R2.Packet17EntityLocationAction;
import net.minecraft.server.v1_6_R1.Packet18ArmAnimation; import net.minecraft.server.v1_6_R2.Packet18ArmAnimation;
import net.minecraft.server.v1_6_R1.Packet40EntityMetadata; import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
import org.bukkit.craftbukkit.v1_6_R1.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public enum PlayerAnimation { public enum PlayerAnimation {

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.util.nms; package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC; import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
public class PlayerControllerLook { public class PlayerControllerLook {
private final EntityHumanNPC a; private final EntityHumanNPC a;

View File

@ -2,9 +2,9 @@ package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC; import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_6_R1.AttributeInstance; import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R1.GenericAttributes; import net.minecraft.server.v1_6_R2.GenericAttributes;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
public class PlayerControllerMove { public class PlayerControllerMove {
private final EntityHumanNPC a; private final EntityHumanNPC a;
@ -66,9 +66,9 @@ public class PlayerControllerMove {
this.a.yaw = this.a(this.a.yaw, f, 30.0F); this.a.yaw = this.a(this.a.yaw, f, 30.0F);
NMS.setHeadYaw(a, this.a.yaw); NMS.setHeadYaw(a, this.a.yaw);
AttributeInstance speed = this.a.a(GenericAttributes.d); AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.d);
speed.a(0.1D * this.e); speed.setValue(0.1D * this.e);
float movement = (float) (this.e * speed.e()) * 10; float movement = (float) (this.e * speed.getValue()) * 10;
this.a.i(movement); this.a.i(movement);
this.a.bf = movement; this.a.bf = movement;
if (d2 > 0.0D && d0 * d0 + d1 * d1 < 1.0D) { if (d2 > 0.0D && d0 * d0 + d1 * d1 < 1.0D) {

View File

@ -3,8 +3,8 @@ package net.citizensnpcs.util.nms;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityLiving; import net.minecraft.server.v1_6_R2.EntityLiving;
public class PlayerEntitySenses { public class PlayerEntitySenses {
EntityLiving entity; EntityLiving entity;

View File

@ -1,19 +1,19 @@
package net.citizensnpcs.util.nms; package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC; import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_6_R1.AttributeInstance; import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R1.Block; import net.minecraft.server.v1_6_R2.Block;
import net.minecraft.server.v1_6_R1.Entity; import net.minecraft.server.v1_6_R2.Entity;
import net.minecraft.server.v1_6_R1.EntityInsentient; import net.minecraft.server.v1_6_R2.EntityInsentient;
import net.minecraft.server.v1_6_R1.GenericAttributes; import net.minecraft.server.v1_6_R2.GenericAttributes;
import net.minecraft.server.v1_6_R1.IBlockAccess; import net.minecraft.server.v1_6_R2.IBlockAccess;
import net.minecraft.server.v1_6_R1.Material; import net.minecraft.server.v1_6_R2.Material;
import net.minecraft.server.v1_6_R1.MathHelper; import net.minecraft.server.v1_6_R2.MathHelper;
import net.minecraft.server.v1_6_R1.Navigation; import net.minecraft.server.v1_6_R2.Navigation;
import net.minecraft.server.v1_6_R1.PathEntity; import net.minecraft.server.v1_6_R2.PathEntity;
import net.minecraft.server.v1_6_R1.PathPoint; import net.minecraft.server.v1_6_R2.PathPoint;
import net.minecraft.server.v1_6_R1.Vec3D; import net.minecraft.server.v1_6_R2.Vec3D;
import net.minecraft.server.v1_6_R1.World; import net.minecraft.server.v1_6_R2.World;
public class PlayerNavigation extends Navigation { public class PlayerNavigation extends Navigation {
private final EntityHumanNPC a; private final EntityHumanNPC a;
@ -34,7 +34,7 @@ public class PlayerNavigation extends Navigation {
super(getDummyInsentient(entityinsentient), world); super(getDummyInsentient(entityinsentient), world);
this.a = entityinsentient; this.a = entityinsentient;
this.b = world; this.b = world;
this.e = entityinsentient.a(GenericAttributes.b); this.e = entityinsentient.getAttributeInstance(GenericAttributes.b);
} }
@Override @Override
@ -244,7 +244,7 @@ public class PlayerNavigation extends Navigation {
@Override @Override
public float d() { public float d() {
return (float) this.e.e(); return (float) this.e.getValue();
} }
@Override @Override
@ -384,7 +384,7 @@ public class PlayerNavigation extends Navigation {
public void setRange(float pathfindingRange) { public void setRange(float pathfindingRange) {
if (this.e != null) { if (this.e != null) {
this.e.a(pathfindingRange); this.e.setValue(pathfindingRange);
} }
} }