From 2a0f5a3943571dc9b5abaf585792f06a11cab938 Mon Sep 17 00:00:00 2001 From: Justin Barker <46458276+JustinTimeCuber@users.noreply.github.com> Date: Sat, 9 Sep 2023 14:15:25 -0400 Subject: [PATCH] Remove unused amethyst "lit" tag (#1623) --- .../llbit/chunky/block/AmethystCluster.java | 22 ------------------- .../chunky/block/MinecraftBlockProvider.java | 12 ++++------ .../se/llbit/chunky/chunk/BlockPalette.java | 16 ++++---------- 3 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 chunky/src/java/se/llbit/chunky/block/AmethystCluster.java diff --git a/chunky/src/java/se/llbit/chunky/block/AmethystCluster.java b/chunky/src/java/se/llbit/chunky/block/AmethystCluster.java deleted file mode 100644 index 0e4bfa68a4..0000000000 --- a/chunky/src/java/se/llbit/chunky/block/AmethystCluster.java +++ /dev/null @@ -1,22 +0,0 @@ -package se.llbit.chunky.block; - -import se.llbit.chunky.resources.Texture; - -public class AmethystCluster extends SpriteBlock { - - private final boolean lit; - - public AmethystCluster(String name, Texture texture, String facing, boolean lit) { - super(name, texture, facing); - this.lit = lit; - } - - public boolean isLit() { - return lit; - } - - @Override - public String description() { - return "facing=" + facing + ", lit=" + lit; - } -} diff --git a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java index c806c87cf0..48d59be7e2 100644 --- a/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java +++ b/chunky/src/java/se/llbit/chunky/block/MinecraftBlockProvider.java @@ -2881,17 +2881,13 @@ public Block getBlockByTag(String namespacedName, Tag tag) { case "lightning_rod": return new LightningRod(BlockProvider.facing(tag, "up"), tag.get("Properties").get("powered").stringValue("false").equals("true")); case "small_amethyst_bud": - return new AmethystCluster(name, Texture.smallAmethystBud, BlockProvider.facing(tag, "up"), - isLit(tag, true)); + return new SpriteBlock(name, Texture.smallAmethystBud, BlockProvider.facing(tag, "up")); case "medium_amethyst_bud": - return new AmethystCluster(name, Texture.mediumAmethystBud, BlockProvider.facing(tag, "up"), - isLit(tag, true)); + return new SpriteBlock(name, Texture.mediumAmethystBud, BlockProvider.facing(tag, "up")); case "large_amethyst_bud": - return new AmethystCluster(name, Texture.largeAmethystBud, BlockProvider.facing(tag, "up"), - isLit(tag, true)); + return new SpriteBlock(name, Texture.largeAmethystBud, BlockProvider.facing(tag, "up")); case "amethyst_cluster": - return new AmethystCluster(name, Texture.amethystCluster, BlockProvider.facing(tag, "up"), - isLit(tag, true)); + return new SpriteBlock(name, Texture.amethystCluster, BlockProvider.facing(tag, "up")); case "tinted_glass": return new TintedGlass(); case "powder_snow": diff --git a/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java b/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java index f6031b65f8..b6644099a4 100644 --- a/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java +++ b/chunky/src/java/se/llbit/chunky/chunk/BlockPalette.java @@ -522,24 +522,16 @@ public static Map> getDefaultMaterialProperties() { } }); materialProperties.put("minecraft:small_amethyst_bud", block -> { - if (block instanceof AmethystCluster && ((AmethystCluster) block).isLit()) { - block.emittance = 1.0f / 15f; - } + block.emittance = 1.0f / 15f; }); materialProperties.put("minecraft:medium_amethyst_bud", block -> { - if (block instanceof AmethystCluster && ((AmethystCluster) block).isLit()) { - block.emittance = 1.0f / 15f * 2; - } + block.emittance = 1.0f / 15f * 2; }); materialProperties.put("minecraft:large_amethyst_bud", block -> { - if (block instanceof AmethystCluster && ((AmethystCluster) block).isLit()) { - block.emittance = 1.0f / 15f * 4; - } + block.emittance = 1.0f / 15f * 4; }); materialProperties.put("minecraft:amethyst_cluster", block -> { - if (block instanceof AmethystCluster && ((AmethystCluster) block).isLit()) { - block.emittance = 1.0f / 15f * 5; - } + block.emittance = 1.0f / 15f * 5; }); materialProperties.put("minecraft:tinted_glass", glassConfig); materialProperties.put("minecraft:sculk_sensor", block -> {