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

hello, I'd like some help and guidance on this, I've been trying to make my spear item function like the trident, and then it crashed, I thought "oh it's probably because of the model?" so I tried making a model, then got kinda lost, so I then removed  the model files, now I need help since I can't really find the problem: here is crash log:

https://pastebin.com/KXA3uU9X

and here is the GitHub repository:

https://github.com/ClaraArmada/Serilis

link to some of the specific files:

https://github.com/ClaraArmada/Serilis/blob/bceffe46abca9daf7e1a4eae6ddb08f78300e65a/src/main/java/com/github/ClaraArmada/serilis/world/item/SpearItem.java

https://github.com/ClaraArmada/Serilis/blob/bceffe46abca9daf7e1a4eae6ddb08f78300e65a/src/main/java/com/github/ClaraArmada/serilis/world/entity/projectile/ThrownSpear.java

https://github.com/ClaraArmada/Serilis/blob/bceffe46abca9daf7e1a4eae6ddb08f78300e65a/src/main/java/com/github/ClaraArmada/serilis/init/EntityInit.java

thank you for your help!

Depending on how you want to make your model, you can either use a json model with ThrownItemRenderer (or a custom renderer if you want some fancy logic, or a java model (you can generate this via BlockBench) attached via a BEWLR.

java.lang.NullPointerException: Cannot invoke "net.minecraft.client.renderer.entity.EntityRenderer.shouldRender(net.minecraft.world.entity.Entity, net.minecraft.client.renderer.culling.Frustum, double, double, double)" because "entityrenderer" is null

 

i say its missing the part where you tell it what model renderer to use whit what entity 

 

 

Spoiler

				
			package merctool;				
			import net.minecraftforge.eventbus.api.SubscribeEvent;
		import net.minecraftforge.fml.common.Mod;
		import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
		import merctool.entity.EntityInit;
		import merctool.entity.detonator_ghost_renderer;
		import merctool.entity.hole_entity_renderer;
		import merctool.entity.icon_entity_renderer;
		import merctool.entity.lance_entity_renderer;
		import merctool.entity.red_hot_iron_entity_renderer;
		import net.minecraft.client.renderer.entity.EntityRenderers;
		import net.minecraftforge.api.distmarker.Dist;				
			
		//@Mod.EventBusSubscriber(modid = merctool.MOD_ID,  bus = Mod.EventBusSubscriber.Bus.FORGE )
		@Mod.EventBusSubscriber(modid = merctool.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
		public class ClientSetup {
		    @SubscribeEvent
		    public static void doSetup(FMLClientSetupEvent event) {
		        
		        EntityRenderers.register(EntityInit.RED_HOT_IRON_ENTITY.get(), red_hot_iron_entity_renderer::new);
		        
		        EntityRenderers.register(EntityInit.ICON_ENTITY.get(), icon_entity_renderer::new);
		        
		        EntityRenderers.register(EntityInit.LANCE_ENTITY.get(), lance_entity_renderer::new);
		        
		        EntityRenderers.register(EntityInit.HOLE_ENTITY.get(), hole_entity_renderer::new);
		        
		        EntityRenderers.register(EntityInit.DETONATOR_GHOST.get(), detonator_ghost_renderer::new);
		        
		        
		        /*
		         EntityRenderers.register(EntityInit.EXPLOSIVE_ARROW.get(), ExplosiveArrowRenderer::new);
		         
		         EntityRenderers.register(EntityInit.MERCENARY_ARROW.get(), mercenaryarrow_renderer::new);
		         
		         EntityRenderers.register(EntityInit.PUERTA_WATCHER_ENTITY.get(), watcher_entity_renderer::new);
		         
		         EntityRenderers.register(EntityInit.MANHOLE_WATCHER_ENTITY.get(), watcher_entity_renderer::new);
		         */
		        
		    }
		}				
			








 

 

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.