Jump to content

VaalAlves

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by VaalAlves

  1. This is what the gilded blackstone's json looks like,i did change what item it drops with silk touch and what item it usually drops. Basically, depending on the fortune level the gold nugget has a different chance to drop (from 10% at nothing to 100% at fortune 3). Changing anything about the gold nugget's functions/conditions makes the item no longer be random, and instead give the first one even if i add weight to them { "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ], "name": "fossilsandstuff:cretaceous_fossil_deposit" }, { "type": "minecraft:alternatives", "conditions": [ { "condition": "minecraft:survives_explosion" } ], "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:table_bonus", "enchantment": "minecraft:fortune", "chances": [ 0.1, 0.14285715, 0.25, 1.0 ] } ], "functions": [ { "function": "minecraft:set_count", "count": { "min": 2.0, "max": 5.0, "type": "minecraft:uniform" } } ], "name": "minecraft:gold_nugget" }, { "type": "minecraft:item", "name": "fossilsandstuff:brachiosaurus_raw_fossil" } ] } ] } ] } ] }
  2. I tried using gilded blackstone's json since that block has both a loot table and silk touch but the weight works in a weird way so i couldn't get very far with it :s
  3. I really can't figure this, is there some function i've missed or something?
  4. The weights are placeholders, i left it this way so it's easy to tell if the whole random drops thing is working or not. The problem is the silk touch working but the random item still being dropped I've tried it like this and while it fixes the silk touch block+random item thing, it makes the non silk touched drop always be the first one. { "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ], "name": "fossilsandstuff:cretaceous_fossil_deposit" }, { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:brachiosaurus_raw_fossil" }, { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:stegosaurus_raw_fossil" }, { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:allosaurus_raw_fossil" } ] } ] } ] }
  5. I'm trying to make a block that can drop 1 of 3 possible items if broken, but only drops itself when broken by a pickaxe with silk touch. I got the 1 out of 3 part working fine, and the item does drop itself when i break it with silktouch but it drops one of those 3 items in addition to itself. Here's my code. { "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ], "name": "fossilsandstuff:cretaceous_fossil_deposit" } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:brachiosaurus_raw_fossil" }, { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:stegosaurus_raw_fossil" }, { "type": "minecraft:item", "weight": 33.3, "name": "fossilsandstuff:allosaurus_raw_fossil" } ] } ] } Thanks.
  6. I want my mod ores to spawn inside the diorite, granite and andesite deposits but i'm not exactly sure on how to do this. Could someone give me some directions on how to approach this? Thanks.
  7. I do intend on reusing it. But i meant if forge had (up to date, even 1.15 didn't have them)javadocs though, not HashSet. Granted, you can just use the "find usages" function but i didn't know about that.
  8. My school did it in a pretty stupid way, for the first year of my course the class was divided in half because there weren't enough computers in any room so those halves got different teachers, mine happened to have been terrible at teaching. Thanks for pointing it out, made me realize all i had to do was create a variable before creating the tool instead of creating a variable on the spot. Thanks for all your help, i'll edit my post in case anyone searches with the same question as me.
  9. I'm not unfamiliar with java, i'm unfamiliar with minecraft modding. I simply never used sets, never needed them since lists and arraylists exist. If there was a javadoc, i wouldn't even be making a thread in the first place.
  10. I guess my question is more like, what variable type do i use to pass the parameter (since it's my first time working with sets lol). I've tried HashSet (where i had /*HERE*/ before) new HashSet(Blocks.OAK_WOOD) but that doesn't seem to work. I guess i should also explain completely what i'm trying to do. I'm adding a couple of blocks that only drop certain resources when mined with this new type tools. If possible, could you please show me an example of a working ToolItem? Thanks
  11. I'm having some trouble understanding how the effectiveBlocksIn field of ToolItem works. I know i'm supposed to put this private static final Set<Block> field_150917_d_ = Sets.newHashSet(Blocks.WARPED_BUTTON); (taken from AxeItem) Here but i'm not sure how. new ToolItem(0.0f, -2.8f, FossilsAndStuffItemMaterial.CRETACEOUS, /*HERE*/, new Item.Properties().group(FossilsAndStuff.TAB)); Thanks for the help.
  12. And how would i make the blocks drop items only if they're broken with said custom tool type?
  13. How would i go about creating a new tool type? I'm specifically trying to make a tool that would function like a pickaxe but only for certain blocks. Thanks. Edit: Use ToolItem and use a Set variable for the effectiveBlocksIn parameter (create the variable before the ToolItem, not during.)
×
×
  • Create New...

Important Information

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