Posted January 12, 20214 yr I recently changed my registration structure to use deferred register for scalability reasons and have encountered an error. One of my items called GAS_TANK, and is being registered like so: //Gas Tanks public static final RegistryObject<Item> GAS_TANK = ITEMS.register("gas_tank", () -> new Item(PropertiesGeneric)); private static final Item.Properties PropertiesGasTank = new Item.Properties().group(solidarityGroup)//solidarityGroup) .maxStackSize(1).containerItem(GAS_TANK.get()); public static final RegistryObject<Item> GAS_TANK_CO2 = ITEMS.register("gas_tank_co2", () -> new Item(PropertiesGasTank)); public static final RegistryObject<Item> GAS_TANK_SO2 = ITEMS.register("gas_tank_so2", () -> new Item(PropertiesGasTank)); I'm trying to make some more items that use GAS_TANK as a containerItem, similar water/lava buckets, so they won't be consumed when used as an ingredient or fuel. However, since GAS_TANK won't be registered yet, it gives me an error when trying to run the line that defines PropertiesGasTank. How should I arrange/modify the code so that I can set GAS_TANK as the containerItem for the gas tank variants?
January 12, 20214 yr Author Worked. Not sure why I didn't think of it myself, guess I need more practice with Java
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.