Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

 

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 by greetthemoth

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.