diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-20 20:16:52 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-20 20:16:52 +0100 |
commit | e82ca08db0ec95130dd152fd8720c82adb82c89e (patch) | |
tree | a7586f00b38d6d86d527eb81735a5d021e150c1b /src/main/java | |
parent | 99da2a7454313bc9cf4035a3f693b2681708d3d6 (diff) | |
download | funny-teleporters-e82ca08db0ec95130dd152fd8720c82adb82c89e.tar.gz funny-teleporters-e82ca08db0ec95130dd152fd8720c82adb82c89e.tar.bz2 funny-teleporters-e82ca08db0ec95130dd152fd8720c82adb82c89e.zip |
Fix some last minute renderings
Diffstat (limited to 'src/main/java')
3 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/moe/nea/funnyteleporters/ColouredChestBlock.java b/src/main/java/moe/nea/funnyteleporters/ColouredChestBlock.java index cf756e0..149dc93 100644 --- a/src/main/java/moe/nea/funnyteleporters/ColouredChestBlock.java +++ b/src/main/java/moe/nea/funnyteleporters/ColouredChestBlock.java @@ -4,6 +4,7 @@ import com.mojang.serialization.MapCodec; import eu.pb4.polymer.core.api.block.PolymerBlock; import net.minecraft.block.AbstractChestBlock; import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.DoubleBlockProperties; @@ -44,8 +45,13 @@ public class ColouredChestBlock extends AbstractChestBlock<ColouredChestBlockEnt } @Override + protected BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.ENTITYBLOCK_ANIMATED; + } + + @Override public BlockState getPolymerBlockState(BlockState blockState) { - return Blocks.CHEST.getStateWithProperties(blockState); + return Blocks.REINFORCED_DEEPSLATE.getDefaultState(); } @Override diff --git a/src/main/java/moe/nea/funnyteleporters/ColouredChestConfigGUI.java b/src/main/java/moe/nea/funnyteleporters/ColouredChestConfigGUI.java index 6a2ee40..992db66 100644 --- a/src/main/java/moe/nea/funnyteleporters/ColouredChestConfigGUI.java +++ b/src/main/java/moe/nea/funnyteleporters/ColouredChestConfigGUI.java @@ -8,7 +8,6 @@ import net.minecraft.item.DyeItem; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.screen.ScreenHandlerType; -import net.minecraft.screen.SimpleNamedScreenHandlerFactory; import net.minecraft.screen.slot.SlotActionType; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Style; @@ -18,8 +17,6 @@ import net.minecraft.util.Formatting; import net.minecraft.util.Unit; import net.minecraft.util.math.MathHelper; -import javax.xml.crypto.Data; -import java.text.Format; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/moe/nea/funnyteleporters/ColouredChestViewScreen.java b/src/main/java/moe/nea/funnyteleporters/ColouredChestViewScreen.java index 0e14c87..21d8c8a 100644 --- a/src/main/java/moe/nea/funnyteleporters/ColouredChestViewScreen.java +++ b/src/main/java/moe/nea/funnyteleporters/ColouredChestViewScreen.java @@ -11,8 +11,11 @@ import net.minecraft.screen.slot.Slot; import net.minecraft.screen.slot.SlotActionType; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; +import net.minecraft.util.DyeColor; import net.minecraft.util.Unit; +import java.util.stream.Collectors; + public class ColouredChestViewScreen extends SimpleGui { private final ColouredChestBlockEntity blockEntity; @@ -20,6 +23,8 @@ public class ColouredChestViewScreen extends SimpleGui { super(ScreenHandlerType.GENERIC_9X4, player, false); this.blockEntity = blockEntity; setSlots(); + setTitle(Text.literal("Funny Storage: " + blockEntity.extra.frequency().stream().map(DyeColor::getName) + .collect(Collectors.joining(", ")))); } @Override |