@@ -8,16 +8,16 @@
|
||||
+
|
||||
public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
|
||||
|
||||
public static final BlockStateInteger POWER = BlockProperties.az;
|
||||
public static final BlockStateInteger POWER = BlockProperties.POWER;
|
||||
@@ -27,7 +29,31 @@
|
||||
|
||||
@Override
|
||||
protected int b(World world, BlockPosition blockposition) {
|
||||
- int i = Math.min(world.a(Entity.class, BlockPressurePlateWeighted.c.a(blockposition)).size(), this.weight);
|
||||
- int i = Math.min(world.a(Entity.class, BlockPressurePlateWeighted.TOUCH_AABB.a(blockposition)).size(), this.maxWeight);
|
||||
+ // CraftBukkit start
|
||||
+ // int i = Math.min(world.a(Entity.class, BlockPressurePlateWeighted.c.a(blockposition)).size(), this.weight);
|
||||
+ int i = 0;
|
||||
+ java.util.Iterator iterator = world.a(Entity.class, BlockPressurePlateWeighted.c.a(blockposition)).iterator();
|
||||
+ java.util.Iterator iterator = world.a(Entity.class, BlockPressurePlateWeighted.TOUCH_AABB.a(blockposition)).iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ Entity entity = (Entity) iterator.next();
|
||||
@@ -37,8 +37,8 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ i = Math.min(i, this.weight);
|
||||
+ i = Math.min(i, this.maxWeight);
|
||||
+ // CraftBukkit end
|
||||
|
||||
if (i > 0) {
|
||||
float f = (float) Math.min(this.weight, i) / (float) this.weight;
|
||||
float f = (float) Math.min(this.maxWeight, i) / (float) this.maxWeight;
|
||||
|
||||
Reference in New Issue
Block a user