Skip to content

Commit 0282a48

Browse files
committed
Fix 1.205 and 1.21 compatible
1 parent c22bf45 commit 0282a48

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

worldedit-bukkit/adapters/adapter-1_20_5/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_20_R4/PaperweightGetBlocks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public synchronized <T extends Future<T>> T call(IChunkSet set, Runnable finaliz
765765
if (entityTagMap.containsKey("Leash")) {
766766
var leashTag = (net.minecraft.nbt.CompoundTag) adapter.fromNative(
767767
entityTagMap.get("Leash"));
768-
final LeashFenceKnotEntity leashEntity = leashRef.get(NbtUtils.readBlockPos(leashTag));
768+
final LeashFenceKnotEntity leashEntity = leashRef.get(NbtUtils.readBlockPos(leashTag, "Leash"));
769769
if (leashEntity != null) {
770770
tag.put("Leash", NbtUtils.writeBlockPos(leashEntity.pos));
771771
}

worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightGetBlocks.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ public synchronized <T extends Future<T>> T call(IChunkSet set, Runnable finaliz
759759
if (entityTagMap.containsKey("Leash")) {
760760
var leashTag = (net.minecraft.nbt.CompoundTag) adapter.fromNative(
761761
entityTagMap.get("Leash")) ;
762-
final LeashFenceKnotEntity leashEntity = leashRef.get(NbtUtils.readBlockPos(leashTag));
762+
final LeashFenceKnotEntity leashEntity = leashRef.get(NbtUtils.readBlockPos(leashTag, "Leash"));
763763
if (leashEntity != null) {
764-
tag.put("Leash", NbtUtils.writeBlockPos(leashEntity.pos));
764+
tag.put("Leash", NbtUtils.writeBlockPos(leashEntity.getPos()));
765765
}
766766
}
767767
for (final String name : Constants.NO_COPY_ENTITY_NBT_FIELDS) {

worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ default void paste(Extent extent, BlockVector3 to, boolean pasteAir, boolean pas
436436
if (entity.getType().equals(EntityTypes.LEASH_KNOT)) {
437437
var state = entity.getState();
438438
var nbtData = new HashMap<>(state.getNbtData().getValue());
439-
var posAsMap = new HashMap<String, Tag>();
439+
var posAsMap = new HashMap<String, Tag<?, ?>>();
440440
posAsMap.put("X", new IntTag(pos.getBlockX()));
441441
posAsMap.put("Y", new IntTag(pos.getBlockY()));
442442
posAsMap.put("Z", new IntTag(pos.getBlockZ()));

0 commit comments

Comments
 (0)