Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
Change some block == AIR checks to isAir to catch CAVE_AIR
Dieser Commit ist enthalten in:
Ursprung
e911c70f85
Commit
10763a88ba
@ -224,7 +224,7 @@
|
|||||||
+ bl = bl.getRelative(BlockFace.NORTH);
|
+ bl = bl.getRelative(BlockFace.NORTH);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (bl.getType() != org.bukkit.Material.AIR) {
|
+ if (!bl.getType().isAir()) {
|
||||||
+ VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
|
+ VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
|
||||||
+ world.getServer().getPluginManager().callEvent(event);
|
+ world.getServer().getPluginManager().callEvent(event);
|
||||||
+ }
|
+ }
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
+ } else {
|
+ } else {
|
||||||
+ for (org.bukkit.block.Block block : event.blockList()) {
|
+ for (org.bukkit.block.Block block : event.blockList()) {
|
||||||
+ org.bukkit.Material blockId = block.getType();
|
+ org.bukkit.Material blockId = block.getType();
|
||||||
+ if (blockId == org.bukkit.Material.AIR) {
|
+ if (blockId.isAir()) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
+ for (int i1 = this.blocks.size() - 1; i1 >= 0; i1--) {
|
+ for (int i1 = this.blocks.size() - 1; i1 >= 0; i1--) {
|
||||||
+ BlockPosition cpos = (BlockPosition) this.blocks.get(i1);
|
+ BlockPosition cpos = (BlockPosition) this.blocks.get(i1);
|
||||||
+ org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ());
|
+ org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ());
|
||||||
+ if (bblock.getType() != org.bukkit.Material.AIR) {
|
+ if (!bblock.getType().isAir()) {
|
||||||
+ blockList.add(bblock);
|
+ blockList.add(bblock);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren