Everything posted by Doctor Moonbad
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Good News: I finally fixed it. I was making typos the entire time, so it was basically a streak of bad luck, which got extended because of my lack of experience with the JSON files. The final, correct code is this one: { "type": "minecraft:crafting_shaped", "pattern": [ "DCC", "A B", "CCD" ], "key": { "A": { "item": "grazodiamod:magisoli_crystal", "data": 32767 }, "B": { "item": "grazodiamod:magisorbeo_crystal", "data": 32767 }, "C": { "item": "grazodiamod:terrametal_wire", "data": 0 }, "D": { "item": "minecraft:redstone", "data": 0 } }, "result": { "item": "grazodiamod:magimagnet", "data": 0 } } Thanks Draco and Diesieben, you helped me understand what the actual heck was going on. I also need to apologize for taking your time, I'm truly sorry, it was a very simple problem.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
So, the actual issue is that I'm writing it wrong. How it should be? I thought the name of the keys were "#" or "W". EDIT: I remember now.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
So, the code you gave me works perfectly as expected. But this one I made for testing didn't: { "type": "minecraft:crafting_shaped", "pattern": [ "#WW", " W ", "WW#" ], "key": { "#": { "item": "minecraft:iron_pickaxe", "data": 32767 } }, "key": { "W": { "item": "minecraft:diamond_pickaxe", "data": 32767 } }, "result": { "item": "minecraft:stonebrick", "data": 0, "count": 4 } } Can you guys please test? Also, I'm sorry for taking your time with this.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
I thought that the code bellow was the recipe. Also the items that I'm having problems with are the crystals.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Have you tried a recipe with 2 items of that type, instead of only one?
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
I'm going to explain everything again, with topics: I have a recipe that has 2 items with variable durability as ingredients. I can't craft with them unless they have their durability values set to max. Changing the data value on the recipe to 32767 does NOT solve the problem. The Minecraft version I'm working with is 1.12.2.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
I've tried to use the value 32767 for the data value on as you two said multiple times. That's what I was talking about.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
I know it isn't there now, but I've tested it multiple times to be sure, trust me.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Can I ask a question? I understood the "data" key as an NBT data as described here: https://minecraft.gamepedia.com/NBT_format What it does to the ingredient, exactly? Also, I've already tried changing it's value to 32767, 2767 and 12. None of them seems to work. Let me give you a screenshot of the recipe and the code I made on the JSON file, so you can tell me what I must do in these situations. Code: { "type": "minecraft:crafting_shaped", "pattern": [ "RWW", "O U", "WWR" ], "key": { "W": [ { "item": "grazodiamod:terrametal_wire", "data": 0 } ], "R": [ { "item": "minecraft:redstone", "data": 0 } ], "U": [ { "item": "grazodiamod:magisolium_crystal", "data": 0 } ], "O": [ { "item": "grazodiamod:magisorbio_crystal", "data": 0 } ] }, "result": { "item": "grazodiamod:magimagnet", "data": 0 } }
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Well, I tried using the "data", "meta" and "metadata" keys but they did not work. What is the actual metadata key?
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Understood.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Where do I change the metadata value? I tried using: @Override public int getMetadata(ItemStack stack) { return 32767; } on the item's custom class, but it did not work. There's also no method available in 1.12.2 to set it after initializing the item. Edit: I know it might be a stupid question, but please understand that I a Noob at programming using the Forge API, although I know how to code in Java, Lua, C# and Python.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
I see. Thank you very much. Looks like 1.14 seems much easier version to work with. Thanks.
-
Modded Items with Durability can't be used as Crafting Materials [SOLVED]
Hello, I'm Moonbad. I've coded a recipe that uses items that never have their durability at maximum. How can I make Minecraft understand that I can use them for crafting, even though they aren't in this totally state?
-
Custom Variables on Diferent Item Stacks [SOLVED]
I see. Thank you Reality Controller!
-
Custom Variables on Diferent Item Stacks [SOLVED]
Hi there, I'm Moonbad. How does one implement a custom variable that can have different values throughout different instances of the same item? I created a Class called ItemAbsorber that increases it's "Charge" variable over time, but all instances of this item have the same "Charge", as if they where one. How do I make Minecraft understand that each item has it's own "Charge"? EDIT (1): Messing with the item's durability does not seem to solve the issue.
-
Diferentiating items on the Player's Inventory [SOLVED]
It worked! Thank you DaemonUmbra!
-
Diferentiating items on the Player's Inventory [SOLVED]
Alright, I'll try itemstack.getItem() == Item.getItemFromBlock(Blocks.DIRT)
-
Diferentiating items on the Player's Inventory [SOLVED]
Yeah, I thought about that, but there is no Items.Dirt or something like that.
-
Diferentiating items on the Player's Inventory [SOLVED]
I did not know that it was possible. Thank you for your lightning-speed answer. How can I do that? EDIT: I'm trying right now with new ItemStack(Blocks.Dirt);
-
Diferentiating items on the Player's Inventory [SOLVED]
Hi there, I'm Moonbad. I've recently started developing a mod, called "Grazodia" for Minecraft 1.12.2, and I found something to be really strange. I want an item to detect a another certain item inside the player's inventory by comparing names with the methods getUnlocalizedName or getDisplayName, but none of them seem to work. Here's a code I made for detecting Dirt Blocks: @Override public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { this.clock++; if(this.clock >= 40) { this.clock = 0; EntityPlayer player = (EntityPlayer)entityIn; InventoryPlayer inventory = player.inventory; for (int i = 0; i < 27; i++) { ItemStack item = inventory.mainInventory.get(i); String itemName = item.getUnlocalizedName(); if (itemName == "tile.dirt.default") { System.out.println("I:[ " + i + " ] [ " + itemName + " ]"); } } } Can someone help me, please? I'm really confused because when I remove the if statement, all Dirt Blocks' names in my inventory are displayed correctly, exactly as "tile.dirt.default".
IPS spam blocked by CleanTalk.