diff --git a/src/main/java/com/zontreck/block/ModBlocks.java b/src/main/java/com/zontreck/block/ModBlocks.java index 977486b..28adb91 100644 --- a/src/main/java/com/zontreck/block/ModBlocks.java +++ b/src/main/java/com/zontreck/block/ModBlocks.java @@ -19,6 +19,9 @@ import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; +import java.util.ArrayList; +import java.util.List; + public class ModBlocks { private static BlockBehaviour.StatePredicate shulkerState = (p_152653_, p_152654_, p_152655_) -> { @@ -110,6 +113,49 @@ public class ModBlocks { } + public static List> registerPoolTile(String color) { + String baseNick = color.length()>1 ? color+"_pool_tile" : "pool_tile"; + List> ret = new ArrayList<>(); + final RegistryObject tile1 = registerWithItem(BLOCKS.register(baseNick, ()->new Block(stone)), new Item.Properties()); + + final RegistryObject POOL_TILE_STAIRS = registerWithItem(BLOCKS.register(baseNick + "_stairs", ()->new StairBlock(tile1.get()::defaultBlockState, stone)), new Item.Properties()); + + final RegistryObject POOL_TILE_SLAB = registerWithItem(BLOCKS.register(baseNick+"_slab", ()->new SlabBlock(stone)), new Item.Properties()); + + final RegistryObject POOL_TILE_WALL = registerWithItem(BLOCKS.register(baseNick + "_wall", ()->new WallBlock(stone)), new Item.Properties()); + + final RegistryObject POOL_LIGHT = registerWithItem(BLOCKS.register(baseNick + "_light", ()->new Block(poolLightClean)), new Item.Properties()); + + + + final RegistryObject DIRTY_POOL_TILE = registerWithItem(BLOCKS.register("dirty_" + baseNick, ()->new Block(stone)), new Item.Properties()); + + final RegistryObject DIRTY_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dirty_" + baseNick + "_stairs", ()->new StairBlock(DIRTY_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); + + final RegistryObject DIRTY_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_" + baseNick + "_slab", ()-> new SlabBlock(stone)), new Item.Properties()); + + final RegistryObject DIRTY_POOL_TILE_WALL = registerWithItem(BLOCKS.register("dirty_" + baseNick + "_wall", ()->new WallBlock(stone)), new Item.Properties()); + + final RegistryObject DIRTY_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_" + baseNick + "_light", ()->new Block(poolLightDirty)), new Item.Properties()); + + final RegistryObject FILTHY_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_" + baseNick + "_light", ()->new Block(poolLightFilthy)), new Item.Properties()); + + + ret.add(tile1); + ret.add(POOL_TILE_STAIRS); + ret.add(POOL_TILE_SLAB); + ret.add(POOL_TILE_WALL); + ret.add(POOL_LIGHT); + ret.add(DIRTY_POOL_TILE); + ret.add(DIRTY_POOL_TILE_STAIRS); + ret.add(DIRTY_POOL_TILE_SLAB); + ret.add(DIRTY_POOL_TILE_WALL); + ret.add(DIRTY_POOL_LIGHT); + ret.add(FILTHY_POOL_LIGHT); + return ret; + } + + public static final RegistryObject DARK_RED_WOOL = registerWithItem(BLOCKS.register("dark_red_wool", ()->new Block(BlockBehaviour.Properties.copy(Blocks.RED_WOOL))), new Item.Properties()); @@ -162,147 +208,26 @@ public class ModBlocks { + public static final List> NORMAL_POOL_TILE = registerPoolTile(""); - public static final RegistryObject POOL_TILE = registerWithItem(BLOCKS.register("pool_tile", ()->new Block(stone)), new Item.Properties()); - public static final RegistryObject POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("pool_tile_stairs", ()->new StairBlock(POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); + public static final List> DARK_POOL_TILES = registerPoolTile("dark"); - public static final RegistryObject POOL_TILE_SLAB = registerWithItem(BLOCKS.register("pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); + public static final List> BLUE_POOL_TILES = registerPoolTile("blue"); - public static final RegistryObject POOL_TILE_WALL = registerWithItem(BLOCKS.register("pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); + public static final List> RED_POOL_TILES = registerPoolTile("red"); - public static final RegistryObject POOL_LIGHT = registerWithItem(BLOCKS.register("pool_light", ()->new Block(poolLightClean)), new Item.Properties()); + public static final List> GREEN_POOL_TILES = registerPoolTile("green"); + public static final List> YELLOW_POOL_TILES = registerPoolTile("yellow"); + public static final List> CYAN_POOL_TILES = registerPoolTile("cyan"); - public static final RegistryObject DIRTY_POOL_TILE = registerWithItem(BLOCKS.register("dirty_pool_tile", ()->new Block(stone)), new Item.Properties()); + public static final List> PURPLE_POOL_TILES = registerPoolTile("purple"); - public static final RegistryObject DIRTY_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dirty_pool_tile_stairs", ()->new StairBlock(DIRTY_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - public static final RegistryObject DIRTY_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_pool_tile_slab", ()-> new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_POOL_TILE_WALL = registerWithItem(BLOCKS.register("dirty_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_pool_light", ()->new Block(poolLightDirty)), new Item.Properties()); - - public static final RegistryObject FILTHY_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties()); - - - - - - - public static final RegistryObject DARK_POOL_TILE = registerWithItem(BLOCKS.register("dark_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject DARK_POOL_LIGHT = registerWithItem(BLOCKS.register("dark_pool_light", ()->new Block(poolLightClean)), new Item.Properties()); - - public static final RegistryObject DARK_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dark_pool_tile_stairs", ()->new StairBlock(DARK_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject DARK_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dark_pool_tile_slab",()-> new SlabBlock(stone)), new Item.Properties()); - - - - - - public static final RegistryObject BLUE_POOL_TILE = registerWithItem(BLOCKS.register("blue_pool_tile",()-> new Block(stone)), new Item.Properties()); - - public static final RegistryObject BLUE_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("blue_pool_tile_stairs", ()->new StairBlock(BLUE_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject BLUE_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("blue_pool_tile_slab",()-> new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject BLUE_POOL_TILE_WALL = registerWithItem(BLOCKS.register("blue_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - public static final RegistryObject BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("blue_pool_light", ()->new Block(poolLightClean)), new Item.Properties()); - - - - - - public static final RegistryObject DIRTY_BLUE_POOL_TILE = registerWithItem(BLOCKS.register("dirty_blue_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_BLUE_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dirty_blue_pool_tile_stairs", ()->new StairBlock(DIRTY_BLUE_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_BLUE_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_blue_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_BLUE_POOL_TILE_WALL = registerWithItem(BLOCKS.register("dirty_blue_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_blue_pool_light", ()->new Block(poolLightDirty)), new Item.Properties()); - - public static final RegistryObject FILTHY_BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_blue_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties()); - - - - - - - public static final RegistryObject RED_POOL_TILE = registerWithItem(BLOCKS.register("red_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject RED_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("red_pool_tile_stairs", ()->new StairBlock(RED_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject RED_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("red_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject RED_POOL_TILE_WALL = registerWithItem(BLOCKS.register("red_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - public static final RegistryObject RED_POOL_LIGHT = registerWithItem(BLOCKS.register("red_pool_light", ()->new Block(poolLightClean)), new Item.Properties()); - - - - - - - - public static final RegistryObject DIRTY_RED_POOL_TILE = registerWithItem(BLOCKS.register("dirty_red_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_RED_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_red_pool_light", ()->new Block(poolLightDirty)), new Item.Properties()); - - public static final RegistryObject FILTHY_RED_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_red_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties()); - - public static final RegistryObject DIRTY_RED_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dirty_red_pool_tile_stairs", ()->new StairBlock(DIRTY_RED_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_RED_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_red_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_RED_POOL_TILE_WALL = registerWithItem(BLOCKS.register("dirty_red_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - - - - - - - - - - public static final RegistryObject GREEN_POOL_TILE = registerWithItem(BLOCKS.register("green_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject GREEN_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("green_pool_tile_stairs", ()->new StairBlock(GREEN_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject GREEN_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("green_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject GREEN_POOL_TILE_WALL = registerWithItem(BLOCKS.register("green_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); - - public static final RegistryObject GREEN_POOL_LIGHT = registerWithItem(BLOCKS.register("green_pool_light", ()->new Block(poolLightClean)), new Item.Properties()); - - - - - - - - - - - public static final RegistryObject DIRTY_GREEN_POOL_TILE = registerWithItem(BLOCKS.register("dirty_green_pool_tile", ()->new Block(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_GREEN_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_green_pool_light", ()->new Block(poolLightDirty)), new Item.Properties()); - - public static final RegistryObject FILTHY_GREEN_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_green_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties()); - - public static final RegistryObject DIRTY_GREEN_POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("dirty_green_pool_tile_stairs", ()->new StairBlock(DIRTY_GREEN_POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_GREEN_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_green_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties()); - - public static final RegistryObject DIRTY_GREEN_POOL_TILE_WALL = registerWithItem(BLOCKS.register("dirty_green_pool_tile_wall", ()->new WallBlock(stone)), new Item.Properties()); + public static final RegistryObject MINI_SUN = registerWithItem(BLOCKS.register("mini_sun", ()->new MiniSunBlock(explosionResistance.lightLevel((x)->128))), new Item.Properties());