Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. Item#onCreated is called when the ItemStack is taken from the output slot of a furnace, crafting table or villager trade GUI. You wouldn't need to set the durability when the item is crafted if you used Minecraft's system of 0 being fully-repaired and X (where X is some positive number) being fully-damaged.
  2. Your code is incorrect, you're printing "NO NBT" when the ItemStack when nbt isn't null (i.e. when it has a compound tag) and calling a method on nbt when it is null (causing the NullPointerException). If ItemStack#getTagCompound returns null or ItemStack#hasTagCompound returns false, you need to create an NBTTagCompound and call ItemStack#setTagCompound to set it as the ItemStack's compound tag. I use this method in my code to get or create an ItemStack's compound tag. You can also use ItemStack#getOrCreateSubCompound to get or create a sub-compound of the ItemStack's compound tag or ItemStack#setTagInfo to set a key of the ItemStack's compound tag to the specified NBT tag. These will both create the compound tag if necessary.
  3. Don't extend BlockLiquid or create your own property; just use Material.WATER and include the BlockLiquid.LEVEL property. Since your Block has a property, you either need to include the property's values in your blockstates file or ignore the property by registering an IStateMapper for the Block by calling ModelLoader.setCustomStateMapper in ModelRegistryEvent. You can create the IStateMapper using StateMap.Builder. It won't render water on any side of the block not touching water:
  4. Item#onCreated can be used to add NBT data to the result ItemStack of a crafting, smelting or merchant recipe; but it can't do so based on the ingredients.
  5. Each overload of GameRegistry.addSmelting calls the corresponding FurnaceRecipes method. There's no difference between the GameRegistry and FurnaceRecipes methods. The NBT data on the result ItemStack you pass to these methods will be copied to the smelting result. The NBT data on the ingredient ItemStack is completely ignored.
  6. Create a class that extends Ingredient or a subclass like IngredientNBT. Override Ingredient#getMatchingStacks and/or Ingredient#apply if you need to. Create a class that implements IIngredientFactory and returns a new instance of your Ingredient from the parse method. Specify the IIngredientFactory class in recipes/_factories.json. FurnaceRecipes doesn't check NBT, so you can't restrict smelting ingredients to specific NBT values. It does preserve the original NBT data of the smelting result, though.
  7. The log explains exactly what the problem is and how to avoid it: Aside from that, 1.7.10 mods won't work on 1.12 (except under very rare circumstances where the mod doesn't use anything that's changed between Minecraft versions).
  8. 1.7.10 is no longer supported here, update if you want help.
  9. Now that IRecipes are in a Forge registry, you can override an existing IRecipe simply by registering a new one with the same registry name.
  10. Minecraft couldn't find an item model or blockstates variant for the Items tut:itemtutitem and tut:tutblock. Minecraft couldn't find a blockstates file for the Block tut:tutblock. Are you sure your JSON files have the right names and paths? Have you set up your IDE project as per the documentation?
  11. It's worth noting that you can use an OreIngredient (forge:ore_dict) in any recipe now, not just Forge's ore recipes (forge:ore_shaped and forge:ore_shapeless).
  12. Using Material.WATER does allow the model to be rendered with water surrounding it, as I explain here: A screenshot of the effect (with Night Vision and Water Breathing active):
  13. Registering the models in common code will crash the dedicated server, but it should work in single player. Something's causing the iron_tank model to be treated differently to the iron_tank_stacked model (it's loaded but not baked), but I haven't determined what that is yet.
  14. As I said, it's the fml-client-latest.log file in the logs directory, which is in the game directory. You can open the game directory by selecting your profile in the "Launch options" tab of the launcher and then clicking the "Go to folder" button next to the "Game directory" option. I don't think Gist or Pastebin support FTP, just upload the log via the Gist or Pastebin website.
  15. You can open the Minecraft game directory by selecting your profile in the "Launch options" tab of the launcher and then clicking the "Go to folder" button next to the "Game directory" option.
  16. The /time command only changes the world time (WorldInfo#worldTime), not the total world time (WorldInfo#totalTime).
  17. Post the FML log from the client (logs/fml-client-latest.log in the game directory) and the dedicated server (logs/fml-server-latest.log in the server directory) using Gist or Pastebin.
  18. Override Block#getCollisionBoundingBox to return Block.NULL_AABB instead of overriding Block#getBoundingBox.
  19. According to MCPBot, IBlockSource#func_189992_e was renamed to IBlockSource#getBlockState in 1.10.2 on 2016-06-28.
  20. Post the FML log (logs/fml-client-latest.log in the game directory) using Gist or Pastebin.
  21. The download links on the files page will take you to AdFocus, which displays a black header with the Forge logo, the text "The content below this header is an advertisement. After the count-down, click the Skip button to the right to begin your Forge download.." and a countdown. As the header text says, the rest of the page is an advertisement; don't click on it. Only click the Skip button in the top-right of the page when the countdown finishes.
  22. Don't open the JAR files, copy them to the mods directory in the Minecraft game directory.
  23. Post the FML log (logs/fml-client-latest.log in the game directory) using Gist or Pastebin.
  24. Indeed, there aren't any model/texture errors in the log. Please update your Git repository with the latest version of your code, I'd like to debug this locally.
  25. Override Item#shouldCauseReequipAnimation.
×
×
  • Create New...

Important Information

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