Ugh. forge...why...

This commit is contained in:
Zontreck 2024-02-20 01:10:25 -07:00
parent a220487d66
commit 58f23e8758
7 changed files with 110 additions and 179 deletions

View file

@ -86,8 +86,6 @@ public class OTEMod
// Directly reference a slf4j logger
public static final Logger LOGGER = LogUtils.getLogger();
public static final String MOD_ID = "otemod";
public static final String MODIFY_BIOMES = "modify_biomes";
public static final ResourceLocation MODIFY_BIOMES_RL = new ResourceLocation(OTEMod.MOD_ID, MODIFY_BIOMES);
//public static List<TeleportContainer> TeleportRegistry = new ArrayList<>();
public static MinecraftServer THE_SERVER;
@ -136,8 +134,8 @@ public class OTEMod
MinecraftForge.EVENT_BUS.register(new EventHandler());
ModBlocks.register(bus);
DeprecatedModBlocks.register(bus);
ModBlocks.register(bus);
CreativeModeTabs.REGISTER.register(bus);
ModItems.register(bus);
DeprecatedModItems.register(bus);

View file

@ -42,54 +42,6 @@ public class DeprecatedModBlocks
OTEMod.LOGGER.info("Registering all blocks...");
}
/**
* This variant of the method is meant for complex blocks that require a custom block item
* @param name
* @param blocky
* @return
*/
public static RegistryObj registerWithItem(String name, Supplier<Blocky> blocky)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->blocky.get().block);
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->blocky.get().item));
return new RegistryObj(ret,item);
}
/**
* Simple block registration with a normal block item.
* @param name
* @param a
* @param props
* @return
*/
public static RegistryObj registerWithItem(String name, Block a, Item.Properties props)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->a);
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->new BlockItem(ret.get(), props)));
return new RegistryObj(ret,item);
}
public static RegistryObj registerDeprecated(String name)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->new DeprecatedBlock());
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->new DeprecatedBlockItem(ret.get())));
return new RegistryObj(ret,item);
}
private static class Blocky
{
public Block block;
public BlockItem item;
public Blocky(Block block, BlockItem item)
{
this.block=block;
this.item=item;
}
}
private static BlockBehaviour.Properties standardBehavior()
{
return BlockBehaviour.Properties.of().requiresCorrectToolForDrops().strength(7F).destroyTime(6);
@ -128,22 +80,30 @@ public class DeprecatedModBlocks
private static BlockBehaviour.Properties poolLightDirty = BlockBehaviour.Properties.copy(Blocks.GLASS).lightLevel((X) -> 12);
private static BlockBehaviour.Properties poolLightFilthy = BlockBehaviour.Properties.copy(Blocks.GLASS).lightLevel((X) -> 4);
public static RegistryObject<Block> registerDeprecated(RegistryObject<Block> blk)
{
ITEMS.register(blk.getId().getPath(), ()->new DeprecatedBlockItem(blk.get()));
public static final RegistryObj ILUSIUM_ORE_BLOCK = registerDeprecated("ilusium_ore_block");
public static final RegistryObj DEEPSLATE_ILUSIUM_ORE_BLOCK = registerDeprecated("deepslate_ilusium_ore_block");
public static final RegistryObj ILUSIUM_BLOCK = registerDeprecated("ilusium_block");
public static final RegistryObj CLEAR_GLASS_BLOCK = registerDeprecated("clear_glass_block");
public static final RegistryObj LIMINAL_TILES = registerDeprecated("liminal_tiles");
public static final RegistryObj BLACK = registerDeprecated("black");
public static final RegistryObj LIMINAL_TILE_STAIRS = registerDeprecated("liminal_tile_stairs");
public static final RegistryObj LIMINAL_TILE_SLAB = registerDeprecated("liminal_tile_slab");
public static final RegistryObj LIMINAL_WINDOW = registerDeprecated("liminal_window");
public static final RegistryObj LIME = registerDeprecated("lime");
public static final RegistryObj LIME_TILE = registerDeprecated("lime_tile");
public static final RegistryObj LIME_STAIRS = registerDeprecated("lime_stairs");
public static final RegistryObj LIME_TILE_BR = registerDeprecated("lime_tile_br");
public static final RegistryObj LIME_TILE_TO_WALL = registerDeprecated("lime_tile_to_wall");
public static final RegistryObj LIME_WALL_V1 = registerDeprecated("lime_wall_variant_1");
public static final RegistryObj LIME_WALL_V2 = registerDeprecated("lime_wall_variant_2");
return blk;
}
public static final RegistryObject<Block> ILUSIUM_ORE_BLOCK = registerDeprecated(BLOCKS.register("ilusium_ore_block", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> DEEPSLATE_ILUSIUM_ORE_BLOCK = registerDeprecated(BLOCKS.register("deepslate_ilusium_ore_block", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> ILUSIUM_BLOCK = registerDeprecated(BLOCKS.register("ilusium_block", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> CLEAR_GLASS_BLOCK = registerDeprecated(BLOCKS.register("clear_glass_block", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIMINAL_TILES = registerDeprecated(BLOCKS.register("liminal_tiles", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> BLACK = registerDeprecated(BLOCKS.register("black", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> LIMINAL_TILE_STAIRS = registerDeprecated(BLOCKS.register("liminal_tile_stairs", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIMINAL_TILE_SLAB = registerDeprecated(BLOCKS.register("liminal_tile_slab", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIMINAL_WINDOW = registerDeprecated(BLOCKS.register("liminal_window", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> LIME = registerDeprecated(BLOCKS.register("lime", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_TILE = registerDeprecated(BLOCKS.register("lime_tile", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_STAIRS = registerDeprecated(BLOCKS.register("lime_stairs", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_TILE_BR = registerDeprecated(BLOCKS.register("lime_tile_br", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_TILE_TO_WALL = registerDeprecated(BLOCKS.register("lime_tile_to_wall", ()-> new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_WALL_V1 = registerDeprecated(BLOCKS.register("lime_wall_variant_1", ()->new DeprecatedBlock()));
public static final RegistryObject<Block> LIME_WALL_V2 = registerDeprecated(BLOCKS.register("lime_wall_variant_2", ()->new DeprecatedBlock()));
}

View file

@ -35,54 +35,6 @@ public class ModBlocks {
OTEMod.LOGGER.info("Registering all blocks...");
}
/**
* This variant of the method is meant for complex blocks that require a custom block item
* @param name
* @param blocky
* @return
*/
public static RegistryObj registerWithItem(String name, Supplier<Blocky> blocky)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->blocky.get().block);
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->blocky.get().item));
return new RegistryObj(ret,item);
}
/**
* Simple block registration with a normal block item.
* @param name
* @param a
* @param props
* @return
*/
public static RegistryObj registerWithItem(String name, Block a, Item.Properties props)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->a);
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->new BlockItem(ret.get(), props)));
return new RegistryObj(ret,item);
}
public static RegistryObj registerDeprecated(String name)
{
RegistryObject<Block> ret = BLOCKS.register(name, ()->new DeprecatedBlock());
var item = CreativeModeTabs.addToOTEModTab(ITEMS.register(name, ()->new DeprecatedBlockItem(ret.get())));
return new RegistryObj(ret,item);
}
private static class Blocky
{
public Block block;
public BlockItem item;
public Blocky(Block block, BlockItem item)
{
this.block=block;
this.item=item;
}
}
private static BlockBehaviour.Properties standardBehavior()
{
return BlockBehaviour.Properties.of().requiresCorrectToolForDrops().strength(7F).destroyTime(6);
@ -122,107 +74,128 @@ public class ModBlocks {
private static BlockBehaviour.Properties poolLightFilthy = BlockBehaviour.Properties.copy(Blocks.GLASS).lightLevel((X) -> 4);
public static final RegistryObj ETERNIUM_ORE_BLOCK = registerWithItem("eternium_ore_block", new DropExperienceBlock(explosionResistance), new Item.Properties());
public static RegistryObject<Block> registerWithItem(RegistryObject<Block> blk, Item.Properties props)
{
ITEMS.register(blk.getId().getPath(), ()->new BlockItem(blk.get(), props));
public static final RegistryObj VAULT_STEEL_ORE_BLOCK = registerWithItem("vault_steel_ore_block", new DropExperienceBlock(explosionResistance), new Item.Properties());
return blk;
}
public static final RegistryObj NETHER_VAULT_STEEL_ORE_BLOCK = registerWithItem("nether_vault_steel_ore_block", new DropExperienceBlock(explosionResistance), new Item.Properties());
public static final RegistryObj ETERNIUM_BLOCK = registerWithItem("eternium_block", new Block(explosionResistance), new Item.Properties());
public static final RegistryObj DEEPSLATE_ETERNIUM_ORE_BLOCK = registerWithItem("deepslate_eternium_ore_block", new DropExperienceBlock(explosionResistance), new Item.Properties());
public static final RegistryObj ITEM_SCRUBBER = registerWithItem("item_scrubber", new ItemScrubberBlock(noViewBlocking), new Item.Properties());
public static final RegistryObj MAGICAL_SCRUBBER = registerWithItem("magical_scrubber", new MagicalScrubberBlock(noViewBlocking), new Item.Properties());
public static final RegistryObj STABLE_SINGULARITY = registerWithItem("stable_singularity", new Block(noViewBlocking), new Item.Properties());
public static final RegistryObj COMPRESSION_CHAMBER = registerWithItem("compression_chamber", new CompressionChamberBlock(noViewBlocking), new Item.Properties());
public static final RegistryObj COMPRESSED_OBSIDIAN_BLOCK = registerWithItem("compressed_obsidian_block", new Block(BlockBehaviour.Properties.copy(Blocks.OBSIDIAN)), new Item.Properties());
public static final RegistryObj LAYERED_COMPRESSED_OBSIDIAN_BLOCK = registerWithItem("layered_compressed_obsidian_block", new Block(BlockBehaviour.Properties.copy(Blocks.OBSIDIAN)), new Item.Properties());
public static final RegistryObj VOID = registerWithItem("void", new Block(fullBright().noCollission()), new Item.Properties());
public static final RegistryObj WHITEOUT = registerWithItem("whiteout", new Block(fullBright().noCollission()), new Item.Properties());
public static final RegistryObj BLOOD_RED = registerWithItem("blood_red", new Block(fullBright()), new Item.Properties());
public static final RegistryObj RED_TILE = registerWithItem("red_tile", new Block(fullBright()), new Item.Properties());
public static final RegistryObj RED_STAIRS = registerWithItem("red_stairs", new StairBlock(BLOOD_RED.block.get()::defaultBlockState, fullBright()), new Item.Properties());
public static final RegistryObj RED_TILE_BR = registerWithItem("red_tile_br", new RotatableBlock(fullBright()), new Item.Properties());
public static final RegistryObject<Block> ETERNIUM_ORE_BLOCK = registerWithItem(BLOCKS.register("eternium_ore_block", ()->new DropExperienceBlock(explosionResistance)), new Item.Properties());
public static final RegistryObj RED_TILE_TO_WALL = registerWithItem("red_tile_to_wall", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> VAULT_STEEL_ORE_BLOCK = registerWithItem(BLOCKS.register("vault_steel_ore_block", ()->new DropExperienceBlock(explosionResistance)), new Item.Properties());
public static final RegistryObj RED_WALL_V1 = registerWithItem("red_wall_variant_1", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> NETHER_VAULT_STEEL_ORE_BLOCK = registerWithItem(BLOCKS.register("nether_vault_steel_ore_block", ()->new DropExperienceBlock(explosionResistance)), new Item.Properties());
public static final RegistryObj RED_WALL_V2 = registerWithItem("red_wall_variant_2", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> ETERNIUM_BLOCK = registerWithItem(BLOCKS.register("eternium_block", ()->new Block(explosionResistance)), new Item.Properties());
public static final RegistryObj CYAN = registerWithItem("cyan", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> DEEPSLATE_ETERNIUM_ORE_BLOCK = registerWithItem(BLOCKS.register("deepslate_eternium_ore_block", ()->new DropExperienceBlock(explosionResistance)), new Item.Properties());
public static final RegistryObj CYAN_TILE = registerWithItem("cyan_tile", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> ITEM_SCRUBBER = registerWithItem(BLOCKS.register("item_scrubber", ()->new ItemScrubberBlock(noViewBlocking)), new Item.Properties());
public static final RegistryObj CYAN_STAIRS = registerWithItem("cyan_stairs", new StairBlock(CYAN.block.get()::defaultBlockState, fullBright()), new Item.Properties());
public static final RegistryObject<Block> MAGICAL_SCRUBBER = registerWithItem(BLOCKS.register("magical_scrubber", ()->new MagicalScrubberBlock(noViewBlocking)), new Item.Properties());
public static final RegistryObj CYAN_TILE_BR = registerWithItem("cyan_tile_br", new RotatableBlock(fullBright()), new Item.Properties());
public static final RegistryObject<Block> STABLE_SINGULARITY = registerWithItem(BLOCKS.register("stable_singularity", ()->new Block(noViewBlocking)), new Item.Properties());
public static final RegistryObj CYAN_TILE_TO_WALL = registerWithItem("cyan_tile_to_wall", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> COMPRESSION_CHAMBER = registerWithItem(BLOCKS.register("compression_chamber", ()->new CompressionChamberBlock(noViewBlocking)), new Item.Properties());
public static final RegistryObj CYAN_WALL_V1 = registerWithItem("cyan_wall_variant_1", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> COMPRESSED_OBSIDIAN_BLOCK = registerWithItem(BLOCKS.register("compressed_obsidian_block", ()->new Block(BlockBehaviour.Properties.copy(Blocks.OBSIDIAN))), new Item.Properties());
public static final RegistryObj CYAN_WALL_V2 = registerWithItem("cyan_wall_variant_2", new Block(fullBright()), new Item.Properties());
public static final RegistryObject<Block> LAYERED_COMPRESSED_OBSIDIAN_BLOCK = registerWithItem(BLOCKS.register("layered_compressed_obsidian_block", ()->new Block(BlockBehaviour.Properties.copy(Blocks.OBSIDIAN))), new Item.Properties());
public static final RegistryObj POOL_TILE = registerWithItem("pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> VOID = registerWithItem(BLOCKS.register("void", ()->new Block(fullBright().noCollission())), new Item.Properties());
public static final RegistryObj POOL_TILE_STAIRS = registerWithItem("pool_tile_stairs", new StairBlock(POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> WHITEOUT = registerWithItem(BLOCKS.register("whiteout", ()->new Block(fullBright().noCollission())), new Item.Properties());
public static final RegistryObj POOL_TILE_SLAB = registerWithItem("pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> BLOOD_RED = registerWithItem(BLOCKS.register("blood_red", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj POOL_LIGHT = registerWithItem("pool_light", new Block(poolLightClean), new Item.Properties());
public static final RegistryObject<Block> RED_TILE = registerWithItem(BLOCKS.register("red_tile", ()-> new Block(fullBright())), new Item.Properties());
public static final RegistryObj DIRTY_POOL_TILE = registerWithItem("dirty_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> RED_STAIRS = registerWithItem(BLOCKS.register("red_stairs", ()-> new StairBlock(BLOOD_RED.get()::defaultBlockState, fullBright())), new Item.Properties());
public static final RegistryObj DIRTY_POOL_TILE_STAIRS = registerWithItem("dirty_pool_tile_stairs", new StairBlock(DIRTY_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> RED_TILE_BR = registerWithItem(BLOCKS.register("red_tile_br", ()->new RotatableBlock(fullBright())), new Item.Properties());
public static final RegistryObj DIRTY_POOL_TILE_SLAB = registerWithItem("dirty_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> RED_TILE_TO_WALL = registerWithItem(BLOCKS.register("red_tile_to_wall", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj DIRTY_POOL_LIGHT = registerWithItem("dirty_pool_light", new Block(poolLightDirty), new Item.Properties());
public static final RegistryObject<Block> RED_WALL_V1 = registerWithItem(BLOCKS.register("red_wall_variant_1", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj FILTHY_POOL_LIGHT = registerWithItem("filthy_pool_light", new Block(poolLightFilthy), new Item.Properties());
public static final RegistryObject<Block> RED_WALL_V2 = registerWithItem(BLOCKS.register("red_wall_variant_2", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj DARK_POOL_TILE = registerWithItem("dark_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> CYAN = registerWithItem(BLOCKS.register("cyan", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj DARK_POOL_LIGHT = registerWithItem("dark_pool_light", new Block(poolLightClean), new Item.Properties());
public static final RegistryObject<Block> CYAN_TILE = registerWithItem(BLOCKS.register("cyan_tile", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj DARK_POOL_TILE_STAIRS = registerWithItem("dark_pool_tile_stairs", new StairBlock(DARK_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> CYAN_STAIRS = registerWithItem(BLOCKS.register("cyan_stairs", ()->new StairBlock(CYAN.get()::defaultBlockState, fullBright())), new Item.Properties());
public static final RegistryObj DARK_POOL_TILE_SLAB = registerWithItem("dark_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> CYAN_TILE_BR = registerWithItem(BLOCKS.register("cyan_tile_br", ()->new RotatableBlock(fullBright())), new Item.Properties());
public static final RegistryObj BLUE_POOL_TILE = registerWithItem("blue_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> CYAN_TILE_TO_WALL = registerWithItem(BLOCKS.register("cyan_tile_to_wall", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj BLUE_POOL_TILE_STAIRS = registerWithItem("blue_pool_tile_stairs", new StairBlock(BLUE_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> CYAN_WALL_V1 = registerWithItem(BLOCKS.register("cyan_wall_variant_1", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj BLUE_POOL_TILE_SLAB = registerWithItem("blue_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> CYAN_WALL_V2 = registerWithItem(BLOCKS.register("cyan_wall_variant_2", ()->new Block(fullBright())), new Item.Properties());
public static final RegistryObj BLUE_POOL_LIGHT = registerWithItem("blue_pool_light", new Block(poolLightClean), new Item.Properties());
public static final RegistryObject<Block> POOL_TILE = registerWithItem(BLOCKS.register("pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObj DIRTY_BLUE_POOL_TILE = registerWithItem("dirty_blue_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> POOL_TILE_STAIRS = registerWithItem(BLOCKS.register("pool_tile_stairs", ()->new StairBlock(POOL_TILE.get()::defaultBlockState, stone)), new Item.Properties());
public static final RegistryObj DIRTY_BLUE_POOL_TILE_STAIRS = registerWithItem("dirty_blue_pool_tile_stairs", new StairBlock(DIRTY_BLUE_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> POOL_TILE_SLAB = registerWithItem(BLOCKS.register("pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties());
public static final RegistryObj DIRTY_BLUE_POOL_TILE_SLAB = registerWithItem("dirty_blue_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> POOL_LIGHT = registerWithItem(BLOCKS.register("pool_light", ()->new Block(poolLightClean)), new Item.Properties());
public static final RegistryObj DIRTY_BLUE_POOL_LIGHT = registerWithItem("dirty_blue_pool_light", new Block(poolLightDirty), new Item.Properties());
public static final RegistryObject<Block> DIRTY_POOL_TILE = registerWithItem(BLOCKS.register("dirty_pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObj FILTHY_BLUE_POOL_LIGHT = registerWithItem("filthy_blue_pool_light", new Block(poolLightFilthy), new Item.Properties());
public static final RegistryObject<Block> 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 RegistryObj RED_POOL_TILE = registerWithItem("red_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> DIRTY_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_pool_tile_slab", ()-> new SlabBlock(stone)), new Item.Properties());
public static final RegistryObj RED_POOL_TILE_STAIRS = registerWithItem("red_pool_tile_stairs", new StairBlock(RED_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> DIRTY_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_pool_light", ()->new Block(poolLightDirty)), new Item.Properties());
public static final RegistryObj RED_POOL_TILE_SLAB = registerWithItem("red_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> FILTHY_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties());
public static final RegistryObj RED_POOL_LIGHT = registerWithItem("red_pool_light", new Block(poolLightClean), new Item.Properties());
public static final RegistryObject<Block> DARK_POOL_TILE = registerWithItem(BLOCKS.register("dark_pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObj DIRTY_RED_POOL_TILE = registerWithItem("dirty_red_pool_tile", new Block(stone), new Item.Properties());
public static final RegistryObject<Block> DARK_POOL_LIGHT = registerWithItem(BLOCKS.register("dark_pool_light", ()->new Block(poolLightClean)), new Item.Properties());
public static final RegistryObj DIRTY_RED_POOL_LIGHT = registerWithItem("dirty_red_pool_light", new Block(poolLightDirty), new Item.Properties());
public static final RegistryObject<Block> 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 RegistryObj FILTHY_RED_POOL_LIGHT = registerWithItem("filthy_red_pool_light", new Block(poolLightFilthy), new Item.Properties());
public static final RegistryObject<Block> DARK_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dark_pool_tile_slab",()-> new SlabBlock(stone)), new Item.Properties());
public static final RegistryObj DIRTY_RED_POOL_TILE_STAIRS = registerWithItem("dirty_red_pool_tile_stairs", new StairBlock(DIRTY_RED_POOL_TILE.block.get()::defaultBlockState, stone), new Item.Properties());
public static final RegistryObject<Block> BLUE_POOL_TILE = registerWithItem(BLOCKS.register("blue_pool_tile",()-> new Block(stone)), new Item.Properties());
public static final RegistryObj DIRTY_RED_POOL_TILE_SLAB = registerWithItem("dirty_red_pool_tile_slab", new SlabBlock(stone), new Item.Properties());
public static final RegistryObject<Block> 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<Block> BLUE_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("blue_pool_tile_slab",()-> new SlabBlock(stone)), new Item.Properties());
public static final RegistryObject<Block> BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("blue_pool_light", ()->new Block(poolLightClean)), new Item.Properties());
public static final RegistryObject<Block> DIRTY_BLUE_POOL_TILE = registerWithItem(BLOCKS.register("dirty_blue_pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObject<Block> 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<Block> DIRTY_BLUE_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_blue_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties());
public static final RegistryObject<Block> DIRTY_BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_blue_pool_light", ()->new Block(poolLightDirty)), new Item.Properties());
public static final RegistryObject<Block> FILTHY_BLUE_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_blue_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties());
public static final RegistryObject<Block> RED_POOL_TILE = registerWithItem(BLOCKS.register("red_pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObject<Block> 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<Block> RED_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("red_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties());
public static final RegistryObject<Block> RED_POOL_LIGHT = registerWithItem(BLOCKS.register("red_pool_light", ()->new Block(poolLightClean)), new Item.Properties());
public static final RegistryObject<Block> DIRTY_RED_POOL_TILE = registerWithItem(BLOCKS.register("dirty_red_pool_tile", ()->new Block(stone)), new Item.Properties());
public static final RegistryObject<Block> DIRTY_RED_POOL_LIGHT = registerWithItem(BLOCKS.register("dirty_red_pool_light", ()->new Block(poolLightDirty)), new Item.Properties());
public static final RegistryObject<Block> FILTHY_RED_POOL_LIGHT = registerWithItem(BLOCKS.register("filthy_red_pool_light", ()->new Block(poolLightFilthy)), new Item.Properties());
public static final RegistryObject<Block> 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<Block> DIRTY_RED_POOL_TILE_SLAB = registerWithItem(BLOCKS.register("dirty_red_pool_tile_slab", ()->new SlabBlock(stone)), new Item.Properties());
}

View file

@ -14,13 +14,13 @@ public class ModEntities {
public static final DeferredRegister<BlockEntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, OTEMod.MOD_ID);
public static final RegistryObject <BlockEntityType <ItemScrubberBlockEntity>> ITEM_SCRUBBER = ENTITIES.register("item_scrubber", ()-> BlockEntityType.Builder.of(ItemScrubberBlockEntity::new, ModBlocks.ITEM_SCRUBBER.block.get()).build(null));
public static final RegistryObject <BlockEntityType <ItemScrubberBlockEntity>> ITEM_SCRUBBER = ENTITIES.register("item_scrubber", ()-> BlockEntityType.Builder.of(ItemScrubberBlockEntity::new, ModBlocks.ITEM_SCRUBBER.get()).build(null));
public static final RegistryObject <BlockEntityType <MagicalScrubberBlockEntity>> MAGICAL_SCRUBBER = ENTITIES.register("magical_scrubber", ()-> BlockEntityType.Builder.of(MagicalScrubberBlockEntity::new, ModBlocks.MAGICAL_SCRUBBER.block.get()).build(null));
public static final RegistryObject <BlockEntityType <MagicalScrubberBlockEntity>> MAGICAL_SCRUBBER = ENTITIES.register("magical_scrubber", ()-> BlockEntityType.Builder.of(MagicalScrubberBlockEntity::new, ModBlocks.MAGICAL_SCRUBBER.get()).build(null));
//public static final ResourceLocation PARALLAX_BLOCK = new ResourceLocation(OTEMod.MOD_ID, "parallax_block");
public static final RegistryObject<BlockEntityType<CompressionChamberBlockEntity>> COMPRESSION_CHAMBER = ENTITIES.register("compression_chamber", ()->BlockEntityType.Builder.of(CompressionChamberBlockEntity::new, ModBlocks.COMPRESSION_CHAMBER.block.get()).build(null));
public static final RegistryObject<BlockEntityType<CompressionChamberBlockEntity>> COMPRESSION_CHAMBER = ENTITIES.register("compression_chamber", ()->BlockEntityType.Builder.of(CompressionChamberBlockEntity::new, ModBlocks.COMPRESSION_CHAMBER.get()).build(null));
//public static final RegistryObject <BlockEntityType <ParallaxWindowEntity>> PARALLAX_WINDOW_ENTITY = ENTITIES.register("parallax_window", ()->BlockEntityType.Builder.of(ParallaxWindowEntity::new, ModBlocks.LIMINAL_WINDOW.get()).build(null));

View file

@ -133,7 +133,7 @@ public class CompressionChamberMenu extends AbstractContainerMenu
@Override
public boolean stillValid(Player player) {
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.COMPRESSION_CHAMBER.block.get());
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.COMPRESSION_CHAMBER.get());
}
private static final int PLAYER_INVENTORY_FIRST_SLOT_HEIGHT = 85;

View file

@ -124,7 +124,7 @@ public class ItemScrubberMenu extends AbstractContainerMenu
@Override
public boolean stillValid(Player player) {
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.ITEM_SCRUBBER.block.get());
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.ITEM_SCRUBBER.get());
}
private static final int PLAYER_INVENTORY_FIRST_SLOT_HEIGHT = 69;

View file

@ -124,7 +124,7 @@ public class MagicalScrubberMenu extends AbstractContainerMenu
@Override
public boolean stillValid(Player player) {
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.MAGICAL_SCRUBBER.block.get());
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.MAGICAL_SCRUBBER.get());
}
private static final int PLAYER_INVENTORY_FIRST_SLOT_HEIGHT = 69;