Update to MC 1.10

This commit is contained in:
fullwall 2016-06-09 18:25:27 +08:00
parent 257144f4c8
commit 844e0aa7ef
96 changed files with 1308 additions and 1125 deletions

View File

@ -6,13 +6,13 @@
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.18-SNAPSHOT</version>
<version>2.0.19-SNAPSHOT</version>
<name>Citizens</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.9.4-R0.1-SNAPSHOT</craftbukkit.version>
<citizensapi.version>2.0.18-SNAPSHOT</citizensapi.version>
<craftbukkit.version>1.10-R0.1-SNAPSHOT</craftbukkit.version>
<citizensapi.version>2.0.19-SNAPSHOT</citizensapi.version>
<vault.version>1.5.4</vault.version>
<powermock.version>1.4.12</powermock.version>
<build.number>Unknown</build.number>

View File

@ -459,5 +459,5 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return false;
}
private static final String COMPATIBLE_MC_REVISION = "1_9_R2";
private static final String COMPATIBLE_MC_REVISION = "1_10_R1";
}

View File

@ -6,6 +6,7 @@ import java.util.List;
import com.google.common.collect.Lists;
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.util.DataKey;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.api.util.Storage;
@ -49,7 +50,7 @@ public class Settings {
private void updateMessagingSettings() {
File file = null;
if (!Setting.DEBUG_FILE.asString().isEmpty()) {
file = new File(Setting.DEBUG_FILE.asString());
file = new File(CitizensAPI.getPlugin().getDataFolder(), Setting.DEBUG_FILE.asString());
}
Messaging.configure(file, Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
Setting.HIGHLIGHT_COLOUR.asString());

View File

@ -8,8 +8,8 @@ import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -47,7 +47,7 @@ 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_9_R2.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityTeleport;
public class CitizensNPC extends AbstractNPC {
private EntityController entityController;
@ -194,7 +194,7 @@ public class CitizensNPC extends AbstractNPC {
entityController.spawn(at, this);
net.minecraft.server.v1_9_R2.Entity mcEntity = ((CraftEntity) getEntity()).getHandle();
net.minecraft.server.v1_10_R1.Entity mcEntity = ((CraftEntity) getEntity()).getHandle();
boolean couldSpawn = !Util.isLoaded(at) ? false : mcEntity.world.addEntity(mcEntity, SpawnReason.CUSTOM);
// send skin packets, if applicable, before other NMS packets are sent

View File

@ -27,6 +27,7 @@ import net.citizensnpcs.npc.entity.MushroomCowController;
import net.citizensnpcs.npc.entity.OcelotController;
import net.citizensnpcs.npc.entity.PigController;
import net.citizensnpcs.npc.entity.PigZombieController;
import net.citizensnpcs.npc.entity.PolarBearController;
import net.citizensnpcs.npc.entity.RabbitController;
import net.citizensnpcs.npc.entity.SheepController;
import net.citizensnpcs.npc.entity.ShulkerController;
@ -140,6 +141,7 @@ public class EntityControllers {
TYPES.put(EntityType.PAINTING, PaintingController.class);
TYPES.put(EntityType.PIG, PigController.class);
TYPES.put(EntityType.PIG_ZOMBIE, PigZombieController.class);
TYPES.put(EntityType.POLAR_BEAR, PolarBearController.class);
TYPES.put(EntityType.PLAYER, HumanController.class);
TYPES.put(EntityType.RABBIT, RabbitController.class);
TYPES.put(EntityType.SHEEP, SheepController.class);

View File

@ -5,13 +5,13 @@ import java.util.Map;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.entity.Entity;
import com.google.common.collect.Maps;
import net.citizensnpcs.api.npc.NPC;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.World;
public abstract class MobEntityController extends AbstractEntityController {
private final Constructor<?> constructor;
@ -23,7 +23,7 @@ public abstract class MobEntityController extends AbstractEntityController {
@Override
protected Entity createEntity(Location at, NPC npc) {
net.minecraft.server.v1_9_R2.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
net.minecraft.server.v1_10_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
npc);
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
@ -36,9 +36,9 @@ public abstract class MobEntityController extends AbstractEntityController {
return entity.getBukkitEntity();
}
private net.minecraft.server.v1_9_R2.Entity createEntityFromClass(Object... args) {
private net.minecraft.server.v1_10_R1.Entity createEntityFromClass(Object... args) {
try {
return (net.minecraft.server.v1_9_R2.Entity) constructor.newInstance(args);
return (net.minecraft.server.v1_10_R1.Entity) constructor.newInstance(args);
} catch (Exception ex) {
ex.printStackTrace();
return null;

View File

@ -68,7 +68,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
}
vector = plan.getCurrentVector();
}
net.minecraft.server.v1_9_R2.Entity handle = NMS.getHandle(npc.getEntity());
net.minecraft.server.v1_10_R1.Entity handle = NMS.getHandle(npc.getEntity());
double dX = vector.getBlockX() - handle.locX;
double dZ = vector.getBlockZ() - handle.locZ;
double dY = vector.getY() - handle.locY;

View File

@ -1,8 +1,8 @@
package net.citizensnpcs.npc.ai;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import net.citizensnpcs.api.ai.tree.BehaviorStatus;
@ -10,17 +10,17 @@ import net.citizensnpcs.api.npc.BlockBreaker;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.PlayerAnimation;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.Blocks;
import net.minecraft.server.v1_9_R2.EnchantmentManager;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EnumItemSlot;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R2.Material;
import net.minecraft.server.v1_9_R2.MobEffects;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.Blocks;
import net.minecraft.server.v1_10_R1.EnchantmentManager;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.EnumItemSlot;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.Material;
import net.minecraft.server.v1_10_R1.MobEffects;
public class CitizensBlockBreaker extends BlockBreaker {
private final BlockBreakerConfiguration configuration;
@ -47,7 +47,7 @@ public class CitizensBlockBreaker extends BlockBreaker {
return Math.pow(entity.locX - x, 2) + Math.pow(entity.locY - y, 2) + Math.pow(entity.locZ - z, 2);
}
private net.minecraft.server.v1_9_R2.ItemStack getCurrentItem() {
private net.minecraft.server.v1_10_R1.ItemStack getCurrentItem() {
return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item())
: entity instanceof EntityLiving ? ((EntityLiving) entity).getEquipment(EnumItemSlot.MAINHAND) : null;
}

View File

@ -17,7 +17,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_9_R2.MathHelper;
import net.minecraft.server.v1_10_R1.MathHelper;
public class FlyingAStarNavigationStrategy extends AbstractPathStrategy {
private final NPC npc;

View File

@ -1,15 +1,15 @@
package net.citizensnpcs.npc.ai;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLivingEntity;
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.citizensnpcs.util.NMS;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.NavigationAbstract;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
public class MCNavigationStrategy extends AbstractPathStrategy {
private final EntityLiving handle;

View File

@ -1,7 +1,7 @@
package net.citizensnpcs.npc.ai;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.LivingEntity;
import net.citizensnpcs.api.ai.AttackStrategy;
@ -12,10 +12,10 @@ 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_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.NavigationAbstract;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
public class MCTargetStrategy implements PathStrategy, EntityTarget {
private final boolean aggro;

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBat;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBat;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Bat;
import org.bukkit.util.Vector;
@ -15,11 +15,11 @@ 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_9_R2.EntityBat;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityBat;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class BatController extends MobEntityController {
public BatController() {
@ -62,21 +62,21 @@ public class BatController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Blaze;
import org.bukkit.util.Vector;
@ -15,11 +15,11 @@ 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_9_R2.EntityBlaze;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityBlaze;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class BlazeController extends MobEntityController {
public BlazeController() {
@ -61,21 +61,21 @@ public class BlazeController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.CaveSpider;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityCaveSpider;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityCaveSpider;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class CaveSpiderController extends MobEntityController {
public CaveSpiderController() {
@ -70,21 +70,21 @@ public class CaveSpiderController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -197,9 +197,9 @@ public class CaveSpiderController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Chicken;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityChicken;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityChicken;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class ChickenController extends MobEntityController {
public ChickenController() {
@ -81,21 +81,21 @@ public class ChickenController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -206,9 +206,9 @@ public class ChickenController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCow;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCow;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Cow;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityCow;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityCow;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class CowController extends MobEntityController {
public CowController() {
@ -82,21 +82,21 @@ public class CowController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -207,9 +207,9 @@ public class CowController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Creeper;
import org.bukkit.util.Vector;
@ -15,17 +15,17 @@ 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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityCreeper;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EntityLightning;
import net.minecraft.server.v1_9_R2.EnumHand;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityCreeper;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntityLightning;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class CreeperController extends MobEntityController {
public CreeperController() {
@ -81,20 +81,20 @@ public class CreeperController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return (SoundEffect) (npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString()));
protected SoundEffect bW() {
return (SoundEffect) (npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString()));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -204,9 +204,9 @@ public class CreeperController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.EnderDragon;
import org.bukkit.util.Vector;
@ -15,11 +15,11 @@ 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_9_R2.EntityEnderDragon;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityEnderDragon;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class EnderDragonController extends MobEntityController {
public EnderDragonController() {
@ -61,21 +61,21 @@ public class EnderDragonController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Enderman;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityEnderman;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityEnderman;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class EndermanController extends MobEntityController {
public EndermanController() {
@ -70,21 +70,21 @@ public class EndermanController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -202,9 +202,9 @@ public class EndermanController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEndermite;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEndermite;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Endermite;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityEndermite;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityEndermite;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class EndermiteController extends MobEntityController {
public EndermiteController() {
@ -70,21 +70,21 @@ public class EndermiteController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -193,9 +193,9 @@ public class EndermiteController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -8,8 +8,8 @@ import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
@ -39,26 +39,27 @@ import net.citizensnpcs.util.nms.PlayerControllerJump;
import net.citizensnpcs.util.nms.PlayerControllerLook;
import net.citizensnpcs.util.nms.PlayerControllerMove;
import net.citizensnpcs.util.nms.PlayerNavigation;
import net.minecraft.server.v1_9_R2.AttributeInstance;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EnumItemSlot;
import net.minecraft.server.v1_9_R2.EnumProtocolDirection;
import net.minecraft.server.v1_9_R2.GenericAttributes;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_9_R2.MinecraftServer;
import net.minecraft.server.v1_9_R2.NavigationAbstract;
import net.minecraft.server.v1_9_R2.NetworkManager;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityHeadRotation;
import net.minecraft.server.v1_9_R2.PathType;
import net.minecraft.server.v1_9_R2.PlayerInteractManager;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_9_R2.WorldSettings.EnumGamemode;
import net.minecraft.server.v1_10_R1.AttributeInstance;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.EnumGamemode;
import net.minecraft.server.v1_10_R1.EnumItemSlot;
import net.minecraft.server.v1_10_R1.EnumProtocolDirection;
import net.minecraft.server.v1_10_R1.GenericAttributes;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.MinecraftServer;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
import net.minecraft.server.v1_10_R1.NetworkManager;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityHeadRotation;
import net.minecraft.server.v1_10_R1.PathType;
import net.minecraft.server.v1_10_R1.PlayerInteractManager;
import net.minecraft.server.v1_10_R1.WorldServer;
public class EntityHumanNPC extends EntityPlayer implements NPCHolder, SkinnableEntity {
private final Map<PathType, Float> bz = Maps.newEnumMap(PathType.class);
@ -103,7 +104,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -307,18 +308,18 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
private void moveOnCurrentHeading() {
NMS.updateAI(this);
if (bd) {
if (be) {
if (onGround && jumpTicks == 0) {
ch();
cl();
jumpTicks = 10;
}
} else {
jumpTicks = 0;
}
be *= 0.98F;
bf *= 0.98F;
bg *= 0.9F;
g(be, bf); // movement method
bg *= 0.98F;
bh *= 0.9F;
g(bf, bg); // movement method
NMS.setHeadYaw(this, yaw);
if (jumpTicks > 0) {
jumpTicks--;
@ -326,9 +327,9 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}
@ -345,7 +346,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
@Override
public void setSkinFlags(byte flags) {
// set skin flag byte
getDataWatcher().set(bq, flags);
getDataWatcher().set(EntityHuman.br, flags);
}
@Override

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGhast;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGhast;
import org.bukkit.entity.Ghast;
import org.bukkit.util.Vector;
@ -15,11 +15,11 @@ 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_9_R2.EntityGhast;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityGhast;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class GhastController extends MobEntityController {
public GhastController() {
@ -47,21 +47,21 @@ public class GhastController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -71,7 +71,7 @@ public class GhastController extends MobEntityController {
}
@Override
public boolean cp() {
public boolean ct() {
return npc != null;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGiant;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGiant;
import org.bukkit.entity.Giant;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityGiantZombie;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityGiantZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class GiantController extends MobEntityController {
public GiantController() {
@ -56,21 +56,21 @@ public class GiantController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -180,9 +180,9 @@ public class GiantController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGuardian;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGuardian;
import org.bukkit.entity.Guardian;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityGuardian;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityGuardian;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class GuardianController extends MobEntityController {
public GuardianController() {
@ -56,21 +56,21 @@ public class GuardianController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -182,9 +182,9 @@ public class GuardianController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -2,9 +2,9 @@ package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftHorse;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftHorse;
import org.bukkit.entity.Horse;
import org.bukkit.util.Vector;
@ -17,13 +17,13 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.HorseModifiers;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityHorse;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityHorse;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class HorseController extends MobEntityController {
public HorseController() {
@ -76,21 +76,21 @@ public class HorseController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -105,11 +105,11 @@ public class HorseController extends MobEntityController {
}
@Override
public boolean de() {
public boolean di() {
if (npc == null)
return super.de();
return super.di();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
return super.de() && !protectedDefault;
return super.di() && !protectedDefault;
}
@Override
@ -211,9 +211,9 @@ public class HorseController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -6,7 +6,7 @@ import java.util.regex.Pattern;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.Scoreboard;
@ -22,8 +22,8 @@ import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.skin.Skin;
import net.citizensnpcs.npc.skin.SkinnableEntity;
import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_9_R2.PlayerInteractManager;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_10_R1.PlayerInteractManager;
import net.minecraft.server.v1_10_R1.WorldServer;
public class HumanController extends AbstractEntityController {
public HumanController() {

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftIronGolem;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftIronGolem;
import org.bukkit.entity.IronGolem;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityIronGolem;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityIronGolem;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class IronGolemController extends MobEntityController {
public IronGolemController() {
@ -56,21 +56,21 @@ public class IronGolemController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -180,9 +180,9 @@ public class IronGolemController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMagmaCube;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMagmaCube;
import org.bukkit.entity.MagmaCube;
import org.bukkit.util.Vector;
@ -16,13 +16,13 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.citizensnpcs.util.nms.PlayerControllerMove;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityMagmaCube;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityMagmaCube;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class MagmaCubeController extends MobEntityController {
public MagmaCubeController() {
@ -59,21 +59,21 @@ public class MagmaCubeController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -183,9 +183,9 @@ public class MagmaCubeController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMushroomCow;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMushroomCow;
import org.bukkit.entity.MushroomCow;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityMushroomCow;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityMushroomCow;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class MushroomCowController extends MobEntityController {
@ -68,21 +68,21 @@ public class MushroomCowController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -191,9 +191,9 @@ public class MushroomCowController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftOcelot;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftOcelot;
import org.bukkit.entity.Ocelot;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityOcelot;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityOcelot;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class OcelotController extends MobEntityController {
public OcelotController() {
@ -67,21 +67,21 @@ public class OcelotController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -191,9 +191,9 @@ public class OcelotController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPig;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPig;
import org.bukkit.entity.Pig;
import org.bukkit.util.Vector;
@ -15,14 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityLightning;
import net.minecraft.server.v1_9_R2.EntityPig;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityLightning;
import net.minecraft.server.v1_10_R1.EntityPig;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class PigController extends MobEntityController {
public PigController() {
@ -68,21 +68,21 @@ public class PigController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -193,9 +193,9 @@ public class PigController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPigZombie;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPigZombie;
import org.bukkit.entity.PigZombie;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityPigZombie;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityPigZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class PigZombieController extends MobEntityController {
@ -57,21 +57,21 @@ public class PigZombieController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -181,9 +181,9 @@ public class PigZombieController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -0,0 +1,174 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPolarBear;
import org.bukkit.entity.PolarBear;
import org.bukkit.util.Vector;
import net.citizensnpcs.api.event.NPCEnderTeleportEvent;
import net.citizensnpcs.api.event.NPCPushEvent;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.npc.CitizensNPC;
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_10_R1.EntityPolarBear;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class PolarBearController extends MobEntityController {
public PolarBearController() {
super(EntityPolarBearNPC.class);
}
@Override
public PolarBear getBukkitEntity() {
return (PolarBear) super.getBukkitEntity();
}
public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {
private final CitizensNPC npc;
public EntityPolarBearNPC(World world) {
this(world, null);
}
public EntityPolarBearNPC(World world, NPC npc) {
super(world);
this.npc = (CitizensNPC) npc;
if (npc != null) {
NMS.clearGoals(goalSelector, targetSelector);
}
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
if (npc != null) {
Util.callCollisionEvent(npc, entity.getBukkitEntity());
}
}
@Override
public boolean d(NBTTagCompound save) {
return npc == null ? super.d(save) : false;
}
@Override
public void enderTeleportTo(double d0, double d1, double d2) {
if (npc == null)
super.enderTeleportTo(d0, d1, d2);
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
super.enderTeleportTo(d0, d1, d2);
}
}
@Override
public void g(double x, double y, double z) {
if (npc == null) {
super.g(x, y, z);
return;
}
if (NPCPushEvent.getHandlerList().getRegisteredListeners().length == 0) {
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true))
super.g(x, y, z);
return;
}
Vector vector = new Vector(x, y, z);
NPCPushEvent event = Util.callPushEvent(npc, vector);
if (!event.isCancelled()) {
vector = event.getCollisionVector();
super.g(vector.getX(), vector.getY(), vector.getZ());
}
// when another entity collides, this method is called to push the
// NPC so we prevent it from doing anything if the event is
// cancelled.
}
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
}
@Override
public CraftEntity getBukkitEntity() {
if (bukkitEntity == null && npc != null)
bukkitEntity = new PolarBearNPC(this);
return super.getBukkitEntity();
}
@Override
public NPC getNPC() {
return npc;
}
@Override
public boolean isLeashed() {
if (npc == null) {
return super.isLeashed();
}
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
unleash(true, false); // clearLeash with client update
}
return false; // shouldLeash
}
@Override
protected void L() {
if (npc == null) {
super.L();
}
}
@Override
public void m() {
super.m();
if (npc != null) {
NMS.updateAI(this);
npc.update();
}
}
}
public static class PolarBearNPC extends CraftPolarBear implements NPCHolder {
private final CitizensNPC npc;
public PolarBearNPC(EntityPolarBearNPC entity) {
super((CraftServer) Bukkit.getServer(), entity);
this.npc = entity.npc;
}
@Override
public NPC getNPC() {
return npc;
}
}
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftRabbit;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftRabbit;
import org.bukkit.entity.Rabbit;
import org.bukkit.util.Vector;
@ -15,14 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntityRabbit;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityRabbit;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class RabbitController extends MobEntityController {
public RabbitController() {
@ -68,21 +68,21 @@ public class RabbitController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -200,9 +200,9 @@ public class RabbitController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSheep;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSheep;
import org.bukkit.entity.Sheep;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySheep;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySheep;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SheepController extends MobEntityController {
public SheepController() {
@ -67,21 +67,21 @@ public class SheepController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -190,9 +190,9 @@ public class SheepController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftShulker;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftShulker;
import org.bukkit.entity.Shulker;
import org.bukkit.util.Vector;
@ -15,14 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityAIBodyControl;
import net.minecraft.server.v1_9_R2.EntityShulker;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityAIBodyControl;
import net.minecraft.server.v1_10_R1.EntityShulker;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class ShulkerController extends MobEntityController {
public ShulkerController() {
@ -57,21 +57,21 @@ public class ShulkerController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -189,9 +189,9 @@ public class ShulkerController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSilverfish;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSilverfish;
import org.bukkit.entity.Silverfish;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySilverfish;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySilverfish;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SilverfishController extends MobEntityController {
public SilverfishController() {
@ -56,21 +56,21 @@ public class SilverfishController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -179,9 +179,9 @@ public class SilverfishController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSkeleton;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSkeleton;
import org.bukkit.entity.Skeleton;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySkeleton;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySkeleton;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SkeletonController extends MobEntityController {
public SkeletonController() {
@ -56,21 +56,21 @@ public class SkeletonController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -180,9 +180,9 @@ public class SkeletonController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSlime;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSlime;
import org.bukkit.entity.Slime;
import org.bukkit.util.Vector;
@ -16,14 +16,14 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.citizensnpcs.util.nms.PlayerControllerMove;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EntitySlime;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntitySlime;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SlimeController extends MobEntityController {
public SlimeController() {
@ -60,21 +60,21 @@ public class SlimeController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -192,9 +192,9 @@ public class SlimeController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSnowman;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSnowman;
import org.bukkit.entity.Snowman;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySnowman;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySnowman;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SnowmanController extends MobEntityController {
public SnowmanController() {
@ -56,21 +56,21 @@ public class SnowmanController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -180,9 +180,9 @@ public class SnowmanController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSpider;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSpider;
import org.bukkit.entity.Spider;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySpider;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySpider;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SpiderController extends MobEntityController {
public SpiderController() {
@ -56,21 +56,21 @@ public class SpiderController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -179,9 +179,9 @@ public class SpiderController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSquid;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSquid;
import org.bukkit.entity.Squid;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntitySquid;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySquid;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class SquidController extends MobEntityController {
public SquidController() {
@ -56,21 +56,21 @@ public class SquidController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -172,9 +172,9 @@ public class SquidController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftVillager;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftVillager;
import org.bukkit.entity.Villager;
import org.bukkit.util.Vector;
@ -15,16 +15,16 @@ 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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EntityVillager;
import net.minecraft.server.v1_9_R2.EnumHand;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntityVillager;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class VillagerController extends MobEntityController {
public VillagerController() {
@ -76,21 +76,21 @@ public class VillagerController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -206,9 +206,9 @@ public class VillagerController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWitch;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWitch;
import org.bukkit.entity.Witch;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityWitch;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityWitch;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class WitchController extends MobEntityController {
public WitchController() {
@ -56,21 +56,21 @@ public class WitchController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -179,9 +179,9 @@ public class WitchController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWither;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither;
import org.bukkit.entity.Wither;
import org.bukkit.util.Vector;
@ -15,11 +15,11 @@ 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_9_R2.EntityWither;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityWither;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class WitherController extends MobEntityController {
public WitherController() {
@ -47,21 +47,21 @@ public class WitherController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWolf;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWolf;
import org.bukkit.entity.Wolf;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityWolf;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityWolf;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class WolfController extends MobEntityController {
public WolfController() {
@ -67,21 +67,21 @@ public class WolfController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -192,9 +192,9 @@ public class WolfController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftZombie;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftZombie;
import org.bukkit.entity.Zombie;
import org.bukkit.util.Vector;
@ -15,13 +15,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_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityZombie;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.MinecraftKey;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.SoundEffect;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
public class ZombieController extends MobEntityController {
public ZombieController() {
@ -56,21 +56,21 @@ public class ZombieController extends MobEntityController {
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
}
@Override
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -180,9 +180,9 @@ public class ZombieController extends MobEntityController {
}
@Override
public boolean n_() {
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
return super.n_();
return super.m_();
} else {
return false;
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftAreaEffectCloud;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftAreaEffectCloud;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityAreaEffectCloud;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityAreaEffectCloud;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class AreaEffectCloudController extends MobEntityController {
public AreaEffectCloudController() {
@ -54,7 +54,7 @@ public class AreaEffectCloudController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArmorStand;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArmorStand;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerInteractEntityEvent;
@ -16,14 +16,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_9_R2.EntityArmorStand;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EnumHand;
import net.minecraft.server.v1_9_R2.EnumInteractionResult;
import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.Vec3D;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityArmorStand;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.EnumInteractionResult;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.Vec3D;
import net.minecraft.server.v1_10_R1.World;
public class ArmorStandController extends MobEntityController {
public ArmorStandController() {
@ -73,7 +73,7 @@ public class ArmorStandController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBoat;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBoat;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Boat;
import org.bukkit.util.Vector;
@ -14,9 +14,9 @@ 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_9_R2.EntityBoat;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityBoat;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class BoatController extends MobEntityController {
public BoatController() {
@ -55,7 +55,7 @@ public class BoatController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftDragonFireball;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftDragonFireball;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.DragonFireball;
import org.bukkit.util.Vector;
@ -14,9 +14,9 @@ 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_9_R2.EntityDragonFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityDragonFireball;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class DragonFireballController extends MobEntityController {
public DragonFireballController() {
@ -55,7 +55,7 @@ public class DragonFireballController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,17 +6,17 @@ import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityEgg;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_10_R1.EntityEgg;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import net.minecraft.server.v1_10_R1.WorldServer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEgg;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEgg;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Egg;
import org.bukkit.entity.Entity;
import org.bukkit.util.Vector;
@ -75,7 +75,7 @@ public class EggController extends AbstractEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityEnderCrystal;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityEnderCrystal;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderCrystal;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderCrystal;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.EnderCrystal;
import org.bukkit.util.Vector;
@ -59,7 +59,7 @@ public class EnderCrystalController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderPearl;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderPearl;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.EnderPearl;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityEnderPearl;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityEnderPearl;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class EnderPearlController extends MobEntityController {
public EnderPearlController() {
@ -54,7 +54,7 @@ public class EnderPearlController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityEnderSignal;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityEnderSignal;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderSignal;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderSignal;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.EnderSignal;
import org.bukkit.util.Vector;
@ -59,7 +59,7 @@ public class EnderSignalController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityExperienceOrb;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityExperienceOrb;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftExperienceOrb;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftExperienceOrb;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.util.Vector;
@ -40,7 +40,7 @@ public class ExperienceOrbController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -3,11 +3,11 @@ package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFallingSand;
import org.bukkit.craftbukkit.v1_9_R2.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFallingSand;
import org.bukkit.craftbukkit.v1_10_R1.util.CraftMagicNumbers;
import org.bukkit.entity.Entity;
import org.bukkit.entity.FallingBlock;
import org.bukkit.util.Vector;
@ -19,13 +19,13 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.Block;
import net.minecraft.server.v1_9_R2.Blocks;
import net.minecraft.server.v1_9_R2.EntityFallingBlock;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_10_R1.Block;
import net.minecraft.server.v1_10_R1.Blocks;
import net.minecraft.server.v1_10_R1.EntityFallingBlock;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import net.minecraft.server.v1_10_R1.WorldServer;
public class FallingBlockController extends AbstractEntityController {
public FallingBlockController() {
@ -69,7 +69,7 @@ public class FallingBlockController extends AbstractEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityFireworks;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityFireworks;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFirework;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFirework;
import org.bukkit.entity.Firework;
import org.bukkit.util.Vector;
@ -45,7 +45,7 @@ public class FireworkController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFish;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFish;
import org.bukkit.entity.FishHook;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityFishingHook;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityFishingHook;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class FishingHookController extends MobEntityController {
public FishingHookController() {
@ -40,7 +40,7 @@ public class FishingHookController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,21 +6,21 @@ import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EntityItem;
import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntityItem;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import net.minecraft.server.v1_10_R1.WorldServer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftItem;
import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftItem;
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Item;
import org.bukkit.util.Vector;
@ -62,7 +62,7 @@ public class ItemController extends AbstractEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -3,9 +3,9 @@ package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftItemFrame;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftItemFrame;
import org.bukkit.entity.Entity;
import org.bukkit.entity.ItemFrame;
import org.bukkit.util.Vector;
@ -16,11 +16,11 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityItemFrame;
import net.minecraft.server.v1_9_R2.EnumDirection;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityItemFrame;
import net.minecraft.server.v1_10_R1.EnumDirection;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class ItemFrameController extends MobEntityController {
public ItemFrameController() {
@ -54,7 +54,7 @@ public class ItemFrameController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLargeFireball;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLargeFireball;
import org.bukkit.entity.LargeFireball;
import org.bukkit.util.Vector;
@ -14,9 +14,9 @@ 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_9_R2.EntityLargeFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityLargeFireball;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class LargeFireballController extends MobEntityController {
public LargeFireballController() {
@ -41,7 +41,7 @@ public class LargeFireballController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityLeash;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityLeash;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLeash;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLeash;
import org.bukkit.entity.LeashHitch;
import org.bukkit.util.Vector;
@ -40,7 +40,7 @@ public class LeashController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartChest;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartChest;
import org.bukkit.entity.Minecart;
import org.bukkit.util.Vector;
@ -14,10 +14,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartChest;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartChest;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartChestController extends MobEntityController {
public MinecartChestController() {
@ -42,7 +42,7 @@ public class MinecartChestController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartCommand;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartCommand;
import org.bukkit.entity.Minecart;
import org.bukkit.util.Vector;
@ -14,10 +14,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartCommandBlock;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartCommandBlock;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartCommandController extends MobEntityController {
public MinecartCommandController() {
@ -42,7 +42,7 @@ public class MinecartCommandController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartFurnace;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartFurnace;
import org.bukkit.entity.Minecart;
import org.bukkit.util.Vector;
@ -14,10 +14,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartFurnace;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartFurnace;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartFurnaceController extends MobEntityController {
public MinecartFurnaceController() {
@ -42,7 +42,7 @@ public class MinecartFurnaceController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -10,10 +10,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartHopper;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartHopper;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartHopperController extends MobEntityController {
public MinecartHopperController() {
@ -38,7 +38,7 @@ public class MinecartHopperController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartRideable;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartRideable;
import org.bukkit.entity.Minecart;
import org.bukkit.util.Vector;
@ -14,10 +14,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartRideable;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartRideable;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartRideableController extends MobEntityController {
public MinecartRideableController() {
@ -42,7 +42,7 @@ public class MinecartRideableController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -10,10 +10,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartMobSpawner;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartMobSpawner;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartSpawnerController extends MobEntityController {
public MinecartSpawnerController() {
@ -38,7 +38,7 @@ public class MinecartSpawnerController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -10,10 +10,10 @@ 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_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityMinecartTNT;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityMinecartTNT;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class MinecartTNTController extends MobEntityController {
public MinecartTNTController() {
@ -38,7 +38,7 @@ public class MinecartTNTController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityPainting;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityPainting;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPainting;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPainting;
import org.bukkit.entity.Painting;
import org.bukkit.util.Vector;
@ -45,7 +45,7 @@ public class PaintingController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftShulkerBullet;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftShulkerBullet;
import org.bukkit.entity.Arrow;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityShulkerBullet;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityShulkerBullet;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class ShulkerBulletController extends MobEntityController {
public ShulkerBulletController() {
@ -40,7 +40,7 @@ public class ShulkerBulletController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSmallFireball;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSmallFireball;
import org.bukkit.entity.SmallFireball;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntitySmallFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntitySmallFireball;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class SmallFireballController extends MobEntityController {
public SmallFireballController() {
@ -40,7 +40,7 @@ public class SmallFireballController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntitySnowball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntitySnowball;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSnowball;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSnowball;
import org.bukkit.entity.Snowball;
import org.bukkit.util.Vector;
@ -59,7 +59,7 @@ public class SnowballController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Arrow;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntitySpectralArrow;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntitySpectralArrow;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class SpectralArrowController extends MobEntityController {
public SpectralArrowController() {
@ -40,7 +40,7 @@ public class SpectralArrowController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityTNTPrimed;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityTNTPrimed;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftTNTPrimed;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftTNTPrimed;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.util.Vector;
@ -45,7 +45,7 @@ public class TNTPrimedController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftThrownExpBottle;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftThrownExpBottle;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityThrownExpBottle;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityThrownExpBottle;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class ThrownExpBottleController extends MobEntityController {
public ThrownExpBottleController() {
@ -40,7 +40,7 @@ public class ThrownExpBottleController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLingeringPotion;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLingeringPotion;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.util.Vector;
@ -13,10 +13,10 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityPotion;
import net.minecraft.server.v1_9_R2.Items;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityPotion;
import net.minecraft.server.v1_10_R1.Items;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class ThrownPotionController extends MobEntityController {
public ThrownPotionController() {
@ -41,7 +41,7 @@ public class ThrownPotionController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity.nonliving;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.entity.Arrow;
import org.bukkit.util.Vector;
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityTippedArrow;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityTippedArrow;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
public class TippedArrowController extends MobEntityController {
public TippedArrowController() {
@ -40,7 +40,7 @@ public class TippedArrowController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.MobEntityController;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityWitherSkull;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.EntityWitherSkull;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.World;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWitherSkull;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWitherSkull;
import org.bukkit.entity.WitherSkull;
import org.bukkit.util.Vector;
@ -45,7 +45,7 @@ public class WitherSkullController extends MobEntityController {
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);

View File

@ -1,10 +1,10 @@
package net.citizensnpcs.npc.network;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.MinecraftServer;
import net.minecraft.server.v1_9_R2.NetworkManager;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PlayerConnection;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.MinecraftServer;
import net.minecraft.server.v1_10_R1.NetworkManager;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PlayerConnection;
public class EmptyNetHandler extends PlayerConnection {
public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) {

View File

@ -3,8 +3,8 @@ package net.citizensnpcs.npc.network;
import java.io.IOException;
import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_9_R2.EnumProtocolDirection;
import net.minecraft.server.v1_9_R2.NetworkManager;
import net.minecraft.server.v1_10_R1.EnumProtocolDirection;
import net.minecraft.server.v1_10_R1.NetworkManager;
public class EmptyNetworkManager extends NetworkManager {
public EmptyNetworkManager(EnumProtocolDirection flag) throws IOException {

View File

@ -3,7 +3,7 @@ package net.citizensnpcs.trait;
import java.lang.reflect.Constructor;
import java.util.Map;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
@ -27,9 +27,9 @@ import net.citizensnpcs.api.trait.trait.Owner;
import net.citizensnpcs.api.util.DataKey;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R2.EntityEnderDragon;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_10_R1.EntityEnderDragon;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityPlayer;
//TODO: reduce reliance on CitizensNPC
@TraitName("controllable")
@ -81,7 +81,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
NMS.mount(npc.getEntity(), player);
}
private net.minecraft.server.v1_9_R2.Entity getHandle() {
private net.minecraft.server.v1_10_R1.Entity getHandle() {
return NMS.getHandle(npc.getEntity());
}
@ -188,7 +188,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
return enabled;
}
private void setMountedYaw(net.minecraft.server.v1_9_R2.Entity handle) {
private void setMountedYaw(net.minecraft.server.v1_10_R1.Entity handle) {
if (handle instanceof EntityEnderDragon || !Setting.USE_BOAT_CONTROLS.asBoolean())
return; // EnderDragon handles this separately
double tX = handle.locX + handle.motX;
@ -214,12 +214,12 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
return enabled;
}
private double updateHorizontalSpeed(net.minecraft.server.v1_9_R2.Entity handle,
net.minecraft.server.v1_9_R2.Entity passenger, double speed, float speedMod) {
private double updateHorizontalSpeed(net.minecraft.server.v1_10_R1.Entity handle,
net.minecraft.server.v1_10_R1.Entity passenger, double speed, float speedMod) {
double oldSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
double angle = Math.toRadians(passenger.yaw - ((EntityLiving) passenger).be * 45.0F);
handle.motX += speedMod * -Math.sin(angle) * ((EntityLiving) passenger).bf * 0.05;
handle.motZ += speedMod * Math.cos(angle) * ((EntityLiving) passenger).bf * 0.05;
double angle = Math.toRadians(passenger.yaw - ((EntityLiving) passenger).bf * 45.0F);
handle.motX += speedMod * -Math.sin(angle) * ((EntityLiving) passenger).bg * 0.05;
handle.motZ += speedMod * Math.cos(angle) * ((EntityLiving) passenger).bg * 0.05;
double newSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
if (newSpeed > oldSpeed && speed < 0.35D) {
@ -248,8 +248,8 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
@Override
public void run(Player rider) {
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
net.minecraft.server.v1_9_R2.Entity passenger = ((CraftPlayer) rider).getHandle();
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
net.minecraft.server.v1_10_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
boolean onGround = handle.onGround;
float speedMod = npc.getNavigator().getDefaultParameters()
.modifiedSpeed((onGround ? GROUND_SPEED : AIR_SPEED));
@ -300,7 +300,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
}
Vector dir = rider.getEyeLocation().getDirection();
dir.multiply(npc.getNavigator().getDefaultParameters().speedModifier());
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
handle.motX = dir.getX();
handle.motY = dir.getY();
handle.motZ = dir.getZ();
@ -343,8 +343,8 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
getHandle().motY = 0.001;
return;
}
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
net.minecraft.server.v1_9_R2.Entity passenger = ((CraftPlayer) rider).getHandle();
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
net.minecraft.server.v1_10_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
speed = updateHorizontalSpeed(handle, passenger, speed, 1F);
boolean shouldJump = NMS.shouldJump(passenger);

View File

@ -1,6 +1,6 @@
package net.citizensnpcs.trait;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftRabbit;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftRabbit;
import org.bukkit.entity.Rabbit;
import net.citizensnpcs.api.persistence.Persist;

View File

@ -1,12 +1,12 @@
package net.citizensnpcs.trait;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWither;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither;
import org.bukkit.entity.Wither;
import net.citizensnpcs.api.persistence.Persist;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import net.minecraft.server.v1_9_R2.EntityWither;
import net.minecraft.server.v1_10_R1.EntityWither;
@TraitName("withertrait")
public class WitherTrait extends Trait {

View File

@ -1,8 +1,8 @@
package net.citizensnpcs.trait.waypoint;
import net.minecraft.server.v1_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityEnderSignal;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.EntityEnderSignal;
import net.minecraft.server.v1_10_R1.World;
public class EntityEnderSignalMarker extends EntityEnderSignal {
public EntityEnderSignalMarker(World world) {

View File

@ -21,12 +21,12 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.CraftSound;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R2.event.CraftEventFactory;
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
import org.bukkit.craftbukkit.v1_10_R1.CraftSound;
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.FishHook;
import org.bukkit.entity.Horse;
@ -56,38 +56,39 @@ import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.citizensnpcs.npc.network.EmptyChannel;
import net.citizensnpcs.npc.skin.SkinnableEntity;
import net.citizensnpcs.util.nms.PlayerlistTrackerEntry;
import net.minecraft.server.v1_9_R2.AttributeInstance;
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
import net.minecraft.server.v1_9_R2.Block;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.ControllerJump;
import net.minecraft.server.v1_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.DataWatcherObject;
import net.minecraft.server.v1_9_R2.EnchantmentManager;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityFishingHook;
import net.minecraft.server.v1_9_R2.EntityHorse;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.EntityInsentient;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntityMinecartAbstract;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EntityRabbit;
import net.minecraft.server.v1_9_R2.EntityTameableAnimal;
import net.minecraft.server.v1_9_R2.EntityTracker;
import net.minecraft.server.v1_9_R2.EntityTrackerEntry;
import net.minecraft.server.v1_9_R2.EntityTypes;
import net.minecraft.server.v1_9_R2.GenericAttributes;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_9_R2.MobEffects;
import net.minecraft.server.v1_9_R2.NavigationAbstract;
import net.minecraft.server.v1_9_R2.NetworkManager;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R2.PathfinderGoalSelector;
import net.minecraft.server.v1_9_R2.Vec3D;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_9_R2.WorldServer;
import net.minecraft.server.v1_10_R1.AttributeInstance;
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
import net.minecraft.server.v1_10_R1.Block;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.ControllerJump;
import net.minecraft.server.v1_10_R1.DamageSource;
import net.minecraft.server.v1_10_R1.DataWatcherObject;
import net.minecraft.server.v1_10_R1.EnchantmentManager;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityFishingHook;
import net.minecraft.server.v1_10_R1.EntityHorse;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntityInsentient;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityMinecartAbstract;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.EntityPolarBear;
import net.minecraft.server.v1_10_R1.EntityRabbit;
import net.minecraft.server.v1_10_R1.EntityTameableAnimal;
import net.minecraft.server.v1_10_R1.EntityTracker;
import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
import net.minecraft.server.v1_10_R1.EntityTypes;
import net.minecraft.server.v1_10_R1.GenericAttributes;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.MobEffects;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
import net.minecraft.server.v1_10_R1.NetworkManager;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_10_R1.PathfinderGoalSelector;
import net.minecraft.server.v1_10_R1.Vec3D;
import net.minecraft.server.v1_10_R1.World;
import net.minecraft.server.v1_10_R1.WorldServer;
@SuppressWarnings("unchecked")
public class NMS {
@ -207,10 +208,11 @@ public class NMS {
}
public static void flyingMoveLogic(EntityLiving entity, float f, float f1) {
if (entity.cp() || entity.by()) {
if (entity.isInWater()) {
if ((entity.ct()) || (entity.bA())) {
if ((entity.isInWater())
&& ((!(entity instanceof EntityHuman)) || (!((EntityHuman) entity).abilities.isFlying))) {
double d1 = entity.locY;
float f4 = 0.8F;
float f4 = entity instanceof EntityPolarBear ? 0.98F : 0.8F;
float f3 = 0.02F;
float f2 = EnchantmentManager.d(entity);
if (f2 > 3.0F) {
@ -221,31 +223,36 @@ public class NMS {
}
if (f2 > 0.0F) {
f4 += (0.54600006F - f4) * f2 / 3.0F;
f3 += (entity.cl() - f3) * f2 / 3.0F;
f3 += (entity.cp() - f3) * f2 / 3.0F;
}
entity.a(f, f1, f3);
entity.move(entity.motX, entity.motY, entity.motZ);
entity.motX *= f4;
entity.motY *= 0.800000011920929D;
entity.motZ *= f4;
entity.motY -= 0.02D;
if (!entity.isNoGravity()) {
entity.motY -= 0.02D;
}
if ((entity.positionChanged)
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
entity.motY = 0.30000001192092896D;
}
} else if (entity.an()) {
} else if ((entity.ao())
&& ((!(entity instanceof EntityHuman)) || (!((EntityHuman) entity).abilities.isFlying))) {
double d1 = entity.locY;
entity.a(f, f1, 0.02F);
entity.move(entity.motX, entity.motY, entity.motZ);
entity.motX *= 0.5D;
entity.motY *= 0.5D;
entity.motZ *= 0.5D;
entity.motY -= 0.02D;
if (!entity.isNoGravity()) {
entity.motY -= 0.02D;
}
if ((entity.positionChanged)
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
entity.motY = 0.30000001192092896D;
}
} else if (entity.cC()) {
} else if (entity.cG()) {
if (entity.motY > -0.5D) {
entity.fallDistance = 1.0F;
}
@ -302,9 +309,9 @@ public class NMS {
float f4 = 0.16277136F / (f8 * f8 * f8);
float f3;
if (entity.onGround) {
f3 = entity.cl() * f4;
f3 = entity.cp() * f4;
} else {
f3 = entity.aR;
f3 = entity.aS;
}
entity.a(f, f1, f3);
f8 = 0.91F;
@ -312,21 +319,20 @@ public class NMS {
f8 = entity.world.getType(blockposition_pooledblockposition.e(entity.locX,
entity.getBoundingBox().b - 1.0D, entity.locZ)).getBlock().frictionFactor * 0.91F;
}
if (entity.n_()) {
float f2 = 0.15F;
entity.motX = MathHelper.a(entity.motX, -f2, f2);
entity.motZ = MathHelper.a(entity.motZ, -f2, f2);
if (entity.m_()) {
entity.motX = MathHelper.a(entity.motX, -0.15000000596046448D, 0.15000000596046448D);
entity.motZ = MathHelper.a(entity.motZ, -0.15000000596046448D, 0.15000000596046448D);
entity.fallDistance = 0.0F;
if (entity.motY < -0.15D) {
entity.motY = -0.15D;
}
boolean flag = (entity.isSneaking());
boolean flag = (entity.isSneaking()) && ((entity instanceof EntityHuman));
if ((flag) && (entity.motY < 0.0D)) {
entity.motY = 0.0D;
}
}
entity.move(entity.motX, entity.motY, entity.motZ);
if ((entity.positionChanged) && (entity.n_())) {
if ((entity.positionChanged) && (entity.m_())) {
entity.motY = 0.2D;
}
if (entity.hasEffect(MobEffects.LEVITATION)) {
@ -341,7 +347,7 @@ public class NMS {
} else {
entity.motY = 0.0D;
}
} else {
} else if (!entity.isNoGravity()) {
entity.motY -= 0.08D;
}
}
@ -351,15 +357,15 @@ public class NMS {
blockposition_pooledblockposition.t();
}
}
entity.aF = entity.aG;
entity.aG = entity.aH;
double d1 = entity.locX - entity.lastX;
double d0 = entity.locZ - entity.lastZ;
float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
if (f2 > 1.0F) {
f2 = 1.0F;
}
entity.aG += (f2 - entity.aG) * 0.4F;
entity.aH += entity.aG;
entity.aH += (f2 - entity.aH) * 0.4F;
entity.aI += entity.aH;
}
public static org.bukkit.entity.Entity getBukkitVehicle(org.bukkit.entity.Entity entity) {
@ -408,7 +414,7 @@ public class NMS {
}
public static float getHeadYaw(EntityLiving handle) {
return handle.aO;
return handle.aP;
}
public static NavigationAbstract getNavigation(Entity handle) {
@ -506,7 +512,7 @@ public class NMS {
Entity mcEntity = getHandle(entity);
if (mcEntity == null)
return false;
return mcEntity.aj() || mcEntity.an();
return mcEntity.ak() || mcEntity.ao();
}
public static boolean isNavigationFinished(NavigationAbstract navigation) {
@ -738,10 +744,10 @@ public class NMS {
return;
EntityLiving handle = (EntityLiving) en;
yaw = clampYaw(yaw);
handle.aO = yaw;
if (!(handle instanceof EntityHuman))
handle.aN = yaw;
handle.aP = yaw;
if (!(handle instanceof EntityHuman))
handle.aO = yaw;
handle.aQ = yaw;
}
public static void setKnockbackResistance(org.bukkit.entity.LivingEntity entity, double d) {
@ -802,10 +808,10 @@ public class NMS {
if (!bukkitEntity.getType().isAlive())
return;
EntityLiving handle = NMS.getHandle((LivingEntity) bukkitEntity);
handle.be = (float) d;
handle.bf = (float) d;
}
public static boolean shouldJump(net.minecraft.server.v1_9_R2.Entity entity) {
public static boolean shouldJump(net.minecraft.server.v1_10_R1.Entity entity) {
if (JUMP_FIELD == null || !(entity instanceof EntityLiving))
return false;
try {
@ -911,13 +917,13 @@ public class NMS {
private static Map<Class<?>, String> ENTITY_CLASS_TO_NAME;
private static final Map<Class<?>, Constructor<?>> ENTITY_CONSTRUCTOR_CACHE = new WeakHashMap<Class<?>, Constructor<?>>();
private static Field GOAL_FIELD = getField(PathfinderGoalSelector.class, "b");
private static final Field JUMP_FIELD = getField(EntityLiving.class, "bd");
private static final Field JUMP_FIELD = getField(EntityLiving.class, "be");
private static Method MAKE_REQUEST;
private static Field NAVIGATION_WORLD_FIELD = getField(NavigationAbstract.class, "b");
private static Field NETWORK_ADDRESS = getField(NetworkManager.class, "l");
private static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
private static Field PATHFINDING_RANGE = getField(NavigationAbstract.class, "g");
private static final Field RABBIT_FIELD = getField(EntityRabbit.class, "bw");
private static Field PATHFINDING_RANGE = getField(NavigationAbstract.class, "f");
private static final Field RABBIT_FIELD = getField(EntityRabbit.class, "bx");
private static final Random RANDOM = Util.getFastRandom();
private static Field SKULL_PROFILE_FIELD;
private static Field TRACKED_ENTITY_SET = NMS.getField(EntityTracker.class, "c");

View File

@ -1,6 +1,6 @@
package net.citizensnpcs.util;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.metadata.FixedMetadataValue;
@ -10,13 +10,13 @@ import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.ArmorStandTrait;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EnumHand;
import net.minecraft.server.v1_9_R2.Packet;
import net.minecraft.server.v1_9_R2.PacketPlayOutAnimation;
import net.minecraft.server.v1_9_R2.PacketPlayOutBed;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutAnimation;
import net.minecraft.server.v1_10_R1.PacketPlayOutBed;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityMetadata;
public enum PlayerAnimation {
ARM_SWING {

View File

@ -11,11 +11,11 @@ import org.bukkit.scheduler.BukkitRunnable;
import net.citizensnpcs.Settings.Setting;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.minecraft.server.v1_9_R2.CrashReport;
import net.minecraft.server.v1_9_R2.CrashReportSystemDetails;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityHuman;
import net.minecraft.server.v1_9_R2.ReportedException;
import net.minecraft.server.v1_10_R1.CrashReport;
import net.minecraft.server.v1_10_R1.CrashReportSystemDetails;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.ReportedException;
public class PlayerUpdateTask extends BukkitRunnable {
@Override
@ -33,15 +33,14 @@ public class PlayerUpdateTask extends BukkitRunnable {
TICKERS.put(ent.getUniqueId(), ent);
}
for (int i = 0; i < TICKERS_PENDING_REMOVE.size(); i++) {
org.bukkit.entity.Entity ent = TICKERS_PENDING_REMOVE.get(i);
TICKERS.remove(ent.getUniqueId());
TICKERS.remove(TICKERS_PENDING_REMOVE.get(i).getUniqueId());
}
TICKERS_PENDING_ADD.clear();
TICKERS_PENDING_REMOVE.clear();
Iterator<org.bukkit.entity.Entity> itr = TICKERS.values().iterator();
while (itr.hasNext()) {
Entity entity = NMS.getHandle(itr.next());
Entity entity1 = entity.bz();
Entity entity1 = entity.bB();
if (entity1 != null) {
if ((entity1.dead) || (!entity1.w(entity))) {
entity.stopRiding();

View File

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

View File

@ -4,13 +4,13 @@ import java.util.Random;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_9_R2.AttributeInstance;
import net.minecraft.server.v1_9_R2.ControllerMove;
import net.minecraft.server.v1_9_R2.EntityInsentient;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.EntitySlime;
import net.minecraft.server.v1_9_R2.GenericAttributes;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_10_R1.AttributeInstance;
import net.minecraft.server.v1_10_R1.ControllerMove;
import net.minecraft.server.v1_10_R1.EntityInsentient;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntitySlime;
import net.minecraft.server.v1_10_R1.GenericAttributes;
import net.minecraft.server.v1_10_R1.MathHelper;
public class PlayerControllerMove extends ControllerMove {
protected EntityLiving a;
@ -74,7 +74,7 @@ public class PlayerControllerMove extends ControllerMove {
@Override
public void c() {
this.a.be = 0F;
this.a.bf = 0F;
if (this.f) {
this.f = false;
int i = MathHelper.floor(this.a.getBoundingBox().b + 0.5D);
@ -90,7 +90,7 @@ public class PlayerControllerMove extends ControllerMove {
AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
speed.setValue(0.1D * this.e);
float movement = (float) (this.e * speed.getValue()) * 10;
this.a.bf = movement;
this.a.bg = movement;
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
this.h = cg();
this.h /= 3;

View File

@ -1,25 +1,25 @@
package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_9_R2.AttributeInstance;
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
import net.minecraft.server.v1_9_R2.Block;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.Blocks;
import net.minecraft.server.v1_9_R2.ChunkCache;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityInsentient;
import net.minecraft.server.v1_9_R2.GenericAttributes;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.Material;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_9_R2.NavigationAbstract;
import net.minecraft.server.v1_9_R2.PathEntity;
import net.minecraft.server.v1_9_R2.PathPoint;
import net.minecraft.server.v1_9_R2.PathType;
import net.minecraft.server.v1_9_R2.Pathfinder;
import net.minecraft.server.v1_9_R2.Vec3D;
import net.minecraft.server.v1_9_R2.World;
import net.minecraft.server.v1_10_R1.AttributeInstance;
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
import net.minecraft.server.v1_10_R1.Block;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.Blocks;
import net.minecraft.server.v1_10_R1.ChunkCache;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityInsentient;
import net.minecraft.server.v1_10_R1.GenericAttributes;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.Material;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
import net.minecraft.server.v1_10_R1.PathEntity;
import net.minecraft.server.v1_10_R1.PathPoint;
import net.minecraft.server.v1_10_R1.PathType;
import net.minecraft.server.v1_10_R1.Pathfinder;
import net.minecraft.server.v1_10_R1.Vec3D;
import net.minecraft.server.v1_10_R1.World;
public class PlayerNavigation extends NavigationAbstract {
protected EntityHumanNPC a;
@ -189,7 +189,7 @@ public class PlayerNavigation extends NavigationAbstract {
if (!localVec3D.equals(this.k)) {
this.k = localVec3D;
double d1 = paramVec3D.f(this.k);
this.n = (this.a.cl() > 0.0F ? d1 / this.a.cl() * 1000.0D : 0.0D);
this.n = (this.a.cp() > 0.0F ? d1 / this.a.cp() * 1000.0D : 0.0D);
} else {
this.l += System.currentTimeMillis() - this.m;
}
@ -470,7 +470,7 @@ public class PlayerNavigation extends NavigationAbstract {
@Override
protected boolean p() {
return (this.a.isInWater()) || (this.a.an());
return (this.a.isInWater()) || (this.a.ao());
}
private int r() {

View File

@ -4,12 +4,12 @@ import java.util.HashSet;
import java.util.Set;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.IBlockAccess;
import net.minecraft.server.v1_9_R2.Path;
import net.minecraft.server.v1_9_R2.PathEntity;
import net.minecraft.server.v1_9_R2.PathPoint;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.IBlockAccess;
import net.minecraft.server.v1_10_R1.Path;
import net.minecraft.server.v1_10_R1.PathEntity;
import net.minecraft.server.v1_10_R1.PathPoint;
public class PlayerPathfinder {
private final Path a = new Path();

View File

@ -1,12 +1,12 @@
package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_9_R2.EntityInsentient;
import net.minecraft.server.v1_9_R2.IBlockAccess;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_9_R2.PathPoint;
import net.minecraft.server.v1_9_R2.PathType;
import net.minecraft.server.v1_9_R2.PathfinderAbstract;
import net.minecraft.server.v1_10_R1.EntityInsentient;
import net.minecraft.server.v1_10_R1.IBlockAccess;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.PathPoint;
import net.minecraft.server.v1_10_R1.PathType;
import net.minecraft.server.v1_10_R1.PathfinderAbstract;
public abstract class PlayerPathfinderAbstract extends PathfinderAbstract {
protected IBlockAccess a;

View File

@ -4,24 +4,24 @@ import java.util.EnumSet;
import java.util.HashSet;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
import net.minecraft.server.v1_9_R2.Block;
import net.minecraft.server.v1_9_R2.BlockCobbleWall;
import net.minecraft.server.v1_9_R2.BlockDoor;
import net.minecraft.server.v1_9_R2.BlockFence;
import net.minecraft.server.v1_9_R2.BlockFenceGate;
import net.minecraft.server.v1_9_R2.BlockMinecartTrackAbstract;
import net.minecraft.server.v1_9_R2.BlockPosition;
import net.minecraft.server.v1_9_R2.BlockPosition.MutableBlockPosition;
import net.minecraft.server.v1_9_R2.Blocks;
import net.minecraft.server.v1_9_R2.EntityInsentient;
import net.minecraft.server.v1_9_R2.EnumDirection;
import net.minecraft.server.v1_9_R2.IBlockAccess;
import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R2.Material;
import net.minecraft.server.v1_9_R2.MathHelper;
import net.minecraft.server.v1_9_R2.PathPoint;
import net.minecraft.server.v1_9_R2.PathType;
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
import net.minecraft.server.v1_10_R1.Block;
import net.minecraft.server.v1_10_R1.BlockCobbleWall;
import net.minecraft.server.v1_10_R1.BlockDoor;
import net.minecraft.server.v1_10_R1.BlockFence;
import net.minecraft.server.v1_10_R1.BlockFenceGate;
import net.minecraft.server.v1_10_R1.BlockMinecartTrackAbstract;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.BlockPosition.MutableBlockPosition;
import net.minecraft.server.v1_10_R1.Blocks;
import net.minecraft.server.v1_10_R1.EntityInsentient;
import net.minecraft.server.v1_10_R1.EnumDirection;
import net.minecraft.server.v1_10_R1.IBlockAccess;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.Material;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.PathPoint;
import net.minecraft.server.v1_10_R1.PathType;
public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
private float j;
@ -246,7 +246,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
int i = 0;
while ((paramInt2 > 0) && (localPathType == PathType.OPEN)) {
paramInt2--;
if (i++ >= this.b.aW()) {
if (i++ >= this.b.aY()) {
return null;
}
localPathType = a(this.b, paramInt1, paramInt2, paramInt3);

View File

@ -7,9 +7,9 @@ import org.bukkit.entity.Player;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.citizensnpcs.npc.skin.SkinnableEntity;
import net.citizensnpcs.util.NMS;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EntityTrackerEntry;
import net.minecraft.server.v1_10_R1.Entity;
import net.minecraft.server.v1_10_R1.EntityPlayer;
import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public PlayerlistTrackerEntry(Entity entity, int i, int j, int k, boolean flag) {
@ -28,7 +28,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
Entity tracker = getTracker(this);
if (entityplayer != tracker && c(entityplayer)) {
if (!this.trackedPlayers.contains(entityplayer)
&& ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ab, tracker.ad))
&& ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ac, tracker.ae))
|| (tracker.attachedToPlayer))) {
if ((tracker instanceof SkinnableEntity)) {