-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
Forge 1.12 - NBT-Data in MetaData-Item and JSON-Recipes
Choonster replied to CyberPunkBln's topic in Modder Support
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. -
Forge 1.12 - NBT-Data in MetaData-Item and JSON-Recipes
Choonster replied to CyberPunkBln's topic in Modder Support
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. -
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:
-
Forge 1.12 - NBT-Data in MetaData-Item and JSON-Recipes
Choonster replied to CyberPunkBln's topic in Modder Support
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. -
Forge 1.12 - NBT-Data in MetaData-Item and JSON-Recipes
Choonster replied to CyberPunkBln's topic in Modder Support
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. -
Forge 1.12 - NBT-Data in MetaData-Item and JSON-Recipes
Choonster replied to CyberPunkBln's topic in Modder Support
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. -
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).
-
1.7.10 is no longer supported here, update if you want help.
-
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.
-
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?
-
[1.12] Ore Dictionary Conversion to Json Recipe
Choonster replied to ChampionAsh5357's topic in Modder Support
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). -
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):
-
Understanding texture/model of blocks in inventory
Choonster replied to indemnity83's topic in Modder Support
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. -
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.
-
The Mod Won't Open! What do I do?
Choonster replied to GigglesTheGecko's topic in Support & Bug Reports
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. -
[1.12, latest][Solved]Item switch animation when nbt changes.
Choonster replied to Jacky2611's topic in Modder Support
The /time command only changes the world time (WorldInfo#worldTime), not the total world time (WorldInfo#totalTime). -
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.
-
What is alternative for func_189992_e in 1.11?
Choonster replied to StrikerRocker's topic in Modder Support
According to MCPBot, IBlockSource#func_189992_e was renamed to IBlockSource#getBlockState in 1.10.2 on 2016-06-28. -
Post the FML log (logs/fml-client-latest.log in the game directory) using Gist or Pastebin.
-
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.
-
The Mod Won't Open! What do I do?
Choonster replied to GigglesTheGecko's topic in Support & Bug Reports
Don't open the JAR files, copy them to the mods directory in the Minecraft game directory. -
Post the FML log (logs/fml-client-latest.log in the game directory) using Gist or Pastebin.
-
Understanding texture/model of blocks in inventory
Choonster replied to indemnity83's topic in Modder Support
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. -
[1.12, latest][Solved]Item switch animation when nbt changes.
Choonster replied to Jacky2611's topic in Modder Support
Override Item#shouldCauseReequipAnimation.