Archiviert
13
0
Dieser Commit ist enthalten in:
Bjarne Koll 2024-06-14 11:07:50 +02:00
Ursprung a399f23903
Commit 4140de28eb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 27F6CCCF55D2EE62
2 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Per world ticks per spawn settings
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 51c4877ffb77ece41e90d9c6ac06c04dc941e35c..975fcd4b8f93cb8c602ddeb165c485214eac10a4 100644
index 16478e2b2368636394cec8a9b30c6fb03e190851..4d6409875771413de7ae20def2aaad4049709c30 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -185,6 +185,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -186,6 +186,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return this.getChunkIfLoaded(chunkX, chunkZ) != null;
}
// Paper end - Use getChunkIfLoadedImmediately
@ -24,7 +24,7 @@ index 51c4877ffb77ece41e90d9c6ac06c04dc941e35c..975fcd4b8f93cb8c602ddeb165c48521
public abstract ResourceKey<LevelStem> getTypeKey();
@@ -197,7 +206,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -198,7 +207,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit Ticks things
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Properly track the changed item from dispense events
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede66f30ae35 100644
index f96734580a29e0436ac808e41c6cbc3f35eff5f5..9d71388c6e8ff56228afbf8cb18c37f861d0b246 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -133,10 +133,14 @@ public interface DispenseItemBehavior {
@@ -134,10 +134,14 @@ public interface DispenseItemBehavior {
idispensebehavior.dispense(pointer, eventStack);
return stack;
}
@ -24,7 +24,7 @@ index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede6
} catch (Exception exception) {
DispenseItemBehavior.LOGGER.error("Error while dispensing spawn egg from dispenser at {}", pointer.pos(), exception); // CraftBukkit - decompile error
return ItemStack.EMPTY;
@@ -191,9 +195,10 @@ public interface DispenseItemBehavior {
@@ -192,9 +196,10 @@ public interface DispenseItemBehavior {
}
// CraftBukkit end
@ -36,7 +36,7 @@ index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede6
ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, consumer, blockposition, MobSpawnType.DISPENSER, false, false);
if (entityarmorstand != null) {
@@ -413,6 +418,7 @@ public interface DispenseItemBehavior {
@@ -414,6 +419,7 @@ public interface DispenseItemBehavior {
int y = blockposition.getY();
int z = blockposition.getZ();
BlockState iblockdata = worldserver.getBlockState(blockposition);
@ -44,7 +44,7 @@ index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede6
// Paper start - correctly check if the bucket place will succeed
/* Taken from SolidBucketItem#emptyContents */
boolean willEmptyContentsSolidBucketItem = dispensiblecontaineritem instanceof net.minecraft.world.item.SolidBucketItem && worldserver.isInWorldBounds(blockposition) && iblockdata.isAir();
@@ -442,12 +448,15 @@ public interface DispenseItemBehavior {
@@ -443,12 +449,15 @@ public interface DispenseItemBehavior {
}
}
@ -59,9 +59,9 @@ index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede6
if (dispensiblecontaineritem.emptyContents((Player) null, worldserver, blockposition, (BlockHitResult) null)) {
- dispensiblecontaineritem.checkExtraContent((Player) null, worldserver, stack, blockposition);
+ dispensiblecontaineritem.checkExtraContent((Player) null, worldserver, dispensedItem, blockposition); // Paper - track changed item from dispense event
// CraftBukkit start - Handle stacked buckets
Item item = Items.BUCKET;
stack.shrink(1);
return this.consumeWithRemainder(pointer, stack, new ItemStack(Items.BUCKET));
} else {
return this.defaultDispenseItemBehavior.dispense(pointer, stack);
diff --git a/src/main/java/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
index 985954030654d521291cccbfc3ca49b67ee4357d..e37d2d29f3ba67cfe28abe4847a3dca07121f0be 100644
--- a/src/main/java/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java