@@ -12,19 +12,15 @@
|
||||
public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
|
||||
|
||||
public static final BlockStateInteger POWER = BlockProperties.POWER;
|
||||
@@ -24,7 +29,31 @@
|
||||
@@ -24,7 +29,27 @@
|
||||
|
||||
@Override
|
||||
protected int getSignalStrength(World world, BlockPosition blockposition) {
|
||||
- int i = Math.min(world.getEntitiesOfClass(Entity.class, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition)).size(), this.maxWeight);
|
||||
- int i = Math.min(getEntityCount(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class), this.maxWeight);
|
||||
+ // CraftBukkit start
|
||||
+ // int i = Math.min(world.getEntitiesOfClass(Entity.class, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition)).size(), this.maxWeight);
|
||||
+ // int i = Math.min(getEntityCount(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class), this.maxWeight);
|
||||
+ int i = 0;
|
||||
+ java.util.Iterator iterator = world.getEntitiesOfClass(Entity.class, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition)).iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ Entity entity = (Entity) iterator.next();
|
||||
+
|
||||
+ for (Entity entity : getEntities(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class)) {
|
||||
+ org.bukkit.event.Cancellable cancellable;
|
||||
+
|
||||
+ if (entity instanceof EntityHuman) {
|
||||
|
||||
Reference in New Issue
Block a user