mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Merge branch 'dev/1.17' of github.com:PaperMC/Paper into dev/1.17
This commit is contained in:
commit
b018b48e2c
3 changed files with 44 additions and 1 deletions
|
@ -20,3 +20,8 @@ net/minecraft/world/entity/npc/EntityVillagerAbstract fD ()Lnet/minecraft/world/
|
|||
|
||||
# BehaviorWorkComposter -> BehaviorWork
|
||||
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 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
this.profiler.push(() -> {
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
|
@ -91,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
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
|
||||
+
|
||||
|
|
|
@ -78,3 +78,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (compound.hasUUID("Id")) {
|
||||
uUID = compound.getUUID("Id");
|
||||
}
|
||||
@@ -0,0 +0,0 @@ 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) {
|
||||
@@ -0,0 +0,0 @@ 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 a new issue