Jump to content

drumslayer01

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by drumslayer01

  1. Ok, thanks, My formatting is not like that in the code the copy paste must have messed it up. Also I have never used any of this Icon stuff before. I am sorry, I am new to forge coding and it does not help me learn by telling me that I suck at what I am trying to learn
  2. It works when I use this in a bow And can you at least be helpful and tell me what is wrong...
  3. So I am trying to make an item that will change textures when it changes modes, and it crashes when I try. I took a similar code from the bow pullback I have used, but it is not working because there are some bow specific properties that I tried to replace but it wasn't right. How can I make it so when it changes modes, it changes textures Icon code Thank you
  4. Oh wow, it wasn't working because I didn't have a world method in the entity class
  5. Ok, thanks for helping. Maybe I will try changing it to a projectile, not entity throwable
  6. I was just saying the other method is for the animals, but I still changed it to 1 and its not working
  7. Ok, but the problem is not with those entities, it is with rendering
  8. This is the one I use for Mob/Animal entities. Also, if I get rid of the findUniqueGlobalEntityID, It doesn't work public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) { int entityId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityId); EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, solidColor, spotColor)); }
  9. Thanks, but it is still rendering wrong
  10. What would I put for the EntityID then?
  11. This is how I register it public static void registerEntity() { createEntity(Caterpillar.class, "Caterpillar", 0x66FF00, 0x000000); createEntity(Coyote.class, "Coyote", 0x5E0F0F, 0 ); createEntity(EntityGrenade.class, "Grenade"); createEntity(EntityPepperLightning.class, "Peppa Lightning"); createEntity(EntityPepperSpray.class, "Pepper Spray"); }//end registerEntity public static void createEntity(Class entityClass, String entityName) { int entityId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerModEntity(entityClass, entityName, entityId, MainRegistry.modInstance, 64, 1, true); }
  12. No matter what I try, it renders it as the grenade, and even does the particles of the grenade as well
  13. I have registered them, but not like that. I will try that, thanks.
  14. I currently have 2 throwable entities made, but for some reason I cannot render both at once. For some reason, the one RenderSnowball I have renders for all entity throwable. Although, when I spawn multiple of the entities at once, it is half correct, half incorrect textures. Here is how I register them RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(ItemManager.grenade)); RenderingRegistry.registerEntityRenderingHandler(Caterpillar.class, new RenderCaterpillar(new ModelCaterpillar(), 0)); RenderingRegistry.registerEntityRenderingHandler(Coyote.class, new RenderCoyote(new ModelCoyote(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityPepperSpray.class, new RenderSpray()); Is there any way I can fix this problem? If I can't fix it using RenderSnowball, is there any way I can make a 2D model? Thanks for your help.
  15. never mind, I figured it out
  16. So I am creating a pepper spray, and was not succeeding at making good particle effects when you use it. I tried adding particles in the onUpdate method in the entity class, but it did not work. Should I do it in the Entity class or Item class in the onRightClick method? Also, how would I make many of them in different places corresponding to the way the player is facing. I can add the classes if you need them. Thanks for your help.
×
×
  • Create New...

Important Information

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