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.

drumslayer01

Members
  • Joined

  • Last visited

  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.

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.