Posted August 16, 20205 yr New to modding. My registry argument within my ClientSetupEvent isnt working. Ive already tried a couple things and i cant get it to work. I guess im not sure whats its asking for. Quote @Mod("progressionmod") @Mod.EventBusSubscriber(modid = ProgressionMod.MOD_ID, bus = Bus.MOD) public class ProgressionMod { ... private void doClientStuff(final FMLClientSetupEvent event) { ... TileEntityRenderer<ProCampfireTileEntity> h = new ProCampfireTileEntityRenderer(TileEntityRendererDispatcher.instance); ClientRegistry.bindTileEntityRenderer(ModTileEntityTypes.CAMPFIRE, h); // ^^^Clearly this doesnt work, but what exactly does it expect me to do here. // I guess im asking for an example of what a functioning ClientRegistry.bindTileEntityRenderer() call would look like. //Also tried >>> TileEntityRendererDispatcher.instance.setSpecialRendererInternal(TileEntityType.CAMPFIRE, h ); } ... } Other stuff that might be relevant Quote public class ProCampfireTileEntity extends TileEntity implements IClearable, ITickableTileEntity { ... public ProCampfireTileEntity(final TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); } public ProCampfireTileEntity() { this(ModTileEntityTypes.CAMPFIRE.get()); } ... } Quote public class ProCampfireTileEntityRenderer extends TileEntityRenderer<ProCampfireTileEntity> { public ProCampfireTileEntityRenderer(TileEntityRendererDispatcher rendererDispatcherIn) { super(rendererDispatcherIn); } ... } Quote public class ModTileEntityTypes { public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.TILE_ENTITIES,ProgressionMod.MOD_ID); public static final RegistryObject<TileEntityType<ProCampfireTileEntity>> CAMPFIRE = TILE_ENTITY_TYPES.register("progressioncampfire",() -> TileEntityType.Builder.create(ProCampfireTileEntity::new, BlockInit.campfire).build(null)); } Edited August 16, 20205 yr by greetthemoth
August 16, 20205 yr TileEntityRenderer<ProCampfireTileEntity> h = new ProCampfireTileEntityRenderer(TileEntityRendererDispatcher.instance); ClientRegistry.bindTileEntityRenderer(ModTileEntityTypes.CAMPFIRE, h); You don't need the first line..in fact it would be a mistake. Just use ProCampfireTileEntityRenderer::new in the bindTileEntityRenderer Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
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.