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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. You don't have a ModelRegistryEvent, meaning your block in the inventory will be black and purple.
  2. The wrongest terminology. Capabilities are how the data is stored during runtime. Json, txt, and NBT are all disk storage formats.
  3. Registry name needs to be all lower case. Unlocalized name should contain your mod ID, most people do this by setting the registry name and then calling setUnlocalizedName(getRegistryName().toString())
  4. TESR should only really be used if the model animates. I can't really advise on how best to proceed trying to do this with JSON models, but if you do go TESR, go FastTESR.
  5. Your NPE is on this line: MinecraftServer mcServer = player1.getServer();
  6. When the item stack is created you need to set the attribute modifiers (attack damage and attack speed). Anytime you update the NBT to have a different value, you would have to update the attributes as well.
  7. That's the worst idea. All of those instances would then need to be garbage collected.
  8. It's a Forge event. So no, its not likely to be changed.
  9. Cancelable means that where the event is used, the code queries if the event was actually cancelled before continuing on with the operation. In this case, it isn't cancelable because it's an event informing other code "hey, this happened." It's too late to do anything about it.
  10. https://stackoverflow.com/a/8851063/1663383
  11. Yes. That is precisely what I am saying.
  12. Sorry, it's createTileEntity.
  13. You need a custom IRecipe implementation. Have a look at Choonster's testmod3, you'll want to look at the gold armor upgrade things. Pay special attention to the _factories.json file.
  14. Most block methods are deprecated but that's irrelevant as the point of deprecated methods is "do not invoke" which says nothing about overriding (that is: if you want to know about a block, as its IBlockState object, not the block).
  15. Do not use ITileEntityProvider. It is old, out dated, bad, and broken. Just use the hasTileEntity and getTileEntity methods already available in the Block class.
  16. someTileEntity.hasCapability(...) someTileEntity.getCapability(...) https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L135-L158 http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
  17. ISidedInventory extends IInventory
  18. Caused by: java.lang.NullPointerException at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:432) ~[ItemStack.class:?] You have a null item stack somewhere.
  19. remove the isRemote check
  20. Found the problem: if (!world.isRemote) { TileEntity te = world.getTileEntity(pos); if (!(te instanceof TileMyFurnace)) { return false; } player.openGui(MyBlocks.instance, Reference.MY_GUI, world, pos.getX(), pos.getY(), pos.getZ()); } You need to open the GUI on both sides.
  21. wrench = new ItemBase("wrench").setCreativeTab(CreativeTabs.WHATEVER); No override needed.
  22. You can turn the resource location into a string. The point is to get your mod ID into the unlocalized name as to avoid name conflicts (language entries are NOT mod specific). e.g. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/EasyRegistry.java#L95 Hmm... There's no need to override setCreativeTab: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L27 Just call it in the item's constructor with whatever tab you want. Not seeing any other issues, though.
  23. Question, why do you pass this off to the item only to have the item pass it back to the registry class? https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L45-L54 You could just call registerItemModel(wrench, 0, new ModelResourceLocation(wrench.getRegistryName(),"normal")) Also: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L14 NO. BAD. There is no reason save this. https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L18 setUnlocalizedName(getRegistryName()) https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L46 This event is client-side-only: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L10
  24. That's fine, but there's still no reason to screw around with which hotbar slot is selected.

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.