From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: BillyGalbreath 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 { return entry; - }).orElseGet(Painting::getDefaultVariant); + }).orElseGet(() -> (Holder.Reference) 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) {