mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-20 15:39:37 +00:00
61 lines
3.3 KiB
Diff
61 lines
3.3 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/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
index 5956a7759964f5e4939f062e93714fba64f53141..0ca82175ec91ca8b3418c0931682c972666c47f8 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
@@ -182,7 +182,7 @@ public class Zoglin extends Monster implements Enemy, HoglinBase {
|
|
|
|
@Override
|
|
public Brain<Zoglin> getBrain() {
|
|
- return super.getBrain();
|
|
+ return (Brain<Zoglin>) super.getBrain(); // Purpur - decompile error
|
|
}
|
|
|
|
protected void updateActivity() {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
index ac75c54e897565e340b66823caeed92ba1d1641a..769e4fbaac01a4fe3a45bd9cab5c63b61fc69f53 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
|
@@ -70,7 +70,7 @@ public class PiglinBrute extends AbstractPiglin {
|
|
|
|
@Override
|
|
public Brain<PiglinBrute> getBrain() {
|
|
- return super.getBrain();
|
|
+ return (Brain<PiglinBrute>) super.getBrain(); // Purpur - decompile error
|
|
}
|
|
|
|
@Override
|
|
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) {
|