3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Fix canceling BlockPlaceEvent

Dieser Commit ist enthalten in:
Thinkofdeath 2014-11-29 21:17:57 +00:00
Ursprung bf401fbbde
Commit 9255e9d82c
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde//net/minecraft/server/ItemStack.java 2014-11-28 17:43:43.241707432 +0000
+++ src/main/java/net/minecraft/server/ItemStack.java 2014-11-28 17:38:20.000000000 +0000
--- ../work/decompile-8eb82bde//net/minecraft/server/ItemStack.java 2014-11-29 21:16:43.705017876 +0000
+++ src/main/java/net/minecraft/server/ItemStack.java 2014-11-29 21:16:36.581018034 +0000
@@ -5,6 +5,18 @@
import java.text.DecimalFormat;
import java.util.Random;

Datei anzeigen

@ -1,5 +1,5 @@
--- ../work/decompile-8eb82bde//net/minecraft/server/World.java 2014-11-29 21:08:51.989028346 +0000
+++ src/main/java/net/minecraft/server/World.java 2014-11-29 21:07:57.617029552 +0000
--- ../work/decompile-8eb82bde//net/minecraft/server/World.java 2014-11-29 21:17:20.461017061 +0000
+++ src/main/java/net/minecraft/server/World.java 2014-11-29 21:17:07.617017346 +0000
@@ -13,6 +13,22 @@
import java.util.UUID;
import java.util.concurrent.Callable;
@ -53,7 +53,7 @@
+ while( blockStateIterator.hasNext() ) {
+ BlockState blockState1 = blockStateIterator.next();
+ if ( blockState1.getLocation().equals( blockState.getLocation() ) ) {
+ blockStateIterator.remove();
+ return false;
+ }
+ }
+
@ -141,7 +141,7 @@
if (iblockdata1 == null) {
+ // CraftBukkit start - remove blockstate if failed
+ if (!this.captureBlockStates) {
+ if (this.captureBlockStates) {
+ this.capturedBlockStates.remove(blockstate);
+ }
+ // CraftBukkit end