mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 04:35:50 +01:00
Update to MC 1.10
This commit is contained in:
parent
257144f4c8
commit
844e0aa7ef
6
pom.xml
6
pom.xml
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
<groupId>net.citizensnpcs</groupId>
|
<groupId>net.citizensnpcs</groupId>
|
||||||
<artifactId>citizens</artifactId>
|
<artifactId>citizens</artifactId>
|
||||||
<version>2.0.18-SNAPSHOT</version>
|
<version>2.0.19-SNAPSHOT</version>
|
||||||
<name>Citizens</name>
|
<name>Citizens</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<craftbukkit.version>1.9.4-R0.1-SNAPSHOT</craftbukkit.version>
|
<craftbukkit.version>1.10-R0.1-SNAPSHOT</craftbukkit.version>
|
||||||
<citizensapi.version>2.0.18-SNAPSHOT</citizensapi.version>
|
<citizensapi.version>2.0.19-SNAPSHOT</citizensapi.version>
|
||||||
<vault.version>1.5.4</vault.version>
|
<vault.version>1.5.4</vault.version>
|
||||||
<powermock.version>1.4.12</powermock.version>
|
<powermock.version>1.4.12</powermock.version>
|
||||||
<build.number>Unknown</build.number>
|
<build.number>Unknown</build.number>
|
||||||
|
@ -459,5 +459,5 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String COMPATIBLE_MC_REVISION = "1_9_R2";
|
private static final String COMPATIBLE_MC_REVISION = "1_10_R1";
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import net.citizensnpcs.api.CitizensAPI;
|
||||||
import net.citizensnpcs.api.util.DataKey;
|
import net.citizensnpcs.api.util.DataKey;
|
||||||
import net.citizensnpcs.api.util.Messaging;
|
import net.citizensnpcs.api.util.Messaging;
|
||||||
import net.citizensnpcs.api.util.Storage;
|
import net.citizensnpcs.api.util.Storage;
|
||||||
@ -49,7 +50,7 @@ public class Settings {
|
|||||||
private void updateMessagingSettings() {
|
private void updateMessagingSettings() {
|
||||||
File file = null;
|
File file = null;
|
||||||
if (!Setting.DEBUG_FILE.asString().isEmpty()) {
|
if (!Setting.DEBUG_FILE.asString().isEmpty()) {
|
||||||
file = new File(Setting.DEBUG_FILE.asString());
|
file = new File(CitizensAPI.getPlugin().getDataFolder(), Setting.DEBUG_FILE.asString());
|
||||||
}
|
}
|
||||||
Messaging.configure(file, Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
|
Messaging.configure(file, Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
|
||||||
Setting.HIGHLIGHT_COLOUR.asString());
|
Setting.HIGHLIGHT_COLOUR.asString());
|
||||||
|
@ -8,8 +8,8 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@ -47,7 +47,7 @@ import net.citizensnpcs.trait.CurrentLocation;
|
|||||||
import net.citizensnpcs.util.Messages;
|
import net.citizensnpcs.util.Messages;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityTeleport;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityTeleport;
|
||||||
|
|
||||||
public class CitizensNPC extends AbstractNPC {
|
public class CitizensNPC extends AbstractNPC {
|
||||||
private EntityController entityController;
|
private EntityController entityController;
|
||||||
@ -194,7 +194,7 @@ public class CitizensNPC extends AbstractNPC {
|
|||||||
|
|
||||||
entityController.spawn(at, this);
|
entityController.spawn(at, this);
|
||||||
|
|
||||||
net.minecraft.server.v1_9_R2.Entity mcEntity = ((CraftEntity) getEntity()).getHandle();
|
net.minecraft.server.v1_10_R1.Entity mcEntity = ((CraftEntity) getEntity()).getHandle();
|
||||||
boolean couldSpawn = !Util.isLoaded(at) ? false : mcEntity.world.addEntity(mcEntity, SpawnReason.CUSTOM);
|
boolean couldSpawn = !Util.isLoaded(at) ? false : mcEntity.world.addEntity(mcEntity, SpawnReason.CUSTOM);
|
||||||
|
|
||||||
// send skin packets, if applicable, before other NMS packets are sent
|
// send skin packets, if applicable, before other NMS packets are sent
|
||||||
|
@ -27,6 +27,7 @@ import net.citizensnpcs.npc.entity.MushroomCowController;
|
|||||||
import net.citizensnpcs.npc.entity.OcelotController;
|
import net.citizensnpcs.npc.entity.OcelotController;
|
||||||
import net.citizensnpcs.npc.entity.PigController;
|
import net.citizensnpcs.npc.entity.PigController;
|
||||||
import net.citizensnpcs.npc.entity.PigZombieController;
|
import net.citizensnpcs.npc.entity.PigZombieController;
|
||||||
|
import net.citizensnpcs.npc.entity.PolarBearController;
|
||||||
import net.citizensnpcs.npc.entity.RabbitController;
|
import net.citizensnpcs.npc.entity.RabbitController;
|
||||||
import net.citizensnpcs.npc.entity.SheepController;
|
import net.citizensnpcs.npc.entity.SheepController;
|
||||||
import net.citizensnpcs.npc.entity.ShulkerController;
|
import net.citizensnpcs.npc.entity.ShulkerController;
|
||||||
@ -140,6 +141,7 @@ public class EntityControllers {
|
|||||||
TYPES.put(EntityType.PAINTING, PaintingController.class);
|
TYPES.put(EntityType.PAINTING, PaintingController.class);
|
||||||
TYPES.put(EntityType.PIG, PigController.class);
|
TYPES.put(EntityType.PIG, PigController.class);
|
||||||
TYPES.put(EntityType.PIG_ZOMBIE, PigZombieController.class);
|
TYPES.put(EntityType.PIG_ZOMBIE, PigZombieController.class);
|
||||||
|
TYPES.put(EntityType.POLAR_BEAR, PolarBearController.class);
|
||||||
TYPES.put(EntityType.PLAYER, HumanController.class);
|
TYPES.put(EntityType.PLAYER, HumanController.class);
|
||||||
TYPES.put(EntityType.RABBIT, RabbitController.class);
|
TYPES.put(EntityType.RABBIT, RabbitController.class);
|
||||||
TYPES.put(EntityType.SHEEP, SheepController.class);
|
TYPES.put(EntityType.SHEEP, SheepController.class);
|
||||||
|
@ -5,13 +5,13 @@ import java.util.Map;
|
|||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public abstract class MobEntityController extends AbstractEntityController {
|
public abstract class MobEntityController extends AbstractEntityController {
|
||||||
private final Constructor<?> constructor;
|
private final Constructor<?> constructor;
|
||||||
@ -23,7 +23,7 @@ public abstract class MobEntityController extends AbstractEntityController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Entity createEntity(Location at, NPC npc) {
|
protected Entity createEntity(Location at, NPC npc) {
|
||||||
net.minecraft.server.v1_9_R2.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
net.minecraft.server.v1_10_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
||||||
npc);
|
npc);
|
||||||
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
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();
|
return entity.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private net.minecraft.server.v1_9_R2.Entity createEntityFromClass(Object... args) {
|
private net.minecraft.server.v1_10_R1.Entity createEntityFromClass(Object... args) {
|
||||||
try {
|
try {
|
||||||
return (net.minecraft.server.v1_9_R2.Entity) constructor.newInstance(args);
|
return (net.minecraft.server.v1_10_R1.Entity) constructor.newInstance(args);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
|
@ -68,7 +68,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
|||||||
}
|
}
|
||||||
vector = plan.getCurrentVector();
|
vector = plan.getCurrentVector();
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_9_R2.Entity handle = NMS.getHandle(npc.getEntity());
|
net.minecraft.server.v1_10_R1.Entity handle = NMS.getHandle(npc.getEntity());
|
||||||
double dX = vector.getBlockX() - handle.locX;
|
double dX = vector.getBlockX() - handle.locX;
|
||||||
double dZ = vector.getBlockZ() - handle.locZ;
|
double dZ = vector.getBlockZ() - handle.locZ;
|
||||||
double dY = vector.getY() - handle.locY;
|
double dY = vector.getY() - handle.locY;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package net.citizensnpcs.npc.ai;
|
package net.citizensnpcs.npc.ai;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import net.citizensnpcs.api.ai.tree.BehaviorStatus;
|
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.api.npc.NPC;
|
||||||
import net.citizensnpcs.util.PlayerAnimation;
|
import net.citizensnpcs.util.PlayerAnimation;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.Blocks;
|
import net.minecraft.server.v1_10_R1.Blocks;
|
||||||
import net.minecraft.server.v1_9_R2.EnchantmentManager;
|
import net.minecraft.server.v1_10_R1.EnchantmentManager;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.EnumItemSlot;
|
import net.minecraft.server.v1_10_R1.EnumItemSlot;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.ItemStack;
|
import net.minecraft.server.v1_10_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_9_R2.Material;
|
import net.minecraft.server.v1_10_R1.Material;
|
||||||
import net.minecraft.server.v1_9_R2.MobEffects;
|
import net.minecraft.server.v1_10_R1.MobEffects;
|
||||||
|
|
||||||
public class CitizensBlockBreaker extends BlockBreaker {
|
public class CitizensBlockBreaker extends BlockBreaker {
|
||||||
private final BlockBreakerConfiguration configuration;
|
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);
|
return Math.pow(entity.locX - x, 2) + Math.pow(entity.locY - y, 2) + Math.pow(entity.locZ - z, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private net.minecraft.server.v1_9_R2.ItemStack getCurrentItem() {
|
private net.minecraft.server.v1_10_R1.ItemStack getCurrentItem() {
|
||||||
return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item())
|
return configuration.item() != null ? CraftItemStack.asNMSCopy(configuration.item())
|
||||||
: entity instanceof EntityLiving ? ((EntityLiving) entity).getEquipment(EnumItemSlot.MAINHAND) : null;
|
: entity instanceof EntityLiving ? ((EntityLiving) entity).getEquipment(EnumItemSlot.MAINHAND) : null;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ import net.citizensnpcs.api.astar.pathfinder.VectorGoal;
|
|||||||
import net.citizensnpcs.api.astar.pathfinder.VectorNode;
|
import net.citizensnpcs.api.astar.pathfinder.VectorNode;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
|
|
||||||
public class FlyingAStarNavigationStrategy extends AbstractPathStrategy {
|
public class FlyingAStarNavigationStrategy extends AbstractPathStrategy {
|
||||||
private final NPC npc;
|
private final NPC npc;
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package net.citizensnpcs.npc.ai;
|
package net.citizensnpcs.npc.ai;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLivingEntity;
|
||||||
|
|
||||||
import net.citizensnpcs.api.ai.NavigatorParameters;
|
import net.citizensnpcs.api.ai.NavigatorParameters;
|
||||||
import net.citizensnpcs.api.ai.TargetType;
|
import net.citizensnpcs.api.ai.TargetType;
|
||||||
import net.citizensnpcs.api.ai.event.CancelReason;
|
import net.citizensnpcs.api.ai.event.CancelReason;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.NavigationAbstract;
|
import net.minecraft.server.v1_10_R1.NavigationAbstract;
|
||||||
|
|
||||||
public class MCNavigationStrategy extends AbstractPathStrategy {
|
public class MCNavigationStrategy extends AbstractPathStrategy {
|
||||||
private final EntityLiving handle;
|
private final EntityLiving handle;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.citizensnpcs.npc.ai;
|
package net.citizensnpcs.npc.ai;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
|
||||||
import net.citizensnpcs.api.ai.AttackStrategy;
|
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.api.npc.NPC;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.PlayerAnimation;
|
import net.citizensnpcs.util.PlayerAnimation;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.NavigationAbstract;
|
import net.minecraft.server.v1_10_R1.NavigationAbstract;
|
||||||
|
|
||||||
public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||||
private final boolean aggro;
|
private final boolean aggro;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBat;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBat;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Bat;
|
import org.bukkit.entity.Bat;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityBat;
|
import net.minecraft.server.v1_10_R1.EntityBat;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class BatController extends MobEntityController {
|
public class BatController extends MobEntityController {
|
||||||
public BatController() {
|
public BatController() {
|
||||||
@ -62,21 +62,21 @@ public class BatController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBlaze;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBlaze;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Blaze;
|
import org.bukkit.entity.Blaze;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityBlaze;
|
import net.minecraft.server.v1_10_R1.EntityBlaze;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class BlazeController extends MobEntityController {
|
public class BlazeController extends MobEntityController {
|
||||||
public BlazeController() {
|
public BlazeController() {
|
||||||
@ -61,21 +61,21 @@ public class BlazeController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCaveSpider;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCaveSpider;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.CaveSpider;
|
import org.bukkit.entity.CaveSpider;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityCaveSpider;
|
import net.minecraft.server.v1_10_R1.EntityCaveSpider;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class CaveSpiderController extends MobEntityController {
|
public class CaveSpiderController extends MobEntityController {
|
||||||
public CaveSpiderController() {
|
public CaveSpiderController() {
|
||||||
@ -70,21 +70,21 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -197,9 +197,9 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftChicken;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftChicken;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Chicken;
|
import org.bukkit.entity.Chicken;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityChicken;
|
import net.minecraft.server.v1_10_R1.EntityChicken;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ChickenController extends MobEntityController {
|
public class ChickenController extends MobEntityController {
|
||||||
public ChickenController() {
|
public ChickenController() {
|
||||||
@ -81,21 +81,21 @@ public class ChickenController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -206,9 +206,9 @@ public class ChickenController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCow;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCow;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Cow;
|
import org.bukkit.entity.Cow;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityCow;
|
import net.minecraft.server.v1_10_R1.EntityCow;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class CowController extends MobEntityController {
|
public class CowController extends MobEntityController {
|
||||||
public CowController() {
|
public CowController() {
|
||||||
@ -82,21 +82,21 @@ public class CowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -207,9 +207,9 @@ public class CowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftCreeper;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftCreeper;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,17 +15,17 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityCreeper;
|
import net.minecraft.server.v1_10_R1.EntityCreeper;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLightning;
|
import net.minecraft.server.v1_10_R1.EntityLightning;
|
||||||
import net.minecraft.server.v1_9_R2.EnumHand;
|
import net.minecraft.server.v1_10_R1.EnumHand;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.ItemStack;
|
import net.minecraft.server.v1_10_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class CreeperController extends MobEntityController {
|
public class CreeperController extends MobEntityController {
|
||||||
public CreeperController() {
|
public CreeperController() {
|
||||||
@ -81,20 +81,20 @@ public class CreeperController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return (SoundEffect) (npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return (SoundEffect) (npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString()));
|
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -204,9 +204,9 @@ public class CreeperController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderDragon;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderDragon;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.EnderDragon;
|
import org.bukkit.entity.EnderDragon;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderDragon;
|
import net.minecraft.server.v1_10_R1.EntityEnderDragon;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class EnderDragonController extends MobEntityController {
|
public class EnderDragonController extends MobEntityController {
|
||||||
public EnderDragonController() {
|
public EnderDragonController() {
|
||||||
@ -61,21 +61,21 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderman;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderman;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Enderman;
|
import org.bukkit.entity.Enderman;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderman;
|
import net.minecraft.server.v1_10_R1.EntityEnderman;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class EndermanController extends MobEntityController {
|
public class EndermanController extends MobEntityController {
|
||||||
public EndermanController() {
|
public EndermanController() {
|
||||||
@ -70,21 +70,21 @@ public class EndermanController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -202,9 +202,9 @@ public class EndermanController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEndermite;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEndermite;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Endermite;
|
import org.bukkit.entity.Endermite;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEndermite;
|
import net.minecraft.server.v1_10_R1.EntityEndermite;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class EndermiteController extends MobEntityController {
|
public class EndermiteController extends MobEntityController {
|
||||||
public EndermiteController() {
|
public EndermiteController() {
|
||||||
@ -70,21 +70,21 @@ public class EndermiteController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -193,9 +193,9 @@ public class EndermiteController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ import java.util.Map;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.metadata.MetadataValue;
|
import org.bukkit.metadata.MetadataValue;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@ -39,26 +39,27 @@ import net.citizensnpcs.util.nms.PlayerControllerJump;
|
|||||||
import net.citizensnpcs.util.nms.PlayerControllerLook;
|
import net.citizensnpcs.util.nms.PlayerControllerLook;
|
||||||
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
||||||
import net.citizensnpcs.util.nms.PlayerNavigation;
|
import net.citizensnpcs.util.nms.PlayerNavigation;
|
||||||
import net.minecraft.server.v1_9_R2.AttributeInstance;
|
import net.minecraft.server.v1_10_R1.AttributeInstance;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EnumItemSlot;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.EnumProtocolDirection;
|
import net.minecraft.server.v1_10_R1.EnumGamemode;
|
||||||
import net.minecraft.server.v1_9_R2.GenericAttributes;
|
import net.minecraft.server.v1_10_R1.EnumItemSlot;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.EnumProtocolDirection;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.GenericAttributes;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftServer;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.NavigationAbstract;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_9_R2.NetworkManager;
|
import net.minecraft.server.v1_10_R1.MinecraftServer;
|
||||||
import net.minecraft.server.v1_9_R2.Packet;
|
import net.minecraft.server.v1_10_R1.NavigationAbstract;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityEquipment;
|
import net.minecraft.server.v1_10_R1.NetworkManager;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityHeadRotation;
|
import net.minecraft.server.v1_10_R1.Packet;
|
||||||
import net.minecraft.server.v1_9_R2.PathType;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityEquipment;
|
||||||
import net.minecraft.server.v1_9_R2.PlayerInteractManager;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityHeadRotation;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.PathType;
|
||||||
import net.minecraft.server.v1_9_R2.WorldSettings.EnumGamemode;
|
import net.minecraft.server.v1_10_R1.PlayerInteractManager;
|
||||||
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
public class EntityHumanNPC extends EntityPlayer implements NPCHolder, SkinnableEntity {
|
public class EntityHumanNPC extends EntityPlayer implements NPCHolder, SkinnableEntity {
|
||||||
private final Map<PathType, Float> bz = Maps.newEnumMap(PathType.class);
|
private final Map<PathType, Float> bz = Maps.newEnumMap(PathType.class);
|
||||||
@ -103,7 +104,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -307,18 +308,18 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
|
|
||||||
private void moveOnCurrentHeading() {
|
private void moveOnCurrentHeading() {
|
||||||
NMS.updateAI(this);
|
NMS.updateAI(this);
|
||||||
if (bd) {
|
if (be) {
|
||||||
if (onGround && jumpTicks == 0) {
|
if (onGround && jumpTicks == 0) {
|
||||||
ch();
|
cl();
|
||||||
jumpTicks = 10;
|
jumpTicks = 10;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
jumpTicks = 0;
|
jumpTicks = 0;
|
||||||
}
|
}
|
||||||
be *= 0.98F;
|
|
||||||
bf *= 0.98F;
|
bf *= 0.98F;
|
||||||
bg *= 0.9F;
|
bg *= 0.98F;
|
||||||
g(be, bf); // movement method
|
bh *= 0.9F;
|
||||||
|
g(bf, bg); // movement method
|
||||||
NMS.setHeadYaw(this, yaw);
|
NMS.setHeadYaw(this, yaw);
|
||||||
if (jumpTicks > 0) {
|
if (jumpTicks > 0) {
|
||||||
jumpTicks--;
|
jumpTicks--;
|
||||||
@ -326,9 +327,9 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -345,7 +346,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
@Override
|
@Override
|
||||||
public void setSkinFlags(byte flags) {
|
public void setSkinFlags(byte flags) {
|
||||||
// set skin flag byte
|
// set skin flag byte
|
||||||
getDataWatcher().set(bq, flags);
|
getDataWatcher().set(EntityHuman.br, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGhast;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGhast;
|
||||||
import org.bukkit.entity.Ghast;
|
import org.bukkit.entity.Ghast;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityGhast;
|
import net.minecraft.server.v1_10_R1.EntityGhast;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class GhastController extends MobEntityController {
|
public class GhastController extends MobEntityController {
|
||||||
public GhastController() {
|
public GhastController() {
|
||||||
@ -47,21 +47,21 @@ public class GhastController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -71,7 +71,7 @@ public class GhastController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean cp() {
|
public boolean ct() {
|
||||||
return npc != null;
|
return npc != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGiant;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGiant;
|
||||||
import org.bukkit.entity.Giant;
|
import org.bukkit.entity.Giant;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityGiantZombie;
|
import net.minecraft.server.v1_10_R1.EntityGiantZombie;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class GiantController extends MobEntityController {
|
public class GiantController extends MobEntityController {
|
||||||
public GiantController() {
|
public GiantController() {
|
||||||
@ -56,21 +56,21 @@ public class GiantController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -180,9 +180,9 @@ public class GiantController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftGuardian;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftGuardian;
|
||||||
import org.bukkit.entity.Guardian;
|
import org.bukkit.entity.Guardian;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityGuardian;
|
import net.minecraft.server.v1_10_R1.EntityGuardian;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class GuardianController extends MobEntityController {
|
public class GuardianController extends MobEntityController {
|
||||||
public GuardianController() {
|
public GuardianController() {
|
||||||
@ -56,21 +56,21 @@ public class GuardianController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -182,9 +182,9 @@ public class GuardianController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ package net.citizensnpcs.npc.entity;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftHorse;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftHorse;
|
||||||
import org.bukkit.entity.Horse;
|
import org.bukkit.entity.Horse;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -17,13 +17,13 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
|||||||
import net.citizensnpcs.trait.HorseModifiers;
|
import net.citizensnpcs.trait.HorseModifiers;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHorse;
|
import net.minecraft.server.v1_10_R1.EntityHorse;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class HorseController extends MobEntityController {
|
public class HorseController extends MobEntityController {
|
||||||
public HorseController() {
|
public HorseController() {
|
||||||
@ -76,21 +76,21 @@ public class HorseController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -105,11 +105,11 @@ public class HorseController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean de() {
|
public boolean di() {
|
||||||
if (npc == null)
|
if (npc == null)
|
||||||
return super.de();
|
return super.di();
|
||||||
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
|
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
|
||||||
return super.de() && !protectedDefault;
|
return super.di() && !protectedDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -211,9 +211,9 @@ public class HorseController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import java.util.regex.Pattern;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Scoreboard;
|
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.Skin;
|
||||||
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.PlayerInteractManager;
|
import net.minecraft.server.v1_10_R1.PlayerInteractManager;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
public class HumanController extends AbstractEntityController {
|
public class HumanController extends AbstractEntityController {
|
||||||
public HumanController() {
|
public HumanController() {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftIronGolem;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftIronGolem;
|
||||||
import org.bukkit.entity.IronGolem;
|
import org.bukkit.entity.IronGolem;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityIronGolem;
|
import net.minecraft.server.v1_10_R1.EntityIronGolem;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class IronGolemController extends MobEntityController {
|
public class IronGolemController extends MobEntityController {
|
||||||
public IronGolemController() {
|
public IronGolemController() {
|
||||||
@ -56,21 +56,21 @@ public class IronGolemController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -180,9 +180,9 @@ public class IronGolemController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMagmaCube;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMagmaCube;
|
||||||
import org.bukkit.entity.MagmaCube;
|
import org.bukkit.entity.MagmaCube;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -16,13 +16,13 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
|||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMagmaCube;
|
import net.minecraft.server.v1_10_R1.EntityMagmaCube;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MagmaCubeController extends MobEntityController {
|
public class MagmaCubeController extends MobEntityController {
|
||||||
public MagmaCubeController() {
|
public MagmaCubeController() {
|
||||||
@ -59,21 +59,21 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -183,9 +183,9 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMushroomCow;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMushroomCow;
|
||||||
import org.bukkit.entity.MushroomCow;
|
import org.bukkit.entity.MushroomCow;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMushroomCow;
|
import net.minecraft.server.v1_10_R1.EntityMushroomCow;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MushroomCowController extends MobEntityController {
|
public class MushroomCowController extends MobEntityController {
|
||||||
|
|
||||||
@ -68,21 +68,21 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -191,9 +191,9 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftOcelot;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftOcelot;
|
||||||
import org.bukkit.entity.Ocelot;
|
import org.bukkit.entity.Ocelot;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityOcelot;
|
import net.minecraft.server.v1_10_R1.EntityOcelot;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class OcelotController extends MobEntityController {
|
public class OcelotController extends MobEntityController {
|
||||||
public OcelotController() {
|
public OcelotController() {
|
||||||
@ -67,21 +67,21 @@ public class OcelotController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -191,9 +191,9 @@ public class OcelotController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPig;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPig;
|
||||||
import org.bukkit.entity.Pig;
|
import org.bukkit.entity.Pig;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,14 +15,14 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLightning;
|
import net.minecraft.server.v1_10_R1.EntityLightning;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPig;
|
import net.minecraft.server.v1_10_R1.EntityPig;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class PigController extends MobEntityController {
|
public class PigController extends MobEntityController {
|
||||||
public PigController() {
|
public PigController() {
|
||||||
@ -68,21 +68,21 @@ public class PigController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -193,9 +193,9 @@ public class PigController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPigZombie;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPigZombie;
|
||||||
import org.bukkit.entity.PigZombie;
|
import org.bukkit.entity.PigZombie;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPigZombie;
|
import net.minecraft.server.v1_10_R1.EntityPigZombie;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class PigZombieController extends MobEntityController {
|
public class PigZombieController extends MobEntityController {
|
||||||
|
|
||||||
@ -57,21 +57,21 @@ public class PigZombieController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -181,9 +181,9 @@ public class PigZombieController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,174 @@
|
|||||||
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPolarBear;
|
||||||
|
import org.bukkit.entity.PolarBear;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import net.citizensnpcs.api.event.NPCEnderTeleportEvent;
|
||||||
|
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||||
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
import net.citizensnpcs.npc.CitizensNPC;
|
||||||
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
|
import net.citizensnpcs.util.NMS;
|
||||||
|
import net.citizensnpcs.util.Util;
|
||||||
|
import net.minecraft.server.v1_10_R1.EntityPolarBear;
|
||||||
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
|
public class PolarBearController extends MobEntityController {
|
||||||
|
public PolarBearController() {
|
||||||
|
super(EntityPolarBearNPC.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PolarBear getBukkitEntity() {
|
||||||
|
return (PolarBear) super.getBukkitEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {
|
||||||
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
|
public EntityPolarBearNPC(World world) {
|
||||||
|
this(world, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityPolarBearNPC(World world, NPC npc) {
|
||||||
|
super(world);
|
||||||
|
this.npc = (CitizensNPC) npc;
|
||||||
|
if (npc != null) {
|
||||||
|
NMS.clearGoals(goalSelector, targetSelector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SoundEffect bV() {
|
||||||
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SoundEffect bW() {
|
||||||
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
|
// this method is called by both the entities involved - cancelling
|
||||||
|
// it will not stop the NPC from moving.
|
||||||
|
super.collide(entity);
|
||||||
|
if (npc != null) {
|
||||||
|
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean d(NBTTagCompound save) {
|
||||||
|
return npc == null ? super.d(save) : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||||
|
if (npc == null)
|
||||||
|
super.enderTeleportTo(d0, d1, d2);
|
||||||
|
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||||
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
if (!event.isCancelled()) {
|
||||||
|
super.enderTeleportTo(d0, d1, d2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void g(double x, double y, double z) {
|
||||||
|
if (npc == null) {
|
||||||
|
super.g(x, y, z);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (NPCPushEvent.getHandlerList().getRegisteredListeners().length == 0) {
|
||||||
|
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true))
|
||||||
|
super.g(x, y, z);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Vector vector = new Vector(x, y, z);
|
||||||
|
NPCPushEvent event = Util.callPushEvent(npc, vector);
|
||||||
|
if (!event.isCancelled()) {
|
||||||
|
vector = event.getCollisionVector();
|
||||||
|
super.g(vector.getX(), vector.getY(), vector.getZ());
|
||||||
|
}
|
||||||
|
// when another entity collides, this method is called to push the
|
||||||
|
// NPC so we prevent it from doing anything if the event is
|
||||||
|
// cancelled.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SoundEffect G() {
|
||||||
|
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
|
||||||
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
|
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CraftEntity getBukkitEntity() {
|
||||||
|
if (bukkitEntity == null && npc != null)
|
||||||
|
bukkitEntity = new PolarBearNPC(this);
|
||||||
|
return super.getBukkitEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NPC getNPC() {
|
||||||
|
return npc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isLeashed() {
|
||||||
|
if (npc == null) {
|
||||||
|
return super.isLeashed();
|
||||||
|
}
|
||||||
|
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
|
||||||
|
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
|
||||||
|
return super.isLeashed();
|
||||||
|
if (super.isLeashed()) {
|
||||||
|
unleash(true, false); // clearLeash with client update
|
||||||
|
}
|
||||||
|
return false; // shouldLeash
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void L() {
|
||||||
|
if (npc == null) {
|
||||||
|
super.L();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void m() {
|
||||||
|
super.m();
|
||||||
|
if (npc != null) {
|
||||||
|
NMS.updateAI(this);
|
||||||
|
npc.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class PolarBearNPC extends CraftPolarBear implements NPCHolder {
|
||||||
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
|
public PolarBearNPC(EntityPolarBearNPC entity) {
|
||||||
|
super((CraftServer) Bukkit.getServer(), entity);
|
||||||
|
this.npc = entity.npc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NPC getNPC() {
|
||||||
|
return npc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftRabbit;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftRabbit;
|
||||||
import org.bukkit.entity.Rabbit;
|
import org.bukkit.entity.Rabbit;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,14 +15,14 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntityRabbit;
|
import net.minecraft.server.v1_10_R1.EntityRabbit;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class RabbitController extends MobEntityController {
|
public class RabbitController extends MobEntityController {
|
||||||
public RabbitController() {
|
public RabbitController() {
|
||||||
@ -68,21 +68,21 @@ public class RabbitController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -200,9 +200,9 @@ public class RabbitController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSheep;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSheep;
|
||||||
import org.bukkit.entity.Sheep;
|
import org.bukkit.entity.Sheep;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySheep;
|
import net.minecraft.server.v1_10_R1.EntitySheep;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SheepController extends MobEntityController {
|
public class SheepController extends MobEntityController {
|
||||||
public SheepController() {
|
public SheepController() {
|
||||||
@ -67,21 +67,21 @@ public class SheepController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -190,9 +190,9 @@ public class SheepController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftShulker;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftShulker;
|
||||||
import org.bukkit.entity.Shulker;
|
import org.bukkit.entity.Shulker;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,14 +15,14 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityAIBodyControl;
|
import net.minecraft.server.v1_10_R1.EntityAIBodyControl;
|
||||||
import net.minecraft.server.v1_9_R2.EntityShulker;
|
import net.minecraft.server.v1_10_R1.EntityShulker;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ShulkerController extends MobEntityController {
|
public class ShulkerController extends MobEntityController {
|
||||||
public ShulkerController() {
|
public ShulkerController() {
|
||||||
@ -57,21 +57,21 @@ public class ShulkerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -189,9 +189,9 @@ public class ShulkerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSilverfish;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSilverfish;
|
||||||
import org.bukkit.entity.Silverfish;
|
import org.bukkit.entity.Silverfish;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySilverfish;
|
import net.minecraft.server.v1_10_R1.EntitySilverfish;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SilverfishController extends MobEntityController {
|
public class SilverfishController extends MobEntityController {
|
||||||
public SilverfishController() {
|
public SilverfishController() {
|
||||||
@ -56,21 +56,21 @@ public class SilverfishController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -179,9 +179,9 @@ public class SilverfishController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSkeleton;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSkeleton;
|
||||||
import org.bukkit.entity.Skeleton;
|
import org.bukkit.entity.Skeleton;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySkeleton;
|
import net.minecraft.server.v1_10_R1.EntitySkeleton;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SkeletonController extends MobEntityController {
|
public class SkeletonController extends MobEntityController {
|
||||||
public SkeletonController() {
|
public SkeletonController() {
|
||||||
@ -56,21 +56,21 @@ public class SkeletonController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -180,9 +180,9 @@ public class SkeletonController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSlime;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSlime;
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -16,14 +16,14 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
|||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
import net.citizensnpcs.util.nms.PlayerControllerMove;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySlime;
|
import net.minecraft.server.v1_10_R1.EntitySlime;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SlimeController extends MobEntityController {
|
public class SlimeController extends MobEntityController {
|
||||||
public SlimeController() {
|
public SlimeController() {
|
||||||
@ -60,21 +60,21 @@ public class SlimeController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -192,9 +192,9 @@ public class SlimeController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSnowman;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSnowman;
|
||||||
import org.bukkit.entity.Snowman;
|
import org.bukkit.entity.Snowman;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySnowman;
|
import net.minecraft.server.v1_10_R1.EntitySnowman;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SnowmanController extends MobEntityController {
|
public class SnowmanController extends MobEntityController {
|
||||||
public SnowmanController() {
|
public SnowmanController() {
|
||||||
@ -56,21 +56,21 @@ public class SnowmanController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -180,9 +180,9 @@ public class SnowmanController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSpider;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSpider;
|
||||||
import org.bukkit.entity.Spider;
|
import org.bukkit.entity.Spider;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySpider;
|
import net.minecraft.server.v1_10_R1.EntitySpider;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SpiderController extends MobEntityController {
|
public class SpiderController extends MobEntityController {
|
||||||
public SpiderController() {
|
public SpiderController() {
|
||||||
@ -56,21 +56,21 @@ public class SpiderController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -179,9 +179,9 @@ public class SpiderController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSquid;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSquid;
|
||||||
import org.bukkit.entity.Squid;
|
import org.bukkit.entity.Squid;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySquid;
|
import net.minecraft.server.v1_10_R1.EntitySquid;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SquidController extends MobEntityController {
|
public class SquidController extends MobEntityController {
|
||||||
public SquidController() {
|
public SquidController() {
|
||||||
@ -56,21 +56,21 @@ public class SquidController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -172,9 +172,9 @@ public class SquidController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftVillager;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftVillager;
|
||||||
import org.bukkit.entity.Villager;
|
import org.bukkit.entity.Villager;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,16 +15,16 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EntityVillager;
|
import net.minecraft.server.v1_10_R1.EntityVillager;
|
||||||
import net.minecraft.server.v1_9_R2.EnumHand;
|
import net.minecraft.server.v1_10_R1.EnumHand;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.ItemStack;
|
import net.minecraft.server.v1_10_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class VillagerController extends MobEntityController {
|
public class VillagerController extends MobEntityController {
|
||||||
public VillagerController() {
|
public VillagerController() {
|
||||||
@ -76,21 +76,21 @@ public class VillagerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -206,9 +206,9 @@ public class VillagerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWitch;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWitch;
|
||||||
import org.bukkit.entity.Witch;
|
import org.bukkit.entity.Witch;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityWitch;
|
import net.minecraft.server.v1_10_R1.EntityWitch;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class WitchController extends MobEntityController {
|
public class WitchController extends MobEntityController {
|
||||||
public WitchController() {
|
public WitchController() {
|
||||||
@ -56,21 +56,21 @@ public class WitchController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -179,9 +179,9 @@ public class WitchController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWither;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither;
|
||||||
import org.bukkit.entity.Wither;
|
import org.bukkit.entity.Wither;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityWither;
|
import net.minecraft.server.v1_10_R1.EntityWither;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class WitherController extends MobEntityController {
|
public class WitherController extends MobEntityController {
|
||||||
public WitherController() {
|
public WitherController() {
|
||||||
@ -47,21 +47,21 @@ public class WitherController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWolf;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWolf;
|
||||||
import org.bukkit.entity.Wolf;
|
import org.bukkit.entity.Wolf;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityWolf;
|
import net.minecraft.server.v1_10_R1.EntityWolf;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class WolfController extends MobEntityController {
|
public class WolfController extends MobEntityController {
|
||||||
public WolfController() {
|
public WolfController() {
|
||||||
@ -67,21 +67,21 @@ public class WolfController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -192,9 +192,9 @@ public class WolfController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity;
|
package net.citizensnpcs.npc.entity;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftZombie;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftZombie;
|
||||||
import org.bukkit.entity.Zombie;
|
import org.bukkit.entity.Zombie;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityZombie;
|
import net.minecraft.server.v1_10_R1.EntityZombie;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftKey;
|
import net.minecraft.server.v1_10_R1.MinecraftKey;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.SoundEffect;
|
import net.minecraft.server.v1_10_R1.SoundEffect;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ZombieController extends MobEntityController {
|
public class ZombieController extends MobEntityController {
|
||||||
public ZombieController() {
|
public ZombieController() {
|
||||||
@ -56,21 +56,21 @@ public class ZombieController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bS() {
|
protected SoundEffect bW() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bS()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bS()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEffect bT() {
|
protected SoundEffect bV() {
|
||||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bT()
|
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
|
||||||
: SoundEffect.a.get(new MinecraftKey(
|
: SoundEffect.a.get(new MinecraftKey(
|
||||||
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bT()).toString())));
|
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
@ -180,9 +180,9 @@ public class ZombieController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean n_() {
|
public boolean m_() {
|
||||||
if (npc == null || !npc.isFlyable()) {
|
if (npc == null || !npc.isFlyable()) {
|
||||||
return super.n_();
|
return super.m_();
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftAreaEffectCloud;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftAreaEffectCloud;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.AreaEffectCloud;
|
import org.bukkit.entity.AreaEffectCloud;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityAreaEffectCloud;
|
import net.minecraft.server.v1_10_R1.EntityAreaEffectCloud;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class AreaEffectCloudController extends MobEntityController {
|
public class AreaEffectCloudController extends MobEntityController {
|
||||||
public AreaEffectCloudController() {
|
public AreaEffectCloudController() {
|
||||||
@ -54,7 +54,7 @@ public class AreaEffectCloudController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArmorStand;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArmorStand;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.ArmorStand;
|
import org.bukkit.entity.ArmorStand;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||||
@ -16,14 +16,14 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityArmorStand;
|
import net.minecraft.server.v1_10_R1.EntityArmorStand;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EnumHand;
|
import net.minecraft.server.v1_10_R1.EnumHand;
|
||||||
import net.minecraft.server.v1_9_R2.EnumInteractionResult;
|
import net.minecraft.server.v1_10_R1.EnumInteractionResult;
|
||||||
import net.minecraft.server.v1_9_R2.ItemStack;
|
import net.minecraft.server.v1_10_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.Vec3D;
|
import net.minecraft.server.v1_10_R1.Vec3D;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ArmorStandController extends MobEntityController {
|
public class ArmorStandController extends MobEntityController {
|
||||||
public ArmorStandController() {
|
public ArmorStandController() {
|
||||||
@ -73,7 +73,7 @@ public class ArmorStandController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftBoat;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftBoat;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Boat;
|
import org.bukkit.entity.Boat;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityBoat;
|
import net.minecraft.server.v1_10_R1.EntityBoat;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class BoatController extends MobEntityController {
|
public class BoatController extends MobEntityController {
|
||||||
public BoatController() {
|
public BoatController() {
|
||||||
@ -55,7 +55,7 @@ public class BoatController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftDragonFireball;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftDragonFireball;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.DragonFireball;
|
import org.bukkit.entity.DragonFireball;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityDragonFireball;
|
import net.minecraft.server.v1_10_R1.EntityDragonFireball;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class DragonFireballController extends MobEntityController {
|
public class DragonFireballController extends MobEntityController {
|
||||||
public DragonFireballController() {
|
public DragonFireballController() {
|
||||||
@ -55,7 +55,7 @@ public class DragonFireballController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,17 +6,17 @@ import net.citizensnpcs.npc.AbstractEntityController;
|
|||||||
import net.citizensnpcs.npc.CitizensNPC;
|
import net.citizensnpcs.npc.CitizensNPC;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEgg;
|
import net.minecraft.server.v1_10_R1.EntityEgg;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEgg;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEgg;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Egg;
|
import org.bukkit.entity.Egg;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -75,7 +75,7 @@ public class EggController extends AbstractEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderCrystal;
|
import net.minecraft.server.v1_10_R1.EntityEnderCrystal;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderCrystal;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderCrystal;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.EnderCrystal;
|
import org.bukkit.entity.EnderCrystal;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public class EnderCrystalController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderPearl;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderPearl;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.EnderPearl;
|
import org.bukkit.entity.EnderPearl;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderPearl;
|
import net.minecraft.server.v1_10_R1.EntityEnderPearl;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class EnderPearlController extends MobEntityController {
|
public class EnderPearlController extends MobEntityController {
|
||||||
public EnderPearlController() {
|
public EnderPearlController() {
|
||||||
@ -54,7 +54,7 @@ public class EnderPearlController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderSignal;
|
import net.minecraft.server.v1_10_R1.EntityEnderSignal;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEnderSignal;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEnderSignal;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.EnderSignal;
|
import org.bukkit.entity.EnderSignal;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public class EnderSignalController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityExperienceOrb;
|
import net.minecraft.server.v1_10_R1.EntityExperienceOrb;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftExperienceOrb;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftExperienceOrb;
|
||||||
import org.bukkit.entity.ExperienceOrb;
|
import org.bukkit.entity.ExperienceOrb;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class ExperienceOrbController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -3,11 +3,11 @@ package net.citizensnpcs.npc.entity.nonliving;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFallingSand;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFallingSand;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.util.CraftMagicNumbers;
|
import org.bukkit.craftbukkit.v1_10_R1.util.CraftMagicNumbers;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.FallingBlock;
|
import org.bukkit.entity.FallingBlock;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -19,13 +19,13 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.Block;
|
import net.minecraft.server.v1_10_R1.Block;
|
||||||
import net.minecraft.server.v1_9_R2.Blocks;
|
import net.minecraft.server.v1_10_R1.Blocks;
|
||||||
import net.minecraft.server.v1_9_R2.EntityFallingBlock;
|
import net.minecraft.server.v1_10_R1.EntityFallingBlock;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
public class FallingBlockController extends AbstractEntityController {
|
public class FallingBlockController extends AbstractEntityController {
|
||||||
public FallingBlockController() {
|
public FallingBlockController() {
|
||||||
@ -69,7 +69,7 @@ public class FallingBlockController extends AbstractEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityFireworks;
|
import net.minecraft.server.v1_10_R1.EntityFireworks;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFirework;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFirework;
|
||||||
import org.bukkit.entity.Firework;
|
import org.bukkit.entity.Firework;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public class FireworkController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftFish;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftFish;
|
||||||
import org.bukkit.entity.FishHook;
|
import org.bukkit.entity.FishHook;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityFishingHook;
|
import net.minecraft.server.v1_10_R1.EntityFishingHook;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class FishingHookController extends MobEntityController {
|
public class FishingHookController extends MobEntityController {
|
||||||
public FishingHookController() {
|
public FishingHookController() {
|
||||||
@ -40,7 +40,7 @@ public class FishingHookController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,21 +6,21 @@ import net.citizensnpcs.npc.AbstractEntityController;
|
|||||||
import net.citizensnpcs.npc.CitizensNPC;
|
import net.citizensnpcs.npc.CitizensNPC;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EntityItem;
|
import net.minecraft.server.v1_10_R1.EntityItem;
|
||||||
import net.minecraft.server.v1_9_R2.ItemStack;
|
import net.minecraft.server.v1_10_R1.ItemStack;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftItem;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftItem;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -62,7 +62,7 @@ public class ItemController extends AbstractEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -3,9 +3,9 @@ package net.citizensnpcs.npc.entity.nonliving;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftItemFrame;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftItemFrame;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.ItemFrame;
|
import org.bukkit.entity.ItemFrame;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
@ -16,11 +16,11 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityItemFrame;
|
import net.minecraft.server.v1_10_R1.EntityItemFrame;
|
||||||
import net.minecraft.server.v1_9_R2.EnumDirection;
|
import net.minecraft.server.v1_10_R1.EnumDirection;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ItemFrameController extends MobEntityController {
|
public class ItemFrameController extends MobEntityController {
|
||||||
public ItemFrameController() {
|
public ItemFrameController() {
|
||||||
@ -54,7 +54,7 @@ public class ItemFrameController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLargeFireball;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLargeFireball;
|
||||||
import org.bukkit.entity.LargeFireball;
|
import org.bukkit.entity.LargeFireball;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,9 +14,9 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLargeFireball;
|
import net.minecraft.server.v1_10_R1.EntityLargeFireball;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class LargeFireballController extends MobEntityController {
|
public class LargeFireballController extends MobEntityController {
|
||||||
public LargeFireballController() {
|
public LargeFireballController() {
|
||||||
@ -41,7 +41,7 @@ public class LargeFireballController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLeash;
|
import net.minecraft.server.v1_10_R1.EntityLeash;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLeash;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLeash;
|
||||||
import org.bukkit.entity.LeashHitch;
|
import org.bukkit.entity.LeashHitch;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class LeashController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartChest;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartChest;
|
||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartChest;
|
import net.minecraft.server.v1_10_R1.EntityMinecartChest;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartChestController extends MobEntityController {
|
public class MinecartChestController extends MobEntityController {
|
||||||
public MinecartChestController() {
|
public MinecartChestController() {
|
||||||
@ -42,7 +42,7 @@ public class MinecartChestController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartCommand;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartCommand;
|
||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartCommandBlock;
|
import net.minecraft.server.v1_10_R1.EntityMinecartCommandBlock;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartCommandController extends MobEntityController {
|
public class MinecartCommandController extends MobEntityController {
|
||||||
public MinecartCommandController() {
|
public MinecartCommandController() {
|
||||||
@ -42,7 +42,7 @@ public class MinecartCommandController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartFurnace;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartFurnace;
|
||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartFurnace;
|
import net.minecraft.server.v1_10_R1.EntityMinecartFurnace;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartFurnaceController extends MobEntityController {
|
public class MinecartFurnaceController extends MobEntityController {
|
||||||
public MinecartFurnaceController() {
|
public MinecartFurnaceController() {
|
||||||
@ -42,7 +42,7 @@ public class MinecartFurnaceController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -10,10 +10,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartHopper;
|
import net.minecraft.server.v1_10_R1.EntityMinecartHopper;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartHopperController extends MobEntityController {
|
public class MinecartHopperController extends MobEntityController {
|
||||||
public MinecartHopperController() {
|
public MinecartHopperController() {
|
||||||
@ -38,7 +38,7 @@ public class MinecartHopperController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftMinecartRideable;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftMinecartRideable;
|
||||||
import org.bukkit.entity.Minecart;
|
import org.bukkit.entity.Minecart;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartRideable;
|
import net.minecraft.server.v1_10_R1.EntityMinecartRideable;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartRideableController extends MobEntityController {
|
public class MinecartRideableController extends MobEntityController {
|
||||||
public MinecartRideableController() {
|
public MinecartRideableController() {
|
||||||
@ -42,7 +42,7 @@ public class MinecartRideableController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -10,10 +10,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartMobSpawner;
|
import net.minecraft.server.v1_10_R1.EntityMinecartMobSpawner;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartSpawnerController extends MobEntityController {
|
public class MinecartSpawnerController extends MobEntityController {
|
||||||
public MinecartSpawnerController() {
|
public MinecartSpawnerController() {
|
||||||
@ -38,7 +38,7 @@ public class MinecartSpawnerController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -10,10 +10,10 @@ import net.citizensnpcs.npc.MobEntityController;
|
|||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartTNT;
|
import net.minecraft.server.v1_10_R1.EntityMinecartTNT;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class MinecartTNTController extends MobEntityController {
|
public class MinecartTNTController extends MobEntityController {
|
||||||
public MinecartTNTController() {
|
public MinecartTNTController() {
|
||||||
@ -38,7 +38,7 @@ public class MinecartTNTController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPainting;
|
import net.minecraft.server.v1_10_R1.EntityPainting;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPainting;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPainting;
|
||||||
import org.bukkit.entity.Painting;
|
import org.bukkit.entity.Painting;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public class PaintingController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftShulkerBullet;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftShulkerBullet;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityShulkerBullet;
|
import net.minecraft.server.v1_10_R1.EntityShulkerBullet;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ShulkerBulletController extends MobEntityController {
|
public class ShulkerBulletController extends MobEntityController {
|
||||||
public ShulkerBulletController() {
|
public ShulkerBulletController() {
|
||||||
@ -40,7 +40,7 @@ public class ShulkerBulletController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSmallFireball;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSmallFireball;
|
||||||
import org.bukkit.entity.SmallFireball;
|
import org.bukkit.entity.SmallFireball;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySmallFireball;
|
import net.minecraft.server.v1_10_R1.EntitySmallFireball;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SmallFireballController extends MobEntityController {
|
public class SmallFireballController extends MobEntityController {
|
||||||
public SmallFireballController() {
|
public SmallFireballController() {
|
||||||
@ -40,7 +40,7 @@ public class SmallFireballController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySnowball;
|
import net.minecraft.server.v1_10_R1.EntitySnowball;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftSnowball;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftSnowball;
|
||||||
import org.bukkit.entity.Snowball;
|
import org.bukkit.entity.Snowball;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public class SnowballController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArrow;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArrow;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySpectralArrow;
|
import net.minecraft.server.v1_10_R1.EntitySpectralArrow;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class SpectralArrowController extends MobEntityController {
|
public class SpectralArrowController extends MobEntityController {
|
||||||
public SpectralArrowController() {
|
public SpectralArrowController() {
|
||||||
@ -40,7 +40,7 @@ public class SpectralArrowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTNTPrimed;
|
import net.minecraft.server.v1_10_R1.EntityTNTPrimed;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftTNTPrimed;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftTNTPrimed;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public class TNTPrimedController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftThrownExpBottle;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftThrownExpBottle;
|
||||||
import org.bukkit.entity.ThrownExpBottle;
|
import org.bukkit.entity.ThrownExpBottle;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityThrownExpBottle;
|
import net.minecraft.server.v1_10_R1.EntityThrownExpBottle;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ThrownExpBottleController extends MobEntityController {
|
public class ThrownExpBottleController extends MobEntityController {
|
||||||
public ThrownExpBottleController() {
|
public ThrownExpBottleController() {
|
||||||
@ -40,7 +40,7 @@ public class ThrownExpBottleController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLingeringPotion;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLingeringPotion;
|
||||||
import org.bukkit.entity.ThrownPotion;
|
import org.bukkit.entity.ThrownPotion;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,10 +13,10 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPotion;
|
import net.minecraft.server.v1_10_R1.EntityPotion;
|
||||||
import net.minecraft.server.v1_9_R2.Items;
|
import net.minecraft.server.v1_10_R1.Items;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class ThrownPotionController extends MobEntityController {
|
public class ThrownPotionController extends MobEntityController {
|
||||||
public ThrownPotionController() {
|
public ThrownPotionController() {
|
||||||
@ -41,7 +41,7 @@ public class ThrownPotionController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.npc.entity.nonliving;
|
package net.citizensnpcs.npc.entity.nonliving;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftArrow;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftArrow;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTippedArrow;
|
import net.minecraft.server.v1_10_R1.EntityTippedArrow;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class TippedArrowController extends MobEntityController {
|
public class TippedArrowController extends MobEntityController {
|
||||||
public TippedArrowController() {
|
public TippedArrowController() {
|
||||||
@ -40,7 +40,7 @@ public class TippedArrowController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -6,14 +6,14 @@ import net.citizensnpcs.npc.CitizensNPC;
|
|||||||
import net.citizensnpcs.npc.MobEntityController;
|
import net.citizensnpcs.npc.MobEntityController;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityWitherSkull;
|
import net.minecraft.server.v1_10_R1.EntityWitherSkull;
|
||||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWitherSkull;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWitherSkull;
|
||||||
import org.bukkit.entity.WitherSkull;
|
import org.bukkit.entity.WitherSkull;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ public class WitherSkullController extends MobEntityController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collide(net.minecraft.server.v1_9_R2.Entity entity) {
|
public void collide(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
// this method is called by both the entities involved - cancelling
|
// this method is called by both the entities involved - cancelling
|
||||||
// it will not stop the NPC from moving.
|
// it will not stop the NPC from moving.
|
||||||
super.collide(entity);
|
super.collide(entity);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package net.citizensnpcs.npc.network;
|
package net.citizensnpcs.npc.network;
|
||||||
|
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.MinecraftServer;
|
import net.minecraft.server.v1_10_R1.MinecraftServer;
|
||||||
import net.minecraft.server.v1_9_R2.NetworkManager;
|
import net.minecraft.server.v1_10_R1.NetworkManager;
|
||||||
import net.minecraft.server.v1_9_R2.Packet;
|
import net.minecraft.server.v1_10_R1.Packet;
|
||||||
import net.minecraft.server.v1_9_R2.PlayerConnection;
|
import net.minecraft.server.v1_10_R1.PlayerConnection;
|
||||||
|
|
||||||
public class EmptyNetHandler extends PlayerConnection {
|
public class EmptyNetHandler extends PlayerConnection {
|
||||||
public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) {
|
public EmptyNetHandler(MinecraftServer minecraftServer, NetworkManager networkManager, EntityPlayer entityPlayer) {
|
||||||
|
@ -3,8 +3,8 @@ package net.citizensnpcs.npc.network;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.EnumProtocolDirection;
|
import net.minecraft.server.v1_10_R1.EnumProtocolDirection;
|
||||||
import net.minecraft.server.v1_9_R2.NetworkManager;
|
import net.minecraft.server.v1_10_R1.NetworkManager;
|
||||||
|
|
||||||
public class EmptyNetworkManager extends NetworkManager {
|
public class EmptyNetworkManager extends NetworkManager {
|
||||||
public EmptyNetworkManager(EnumProtocolDirection flag) throws IOException {
|
public EmptyNetworkManager(EnumProtocolDirection flag) throws IOException {
|
||||||
|
@ -3,7 +3,7 @@ package net.citizensnpcs.trait;
|
|||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
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.api.util.DataKey;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderDragon;
|
import net.minecraft.server.v1_10_R1.EntityEnderDragon;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
|
|
||||||
//TODO: reduce reliance on CitizensNPC
|
//TODO: reduce reliance on CitizensNPC
|
||||||
@TraitName("controllable")
|
@TraitName("controllable")
|
||||||
@ -81,7 +81,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
NMS.mount(npc.getEntity(), player);
|
NMS.mount(npc.getEntity(), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
private net.minecraft.server.v1_9_R2.Entity getHandle() {
|
private net.minecraft.server.v1_10_R1.Entity getHandle() {
|
||||||
return NMS.getHandle(npc.getEntity());
|
return NMS.getHandle(npc.getEntity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setMountedYaw(net.minecraft.server.v1_9_R2.Entity handle) {
|
private void setMountedYaw(net.minecraft.server.v1_10_R1.Entity handle) {
|
||||||
if (handle instanceof EntityEnderDragon || !Setting.USE_BOAT_CONTROLS.asBoolean())
|
if (handle instanceof EntityEnderDragon || !Setting.USE_BOAT_CONTROLS.asBoolean())
|
||||||
return; // EnderDragon handles this separately
|
return; // EnderDragon handles this separately
|
||||||
double tX = handle.locX + handle.motX;
|
double tX = handle.locX + handle.motX;
|
||||||
@ -214,12 +214,12 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double updateHorizontalSpeed(net.minecraft.server.v1_9_R2.Entity handle,
|
private double updateHorizontalSpeed(net.minecraft.server.v1_10_R1.Entity handle,
|
||||||
net.minecraft.server.v1_9_R2.Entity passenger, double speed, float speedMod) {
|
net.minecraft.server.v1_10_R1.Entity passenger, double speed, float speedMod) {
|
||||||
double oldSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
|
double oldSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
|
||||||
double angle = Math.toRadians(passenger.yaw - ((EntityLiving) passenger).be * 45.0F);
|
double angle = Math.toRadians(passenger.yaw - ((EntityLiving) passenger).bf * 45.0F);
|
||||||
handle.motX += speedMod * -Math.sin(angle) * ((EntityLiving) passenger).bf * 0.05;
|
handle.motX += speedMod * -Math.sin(angle) * ((EntityLiving) passenger).bg * 0.05;
|
||||||
handle.motZ += speedMod * Math.cos(angle) * ((EntityLiving) passenger).bf * 0.05;
|
handle.motZ += speedMod * Math.cos(angle) * ((EntityLiving) passenger).bg * 0.05;
|
||||||
|
|
||||||
double newSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
|
double newSpeed = Math.sqrt(handle.motX * handle.motX + handle.motZ * handle.motZ);
|
||||||
if (newSpeed > oldSpeed && speed < 0.35D) {
|
if (newSpeed > oldSpeed && speed < 0.35D) {
|
||||||
@ -248,8 +248,8 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(Player rider) {
|
public void run(Player rider) {
|
||||||
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
|
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
|
||||||
net.minecraft.server.v1_9_R2.Entity passenger = ((CraftPlayer) rider).getHandle();
|
net.minecraft.server.v1_10_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
|
||||||
boolean onGround = handle.onGround;
|
boolean onGround = handle.onGround;
|
||||||
float speedMod = npc.getNavigator().getDefaultParameters()
|
float speedMod = npc.getNavigator().getDefaultParameters()
|
||||||
.modifiedSpeed((onGround ? GROUND_SPEED : AIR_SPEED));
|
.modifiedSpeed((onGround ? GROUND_SPEED : AIR_SPEED));
|
||||||
@ -300,7 +300,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
}
|
}
|
||||||
Vector dir = rider.getEyeLocation().getDirection();
|
Vector dir = rider.getEyeLocation().getDirection();
|
||||||
dir.multiply(npc.getNavigator().getDefaultParameters().speedModifier());
|
dir.multiply(npc.getNavigator().getDefaultParameters().speedModifier());
|
||||||
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
|
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
|
||||||
handle.motX = dir.getX();
|
handle.motX = dir.getX();
|
||||||
handle.motY = dir.getY();
|
handle.motY = dir.getY();
|
||||||
handle.motZ = dir.getZ();
|
handle.motZ = dir.getZ();
|
||||||
@ -343,8 +343,8 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
getHandle().motY = 0.001;
|
getHandle().motY = 0.001;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_9_R2.Entity handle = getHandle();
|
net.minecraft.server.v1_10_R1.Entity handle = getHandle();
|
||||||
net.minecraft.server.v1_9_R2.Entity passenger = ((CraftPlayer) rider).getHandle();
|
net.minecraft.server.v1_10_R1.Entity passenger = ((CraftPlayer) rider).getHandle();
|
||||||
|
|
||||||
speed = updateHorizontalSpeed(handle, passenger, speed, 1F);
|
speed = updateHorizontalSpeed(handle, passenger, speed, 1F);
|
||||||
boolean shouldJump = NMS.shouldJump(passenger);
|
boolean shouldJump = NMS.shouldJump(passenger);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package net.citizensnpcs.trait;
|
package net.citizensnpcs.trait;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftRabbit;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftRabbit;
|
||||||
import org.bukkit.entity.Rabbit;
|
import org.bukkit.entity.Rabbit;
|
||||||
|
|
||||||
import net.citizensnpcs.api.persistence.Persist;
|
import net.citizensnpcs.api.persistence.Persist;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package net.citizensnpcs.trait;
|
package net.citizensnpcs.trait;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftWither;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftWither;
|
||||||
import org.bukkit.entity.Wither;
|
import org.bukkit.entity.Wither;
|
||||||
|
|
||||||
import net.citizensnpcs.api.persistence.Persist;
|
import net.citizensnpcs.api.persistence.Persist;
|
||||||
import net.citizensnpcs.api.trait.Trait;
|
import net.citizensnpcs.api.trait.Trait;
|
||||||
import net.citizensnpcs.api.trait.TraitName;
|
import net.citizensnpcs.api.trait.TraitName;
|
||||||
import net.minecraft.server.v1_9_R2.EntityWither;
|
import net.minecraft.server.v1_10_R1.EntityWither;
|
||||||
|
|
||||||
@TraitName("withertrait")
|
@TraitName("withertrait")
|
||||||
public class WitherTrait extends Trait {
|
public class WitherTrait extends Trait {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package net.citizensnpcs.trait.waypoint;
|
package net.citizensnpcs.trait.waypoint;
|
||||||
|
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.EntityEnderSignal;
|
import net.minecraft.server.v1_10_R1.EntityEnderSignal;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class EntityEnderSignalMarker extends EntityEnderSignal {
|
public class EntityEnderSignalMarker extends EntityEnderSignal {
|
||||||
public EntityEnderSignalMarker(World world) {
|
public EntityEnderSignalMarker(World world) {
|
||||||
|
@ -21,12 +21,12 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftSound;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftSound;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_10_R1.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_10_R1.event.CraftEventFactory;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.FishHook;
|
import org.bukkit.entity.FishHook;
|
||||||
import org.bukkit.entity.Horse;
|
import org.bukkit.entity.Horse;
|
||||||
@ -56,38 +56,39 @@ import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
|||||||
import net.citizensnpcs.npc.network.EmptyChannel;
|
import net.citizensnpcs.npc.network.EmptyChannel;
|
||||||
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
||||||
import net.citizensnpcs.util.nms.PlayerlistTrackerEntry;
|
import net.citizensnpcs.util.nms.PlayerlistTrackerEntry;
|
||||||
import net.minecraft.server.v1_9_R2.AttributeInstance;
|
import net.minecraft.server.v1_10_R1.AttributeInstance;
|
||||||
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
|
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
|
||||||
import net.minecraft.server.v1_9_R2.Block;
|
import net.minecraft.server.v1_10_R1.Block;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.ControllerJump;
|
import net.minecraft.server.v1_10_R1.ControllerJump;
|
||||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
import net.minecraft.server.v1_10_R1.DamageSource;
|
||||||
import net.minecraft.server.v1_9_R2.DataWatcherObject;
|
import net.minecraft.server.v1_10_R1.DataWatcherObject;
|
||||||
import net.minecraft.server.v1_9_R2.EnchantmentManager;
|
import net.minecraft.server.v1_10_R1.EnchantmentManager;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityFishingHook;
|
import net.minecraft.server.v1_10_R1.EntityFishingHook;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHorse;
|
import net.minecraft.server.v1_10_R1.EntityHorse;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.EntityInsentient;
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntityMinecartAbstract;
|
import net.minecraft.server.v1_10_R1.EntityMinecartAbstract;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.EntityRabbit;
|
import net.minecraft.server.v1_10_R1.EntityPolarBear;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTameableAnimal;
|
import net.minecraft.server.v1_10_R1.EntityRabbit;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTracker;
|
import net.minecraft.server.v1_10_R1.EntityTameableAnimal;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTrackerEntry;
|
import net.minecraft.server.v1_10_R1.EntityTracker;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTypes;
|
import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
|
||||||
import net.minecraft.server.v1_9_R2.GenericAttributes;
|
import net.minecraft.server.v1_10_R1.EntityTypes;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.GenericAttributes;
|
||||||
import net.minecraft.server.v1_9_R2.MobEffects;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_9_R2.NavigationAbstract;
|
import net.minecraft.server.v1_10_R1.MobEffects;
|
||||||
import net.minecraft.server.v1_9_R2.NetworkManager;
|
import net.minecraft.server.v1_10_R1.NavigationAbstract;
|
||||||
import net.minecraft.server.v1_9_R2.Packet;
|
import net.minecraft.server.v1_10_R1.NetworkManager;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutPlayerInfo;
|
import net.minecraft.server.v1_10_R1.Packet;
|
||||||
import net.minecraft.server.v1_9_R2.PathfinderGoalSelector;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo;
|
||||||
import net.minecraft.server.v1_9_R2.Vec3D;
|
import net.minecraft.server.v1_10_R1.PathfinderGoalSelector;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.Vec3D;
|
||||||
import net.minecraft.server.v1_9_R2.WorldServer;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
import net.minecraft.server.v1_10_R1.WorldServer;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class NMS {
|
public class NMS {
|
||||||
@ -207,10 +208,11 @@ public class NMS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void flyingMoveLogic(EntityLiving entity, float f, float f1) {
|
public static void flyingMoveLogic(EntityLiving entity, float f, float f1) {
|
||||||
if (entity.cp() || entity.by()) {
|
if ((entity.ct()) || (entity.bA())) {
|
||||||
if (entity.isInWater()) {
|
if ((entity.isInWater())
|
||||||
|
&& ((!(entity instanceof EntityHuman)) || (!((EntityHuman) entity).abilities.isFlying))) {
|
||||||
double d1 = entity.locY;
|
double d1 = entity.locY;
|
||||||
float f4 = 0.8F;
|
float f4 = entity instanceof EntityPolarBear ? 0.98F : 0.8F;
|
||||||
float f3 = 0.02F;
|
float f3 = 0.02F;
|
||||||
float f2 = EnchantmentManager.d(entity);
|
float f2 = EnchantmentManager.d(entity);
|
||||||
if (f2 > 3.0F) {
|
if (f2 > 3.0F) {
|
||||||
@ -221,31 +223,36 @@ public class NMS {
|
|||||||
}
|
}
|
||||||
if (f2 > 0.0F) {
|
if (f2 > 0.0F) {
|
||||||
f4 += (0.54600006F - f4) * f2 / 3.0F;
|
f4 += (0.54600006F - f4) * f2 / 3.0F;
|
||||||
f3 += (entity.cl() - f3) * f2 / 3.0F;
|
f3 += (entity.cp() - f3) * f2 / 3.0F;
|
||||||
}
|
}
|
||||||
entity.a(f, f1, f3);
|
entity.a(f, f1, f3);
|
||||||
entity.move(entity.motX, entity.motY, entity.motZ);
|
entity.move(entity.motX, entity.motY, entity.motZ);
|
||||||
entity.motX *= f4;
|
entity.motX *= f4;
|
||||||
entity.motY *= 0.800000011920929D;
|
entity.motY *= 0.800000011920929D;
|
||||||
entity.motZ *= f4;
|
entity.motZ *= f4;
|
||||||
|
if (!entity.isNoGravity()) {
|
||||||
entity.motY -= 0.02D;
|
entity.motY -= 0.02D;
|
||||||
|
}
|
||||||
if ((entity.positionChanged)
|
if ((entity.positionChanged)
|
||||||
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
|
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
|
||||||
entity.motY = 0.30000001192092896D;
|
entity.motY = 0.30000001192092896D;
|
||||||
}
|
}
|
||||||
} else if (entity.an()) {
|
} else if ((entity.ao())
|
||||||
|
&& ((!(entity instanceof EntityHuman)) || (!((EntityHuman) entity).abilities.isFlying))) {
|
||||||
double d1 = entity.locY;
|
double d1 = entity.locY;
|
||||||
entity.a(f, f1, 0.02F);
|
entity.a(f, f1, 0.02F);
|
||||||
entity.move(entity.motX, entity.motY, entity.motZ);
|
entity.move(entity.motX, entity.motY, entity.motZ);
|
||||||
entity.motX *= 0.5D;
|
entity.motX *= 0.5D;
|
||||||
entity.motY *= 0.5D;
|
entity.motY *= 0.5D;
|
||||||
entity.motZ *= 0.5D;
|
entity.motZ *= 0.5D;
|
||||||
|
if (!entity.isNoGravity()) {
|
||||||
entity.motY -= 0.02D;
|
entity.motY -= 0.02D;
|
||||||
|
}
|
||||||
if ((entity.positionChanged)
|
if ((entity.positionChanged)
|
||||||
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
|
&& (entity.c(entity.motX, entity.motY + 0.6000000238418579D - entity.locY + d1, entity.motZ))) {
|
||||||
entity.motY = 0.30000001192092896D;
|
entity.motY = 0.30000001192092896D;
|
||||||
}
|
}
|
||||||
} else if (entity.cC()) {
|
} else if (entity.cG()) {
|
||||||
if (entity.motY > -0.5D) {
|
if (entity.motY > -0.5D) {
|
||||||
entity.fallDistance = 1.0F;
|
entity.fallDistance = 1.0F;
|
||||||
}
|
}
|
||||||
@ -302,9 +309,9 @@ public class NMS {
|
|||||||
float f4 = 0.16277136F / (f8 * f8 * f8);
|
float f4 = 0.16277136F / (f8 * f8 * f8);
|
||||||
float f3;
|
float f3;
|
||||||
if (entity.onGround) {
|
if (entity.onGround) {
|
||||||
f3 = entity.cl() * f4;
|
f3 = entity.cp() * f4;
|
||||||
} else {
|
} else {
|
||||||
f3 = entity.aR;
|
f3 = entity.aS;
|
||||||
}
|
}
|
||||||
entity.a(f, f1, f3);
|
entity.a(f, f1, f3);
|
||||||
f8 = 0.91F;
|
f8 = 0.91F;
|
||||||
@ -312,21 +319,20 @@ public class NMS {
|
|||||||
f8 = entity.world.getType(blockposition_pooledblockposition.e(entity.locX,
|
f8 = entity.world.getType(blockposition_pooledblockposition.e(entity.locX,
|
||||||
entity.getBoundingBox().b - 1.0D, entity.locZ)).getBlock().frictionFactor * 0.91F;
|
entity.getBoundingBox().b - 1.0D, entity.locZ)).getBlock().frictionFactor * 0.91F;
|
||||||
}
|
}
|
||||||
if (entity.n_()) {
|
if (entity.m_()) {
|
||||||
float f2 = 0.15F;
|
entity.motX = MathHelper.a(entity.motX, -0.15000000596046448D, 0.15000000596046448D);
|
||||||
entity.motX = MathHelper.a(entity.motX, -f2, f2);
|
entity.motZ = MathHelper.a(entity.motZ, -0.15000000596046448D, 0.15000000596046448D);
|
||||||
entity.motZ = MathHelper.a(entity.motZ, -f2, f2);
|
|
||||||
entity.fallDistance = 0.0F;
|
entity.fallDistance = 0.0F;
|
||||||
if (entity.motY < -0.15D) {
|
if (entity.motY < -0.15D) {
|
||||||
entity.motY = -0.15D;
|
entity.motY = -0.15D;
|
||||||
}
|
}
|
||||||
boolean flag = (entity.isSneaking());
|
boolean flag = (entity.isSneaking()) && ((entity instanceof EntityHuman));
|
||||||
if ((flag) && (entity.motY < 0.0D)) {
|
if ((flag) && (entity.motY < 0.0D)) {
|
||||||
entity.motY = 0.0D;
|
entity.motY = 0.0D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entity.move(entity.motX, entity.motY, entity.motZ);
|
entity.move(entity.motX, entity.motY, entity.motZ);
|
||||||
if ((entity.positionChanged) && (entity.n_())) {
|
if ((entity.positionChanged) && (entity.m_())) {
|
||||||
entity.motY = 0.2D;
|
entity.motY = 0.2D;
|
||||||
}
|
}
|
||||||
if (entity.hasEffect(MobEffects.LEVITATION)) {
|
if (entity.hasEffect(MobEffects.LEVITATION)) {
|
||||||
@ -341,7 +347,7 @@ public class NMS {
|
|||||||
} else {
|
} else {
|
||||||
entity.motY = 0.0D;
|
entity.motY = 0.0D;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!entity.isNoGravity()) {
|
||||||
entity.motY -= 0.08D;
|
entity.motY -= 0.08D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -351,15 +357,15 @@ public class NMS {
|
|||||||
blockposition_pooledblockposition.t();
|
blockposition_pooledblockposition.t();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entity.aF = entity.aG;
|
entity.aG = entity.aH;
|
||||||
double d1 = entity.locX - entity.lastX;
|
double d1 = entity.locX - entity.lastX;
|
||||||
double d0 = entity.locZ - entity.lastZ;
|
double d0 = entity.locZ - entity.lastZ;
|
||||||
float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
|
float f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;
|
||||||
if (f2 > 1.0F) {
|
if (f2 > 1.0F) {
|
||||||
f2 = 1.0F;
|
f2 = 1.0F;
|
||||||
}
|
}
|
||||||
entity.aG += (f2 - entity.aG) * 0.4F;
|
entity.aH += (f2 - entity.aH) * 0.4F;
|
||||||
entity.aH += entity.aG;
|
entity.aI += entity.aH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.bukkit.entity.Entity getBukkitVehicle(org.bukkit.entity.Entity entity) {
|
public static org.bukkit.entity.Entity getBukkitVehicle(org.bukkit.entity.Entity entity) {
|
||||||
@ -408,7 +414,7 @@ public class NMS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static float getHeadYaw(EntityLiving handle) {
|
public static float getHeadYaw(EntityLiving handle) {
|
||||||
return handle.aO;
|
return handle.aP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NavigationAbstract getNavigation(Entity handle) {
|
public static NavigationAbstract getNavigation(Entity handle) {
|
||||||
@ -506,7 +512,7 @@ public class NMS {
|
|||||||
Entity mcEntity = getHandle(entity);
|
Entity mcEntity = getHandle(entity);
|
||||||
if (mcEntity == null)
|
if (mcEntity == null)
|
||||||
return false;
|
return false;
|
||||||
return mcEntity.aj() || mcEntity.an();
|
return mcEntity.ak() || mcEntity.ao();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNavigationFinished(NavigationAbstract navigation) {
|
public static boolean isNavigationFinished(NavigationAbstract navigation) {
|
||||||
@ -738,10 +744,10 @@ public class NMS {
|
|||||||
return;
|
return;
|
||||||
EntityLiving handle = (EntityLiving) en;
|
EntityLiving handle = (EntityLiving) en;
|
||||||
yaw = clampYaw(yaw);
|
yaw = clampYaw(yaw);
|
||||||
handle.aO = yaw;
|
|
||||||
if (!(handle instanceof EntityHuman))
|
|
||||||
handle.aN = yaw;
|
|
||||||
handle.aP = yaw;
|
handle.aP = yaw;
|
||||||
|
if (!(handle instanceof EntityHuman))
|
||||||
|
handle.aO = yaw;
|
||||||
|
handle.aQ = yaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setKnockbackResistance(org.bukkit.entity.LivingEntity entity, double d) {
|
public static void setKnockbackResistance(org.bukkit.entity.LivingEntity entity, double d) {
|
||||||
@ -802,10 +808,10 @@ public class NMS {
|
|||||||
if (!bukkitEntity.getType().isAlive())
|
if (!bukkitEntity.getType().isAlive())
|
||||||
return;
|
return;
|
||||||
EntityLiving handle = NMS.getHandle((LivingEntity) bukkitEntity);
|
EntityLiving handle = NMS.getHandle((LivingEntity) bukkitEntity);
|
||||||
handle.be = (float) d;
|
handle.bf = (float) d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldJump(net.minecraft.server.v1_9_R2.Entity entity) {
|
public static boolean shouldJump(net.minecraft.server.v1_10_R1.Entity entity) {
|
||||||
if (JUMP_FIELD == null || !(entity instanceof EntityLiving))
|
if (JUMP_FIELD == null || !(entity instanceof EntityLiving))
|
||||||
return false;
|
return false;
|
||||||
try {
|
try {
|
||||||
@ -911,13 +917,13 @@ public class NMS {
|
|||||||
private static Map<Class<?>, String> ENTITY_CLASS_TO_NAME;
|
private static Map<Class<?>, String> ENTITY_CLASS_TO_NAME;
|
||||||
private static final Map<Class<?>, Constructor<?>> ENTITY_CONSTRUCTOR_CACHE = new WeakHashMap<Class<?>, Constructor<?>>();
|
private static final Map<Class<?>, Constructor<?>> ENTITY_CONSTRUCTOR_CACHE = new WeakHashMap<Class<?>, Constructor<?>>();
|
||||||
private static Field GOAL_FIELD = getField(PathfinderGoalSelector.class, "b");
|
private static Field GOAL_FIELD = getField(PathfinderGoalSelector.class, "b");
|
||||||
private static final Field JUMP_FIELD = getField(EntityLiving.class, "bd");
|
private static final Field JUMP_FIELD = getField(EntityLiving.class, "be");
|
||||||
private static Method MAKE_REQUEST;
|
private static Method MAKE_REQUEST;
|
||||||
private static Field NAVIGATION_WORLD_FIELD = getField(NavigationAbstract.class, "b");
|
private static Field NAVIGATION_WORLD_FIELD = getField(NavigationAbstract.class, "b");
|
||||||
private static Field NETWORK_ADDRESS = getField(NetworkManager.class, "l");
|
private static Field NETWORK_ADDRESS = getField(NetworkManager.class, "l");
|
||||||
private static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
|
private static final Location PACKET_CACHE_LOCATION = new Location(null, 0, 0, 0);
|
||||||
private static Field PATHFINDING_RANGE = getField(NavigationAbstract.class, "g");
|
private static Field PATHFINDING_RANGE = getField(NavigationAbstract.class, "f");
|
||||||
private static final Field RABBIT_FIELD = getField(EntityRabbit.class, "bw");
|
private static final Field RABBIT_FIELD = getField(EntityRabbit.class, "bx");
|
||||||
private static final Random RANDOM = Util.getFastRandom();
|
private static final Random RANDOM = Util.getFastRandom();
|
||||||
private static Field SKULL_PROFILE_FIELD;
|
private static Field SKULL_PROFILE_FIELD;
|
||||||
private static Field TRACKED_ENTITY_SET = NMS.getField(EntityTracker.class, "c");
|
private static Field TRACKED_ENTITY_SET = NMS.getField(EntityTracker.class, "c");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package net.citizensnpcs.util;
|
package net.citizensnpcs.util;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
@ -10,13 +10,13 @@ import net.citizensnpcs.api.CitizensAPI;
|
|||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.citizensnpcs.trait.ArmorStandTrait;
|
import net.citizensnpcs.trait.ArmorStandTrait;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.EnumHand;
|
import net.minecraft.server.v1_10_R1.EnumHand;
|
||||||
import net.minecraft.server.v1_9_R2.Packet;
|
import net.minecraft.server.v1_10_R1.Packet;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutAnimation;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutAnimation;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutBed;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutBed;
|
||||||
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityMetadata;
|
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityMetadata;
|
||||||
|
|
||||||
public enum PlayerAnimation {
|
public enum PlayerAnimation {
|
||||||
ARM_SWING {
|
ARM_SWING {
|
||||||
|
@ -11,11 +11,11 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
|
|
||||||
import net.citizensnpcs.Settings.Setting;
|
import net.citizensnpcs.Settings.Setting;
|
||||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||||
import net.minecraft.server.v1_9_R2.CrashReport;
|
import net.minecraft.server.v1_10_R1.CrashReport;
|
||||||
import net.minecraft.server.v1_9_R2.CrashReportSystemDetails;
|
import net.minecraft.server.v1_10_R1.CrashReportSystemDetails;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityHuman;
|
import net.minecraft.server.v1_10_R1.EntityHuman;
|
||||||
import net.minecraft.server.v1_9_R2.ReportedException;
|
import net.minecraft.server.v1_10_R1.ReportedException;
|
||||||
|
|
||||||
public class PlayerUpdateTask extends BukkitRunnable {
|
public class PlayerUpdateTask extends BukkitRunnable {
|
||||||
@Override
|
@Override
|
||||||
@ -33,15 +33,14 @@ public class PlayerUpdateTask extends BukkitRunnable {
|
|||||||
TICKERS.put(ent.getUniqueId(), ent);
|
TICKERS.put(ent.getUniqueId(), ent);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < TICKERS_PENDING_REMOVE.size(); i++) {
|
for (int i = 0; i < TICKERS_PENDING_REMOVE.size(); i++) {
|
||||||
org.bukkit.entity.Entity ent = TICKERS_PENDING_REMOVE.get(i);
|
TICKERS.remove(TICKERS_PENDING_REMOVE.get(i).getUniqueId());
|
||||||
TICKERS.remove(ent.getUniqueId());
|
|
||||||
}
|
}
|
||||||
TICKERS_PENDING_ADD.clear();
|
TICKERS_PENDING_ADD.clear();
|
||||||
TICKERS_PENDING_REMOVE.clear();
|
TICKERS_PENDING_REMOVE.clear();
|
||||||
Iterator<org.bukkit.entity.Entity> itr = TICKERS.values().iterator();
|
Iterator<org.bukkit.entity.Entity> itr = TICKERS.values().iterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
Entity entity = NMS.getHandle(itr.next());
|
Entity entity = NMS.getHandle(itr.next());
|
||||||
Entity entity1 = entity.bz();
|
Entity entity1 = entity.bB();
|
||||||
if (entity1 != null) {
|
if (entity1 != null) {
|
||||||
if ((entity1.dead) || (!entity1.w(entity))) {
|
if ((entity1.dead) || (!entity1.w(entity))) {
|
||||||
entity.stopRiding();
|
entity.stopRiding();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.citizensnpcs.util.nms;
|
package net.citizensnpcs.util.nms;
|
||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
|
|
||||||
public class PlayerControllerLook {
|
public class PlayerControllerLook {
|
||||||
private final EntityHumanNPC a;
|
private final EntityHumanNPC a;
|
||||||
|
@ -4,13 +4,13 @@ import java.util.Random;
|
|||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.AttributeInstance;
|
import net.minecraft.server.v1_10_R1.AttributeInstance;
|
||||||
import net.minecraft.server.v1_9_R2.ControllerMove;
|
import net.minecraft.server.v1_10_R1.ControllerMove;
|
||||||
import net.minecraft.server.v1_9_R2.EntityInsentient;
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_9_R2.EntityLiving;
|
import net.minecraft.server.v1_10_R1.EntityLiving;
|
||||||
import net.minecraft.server.v1_9_R2.EntitySlime;
|
import net.minecraft.server.v1_10_R1.EntitySlime;
|
||||||
import net.minecraft.server.v1_9_R2.GenericAttributes;
|
import net.minecraft.server.v1_10_R1.GenericAttributes;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
|
|
||||||
public class PlayerControllerMove extends ControllerMove {
|
public class PlayerControllerMove extends ControllerMove {
|
||||||
protected EntityLiving a;
|
protected EntityLiving a;
|
||||||
@ -74,7 +74,7 @@ public class PlayerControllerMove extends ControllerMove {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void c() {
|
public void c() {
|
||||||
this.a.be = 0F;
|
this.a.bf = 0F;
|
||||||
if (this.f) {
|
if (this.f) {
|
||||||
this.f = false;
|
this.f = false;
|
||||||
int i = MathHelper.floor(this.a.getBoundingBox().b + 0.5D);
|
int i = MathHelper.floor(this.a.getBoundingBox().b + 0.5D);
|
||||||
@ -90,7 +90,7 @@ public class PlayerControllerMove extends ControllerMove {
|
|||||||
AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
AttributeInstance speed = this.a.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||||
speed.setValue(0.1D * this.e);
|
speed.setValue(0.1D * this.e);
|
||||||
float movement = (float) (this.e * speed.getValue()) * 10;
|
float movement = (float) (this.e * speed.getValue()) * 10;
|
||||||
this.a.bf = movement;
|
this.a.bg = movement;
|
||||||
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
if (shouldSlimeJump() || ((d2 > 0.0D) && (d0 * d0 + d1 * d1 < 1.0D))) {
|
||||||
this.h = cg();
|
this.h = cg();
|
||||||
this.h /= 3;
|
this.h /= 3;
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
package net.citizensnpcs.util.nms;
|
package net.citizensnpcs.util.nms;
|
||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.minecraft.server.v1_9_R2.AttributeInstance;
|
import net.minecraft.server.v1_10_R1.AttributeInstance;
|
||||||
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
|
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
|
||||||
import net.minecraft.server.v1_9_R2.Block;
|
import net.minecraft.server.v1_10_R1.Block;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.Blocks;
|
import net.minecraft.server.v1_10_R1.Blocks;
|
||||||
import net.minecraft.server.v1_9_R2.ChunkCache;
|
import net.minecraft.server.v1_10_R1.ChunkCache;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityInsentient;
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_9_R2.GenericAttributes;
|
import net.minecraft.server.v1_10_R1.GenericAttributes;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.Material;
|
import net.minecraft.server.v1_10_R1.Material;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_9_R2.NavigationAbstract;
|
import net.minecraft.server.v1_10_R1.NavigationAbstract;
|
||||||
import net.minecraft.server.v1_9_R2.PathEntity;
|
import net.minecraft.server.v1_10_R1.PathEntity;
|
||||||
import net.minecraft.server.v1_9_R2.PathPoint;
|
import net.minecraft.server.v1_10_R1.PathPoint;
|
||||||
import net.minecraft.server.v1_9_R2.PathType;
|
import net.minecraft.server.v1_10_R1.PathType;
|
||||||
import net.minecraft.server.v1_9_R2.Pathfinder;
|
import net.minecraft.server.v1_10_R1.Pathfinder;
|
||||||
import net.minecraft.server.v1_9_R2.Vec3D;
|
import net.minecraft.server.v1_10_R1.Vec3D;
|
||||||
import net.minecraft.server.v1_9_R2.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public class PlayerNavigation extends NavigationAbstract {
|
public class PlayerNavigation extends NavigationAbstract {
|
||||||
protected EntityHumanNPC a;
|
protected EntityHumanNPC a;
|
||||||
@ -189,7 +189,7 @@ public class PlayerNavigation extends NavigationAbstract {
|
|||||||
if (!localVec3D.equals(this.k)) {
|
if (!localVec3D.equals(this.k)) {
|
||||||
this.k = localVec3D;
|
this.k = localVec3D;
|
||||||
double d1 = paramVec3D.f(this.k);
|
double d1 = paramVec3D.f(this.k);
|
||||||
this.n = (this.a.cl() > 0.0F ? d1 / this.a.cl() * 1000.0D : 0.0D);
|
this.n = (this.a.cp() > 0.0F ? d1 / this.a.cp() * 1000.0D : 0.0D);
|
||||||
} else {
|
} else {
|
||||||
this.l += System.currentTimeMillis() - this.m;
|
this.l += System.currentTimeMillis() - this.m;
|
||||||
}
|
}
|
||||||
@ -470,7 +470,7 @@ public class PlayerNavigation extends NavigationAbstract {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean p() {
|
protected boolean p() {
|
||||||
return (this.a.isInWater()) || (this.a.an());
|
return (this.a.isInWater()) || (this.a.ao());
|
||||||
}
|
}
|
||||||
|
|
||||||
private int r() {
|
private int r() {
|
||||||
|
@ -4,12 +4,12 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockAccess;
|
import net.minecraft.server.v1_10_R1.IBlockAccess;
|
||||||
import net.minecraft.server.v1_9_R2.Path;
|
import net.minecraft.server.v1_10_R1.Path;
|
||||||
import net.minecraft.server.v1_9_R2.PathEntity;
|
import net.minecraft.server.v1_10_R1.PathEntity;
|
||||||
import net.minecraft.server.v1_9_R2.PathPoint;
|
import net.minecraft.server.v1_10_R1.PathPoint;
|
||||||
|
|
||||||
public class PlayerPathfinder {
|
public class PlayerPathfinder {
|
||||||
private final Path a = new Path();
|
private final Path a = new Path();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package net.citizensnpcs.util.nms;
|
package net.citizensnpcs.util.nms;
|
||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.minecraft.server.v1_9_R2.EntityInsentient;
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockAccess;
|
import net.minecraft.server.v1_10_R1.IBlockAccess;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_9_R2.PathPoint;
|
import net.minecraft.server.v1_10_R1.PathPoint;
|
||||||
import net.minecraft.server.v1_9_R2.PathType;
|
import net.minecraft.server.v1_10_R1.PathType;
|
||||||
import net.minecraft.server.v1_9_R2.PathfinderAbstract;
|
import net.minecraft.server.v1_10_R1.PathfinderAbstract;
|
||||||
|
|
||||||
public abstract class PlayerPathfinderAbstract extends PathfinderAbstract {
|
public abstract class PlayerPathfinderAbstract extends PathfinderAbstract {
|
||||||
protected IBlockAccess a;
|
protected IBlockAccess a;
|
||||||
|
@ -4,24 +4,24 @@ import java.util.EnumSet;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
|
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
|
||||||
import net.minecraft.server.v1_9_R2.Block;
|
import net.minecraft.server.v1_10_R1.Block;
|
||||||
import net.minecraft.server.v1_9_R2.BlockCobbleWall;
|
import net.minecraft.server.v1_10_R1.BlockCobbleWall;
|
||||||
import net.minecraft.server.v1_9_R2.BlockDoor;
|
import net.minecraft.server.v1_10_R1.BlockDoor;
|
||||||
import net.minecraft.server.v1_9_R2.BlockFence;
|
import net.minecraft.server.v1_10_R1.BlockFence;
|
||||||
import net.minecraft.server.v1_9_R2.BlockFenceGate;
|
import net.minecraft.server.v1_10_R1.BlockFenceGate;
|
||||||
import net.minecraft.server.v1_9_R2.BlockMinecartTrackAbstract;
|
import net.minecraft.server.v1_10_R1.BlockMinecartTrackAbstract;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.BlockPosition.MutableBlockPosition;
|
import net.minecraft.server.v1_10_R1.BlockPosition.MutableBlockPosition;
|
||||||
import net.minecraft.server.v1_9_R2.Blocks;
|
import net.minecraft.server.v1_10_R1.Blocks;
|
||||||
import net.minecraft.server.v1_9_R2.EntityInsentient;
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_9_R2.EnumDirection;
|
import net.minecraft.server.v1_10_R1.EnumDirection;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockAccess;
|
import net.minecraft.server.v1_10_R1.IBlockAccess;
|
||||||
import net.minecraft.server.v1_9_R2.IBlockData;
|
import net.minecraft.server.v1_10_R1.IBlockData;
|
||||||
import net.minecraft.server.v1_9_R2.Material;
|
import net.minecraft.server.v1_10_R1.Material;
|
||||||
import net.minecraft.server.v1_9_R2.MathHelper;
|
import net.minecraft.server.v1_10_R1.MathHelper;
|
||||||
import net.minecraft.server.v1_9_R2.PathPoint;
|
import net.minecraft.server.v1_10_R1.PathPoint;
|
||||||
import net.minecraft.server.v1_9_R2.PathType;
|
import net.minecraft.server.v1_10_R1.PathType;
|
||||||
|
|
||||||
public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
|
public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
|
||||||
private float j;
|
private float j;
|
||||||
@ -246,7 +246,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while ((paramInt2 > 0) && (localPathType == PathType.OPEN)) {
|
while ((paramInt2 > 0) && (localPathType == PathType.OPEN)) {
|
||||||
paramInt2--;
|
paramInt2--;
|
||||||
if (i++ >= this.b.aW()) {
|
if (i++ >= this.b.aY()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
localPathType = a(this.b, paramInt1, paramInt2, paramInt3);
|
localPathType = a(this.b, paramInt1, paramInt2, paramInt3);
|
||||||
|
@ -7,9 +7,9 @@ import org.bukkit.entity.Player;
|
|||||||
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
import net.citizensnpcs.npc.entity.EntityHumanNPC;
|
||||||
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
import net.citizensnpcs.npc.skin.SkinnableEntity;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.minecraft.server.v1_9_R2.Entity;
|
import net.minecraft.server.v1_10_R1.Entity;
|
||||||
import net.minecraft.server.v1_9_R2.EntityPlayer;
|
import net.minecraft.server.v1_10_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_9_R2.EntityTrackerEntry;
|
import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
|
||||||
|
|
||||||
public class PlayerlistTrackerEntry extends EntityTrackerEntry {
|
public class PlayerlistTrackerEntry extends EntityTrackerEntry {
|
||||||
public PlayerlistTrackerEntry(Entity entity, int i, int j, int k, boolean flag) {
|
public PlayerlistTrackerEntry(Entity entity, int i, int j, int k, boolean flag) {
|
||||||
@ -28,7 +28,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
|
|||||||
Entity tracker = getTracker(this);
|
Entity tracker = getTracker(this);
|
||||||
if (entityplayer != tracker && c(entityplayer)) {
|
if (entityplayer != tracker && c(entityplayer)) {
|
||||||
if (!this.trackedPlayers.contains(entityplayer)
|
if (!this.trackedPlayers.contains(entityplayer)
|
||||||
&& ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ab, tracker.ad))
|
&& ((entityplayer.x().getPlayerChunkMap().a(entityplayer, tracker.ac, tracker.ae))
|
||||||
|| (tracker.attachedToPlayer))) {
|
|| (tracker.attachedToPlayer))) {
|
||||||
if ((tracker instanceof SkinnableEntity)) {
|
if ((tracker instanceof SkinnableEntity)) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user