From bff84d6bdea7782a5cfe07f757cb54bbb41a5f1c Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 11 Jun 2023 14:35:35 +0200 Subject: [PATCH] [Feature] **New** Cracked and Weathered variant of Endstone Bricks --- .../VanillaVariantStoneMaterial.java | 43 +++++++++++++++++++ .../betterx/betterend/registry/EndBlocks.java | 7 +++ 2 files changed, 50 insertions(+) create mode 100644 src/main/java/org/betterx/betterend/complexmaterials/VanillaVariantStoneMaterial.java diff --git a/src/main/java/org/betterx/betterend/complexmaterials/VanillaVariantStoneMaterial.java b/src/main/java/org/betterx/betterend/complexmaterials/VanillaVariantStoneMaterial.java new file mode 100644 index 00000000..8d8c3f24 --- /dev/null +++ b/src/main/java/org/betterx/betterend/complexmaterials/VanillaVariantStoneMaterial.java @@ -0,0 +1,43 @@ +package org.betterx.betterend.complexmaterials; + +import org.betterx.bclib.complexmaterials.StoneComplexMaterial; +import org.betterx.bclib.complexmaterials.entry.SlotMap; +import org.betterx.bclib.complexmaterials.set.stone.StoneSlots; +import org.betterx.betterend.BetterEnd; +import org.betterx.betterend.registry.EndBlocks; +import org.betterx.betterend.registry.EndItems; + +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.MapColor; + +public class VanillaVariantStoneMaterial extends StoneComplexMaterial { + public VanillaVariantStoneMaterial( + String baseName, + Block sourceBlock, + MapColor color + ) { + super(BetterEnd.MOD_ID, baseName, "", sourceBlock, color); + } + + public VanillaVariantStoneMaterial init() { + return (VanillaVariantStoneMaterial) super.init( + EndBlocks.getBlockRegistry(), + EndItems.getItemRegistry() + ); + } + + @Override + protected SlotMap createMaterialSlots() { + return SlotMap.of( + StoneSlots.SOURCE, + StoneSlots.CRACKED, + StoneSlots.CRACKED_SLAB, + StoneSlots.CRACKED_STAIRS, + StoneSlots.CRACKED_WALL, + StoneSlots.WEATHERED, + StoneSlots.WEATHERED_SLAB, + StoneSlots.WEATHERED_STAIRS, + StoneSlots.WEATHERED_WALL + ); + } +} diff --git a/src/main/java/org/betterx/betterend/registry/EndBlocks.java b/src/main/java/org/betterx/betterend/registry/EndBlocks.java index 7b8d7e80..9f99927c 100644 --- a/src/main/java/org/betterx/betterend/registry/EndBlocks.java +++ b/src/main/java/org/betterx/betterend/registry/EndBlocks.java @@ -703,6 +703,13 @@ public class EndBlocks { // Technical public static final Block END_PORTAL_BLOCK = registerEndBlockOnly("end_portal_block", new EndPortalBlock()); + // Variations + public static final VanillaVariantStoneMaterial END_STONE_BRICK_VARIATIONS = new VanillaVariantStoneMaterial( + "end_stone_brick", + Blocks.END_STONE_BRICKS, + MapColor.SAND + ).init(); + public static List getModBlocks() { return BlockRegistry.getModBlocks(BetterEnd.MOD_ID); }