@@ -29,3 +29,20 @@
|
||||
if (i != j) {
|
||||
IBlockData iblockdata1 = this.setSignalForState(iblockdata, j);
|
||||
|
||||
@@ -140,9 +155,15 @@
|
||||
}
|
||||
|
||||
protected static int getEntityCount(World world, AxisAlignedBB axisalignedbb, Class<? extends Entity> oclass) {
|
||||
+ // CraftBukkit start
|
||||
+ return getEntities(world, axisalignedbb, oclass).size();
|
||||
+ }
|
||||
+
|
||||
+ protected static <T extends Entity> java.util.List<T> getEntities(World world, AxisAlignedBB axisalignedbb, Class<T> oclass) {
|
||||
+ // CraftBukkit end
|
||||
return world.getEntitiesOfClass(oclass, axisalignedbb, IEntitySelector.NO_SPECTATORS.and((entity) -> {
|
||||
return !entity.isIgnoringBlockTriggers();
|
||||
- })).size();
|
||||
+ })); // CraftBukkit
|
||||
}
|
||||
|
||||
protected abstract int getSignalStrength(World world, BlockPosition blockposition);
|
||||
|
||||
Reference in New Issue
Block a user