First pass update to 1.9.4

This commit is contained in:
fullwall 2016-05-10 22:23:01 +08:00
parent 91853e4464
commit 9af9a2fba1
93 changed files with 1232 additions and 1555 deletions

View File

@ -6,13 +6,13 @@
<groupId>net.citizensnpcs</groupId>
<artifactId>citizens</artifactId>
<version>2.0.17-SNAPSHOT</version>
<version>2.0.18-SNAPSHOT</version>
<name>Citizens</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<craftbukkit.version>1.9-R0.1-SNAPSHOT</craftbukkit.version>
<citizensapi.version>2.0.17-SNAPSHOT</citizensapi.version>
<craftbukkit.version>1.9.4-R0.1-SNAPSHOT</craftbukkit.version>
<citizensapi.version>2.0.18-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_R1";
private static final String COMPATIBLE_MC_REVISION = "1_9_R2";
}

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_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_9_R2.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_R1.Entity mcEntity = ((CraftEntity) getEntity()).getHandle();
net.minecraft.server.v1_9_R2.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

@ -5,13 +5,13 @@ import java.util.Map;
import org.bukkit.Location;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
import org.bukkit.entity.Entity;
import com.google.common.collect.Maps;
import net.citizensnpcs.api.npc.NPC;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
net.minecraft.server.v1_9_R2.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_R1.Entity createEntityFromClass(Object... args) {
private net.minecraft.server.v1_9_R2.Entity createEntityFromClass(Object... args) {
try {
return (net.minecraft.server.v1_9_R1.Entity) constructor.newInstance(args);
return (net.minecraft.server.v1_9_R2.Entity) constructor.newInstance(args);
} catch (Exception ex) {
ex.printStackTrace();
return null;

View File

@ -70,7 +70,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
}
vector = plan.getCurrentVector();
}
net.minecraft.server.v1_9_R1.Entity handle = NMS.getHandle(npc.getEntity());
net.minecraft.server.v1_9_R2.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_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.Blocks;
import net.minecraft.server.v1_9_R1.EnchantmentManager;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.EnumItemSlot;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.ItemStack;
import net.minecraft.server.v1_9_R1.Material;
import net.minecraft.server.v1_9_R1.MobEffects;
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;
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_R1.ItemStack getCurrentItem() {
private net.minecraft.server.v1_9_R2.ItemStack getCurrentItem() {
return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item())
: entity instanceof EntityLiving ? ((EntityLiving) entity).getEquipment(EnumItemSlot.MAINHAND) : null;
}

View File

@ -18,7 +18,7 @@ import net.citizensnpcs.api.astar.pathfinder.VectorNode;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R2.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_R1.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.NavigationAbstract;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.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_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.NavigationAbstract;
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;
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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftBat;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityBat;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class BatController extends MobEntityController {
public BatController() {
@ -61,22 +61,22 @@ public class BatController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftBlaze;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityBlaze;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class BlazeController extends MobEntityController {
public BlazeController() {
@ -60,22 +60,22 @@ public class BlazeController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftCaveSpider;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityCaveSpider;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class CaveSpiderController extends MobEntityController {
public CaveSpiderController() {
@ -69,22 +69,22 @@ public class CaveSpiderController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftChicken;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityChicken;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class ChickenController extends MobEntityController {
public ChickenController() {
@ -80,22 +80,22 @@ public class ChickenController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftCow;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityCow;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class CowController extends MobEntityController {
public CowController() {
@ -81,22 +81,22 @@ public class CowController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftCreeper;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.entity.Creeper;
import org.bukkit.util.Vector;
@ -15,16 +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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityCreeper;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EntityLightning;
import net.minecraft.server.v1_9_R1.EnumHand;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.ItemStack;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class CreeperController extends MobEntityController {
public CreeperController() {
@ -79,20 +80,21 @@ public class CreeperController extends MobEntityController {
? super.a(entityhuman, enumhand, itemstack) : false;
}
@Override
protected SoundEffect bR() {
return (SoundEffect) (npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString()));
}
@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.bR()).toString()));
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString()));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEnderDragon;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityEnderDragon;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class EnderDragonController extends MobEntityController {
public EnderDragonController() {
@ -60,22 +60,22 @@ public class EnderDragonController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEnderman;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityEnderman;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class EndermanController extends MobEntityController {
public EndermanController() {
@ -69,22 +69,22 @@ public class EndermanController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEndermite;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityEndermite;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class EndermiteController extends MobEntityController {
public EndermiteController() {
@ -69,22 +69,22 @@ public class EndermiteController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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

@ -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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
@ -39,26 +39,26 @@ 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_R1.AttributeInstance;
import net.minecraft.server.v1_9_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.DamageSource;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.EnumItemSlot;
import net.minecraft.server.v1_9_R1.EnumProtocolDirection;
import net.minecraft.server.v1_9_R1.GenericAttributes;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.MinecraftServer;
import net.minecraft.server.v1_9_R1.NavigationAbstract;
import net.minecraft.server.v1_9_R1.NetworkManager;
import net.minecraft.server.v1_9_R1.Packet;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityHeadRotation;
import net.minecraft.server.v1_9_R1.PathType;
import net.minecraft.server.v1_9_R1.PlayerInteractManager;
import net.minecraft.server.v1_9_R1.WorldServer;
import net.minecraft.server.v1_9_R1.WorldSettings.EnumGamemode;
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;
public class EntityHumanNPC extends EntityPlayer implements NPCHolder, SkinnableEntity {
private final Map<PathType, Float> bz = Maps.newEnumMap(PathType.class);
@ -103,7 +103,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -305,7 +305,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
private void moveOnCurrentHeading() {
NMS.updateAI(this);
if (bc) {
if (bd) {
if (onGround && jumpTicks == 0) {
ch();
jumpTicks = 10;
@ -313,10 +313,10 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
} else {
jumpTicks = 0;
}
bd *= 0.98F;
be *= 0.98F;
bf *= 0.9F;
g(bd, be); // movement method
bf *= 0.98F;
bg *= 0.9F;
g(be, bf); // movement method
NMS.setHeadYaw(this, yaw);
if (jumpTicks > 0) {
jumpTicks--;
@ -343,7 +343,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
@Override
public void setSkinFlags(byte flags) {
// set skin flag byte
getDataWatcher().set(bp, flags);
getDataWatcher().set(bq, flags);
}
@Override

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftGhast;
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.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_R1.EntityGhast;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class GhastController extends MobEntityController {
public GhastController() {
@ -46,27 +46,22 @@ public class GhastController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public boolean co() {
return npc != null;
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -75,6 +70,11 @@ public class GhastController extends MobEntityController {
}
}
@Override
public boolean cp() {
return npc != null;
}
@Override
public boolean d(NBTTagCompound save) {
return npc == null ? super.d(save) : false;

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftGiant;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityGiantZombie;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class GiantController extends MobEntityController {
public GiantController() {
@ -55,22 +55,22 @@ public class GiantController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftGuardian;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityGuardian;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class GuardianController extends MobEntityController {
public GuardianController() {
@ -55,22 +55,22 @@ public class GuardianController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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

@ -2,10 +2,9 @@ package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftHorse;
import org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory;
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.entity.Horse;
import org.bukkit.util.Vector;
@ -18,18 +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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EnchantmentManager;
import net.minecraft.server.v1_9_R1.EntityHorse;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.MobEffects;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.Vec3D;
import net.minecraft.server.v1_9_R1.World;
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;
public class HorseController extends MobEntityController {
public HorseController() {
@ -63,162 +57,6 @@ public class HorseController extends MobEntityController {
}
}
public void _g(float f, float f1) {
if ((co()) || (bx())) {
if ((isInWater())) {
double d1 = this.locY;
float f4 = 0.8F;
float f3 = 0.02F;
float f2 = EnchantmentManager.d(this);
if (f2 > 3.0F) {
f2 = 3.0F;
}
if (!this.onGround) {
f2 *= 0.5F;
}
if (f2 > 0.0F) {
f4 += (0.54600006F - f4) * f2 / 3.0F;
f3 += (ck() - f3) * f2 / 3.0F;
}
a(f, f1, f3);
move(this.motX, this.motY, this.motZ);
this.motX *= f4;
this.motY *= 0.800000011920929D;
this.motZ *= f4;
this.motY -= 0.02D;
if ((this.positionChanged)
&& (c(this.motX, this.motY + 0.6000000238418579D - this.locY + d1, this.motZ))) {
this.motY = 0.30000001192092896D;
}
} else if ((an())) {
double d1 = this.locY;
a(f, f1, 0.02F);
move(this.motX, this.motY, this.motZ);
this.motX *= 0.5D;
this.motY *= 0.5D;
this.motZ *= 0.5D;
this.motY -= 0.02D;
if ((this.positionChanged)
&& (c(this.motX, this.motY + 0.6000000238418579D - this.locY + d1, this.motZ))) {
this.motY = 0.30000001192092896D;
}
} else if (cB()) {
if (this.motY > -0.5D) {
this.fallDistance = 1.0F;
}
Vec3D vec3d = aB();
float f5 = this.pitch * 0.017453292F;
double d0 = Math.sqrt(vec3d.x * vec3d.x + vec3d.z * vec3d.z);
double d2 = Math.sqrt(this.motX * this.motX + this.motZ * this.motZ);
double d3 = vec3d.b();
float f6 = MathHelper.cos(f5);
f6 = (float) (f6 * f6 * Math.min(1.0D, d3 / 0.4D));
this.motY += -0.08D + f6 * 0.06D;
if ((this.motY < 0.0D) && (d0 > 0.0D)) {
double d4 = this.motY * -0.1D * f6;
this.motY += d4;
this.motX += vec3d.x * d4 / d0;
this.motZ += vec3d.z * d4 / d0;
}
if (f5 < 0.0F) {
double d4 = d2 * -MathHelper.sin(f5) * 0.04D;
this.motY += d4 * 3.2D;
this.motX -= vec3d.x * d4 / d0;
this.motZ -= vec3d.z * d4 / d0;
}
if (d0 > 0.0D) {
this.motX += (vec3d.x / d0 * d2 - this.motX) * 0.1D;
this.motZ += (vec3d.z / d0 * d2 - this.motZ) * 0.1D;
}
this.motX *= 0.9900000095367432D;
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9900000095367432D;
move(this.motX, this.motY, this.motZ);
if ((this.positionChanged) && (!this.world.isClientSide)) {
double d4 = Math.sqrt(this.motX * this.motX + this.motZ * this.motZ);
double d5 = d2 - d4;
float f7 = (float) (d5 * 10.0D - 3.0D);
if (f7 > 0.0F) {
a(e((int) f7), 1.0F, 1.0F);
damageEntity(DamageSource.j, f7);
}
}
if ((this.onGround) && (!this.world.isClientSide) && (getFlag(7))
&& (!CraftEventFactory.callToggleGlideEvent(this, false).isCancelled())) {
setFlag(7, false);
}
} else {
float f8 = 0.91F;
BlockPosition.PooledBlockPosition blockposition_pooledblockposition = BlockPosition.PooledBlockPosition
.c(this.locX, getBoundingBox().b - 1.0D, this.locZ);
if (this.onGround) {
f8 = this.world.getType(blockposition_pooledblockposition).getBlock().frictionFactor * 0.91F;
}
float f4 = 0.16277136F / (f8 * f8 * f8);
float f3;
if (this.onGround) {
f3 = ck() * f4;
} else {
f3 = this.aQ;
}
a(f, f1, f3);
f8 = 0.91F;
if (this.onGround) {
f8 = this.world.getType(
blockposition_pooledblockposition.d(this.locX, getBoundingBox().b - 1.0D, this.locZ))
.getBlock().frictionFactor * 0.91F;
}
if (n_()) {
float f2 = 0.15F;
this.motX = MathHelper.a(this.motX, -f2, f2);
this.motZ = MathHelper.a(this.motZ, -f2, f2);
this.fallDistance = 0.0F;
if (this.motY < -0.15D) {
this.motY = -0.15D;
}
boolean flag = (isSneaking());
if ((flag) && (this.motY < 0.0D)) {
this.motY = 0.0D;
}
}
move(this.motX, this.motY, this.motZ);
if ((this.positionChanged) && (n_())) {
this.motY = 0.2D;
}
if (hasEffect(MobEffects.LEVITATION)) {
this.motY += (0.05D * (getEffect(MobEffects.LEVITATION).getAmplifier() + 1) - this.motY) * 0.2D;
} else {
blockposition_pooledblockposition.d(this.locX, 0.0D, this.locZ);
if ((this.world.isClientSide) && ((!this.world.isLoaded(blockposition_pooledblockposition))
|| (!this.world.getChunkAtWorldCoords(blockposition_pooledblockposition).p()))) {
if (this.locY > 0.0D) {
this.motY = -0.1D;
} else {
this.motY = 0.0D;
}
} else {
this.motY -= 0.08D;
}
}
this.motY *= 0.9800000190734863D;
this.motX *= f8;
this.motZ *= f8;
blockposition_pooledblockposition.t();
}
}
this.aE = this.aF;
double d1 = this.locX - this.lastX;
double d0 = this.locZ - this.lastZ;
float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
if (f2 > 1.0F) {
f2 = 1.0F;
}
this.aF += (f2 - this.aF) * 0.4F;
this.aG += this.aF;
}
@Override
public void a(boolean flag) {
float oldw = width;
@ -237,22 +75,22 @@ public class HorseController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -267,11 +105,11 @@ public class HorseController extends MobEntityController {
}
@Override
public boolean dd() {
public boolean de() {
if (npc == null)
return super.dd();
return super.de();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
return super.dd() && !protectedDefault;
return super.de() && !protectedDefault;
}
@Override
@ -320,7 +158,7 @@ public class HorseController extends MobEntityController {
super.g(f, f1);
return;
} else if (!npc.isFlyable()) {
_g(f, f1);
g(f, f1);
} else {
NMS.flyingMoveLogic(this, f, f1);
}

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_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.PlayerInteractManager;
import net.minecraft.server.v1_9_R1.WorldServer;
import net.minecraft.server.v1_9_R2.PlayerInteractManager;
import net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftIronGolem;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityIronGolem;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class IronGolemController extends MobEntityController {
public IronGolemController() {
@ -55,22 +55,22 @@ public class IronGolemController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMagmaCube;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityMagmaCube;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class MagmaCubeController extends MobEntityController {
public MagmaCubeController() {
@ -58,29 +58,29 @@ public class MagmaCubeController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void ch() {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void ci() {
if (npc == null) {
super.ch();
super.ci();
}
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMushroomCow;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityMushroomCow;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class MushroomCowController extends MobEntityController {
@ -67,22 +67,22 @@ public class MushroomCowController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftOcelot;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityOcelot;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class OcelotController extends MobEntityController {
public OcelotController() {
@ -66,22 +66,22 @@ public class OcelotController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPig;
import org.bukkit.craftbukkit.v1_9_R1.event.CraftEventFactory;
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.entity.Pig;
import org.bukkit.util.Vector;
@ -16,19 +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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EnchantmentManager;
import net.minecraft.server.v1_9_R1.EntityLightning;
import net.minecraft.server.v1_9_R1.EntityPig;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.MobEffects;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.Vec3D;
import net.minecraft.server.v1_9_R1.World;
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;
public class PigController extends MobEntityController {
public PigController() {
@ -55,162 +49,6 @@ public class PigController extends MobEntityController {
}
}
public void _g(float f, float f1) {
if ((co()) || (bx())) {
if ((isInWater())) {
double d1 = this.locY;
float f4 = 0.8F;
float f3 = 0.02F;
float f2 = EnchantmentManager.d(this);
if (f2 > 3.0F) {
f2 = 3.0F;
}
if (!this.onGround) {
f2 *= 0.5F;
}
if (f2 > 0.0F) {
f4 += (0.54600006F - f4) * f2 / 3.0F;
f3 += (ck() - f3) * f2 / 3.0F;
}
a(f, f1, f3);
move(this.motX, this.motY, this.motZ);
this.motX *= f4;
this.motY *= 0.800000011920929D;
this.motZ *= f4;
this.motY -= 0.02D;
if ((this.positionChanged)
&& (c(this.motX, this.motY + 0.6000000238418579D - this.locY + d1, this.motZ))) {
this.motY = 0.30000001192092896D;
}
} else if ((an())) {
double d1 = this.locY;
a(f, f1, 0.02F);
move(this.motX, this.motY, this.motZ);
this.motX *= 0.5D;
this.motY *= 0.5D;
this.motZ *= 0.5D;
this.motY -= 0.02D;
if ((this.positionChanged)
&& (c(this.motX, this.motY + 0.6000000238418579D - this.locY + d1, this.motZ))) {
this.motY = 0.30000001192092896D;
}
} else if (cB()) {
if (this.motY > -0.5D) {
this.fallDistance = 1.0F;
}
Vec3D vec3d = aB();
float f5 = this.pitch * 0.017453292F;
double d0 = Math.sqrt(vec3d.x * vec3d.x + vec3d.z * vec3d.z);
double d2 = Math.sqrt(this.motX * this.motX + this.motZ * this.motZ);
double d3 = vec3d.b();
float f6 = MathHelper.cos(f5);
f6 = (float) (f6 * f6 * Math.min(1.0D, d3 / 0.4D));
this.motY += -0.08D + f6 * 0.06D;
if ((this.motY < 0.0D) && (d0 > 0.0D)) {
double d4 = this.motY * -0.1D * f6;
this.motY += d4;
this.motX += vec3d.x * d4 / d0;
this.motZ += vec3d.z * d4 / d0;
}
if (f5 < 0.0F) {
double d4 = d2 * -MathHelper.sin(f5) * 0.04D;
this.motY += d4 * 3.2D;
this.motX -= vec3d.x * d4 / d0;
this.motZ -= vec3d.z * d4 / d0;
}
if (d0 > 0.0D) {
this.motX += (vec3d.x / d0 * d2 - this.motX) * 0.1D;
this.motZ += (vec3d.z / d0 * d2 - this.motZ) * 0.1D;
}
this.motX *= 0.9900000095367432D;
this.motY *= 0.9800000190734863D;
this.motZ *= 0.9900000095367432D;
move(this.motX, this.motY, this.motZ);
if ((this.positionChanged) && (!this.world.isClientSide)) {
double d4 = Math.sqrt(this.motX * this.motX + this.motZ * this.motZ);
double d5 = d2 - d4;
float f7 = (float) (d5 * 10.0D - 3.0D);
if (f7 > 0.0F) {
a(e((int) f7), 1.0F, 1.0F);
damageEntity(DamageSource.j, f7);
}
}
if ((this.onGround) && (!this.world.isClientSide) && (getFlag(7))
&& (!CraftEventFactory.callToggleGlideEvent(this, false).isCancelled())) {
setFlag(7, false);
}
} else {
float f8 = 0.91F;
BlockPosition.PooledBlockPosition blockposition_pooledblockposition = BlockPosition.PooledBlockPosition
.c(this.locX, getBoundingBox().b - 1.0D, this.locZ);
if (this.onGround) {
f8 = this.world.getType(blockposition_pooledblockposition).getBlock().frictionFactor * 0.91F;
}
float f4 = 0.16277136F / (f8 * f8 * f8);
float f3;
if (this.onGround) {
f3 = ck() * f4;
} else {
f3 = this.aQ;
}
a(f, f1, f3);
f8 = 0.91F;
if (this.onGround) {
f8 = this.world.getType(
blockposition_pooledblockposition.d(this.locX, getBoundingBox().b - 1.0D, this.locZ))
.getBlock().frictionFactor * 0.91F;
}
if (n_()) {
float f2 = 0.15F;
this.motX = MathHelper.a(this.motX, -f2, f2);
this.motZ = MathHelper.a(this.motZ, -f2, f2);
this.fallDistance = 0.0F;
if (this.motY < -0.15D) {
this.motY = -0.15D;
}
boolean flag = (isSneaking());
if ((flag) && (this.motY < 0.0D)) {
this.motY = 0.0D;
}
}
move(this.motX, this.motY, this.motZ);
if ((this.positionChanged) && (n_())) {
this.motY = 0.2D;
}
if (hasEffect(MobEffects.LEVITATION)) {
this.motY += (0.05D * (getEffect(MobEffects.LEVITATION).getAmplifier() + 1) - this.motY) * 0.2D;
} else {
blockposition_pooledblockposition.d(this.locX, 0.0D, this.locZ);
if ((this.world.isClientSide) && ((!this.world.isLoaded(blockposition_pooledblockposition))
|| (!this.world.getChunkAtWorldCoords(blockposition_pooledblockposition).p()))) {
if (this.locY > 0.0D) {
this.motY = -0.1D;
} else {
this.motY = 0.0D;
}
} else {
this.motY -= 0.08D;
}
}
this.motY *= 0.9800000190734863D;
this.motX *= f8;
this.motZ *= f8;
blockposition_pooledblockposition.t();
}
}
this.aE = this.aF;
double d1 = this.locX - this.lastX;
double d0 = this.locZ - this.lastZ;
float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
if (f2 > 1.0F) {
f2 = 1.0F;
}
this.aF += (f2 - this.aF) * 0.4F;
this.aG += this.aF;
}
@Override
public void a(boolean flag) {
float oldw = width;
@ -229,22 +67,22 @@ public class PigController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
@ -303,7 +141,7 @@ public class PigController extends MobEntityController {
if (npc == null) {
super.g(f, f1);
} else if (!npc.isFlyable()) {
_g(f, f1);
g(f, f1);
} else {
NMS.flyingMoveLogic(this, f, f1);
}

View File

@ -1,9 +1,9 @@
package net.citizensnpcs.npc.entity;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPigZombie;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityPigZombie;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class PigZombieController extends MobEntityController {
@ -56,22 +56,22 @@ public class PigZombieController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftRabbit;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntityRabbit;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class RabbitController extends MobEntityController {
public RabbitController() {
@ -67,22 +67,22 @@ public class RabbitController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSheep;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySheep;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SheepController extends MobEntityController {
public SheepController() {
@ -66,22 +66,22 @@ public class SheepController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftShulker;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityAIBodyControl;
import net.minecraft.server.v1_9_R1.EntityShulker;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class ShulkerController extends MobEntityController {
public ShulkerController() {
@ -56,22 +56,22 @@ public class ShulkerController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSilverfish;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySilverfish;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SilverfishController extends MobEntityController {
public SilverfishController() {
@ -55,22 +55,22 @@ public class SilverfishController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSkeleton;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySkeleton;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SkeletonController extends MobEntityController {
public SkeletonController() {
@ -55,22 +55,22 @@ public class SkeletonController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSlime;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EntitySlime;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SlimeController extends MobEntityController {
@ -60,29 +60,29 @@ public class SlimeController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void ch() {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void ci() {
if (npc == null) {
super.ch();
super.ci();
}
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSnowman;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySnowman;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SnowmanController extends MobEntityController {
public SnowmanController() {
@ -55,22 +55,22 @@ public class SnowmanController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSpider;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySpider;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SpiderController extends MobEntityController {
public SpiderController() {
@ -55,22 +55,22 @@ public class SpiderController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSquid;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntitySquid;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class SquidController extends MobEntityController {
public SquidController() {
@ -55,22 +55,22 @@ public class SquidController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftVillager;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EntityVillager;
import net.minecraft.server.v1_9_R1.EnumHand;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.ItemStack;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class VillagerController extends MobEntityController {
public VillagerController() {
@ -75,22 +75,22 @@ public class VillagerController extends MobEntityController {
return npc == null || !blockTrades ? super.a(entityhuman) : false; // block trades
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftWitch;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityWitch;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class WitchController extends MobEntityController {
public WitchController() {
@ -55,22 +55,22 @@ public class WitchController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftWither;
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.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_R1.EntityWither;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class WitherController extends MobEntityController {
public WitherController() {
@ -46,22 +46,22 @@ public class WitherController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftWolf;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityWolf;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class WolfController extends MobEntityController {
public WolfController() {
@ -66,22 +66,22 @@ public class WolfController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftZombie;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityZombie;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.MinecraftKey;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.SoundEffect;
import net.minecraft.server.v1_9_R1.World;
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;
public class ZombieController extends MobEntityController {
public ZombieController() {
@ -55,22 +55,22 @@ public class ZombieController extends MobEntityController {
}
}
@Override
protected SoundEffect bR() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bR()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
}
@Override
protected SoundEffect bS() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bR()).toString())));
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R1.Entity entity) {
protected SoundEffect bT() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
}
@Override
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftAreaEffectCloud;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityAreaEffectCloud;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityAreaEffectCloud;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftArmorStand;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityArmorStand;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EnumHand;
import net.minecraft.server.v1_9_R1.EnumInteractionResult;
import net.minecraft.server.v1_9_R1.ItemStack;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.Vec3D;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftBoat;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityBoat;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityBoat;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftDragonFireball;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityDragonFireball;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityDragonFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityEgg;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R1.WorldServer;
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 org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEgg;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityEnderCrystal;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEnderCrystal;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEnderPearl;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityEnderPearl;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityEnderPearl;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityEnderSignal;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEnderSignal;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityExperienceOrb;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftExperienceOrb;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftFallingSand;
import org.bukkit.craftbukkit.v1_9_R1.util.CraftMagicNumbers;
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.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_R1.Block;
import net.minecraft.server.v1_9_R1.Blocks;
import net.minecraft.server.v1_9_R1.EntityFallingBlock;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R1.WorldServer;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityFireworks;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftFirework;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftFish;
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.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_R1.EntityFishingHook;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityFishingHook;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EntityItem;
import net.minecraft.server.v1_9_R1.ItemStack;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R1.WorldServer;
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 org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftItem;
import org.bukkit.craftbukkit.v1_9_R1.inventory.CraftItemStack;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftItemFrame;
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.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityItemFrame;
import net.minecraft.server.v1_9_R1.EnumDirection;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftLargeFireball;
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.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_R1.EntityLargeFireball;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityLargeFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityLeash;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftLeash;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMinecartChest;
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.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartChest;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMinecartCommand;
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.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartCommandBlock;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMinecartFurnace;
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.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartFurnace;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartHopper;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftMinecartRideable;
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.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartRideable;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartMobSpawner;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityMinecartTNT;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityPainting;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPainting;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftShulkerBullet;
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.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_R1.EntityShulkerBullet;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityShulkerBullet;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSmallFireball;
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.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_R1.EntitySmallFireball;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntitySmallFireball;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntitySnowball;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftSnowball;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntitySpectralArrow;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntitySpectralArrow;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityTNTPrimed;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftTNTPrimed;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftThrownExpBottle;
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.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_R1.EntityThrownExpBottle;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityThrownExpBottle;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftLingeringPotion;
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.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_R1.EntityPotion;
import net.minecraft.server.v1_9_R1.Items;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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;
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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftArrow;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
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.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_R1.EntityTippedArrow;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.EntityTippedArrow;
import net.minecraft.server.v1_9_R2.NBTTagCompound;
import net.minecraft.server.v1_9_R2.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityWitherSkull;
import net.minecraft.server.v1_9_R1.NBTTagCompound;
import net.minecraft.server.v1_9_R1.World;
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 org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftWitherSkull;
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.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_R1.Entity entity) {
public void collide(net.minecraft.server.v1_9_R2.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_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.MinecraftServer;
import net.minecraft.server.v1_9_R1.NetworkManager;
import net.minecraft.server.v1_9_R1.Packet;
import net.minecraft.server.v1_9_R1.PlayerConnection;
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;
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_R1.EnumProtocolDirection;
import net.minecraft.server.v1_9_R1.NetworkManager;
import net.minecraft.server.v1_9_R2.EnumProtocolDirection;
import net.minecraft.server.v1_9_R2.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_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.EntityEnderDragon;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R2.EntityEnderDragon;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.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_R1.Entity getHandle() {
private net.minecraft.server.v1_9_R2.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_R1.Entity handle) {
private void setMountedYaw(net.minecraft.server.v1_9_R2.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_R1.Entity handle,
net.minecraft.server.v1_9_R1.Entity passenger, double speed, float speedMod) {
private double updateHorizontalSpeed(net.minecraft.server.v1_9_R2.Entity handle,
net.minecraft.server.v1_9_R2.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).bd * 45.0F);
handle.motX += speedMod * -Math.sin(angle) * ((EntityLiving) passenger).be * 0.05;
handle.motZ += speedMod * Math.cos(angle) * ((EntityLiving) passenger).be * 0.05;
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 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_R1.Entity handle = getHandle();
net.minecraft.server.v1_9_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
net.minecraft.server.v1_9_R2.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_R1.Entity handle = getHandle();
net.minecraft.server.v1_9_R2.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_R1.Entity handle = getHandle();
net.minecraft.server.v1_9_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
net.minecraft.server.v1_9_R2.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_R1.entity.CraftRabbit;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.entity.CraftWither;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.EntityWither;
import net.minecraft.server.v1_9_R2.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_R1.DamageSource;
import net.minecraft.server.v1_9_R1.EntityEnderSignal;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R2.DamageSource;
import net.minecraft.server.v1_9_R2.EntityEnderSignal;
import net.minecraft.server.v1_9_R2.World;
public class EntityEnderSignalMarker extends EntityEnderSignal {
public EntityEnderSignalMarker(World world) {

View File

@ -21,11 +21,12 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.CraftSound;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
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.entity.EntityType;
import org.bukkit.entity.FishHook;
import org.bukkit.entity.Horse;
@ -55,38 +56,38 @@ 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_R1.AttributeInstance;
import net.minecraft.server.v1_9_R1.AxisAlignedBB;
import net.minecraft.server.v1_9_R1.Block;
import net.minecraft.server.v1_9_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.ControllerJump;
import net.minecraft.server.v1_9_R1.DamageSource;
import net.minecraft.server.v1_9_R1.DataWatcherObject;
import net.minecraft.server.v1_9_R1.EnchantmentManager;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityFishingHook;
import net.minecraft.server.v1_9_R1.EntityHorse;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.EntityInsentient;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntityMinecartAbstract;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.EntityRabbit;
import net.minecraft.server.v1_9_R1.EntityTameableAnimal;
import net.minecraft.server.v1_9_R1.EntityTracker;
import net.minecraft.server.v1_9_R1.EntityTrackerEntry;
import net.minecraft.server.v1_9_R1.EntityTypes;
import net.minecraft.server.v1_9_R1.GenericAttributes;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.MobEffects;
import net.minecraft.server.v1_9_R1.NavigationAbstract;
import net.minecraft.server.v1_9_R1.NetworkManager;
import net.minecraft.server.v1_9_R1.Packet;
import net.minecraft.server.v1_9_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R1.PathfinderGoalSelector;
import net.minecraft.server.v1_9_R1.Vec3D;
import net.minecraft.server.v1_9_R1.World;
import net.minecraft.server.v1_9_R1.WorldServer;
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;
@SuppressWarnings("unchecked")
public class NMS {
@ -207,36 +208,34 @@ public class NMS {
}
public static void flyingMoveLogic(EntityLiving entity, float f, float f1) {
if (entity.co() || entity.bx()) {
if (entity.cp() || entity.by()) {
if (entity.isInWater()) {
double d0 = entity.locY;
float f3 = 0.8F;
float f4 = 0.02F;
double d1 = entity.locY;
float f4 = 0.8F;
float f3 = 0.02F;
float f2 = EnchantmentManager.d(entity);
if (f2 > 3.0F) {
f2 = 3.0F;
}
if (!entity.onGround) {
f2 *= 0.5F;
}
if (f2 > 0.0F) {
f3 += (0.5460001F - f3) * f2 / 3.0F;
f4 += (entity.ck() * 1.0F - f4) * f2 / 3.0F;
f4 += (0.54600006F - f4) * f2 / 3.0F;
f3 += (entity.cl() - f3) * f2 / 3.0F;
}
entity.a(f, f1, f4);
entity.a(f, f1, f3);
entity.move(entity.motX, entity.motY, entity.motZ);
entity.motX *= f3;
entity.motX *= f4;
entity.motY *= 0.800000011920929D;
entity.motZ *= f3;
entity.motZ *= f4;
entity.motY -= 0.02D;
if ((entity.positionChanged)
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d0, entity.motZ)))
entity.motY = 0.300000011920929D;
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
entity.motY = 0.30000001192092896D;
}
} else if (entity.an()) {
double d0 = entity.locY;
double d1 = entity.locY;
entity.a(f, f1, 0.02F);
entity.move(entity.motX, entity.motY, entity.motZ);
entity.motX *= 0.5D;
@ -244,9 +243,10 @@ public class NMS {
entity.motZ *= 0.5D;
entity.motY -= 0.02D;
if ((entity.positionChanged)
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d0, entity.motZ)))
entity.motY = 0.300000011920929D;
} else if (entity.cB()) {
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
entity.motY = 0.30000001192092896D;
}
} else if (entity.cC()) {
if (entity.motY > -0.5D) {
entity.fallDistance = 1.0F;
}
@ -286,30 +286,31 @@ public class NMS {
float f7 = (float) (d5 * 10.0D - 3.0D);
if (f7 > 0.0F) {
entity.a(entity.e((int) f7), 1.0F, 1.0F);
entity.damageEntity(DamageSource.j, f7);
entity.damageEntity(DamageSource.FLY_INTO_WALL, f7);
}
}
if ((entity.onGround) && (!entity.world.isClientSide)) {
if ((entity.onGround) && (!entity.world.isClientSide) && (entity.getFlag(7))
&& (!CraftEventFactory.callToggleGlideEvent(entity, false).isCancelled())) {
entity.setFlag(7, false);
}
} else {
float f8 = 0.91F;
BlockPosition.PooledBlockPosition blockposition_pooledblockposition = BlockPosition.PooledBlockPosition
.c(entity.locX, entity.getBoundingBox().b - 1.0D, entity.locZ);
.d(entity.locX, entity.getBoundingBox().b - 1.0D, entity.locZ);
if (entity.onGround) {
f8 = entity.world.getType(blockposition_pooledblockposition).getBlock().frictionFactor * 0.91F;
}
float f4 = 0.16277136F / (f8 * f8 * f8);
float f3;
if (entity.onGround) {
f3 = entity.ck() * f4;
f3 = entity.cl() * f4;
} else {
f3 = entity.aQ;
f3 = entity.aR;
}
entity.a(f, f1, f3);
f8 = 0.91F;
if (entity.onGround) {
f8 = entity.world.getType(blockposition_pooledblockposition.d(entity.locX,
f8 = entity.world.getType(blockposition_pooledblockposition.e(entity.locX,
entity.getBoundingBox().b - 1.0D, entity.locZ)).getBlock().frictionFactor * 0.91F;
}
if (entity.n_()) {
@ -320,7 +321,7 @@ public class NMS {
if (entity.motY < -0.15D) {
entity.motY = -0.15D;
}
boolean flag = (entity.isSneaking()) && ((entity instanceof EntityHuman));
boolean flag = (entity.isSneaking());
if ((flag) && (entity.motY < 0.0D)) {
entity.motY = 0.0D;
}
@ -333,7 +334,7 @@ public class NMS {
entity.motY += (0.05D * (entity.getEffect(MobEffects.LEVITATION).getAmplifier() + 1) - entity.motY)
* 0.2D;
} else {
blockposition_pooledblockposition.d(entity.locX, 0.0D, entity.locZ);
blockposition_pooledblockposition.e(entity.locX, 0.0D, entity.locZ);
if ((entity.world.isClientSide) && ((!entity.world.isLoaded(blockposition_pooledblockposition))
|| (!entity.world.getChunkAtWorldCoords(blockposition_pooledblockposition).p()))) {
if (entity.locY > 0.0D) {
@ -351,18 +352,15 @@ public class NMS {
blockposition_pooledblockposition.t();
}
}
entity.aE = entity.aF;
double d0 = entity.locX - entity.lastX;
double d1 = entity.locZ - entity.lastZ;
float f2 = MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F;
entity.aF = entity.aG;
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.aF += (f2 - entity.aF) * 0.4F;
entity.aG += entity.aF;
entity.aG += (f2 - entity.aG) * 0.4F;
entity.aH += entity.aG;
}
public static org.bukkit.entity.Entity getBukkitVehicle(org.bukkit.entity.Entity entity) {
@ -808,7 +806,7 @@ public class NMS {
handle.be = (float) d;
}
public static boolean shouldJump(net.minecraft.server.v1_9_R1.Entity entity) {
public static boolean shouldJump(net.minecraft.server.v1_9_R2.Entity entity) {
if (JUMP_FIELD == null || !(entity instanceof EntityLiving))
return false;
try {
@ -914,13 +912,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, "bc");
private static final Field JUMP_FIELD = getField(EntityLiving.class, "bd");
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, "bv");
private static final Field RABBIT_FIELD = getField(EntityRabbit.class, "bw");
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_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R2.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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.EnumHand;
import net.minecraft.server.v1_9_R1.Packet;
import net.minecraft.server.v1_9_R1.PacketPlayOutAnimation;
import net.minecraft.server.v1_9_R1.PacketPlayOutBed;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityMetadata;
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;
public enum PlayerAnimation {
ARM_SWING {
@ -154,7 +154,7 @@ public enum PlayerAnimation {
STOP_USE_ITEM {
@Override
protected void playAnimation(EntityPlayer player, int radius) {
player.cz();
player.cA();
sendPacketNearby(new PacketPlayOutEntityMetadata(player.getId(), player.getDataWatcher(), true), player,
radius);
}

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_R1.CrashReport;
import net.minecraft.server.v1_9_R1.CrashReportSystemDetails;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityHuman;
import net.minecraft.server.v1_9_R1.ReportedException;
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;
public class PlayerUpdateTask extends BukkitRunnable {
@Override
@ -41,7 +41,7 @@ public class PlayerUpdateTask extends BukkitRunnable {
Iterator<org.bukkit.entity.Entity> itr = TICKERS.values().iterator();
while (itr.hasNext()) {
Entity entity = NMS.getHandle(itr.next());
Entity entity1 = entity.by();
Entity entity1 = entity.bz();
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_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityLiving;
import net.minecraft.server.v1_9_R2.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_R1.AttributeInstance;
import net.minecraft.server.v1_9_R1.ControllerMove;
import net.minecraft.server.v1_9_R1.EntityInsentient;
import net.minecraft.server.v1_9_R1.EntityLiving;
import net.minecraft.server.v1_9_R1.EntitySlime;
import net.minecraft.server.v1_9_R1.GenericAttributes;
import net.minecraft.server.v1_9_R1.MathHelper;
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;
public class PlayerControllerMove extends ControllerMove {
protected EntityLiving a;

View File

@ -1,25 +1,25 @@
package net.citizensnpcs.util.nms;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
import net.minecraft.server.v1_9_R1.AttributeInstance;
import net.minecraft.server.v1_9_R1.AxisAlignedBB;
import net.minecraft.server.v1_9_R1.Block;
import net.minecraft.server.v1_9_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.Blocks;
import net.minecraft.server.v1_9_R1.ChunkCache;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityInsentient;
import net.minecraft.server.v1_9_R1.GenericAttributes;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.Material;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.NavigationAbstract;
import net.minecraft.server.v1_9_R1.PathEntity;
import net.minecraft.server.v1_9_R1.PathPoint;
import net.minecraft.server.v1_9_R1.PathType;
import net.minecraft.server.v1_9_R1.Pathfinder;
import net.minecraft.server.v1_9_R1.Vec3D;
import net.minecraft.server.v1_9_R1.World;
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;
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.ck() > 0.0F ? d1 / this.a.ck() * 1000.0D : 0.0D);
this.n = (this.a.cl() > 0.0F ? d1 / this.a.cl() * 1000.0D : 0.0D);
} else {
this.l += System.currentTimeMillis() - this.m;
}

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_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.Entity;
import net.minecraft.server.v1_9_R1.IBlockAccess;
import net.minecraft.server.v1_9_R1.Path;
import net.minecraft.server.v1_9_R1.PathEntity;
import net.minecraft.server.v1_9_R1.PathPoint;
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;
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_R1.EntityInsentient;
import net.minecraft.server.v1_9_R1.IBlockAccess;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.PathPoint;
import net.minecraft.server.v1_9_R1.PathType;
import net.minecraft.server.v1_9_R1.PathfinderAbstract;
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;
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_R1.AxisAlignedBB;
import net.minecraft.server.v1_9_R1.Block;
import net.minecraft.server.v1_9_R1.BlockCobbleWall;
import net.minecraft.server.v1_9_R1.BlockDoor;
import net.minecraft.server.v1_9_R1.BlockFence;
import net.minecraft.server.v1_9_R1.BlockFenceGate;
import net.minecraft.server.v1_9_R1.BlockMinecartTrackAbstract;
import net.minecraft.server.v1_9_R1.BlockPosition;
import net.minecraft.server.v1_9_R1.BlockPosition.MutableBlockPosition;
import net.minecraft.server.v1_9_R1.Blocks;
import net.minecraft.server.v1_9_R1.EntityInsentient;
import net.minecraft.server.v1_9_R1.EnumDirection;
import net.minecraft.server.v1_9_R1.IBlockAccess;
import net.minecraft.server.v1_9_R1.IBlockData;
import net.minecraft.server.v1_9_R1.Material;
import net.minecraft.server.v1_9_R1.MathHelper;
import net.minecraft.server.v1_9_R1.PathPoint;
import net.minecraft.server.v1_9_R1.PathType;
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;
public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
private float j;
@ -53,6 +53,79 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
this.j = paramEntityInsentient.a(PathType.WATER);
}
@Override
public PathType a(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) {
BlockPosition localBlockPosition = new BlockPosition(paramInt1, paramInt2, paramInt3);
IBlockData localIBlockData = paramIBlockAccess.getType(localBlockPosition);
Block localBlock1 = localIBlockData.getBlock();
Material localMaterial = localIBlockData.getMaterial();
PathType localPathType1 = PathType.BLOCKED;
if ((localBlock1 == Blocks.TRAPDOOR) || (localBlock1 == Blocks.IRON_TRAPDOOR)
|| (localBlock1 == Blocks.WATERLILY)) {
return PathType.TRAPDOOR;
}
if (localBlock1 == Blocks.FIRE) {
return PathType.DAMAGE_FIRE;
}
if (localBlock1 == Blocks.CACTUS) {
return PathType.DAMAGE_CACTUS;
}
if (((localBlock1 instanceof BlockDoor)) && (localMaterial == Material.WOOD)
&& (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_WOOD_CLOSED;
}
if (((localBlock1 instanceof BlockDoor)) && (localMaterial == Material.ORE)
&& (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_IRON_CLOSED;
}
if (((localBlock1 instanceof BlockDoor)) && (localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_OPEN;
}
if ((localBlock1 instanceof BlockMinecartTrackAbstract)) {
return PathType.RAIL;
}
if (((localBlock1 instanceof BlockFence)) || ((localBlock1 instanceof BlockCobbleWall))
|| (((localBlock1 instanceof BlockFenceGate))
&& (!localIBlockData.get(BlockFenceGate.OPEN).booleanValue()))) {
return PathType.FENCE;
}
if (localMaterial == Material.AIR) {
localPathType1 = PathType.OPEN;
} else {
if (localMaterial == Material.WATER) {
return PathType.WATER;
}
if (localMaterial == Material.LAVA) {
return PathType.LAVA;
}
}
if ((localBlock1.b(paramIBlockAccess, localBlockPosition)) && (localPathType1 == PathType.BLOCKED)) {
localPathType1 = PathType.OPEN;
}
if ((localPathType1 == PathType.OPEN) && (paramInt2 >= 1)) {
PathType localPathType2 = a(paramIBlockAccess, paramInt1, paramInt2 - 1, paramInt3);
localPathType1 = (localPathType2 == PathType.WALKABLE) || (localPathType2 == PathType.OPEN)
|| (localPathType2 == PathType.WATER) || (localPathType2 == PathType.LAVA) ? PathType.OPEN
: PathType.WALKABLE;
}
if (localPathType1 == PathType.WALKABLE) {
for (int i = paramInt1 - 1; i <= paramInt1 + 1; i++) {
for (int k = paramInt3 - 1; k <= paramInt3 + 1; k++) {
if ((i != paramInt1) || (k != paramInt3)) {
Block localBlock2 = paramIBlockAccess.getType(new BlockPosition(i, paramInt2, k)).getBlock();
if (localBlock2 == Blocks.CACTUS) {
localPathType1 = PathType.DANGER_CACTUS;
} else if (localBlock2 == Blocks.FIRE) {
localPathType1 = PathType.DANGER_FIRE;
}
}
}
}
}
return localPathType1;
}
@Override
public PathType a(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3,
EntityHumanNPC paramEntityInsentient, int paramInt4, int paramInt5, int paramInt6, boolean paramBoolean1,
@ -355,76 +428,4 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
}
return a(localObject1.getX(), i, localObject1.getZ());
}
public static PathType a(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) {
BlockPosition localBlockPosition = new BlockPosition(paramInt1, paramInt2, paramInt3);
IBlockData localIBlockData = paramIBlockAccess.getType(localBlockPosition);
Block localBlock1 = localIBlockData.getBlock();
Material localMaterial = localIBlockData.getMaterial();
PathType localPathType1 = PathType.BLOCKED;
if ((localBlock1 == Blocks.TRAPDOOR) || (localBlock1 == Blocks.IRON_TRAPDOOR)
|| (localBlock1 == Blocks.WATERLILY)) {
return PathType.TRAPDOOR;
}
if (localBlock1 == Blocks.FIRE) {
return PathType.DAMAGE_FIRE;
}
if (localBlock1 == Blocks.CACTUS) {
return PathType.DAMAGE_CACTUS;
}
if (((localBlock1 instanceof BlockDoor)) && (localMaterial == Material.WOOD)
&& (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_WOOD_CLOSED;
}
if (((localBlock1 instanceof BlockDoor)) && (localMaterial == Material.ORE)
&& (!localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_IRON_CLOSED;
}
if (((localBlock1 instanceof BlockDoor)) && (localIBlockData.get(BlockDoor.OPEN).booleanValue())) {
return PathType.DOOR_OPEN;
}
if ((localBlock1 instanceof BlockMinecartTrackAbstract)) {
return PathType.RAIL;
}
if (((localBlock1 instanceof BlockFence)) || ((localBlock1 instanceof BlockCobbleWall))
|| (((localBlock1 instanceof BlockFenceGate))
&& (!localIBlockData.get(BlockFenceGate.OPEN).booleanValue()))) {
return PathType.FENCE;
}
if (localMaterial == Material.AIR) {
localPathType1 = PathType.OPEN;
} else {
if (localMaterial == Material.WATER) {
return PathType.WATER;
}
if (localMaterial == Material.LAVA) {
return PathType.LAVA;
}
}
if ((localBlock1.b(paramIBlockAccess, localBlockPosition)) && (localPathType1 == PathType.BLOCKED)) {
localPathType1 = PathType.OPEN;
}
if ((localPathType1 == PathType.OPEN) && (paramInt2 >= 1)) {
PathType localPathType2 = a(paramIBlockAccess, paramInt1, paramInt2 - 1, paramInt3);
localPathType1 = (localPathType2 == PathType.WALKABLE) || (localPathType2 == PathType.OPEN)
|| (localPathType2 == PathType.WATER) || (localPathType2 == PathType.LAVA) ? PathType.OPEN
: PathType.WALKABLE;
}
if (localPathType1 == PathType.WALKABLE) {
for (int i = paramInt1 - 1; i <= paramInt1 + 1; i++) {
for (int k = paramInt3 - 1; k <= paramInt3 + 1; k++) {
if ((i != paramInt1) || (k != paramInt3)) {
Block localBlock2 = paramIBlockAccess.getType(new BlockPosition(i, paramInt2, k)).getBlock();
if (localBlock2 == Blocks.CACTUS) {
localPathType1 = PathType.DANGER_CACTUS;
} else if (localBlock2 == Blocks.FIRE) {
localPathType1 = PathType.DANGER_FIRE;
}
}
}
}
}
return localPathType1;
}
}

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_R1.Entity;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.EntityTrackerEntry;
import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R2.EntityPlayer;
import net.minecraft.server.v1_9_R2.EntityTrackerEntry;
public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public PlayerlistTrackerEntry(Entity entity, int i, int j, int k, boolean flag) {