mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 14:06:17 +01:00
Merge branch 'dev/1.17' of github.com:PaperMC/Paper into dev/1.17
This commit is contained in:
commit
d2cb88db9c
@ -20,3 +20,8 @@ net/minecraft/world/entity/npc/EntityVillagerAbstract fD ()Lnet/minecraft/world/
|
|||||||
|
|
||||||
# BehaviorWorkComposter -> BehaviorWork
|
# BehaviorWorkComposter -> BehaviorWork
|
||||||
net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter a (Lnet/minecraft/server/level/WorldServer;Lnet/minecraft/world/entity/npc/EntityVillager;)V doWork
|
net/minecraft/world/entity/ai/behavior/BehaviorWorkComposter a (Lnet/minecraft/server/level/WorldServer;Lnet/minecraft/world/entity/npc/EntityVillager;)V doWork
|
||||||
|
|
||||||
|
# We add getLevel to the Hopper interface (implemented by Hoppers and Hopper Minecarts), but this also exists on BlockEntity,
|
||||||
|
# which Hoppers also extend. We need to map the method we add to the Hopper interface to the same name used for the method on BlockEntity
|
||||||
|
# to avoid remap causing issues
|
||||||
|
net/minecraft/world/level/block/entity/IHopper getWorld ()Lnet/minecraft/world/level/World; getLevel
|
||||||
|
@ -43,6 +43,24 @@ index f00839eab02277bf10b742c88fadc4aa9e89e7e0..312be2221e1acc44aaf6936533b0eb96
|
|||||||
|
|
||||||
this.profiler.push(() -> {
|
this.profiler.push(() -> {
|
||||||
return worldserver + " " + worldserver.dimension().location();
|
return worldserver + " " + worldserver.dimension().location();
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
|
index 449d2e7b18608ca36282f1a29e69457fc525307e..c738cb0433ea4a86d82372bf66e29c01f991d2c6 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
|
@@ -68,6 +68,13 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Paper start - add back getLevel
|
||||||
|
+ @Override
|
||||||
|
+ public net.minecraft.world.level.Level getLevel() {
|
||||||
|
+ return this.level;
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public double getLevelX() {
|
||||||
|
return this.getX();
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index dd4deb08eb3ed15a156269a11d3d43abfd61fe5b..10f55ba189d12c46e0ef38b0b96a29894b4fba93 100644
|
index dd4deb08eb3ed15a156269a11d3d43abfd61fe5b..10f55ba189d12c46e0ef38b0b96a29894b4fba93 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@ -84,14 +102,14 @@ index 8a079ee3ed243fd19b1dd7eed2de1dd33785faa1..c3a07ccccd5cc38552363c82398f432c
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
index a05acf709735b40ca86f978508c63a86065fd405..c1754df6a60ff93d75a28145b9dc4e9174241a21 100644
|
index a05acf709735b40ca86f978508c63a86065fd405..71dd26ca6626631b94d53818cd06b93f61485369 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
@@ -14,6 +14,10 @@ public interface Hopper extends Container {
|
@@ -14,6 +14,10 @@ public interface Hopper extends Container {
|
||||||
return SUCK;
|
return SUCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ net.minecraft.world.level.Level getLevel();
|
+ net.minecraft.world.level.Level getLevel(); // Paper
|
||||||
+
|
+
|
||||||
+ default net.minecraft.core.BlockPos getBlockPosition() { return new net.minecraft.core.BlockPos(getLevelX(), getLevelY(), getLevelZ()); } // Paper
|
+ default net.minecraft.core.BlockPos getBlockPosition() { return new net.minecraft.core.BlockPos(getLevelX(), getLevelY(), getLevelZ()); } // Paper
|
||||||
+
|
+
|
||||||
|
@ -46,7 +46,7 @@ index 1aa3af8c7714b2c850fb4264c863db8e639e6284..2a805d6bbeede50898d36258976ff25e
|
|||||||
return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4;
|
return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
index 57c9575a9714acb95d9dced672955a96d71dfd1e..dc136cd4d5d4ba1e0e53a7187b3a2e836e185c19 100644
|
index 57c9575a9714acb95d9dced672955a96d71dfd1e..06fe97e05608fc21f90c9884d745d910beb6883d 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
@@ -40,14 +40,14 @@ import org.apache.logging.log4j.LogManager;
|
@@ -40,14 +40,14 @@ import org.apache.logging.log4j.LogManager;
|
||||||
@ -78,3 +78,23 @@ index 57c9575a9714acb95d9dced672955a96d71dfd1e..dc136cd4d5d4ba1e0e53a7187b3a2e83
|
|||||||
if (compound.hasUUID("Id")) {
|
if (compound.hasUUID("Id")) {
|
||||||
uUID = compound.getUUID("Id");
|
uUID = compound.getUUID("Id");
|
||||||
}
|
}
|
||||||
|
@@ -495,7 +500,7 @@ public final class NbtUtils {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CompoundTag update(DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion) {
|
||||||
|
- return fixer.update(fixTypes.getType(), new Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue();
|
||||||
|
+ return (CompoundTag) fixer.update(fixTypes.getType(), new com.mojang.serialization.Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue(); // Paper - decompile fix
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Component toPrettyComponent(Tag element) {
|
||||||
|
@@ -620,8 +625,8 @@ public final class NbtUtils {
|
||||||
|
CompoundTag compoundTag2 = new CompoundTag();
|
||||||
|
if (i + 2 <= string.length()) {
|
||||||
|
String string3 = string.substring(i + 1, string.indexOf(125, i));
|
||||||
|
- COMMA_SPLITTER.split(string3).forEach((string2) -> {
|
||||||
|
- List<String> list = COLON_SPLITTER.splitToList(string2);
|
||||||
|
+ COMMA_SPLITTER.split(string3).forEach(it -> { // Paper - decompile fix
|
||||||
|
+ List<String> list = COLON_SPLITTER.splitToList(it); // Paper - decompile fix
|
||||||
|
if (list.size() == 2) {
|
||||||
|
compoundTag2.putString(list.get(0), list.get(1));
|
||||||
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user