Jump to content

Entity that behaves like a spear


ClaraArmada

Recommended Posts

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!

Link to comment
Share on other sites

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);
		         */
		        
		    }
		}				
			








 

 

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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