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

I am unable to get the entity associated with my TNT-like block to render in-world. I've looked at tons of examples on how it's been done previously and an equivalent number of "Help Me" topics, but nothing's worked for me yet. I've even attempted to use the vanilla TNT rendering code in the registry, to no avail. I know the entity is "alive", because it's dropping due to gravity and is exploding properly.

 

Here's my code bits:

 

Rendering Class, mostly copied over from vanilla RenderTNTPrimed Class.

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/ExplosiveRender.java

 

Entity for the TNT-clone.

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/entities/EntityMiningChargePrimed.java

 

ClientProxy Class, register for Rendering the entity is on line 33.

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/ClientProxy.java

 

Main class, Entity registry for TNT entity is on line 85.

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/Main.java

 

Block Class, just in case you need that.

https://github.com/Exo594/TutorialWork/blob/master/src/src/main/java/com/exo594/tutorial/block/MiningCharge.java

 

At time of edit: I've placed systemout statements in my doRender and RenderPrimedTNT methods, and it appears that they're not being triggered at all. I had assumed from the examples I'd seen that doRender was called by some skeleton class in Forge or FML, or even in Vanilla code, but I guess not. I've attempted to call it from my Entity class when the entity updates, but it bitches at me about static and non-static contexts.

 

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.