dakamojo
Members-
Posts
23 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
dakamojo's Achievements
Tree Puncher (2/8)
0
Reputation
-
That explains a lot. Based on this I learned that itemStack.getItem() returns an item with no NBT? Because this works... stack.getItem().getHarvestLevel(stack, "pickaxe", null, null); but this doesn't... isToolValid(stack.getItem()); private boolean isToolValid(Item tool) { tool.getHarvestLevel(new ItemStack(tool), "pickaxe", null, null); ... }
-
Thanks, that fixed it.
-
Correct. I tried supplying an ItemStack with the tool also but still get a harvest level of zero.
-
When my gui is open, there are no tool tips, not even on the items in the player inventory. I don't want to add anything to the tool tips, they are just missing. Is there something basic I need to do to enable tool tips? Why isn't it on by default?
-
This may be a Tinkers Construct specific question, but maybe not. My machine accepts a pickaxe (similar to a Ender IO Farming Station). I want to limit the harvest level of the pickaxes that are inserted into it. I get the tool harvest level like this. tool.getHarvestLevel(ItemStack.EMPTY, "pickaxe", null, null) This works for all vanilla pickaxes and many mod pickaxes. However all Tinker's pickaxes return a harvest level of 0. Is there a way I can get the true harvest level of a Tinker's tool? I would prefer to not have to add the Tinkers API.
-
[1.12] Blockstates for versions of item in inventory?
dakamojo replied to dakamojo's topic in Modder Support
I'm not completely able to follow the logic in your helper class. Here is what I think you are doing. Please correct me where I am wrong. I'm using the ores in your mod as an example. 1) You have an ItemRawOre that implements subtypes. I didn't create a ItemMiner because the generic BlockItem seems to work fine. When each of the three variants of my block are mined, I get BlockItems of the three variants. Is creating a custom Item required? 2) You register all the ItemRawOre variants by calling EasyRegistry#registerItemWithVariants. 3) This loops through each of the subTypes of ItemRawOre calling ModelLoader#setCustomModelResourceLocation for each one. 4) Each one of the subTypes has its own blockState json file. Assuming all that is correct, here's what I don't understand. Why can I define one blockState json file for all the variants of my block in world, but I would need a different blockState json file for each of the variants in inventory? -
Here is my current blockstates file. { "forge_marker": 1, "defaults": { "model": "earlygameminer:miner" }, "variants": { "inventory": { "model": "cube_all", "textures": { "all": "blocks/dirt" } }, "variant": { "stone": { "textures": { "top": "blocks/stone", "side": "earlygameminer:blocks/miner_stone_side" } }, "iron": { "textures": { "top": "blocks/iron_block", "side": "earlygameminer:blocks/miner_iron_side" } }, "diamond": { "textures": { "top": "blocks/diamond_block", "side": "earlygameminer:blocks/miner_diamond_side" } } } } } My block has three versions (stone, iron, and diamond) which is indicated by an iProperty named "variant". All three varients render correctly in world. However in inventory only the "inventory" section is used. I set it as dirt so that I could see it is actually working. What is the syntax to have the inventory use the exact same logic as when placed? My block code is modeled after BlockPlanks. However I can't seem to understand where BlockPlanks sets up its blockstates file.
-
I have a block that has three levels, stone, iron, and diamond. I have been coding this as one block with a PropertyInteger to specify the level. Then I noticed hasSubtypes. This sounds like something I maybe should be using. What are subtypes for?
-
Right now I have a generic ItemBlock registered for my Block. event.getRegistry().register(new ItemBlock(Blocks.miner).setRegistryName(Blocks.miner.getRegistryName())); My Block makes use of a PropertyInteger. When my Block is broken I need the dropped item to preserve that value so that when it is placed again the new block will have the same value. How do I do this? Do I need to create my own ItemBlock? Does anyone have an easy example of this that I can look at?
-
[1.12] List of key in textures section of model json file?
dakamojo replied to dakamojo's topic in Modder Support
Thanks. Where can I find the documentation for this? -
[1.12] List of key in textures section of model json file?
dakamojo posted a topic in Modder Support
What are the possible keys in the texture section of a model json file? Is it documented anywhere? For example I want all side to use the same texture (not not top and bottom). Is there a cleaner way than this? I tired the key "side" but it didn't work. { "parent": "block/cube_all", "textures": { "up": "blocks/stone", "down": "blocks/stone", "east": "earlygameminer:blocks/miner_stone_side", "west": "earlygameminer:blocks/miner_stone_side", "north": "earlygameminer:blocks/miner_stone_side", "south": "earlygameminer:blocks/miner_stone_side" } } -
I'm considering making a machine that slowly scans for a stronghold. I am thinking that the machine will be powered by eyes of ender. It would replace the act of throwing the eye of ender. Sit the machine down in your base and feed it and slowly it scans chunks to fid the stronghold. My question is how should it actually find the stronghold? I scanned the World code but I don't see anything that tells me where the stronghold is. Would I need to load each chunk and scan block by block to find end portal blocks? Any recommendations?
-
[1.10] Get drops when a BlockBreakHandler is used
dakamojo replied to dakamojo's topic in Modder Support
This seems like something I can do rather than spawning the drops and capturing them. What are the recommendations against this?