mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-17 13:00:04 +08:00
59 lines
3.2 KiB
Diff
59 lines
3.2 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] Fix decompile errors
|
|
|
|
|
|
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 0f4ef103afcbabc04880c8fc3547b861341c15fc..d5784a19cec98eb199a51acd9e1f4de8c6bf7265 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/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java
|
|
index c1abeb62f63d2f8fb891efec8f76c6736b8f7f75..7815af9b64ead32d6f7bcad6f86b2d21ec4aec22 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 d02ee11066fc4f07ccb110b09b86d895ff90d4f2..e1be4a77fae0b9120781f460079269b85c993930 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 877035b6c6593a28f475b9c5bcd7727e3fcdb802..0453397c157c8c7968947445f41bc46b68b111e8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
|
|
@@ -1159,7 +1159,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) {
|