@@ -207,7 +207,7 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
|
||||
}
|
||||
|
||||
public ProjectileSource getSource() {
|
||||
EntityLiving source = getHandle().y(); // PAIL: rename
|
||||
EntityLiving source = getHandle().getSource();
|
||||
return (source == null) ? null : (LivingEntity) source.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
||||
@@ -686,7 +686,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
@Override
|
||||
public PistonMoveReaction getPistonMoveReaction() {
|
||||
return PistonMoveReaction.getById(getHandle().o_().ordinal()); // PAIL: rename
|
||||
return PistonMoveReaction.getById(getHandle().getPushReaction().ordinal());
|
||||
}
|
||||
|
||||
protected NBTTagCompound save() {
|
||||
|
||||
@@ -134,32 +134,6 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return getEyeHeight();
|
||||
}
|
||||
|
||||
private List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance, int maxLength) {
|
||||
if (maxDistance > 120) {
|
||||
maxDistance = 120;
|
||||
}
|
||||
ArrayList<Block> blocks = new ArrayList<Block>();
|
||||
Iterator<Block> itr = new BlockIterator(this, maxDistance);
|
||||
while (itr.hasNext()) {
|
||||
Block block = itr.next();
|
||||
blocks.add(block);
|
||||
if (maxLength != 0 && blocks.size() > maxLength) {
|
||||
blocks.remove(0);
|
||||
}
|
||||
int id = block.getTypeId();
|
||||
if (transparent == null) {
|
||||
if (id != 0) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!transparent.contains((byte) id)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return blocks;
|
||||
}
|
||||
|
||||
private List<Block> getLineOfSight(Set<Material> transparent, int maxDistance, int maxLength) {
|
||||
if (maxDistance > 120) {
|
||||
maxDistance = 120;
|
||||
@@ -186,28 +160,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
public List<Block> getLineOfSight(HashSet<Byte> transparent, int maxDistance) {
|
||||
return getLineOfSight(transparent, maxDistance, 0);
|
||||
}
|
||||
|
||||
public List<Block> getLineOfSight(Set<Material> transparent, int maxDistance) {
|
||||
return getLineOfSight(transparent, maxDistance, 0);
|
||||
}
|
||||
|
||||
public Block getTargetBlock(HashSet<Byte> transparent, int maxDistance) {
|
||||
List<Block> blocks = getLineOfSight(transparent, maxDistance, 1);
|
||||
return blocks.get(0);
|
||||
}
|
||||
|
||||
public Block getTargetBlock(Set<Material> transparent, int maxDistance) {
|
||||
List<Block> blocks = getLineOfSight(transparent, maxDistance, 1);
|
||||
return blocks.get(0);
|
||||
}
|
||||
|
||||
public List<Block> getLastTwoTargetBlocks(HashSet<Byte> transparent, int maxDistance) {
|
||||
return getLineOfSight(transparent, maxDistance, 2);
|
||||
}
|
||||
|
||||
public List<Block> getLastTwoTargetBlocks(Set<Material> transparent, int maxDistance) {
|
||||
return getLineOfSight(transparent, maxDistance, 2);
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
||||
break;
|
||||
}
|
||||
}
|
||||
TileEntity te = (blockEntityTag == null) ? null : TileEntity.a(null, blockEntityTag);
|
||||
TileEntity te = (blockEntityTag == null) ? null : TileEntity.create(null, blockEntityTag);
|
||||
|
||||
switch (material) {
|
||||
case SIGN:
|
||||
|
||||
Reference in New Issue
Block a user