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.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. Wow, every time I think I have a genuine problem, I always just look like an idiot because it is something stupid I missed. What do I need to put instead of null there? I am not sure.. Delete the TileEntityTestChest method (it has no reason to exist) and use the new operator in createNewTileEntity (this is how you create new objects).
  2. EntityLeashKnot extends EntityHanging , but your EntityRopeKnot doesn't. Do you replicate all of the logic from EntityHanging yourself? There a few places where Minecraft checks if an entity is an instance of EntityHanging , so you may want to extend it (or extend EntityLeashKnot since your entity seems to be very similar).
  3. Render and IRenderFactory both have a generic type argument: the entity type that they support. If you try to return an incompatible Render instance from your IRenderFactory (e.g. an instance of RenderZombie for EntityArrow ), you'll get a compilation error because the generic types don't match. Is the method that calls RenderingRegistry.registerEntityRenderingHandler definitely being called? Is RenderRopeKnot#doRender being called? Are there any errors in the log? Side note: You should always annotate override methods with @Override so you get a compilation error if they don't actually override a super method. You should also consider extending EntityLeashKnot and overriding any required methods instead of copy-pasting it.
  4. TileEntityItemStackRenderer#renderByItem is responsible for rendering the banner/shield items (as well as skulls, chests and shulker boxes). This uses TileEntityBanner#setItemValues to read colour/pattern data from the ItemStack and BannerTextures.Cache#getResourceLocation to get the ResourceLocation of the shield texture from the TileEntityBanner instance. Mods can register a TileEntitySpecialRenderer for their Item s, but this is deprecated and will be removed as soon as possible. Instead, you should use the baked model system to generate models and textures at runtime like Forge's ModelDynBucket does. You can also use the capability system to store your data as objects instead of having to read it from and write it to NBT every time you interact with it. Unfortunately, syncing of item capabilities is tricky. Capability-only changes to an ItemStack in a server-side Container will cause an SPacketSetSlot to be sent for the slot, but this doesn't include the capability data so the client-side copy of the capability data will be reset to the default. This PR and this issue discuss potential fixes for this. One way to handle the syncing currently is to register an IContainerListener , as described in this thread.
  5. It looks like you already figured this out yourself, but for future reference click the Files link at the top of the site or go files.minecraftforge.net.
  6. Just to be clear, you've tried calling RenderingRegistry#registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) with an IRenderFactory that produces a RenderRopeKnot instance in preInit? Is the method that calls this definitely being called? RenderLeashKnot can only be used for entities that extend EntityLeashKnot .
  7. Update to the latest version of Forge, these bugs have already been fixed.
  8. It looks like you figured this out in your thread, but for future reference click the Files link at the top of the site or go files.minecraftforge.net.
  9. The currently recommended way to register things like Item s and models is using the recently-added registry events. I explain them here.
  10. cpw explains how to generate the run configurations for IDEA in .
  11. You'll probably need to generate textures and models at runtime like ModelDynBucket does.
  12. You're using the deprecated overload of RenderingRegistry.registerEntityRenderingHandler in preInit, before the RenderManager instance has been created. I'm surprised the game isn't crashing with a NullPointerException as soon as it tries to render the entity. Use the non-deprecated overload of RenderingRegistry.registerEntityRenderingHandler (the IRenderFactory one) instead.
  13. Oh it turns out I had downloaded an outdated version. When was Forge most recently updated? I got it about 2 days ago, before I learned how to use it. Thank you very much! A new version is automatically released every time a change is pushed to the main repository on GitHub. This usually happens every day (or several times a day) for a Minecraft version that's been released recently or slightly less often for a Minecraft version that's been out for a while. 1.11 was released fairly recently and changed a few things around, so there's a lot of active development going on for it.
  14. Post the full FML log (logs/fml-client-latest.log) using Gist. It looks like you may be trying to load a 1.7.10 version of Forge as a mod in a newer version of Forge, which won't work (and doesn't make any sense).
  15. Make sure you're using Forge 1.11-13.19.0.2178, the latest version. If the issues still happen with the latest version, upload the FML log (logs/fml-client-latest.log) to Gist and link it here.
  16. What you're doing should work, though it's no longer the recommended way to import the project into IDEA. Try following from cpw and see if anything changes.
  17. Does that mean I need to fix it myself again? Grumble grumble. (I'm the one that did it for 1.7.10) That's probably going to be the quickest way to get these issues fixed.
  18. The issue with the gas (negative density fluid) has been reported here. The issue with the other fluid is probably this one. Unfortunately it may take a while for these to get fixed as Fry (Forge's rendering guy) hasn't been working much on Forge lately.
  19. IBakedModel#getQuads can give you the BakedQuad s for an EnumFacing and BakedQuad#getSprite can give you the texture of a BakedQuad . If you're storing an IBlockState , you can use BlockModelShapes#getModelForState to get the IBakedModel . If you're storing an ItemStack , you can use ItemModelMesher#getItemModel(ItemStack) , IBakedModel#getOverrides and ItemOverrideList#handleItemState to get the IBakedModel .
  20. Do you need to get this texture at runtime or can you simply create a texture for each block's armour on disk? If you do need to get the texture at runtime, you can use the particle texture of the block's model. If your armour stores an IBlockState , use BlockModelShapes#getTexture to get the particle texture of that state's model. If your armour stores an ItemStack , use ItemModelMesher#getParticleIcon to get the particle texture of that item's model.
  21. ItemStack#getDisplayName will throw a NullPointerException when you call it on an ItemStack with a null Item . Side note: Why are you raytracing once for each coordinate of the block and then immediately creating a BlockPos from those coordinates? Raytrace once and use the BlockPos from the RayTraceResult directly.
  22. Create a SoundEvent with the ResourceLocation of your sound (i.e. your mod ID as the domain and the event name from sounds.json as the path), subscribe to RegistryEvent.Register<SoundEvent> and then use RegistryEvent.Register#getRegistry to get the registry and IForgeRegistry#register or IForgeRegistry#registerAll to register your SoundEvent . RegistryEvent.Register is fired before preInit, so you need to subscribe to it with a static method annotated with @SubscribeEvent in a class annotated with @Mod.EventBusSubscriber . You can see how I do this here.
  23. Block#getMobilityFlag determines whether a Block can be pushed by a piston. There have been various PRs for piston events in the past, but none have been merged yet. If you need these events, consider submitting a current PR.
  24. If you know you're on the client, you should be able to access the client World through the Minecraft#world field.
  25. ItemStack doesn't override Object#hashCode , so two ItemStack s will only have the same hash code if they're the same object. You shouldn't actually need to override Object#hashCode if your recipe class isn't being used as the key of a HashMap . If you do override it, you need to generate your own hash code for each ItemStack based on the parts your recipe cares about ( Item , metadata, NBT and/or capabilities). Are you sure your updated equals method is correct? You're comparing item1 and item2 , item2 and item2 and item1 and item3 . Should you not be comparing item1 and item1 , item2 and item2 , item3 and item3 ?

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.