Skip 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. There is always a log, even when nothing goes wrong. Upload the FML log (logs/fml-client-latest.log) to Gist and link it here.
  2. RedChestBlock#createTileEntity creates a new CrateTileEntity , not a RedChestTileEntity . Side note: The standard naming convention used by MCP (in vanilla code) and most mods is to have the parent class as a prefix rather than a suffix (e.g. TileEntityRedChest , not RedChestTileEntity ). I'd recommend following this convention, though it's not required.
  3. RedChestBlock#createTileEntity creates a new CrateTileEntity , not a RedChestTileEntity . Side note: The standard naming convention used by MCP (in vanilla code) and most mods is to have the parent class as a prefix rather than a suffix (e.g. TileEntityRedChest , not RedChestTileEntity ). I'd recommend following this convention, though it's not required.
  4. If you're just recolouring a greyscale texture with a single colour, you don't need to generate a texture. Simply override Block#getBlockColor , Block#getRenderColor and Block#colorMultiplier . If the colour should be determined at runtime, store it in a field.
  5. If you're just recolouring a greyscale texture with a single colour, you don't need to generate a texture. Simply override Block#getBlockColor , Block#getRenderColor and Block#colorMultiplier . If the colour should be determined at runtime, store it in a field.
  6. You never initialise the myStacks field. You also never read it from or write it to NBT, do this using the INBTSerializable methods implemented by ItemStackHandler . I suggest you remove the ItemStack array field and the IInventory methods.
  7. You never initialise the myStacks field. You also never read it from or write it to NBT, do this using the INBTSerializable methods implemented by ItemStackHandler . I suggest you remove the ItemStack array field and the IInventory methods.
  8. I think this is caused by your getMetaFromState method. Metadata should simply be radius - 1.
  9. I think this is caused by your getMetaFromState method. Metadata should simply be radius - 1.
  10. Don't implement IItemHandler on your TileEntity , create a field storing an implementation of it (e.g. ItemStackHandler ) and expose it as a capability (by overriding the ICapabilityProvider methods inherited by TileEntity ). I do this in [url=https://github.com/Choonster/TestMod3/blob/d326040ffd81cf942de5ddaebc9c5ed866f1dd33/src/main/java/com/choonster/testmod3/tileentity/TileEntityItemHandler.java]TileEntityItemHandler[/url] .
  11. Don't implement IItemHandler on your TileEntity , create a field storing an implementation of it (e.g. ItemStackHandler ) and expose it as a capability (by overriding the ICapabilityProvider methods inherited by TileEntity ). I do this in [url=https://github.com/Choonster/TestMod3/blob/d326040ffd81cf942de5ddaebc9c5ed866f1dd33/src/main/java/com/choonster/testmod3/tileentity/TileEntityItemHandler.java]TileEntityItemHandler[/url] .
  12. Yes, the class I linked does that. IRecipe#getRecipeOutput returns the recipe's output, but each recipe type has a separate way to get the input.
  13. Yes, the class I linked does that. IRecipe#getRecipeOutput returns the recipe's output, but each recipe type has a separate way to get the input.
  14. Override Block#getBlockLayer to return CUTOUT or TRANSPARENT . The Grey Ghost explains each layer here. Block#isOpaqueCube is used by Block#doesSideBlockRendering / Block#shouldSideBeRendered to determine whether the faces of adjacent blocks should be rendered (opaque blocks block rendering, transparent blocks don't).
  15. I have a class that replaces vanilla/Forge recipes here, though it's for 1.7.10. Each recipe class needs to be handled individually and I specifically prevent it from replacing subclasses because they may have their own custom behaviour.
  16. I have a class that replaces vanilla/Forge recipes here, though it's for 1.7.10. Each recipe class needs to be handled individually and I specifically prevent it from replacing subclasses because they may have their own custom behaviour.
  17. I can't see any obvious errors in your code, try stepping through the IInventory methods or the NBT reading/writing methods in a debugger and see if anything goes wrong. Side note: You shouldn't be using IInventory in 1.8.9+, you should be using the IItemHandler capability. I have an example of a chest that uses IItemHandler here (all other classes used are in the same repository). This includes the naming and loot generation features of vanilla chests, but not the animated model. You also shouldn't be using the deprecated GameRegistry.registerBlock or registering your blocks in init. Use GameRegistry.register in preInit to register all IForgeRegistryEntry implementations (e.g. Block , Item , Biome , SoundEvent ). This won't register an ItemBlock for your Block , you need to do that yourself.
  18. I can't see any obvious errors in your code, try stepping through the IInventory methods or the NBT reading/writing methods in a debugger and see if anything goes wrong. Side note: You shouldn't be using IInventory in 1.8.9+, you should be using the IItemHandler capability. I have an example of a chest that uses IItemHandler here (all other classes used are in the same repository). This includes the naming and loot generation features of vanilla chests, but not the animated model. You also shouldn't be using the deprecated GameRegistry.registerBlock or registering your blocks in init. Use GameRegistry.register in preInit to register all IForgeRegistryEntry implementations (e.g. Block , Item , Biome , SoundEvent ). This won't register an ItemBlock for your Block , you need to do that yourself.
  19. EntityLivingBase#getItemStackFromSlot
  20. EntityLivingBase#getItemStackFromSlot
  21. In 1.9, block/block defines the standard display transformations for block models. This is extended by all full cube models (e.g. block/cube and block/cube_all ). Similarly, item/generated extends builtin/generated and defines the standard display transformations for simple item models. You only need to define display transformations yourself when your model has a custom shape or you want it to be displayed differently to normal models.
  22. In 1.9, block/block defines the standard display transformations for block models. This is extended by all full cube models (e.g. block/cube and block/cube_all ). Similarly, item/generated extends builtin/generated and defines the standard display transformations for simple item models. You only need to define display transformations yourself when your model has a custom shape or you want it to be displayed differently to normal models.
  23. As it says in the error message, it's using the JAVA_HOME environment variable; not PATH . Set this to your JDK path.

Important Information

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

Account

Navigation

Search

Search

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.