mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-22 08:29:28 +00:00
35 lines
2.0 KiB
Diff
35 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
Date: Sun, 12 Jun 2022 06:20:21 -0500
|
|
Subject: [PATCH] Purpur: Fix decompile errors
|
|
|
|
Original license: MIT
|
|
Original project: https://github.com/PurpurMC/Purpur
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/Painting.java b/src/main/java/net/minecraft/world/entity/decoration/Painting.java
|
|
index ad0df80d1adb1d945f40e1b5f7732bb36b2ca2ff..cefb3d0658e56c7c103626b8cfc5faa05f03665b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/Painting.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/Painting.java
|
|
@@ -121,7 +121,7 @@ public class Painting extends HangingEntity implements VariantHolder<Holder<Pain
|
|
|
|
@Override
|
|
public void readAdditionalSaveData(CompoundTag nbt) {
|
|
- Holder<PaintingVariant> holder = loadVariant(nbt).orElseGet(Painting::getDefaultVariant);
|
|
+ Holder<PaintingVariant> holder = loadVariant(nbt).orElseGet(() -> (Holder.Reference<PaintingVariant>) getDefaultVariant()); // Purpur - decompile error TODO: still needed?
|
|
this.setVariant(holder);
|
|
this.direction = Direction.from2DDataValue(nbt.getByte("facing"));
|
|
super.readAdditionalSaveData(nbt);
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
|
|
index f148c7d2954cc17377d0da4af03ea2c1c9397a52..8584a65433555133cdcfc24a078fb0b53b9f83bc 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
|
|
@@ -1153,7 +1153,7 @@ public class Blocks {
|
|
}
|
|
|
|
private static Boolean ocelotOrParrot(BlockState state, BlockGetter world, BlockPos pos, EntityType<?> type) {
|
|
- return (boolean)type == EntityType.OCELOT || type == EntityType.PARROT;
|
|
+ return type == EntityType.OCELOT || type == EntityType.PARROT; // Purpur - decompile error
|
|
}
|
|
|
|
private static BedBlock bed(DyeColor color) {
|