Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -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;