9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 08:29:28 +00:00
Files
Leaf/patches/server/0008-Purpur-Fix-decompile-errors.patch
Dreeam 4e079f9662 Update
Use Gale as upstream
Update Remove Mojang username check patch
Remove Mikuserver patches (temporarily)
2023-02-10 14:10:24 -05:00

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 0c5caad2a5bfc14450cf8d37f988ee176e8d1450..05a0a890a719a957d9aea736d6c0e85bae9e4eec 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/Painting.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/Painting.java
@@ -124,7 +124,7 @@ public class Painting extends HangingEntity implements VariantHolder<Holder<Pain
return ResourceKey.create(Registries.PAINTING_VARIANT, id);
}).flatMap(BuiltInRegistries.PAINTING_VARIANT::getHolder).map((entry) -> {
return entry;
- }).orElseGet(Painting::getDefaultVariant);
+ }).orElseGet(() -> (Holder.Reference<PaintingVariant>) getDefaultVariant()); // Purpur - decompile error
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 42f46d338886e2892ee4219d19be4dc97f61616f..fdd3aa81644087bff33a47c5f98e14ca0452f3ef 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
@@ -1127,7 +1127,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) {