[Feature] **New** Cracked and Weathered variant of Endstone Bricks

This commit is contained in:
Frank 2023-06-11 14:35:35 +02:00
parent 56b3f4fcb1
commit bff84d6bde
2 changed files with 50 additions and 0 deletions

View file

@ -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<StoneComplexMaterial> 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
);
}
}

View file

@ -703,6 +703,13 @@ public class EndBlocks {
// Technical // Technical
public static final Block END_PORTAL_BLOCK = registerEndBlockOnly("end_portal_block", new EndPortalBlock()); 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<Block> getModBlocks() { public static List<Block> getModBlocks() {
return BlockRegistry.getModBlocks(BetterEnd.MOD_ID); return BlockRegistry.getModBlocks(BetterEnd.MOD_ID);
} }