Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/21/19 in all areas

  1. There are some Forge-available functions to add new values to enums, though I'm not sure what the class name is, as it may have changed between 1.12 and 1.13 and you didn't say what version you're working with (1.12 by the docs link, maybe? Then it would be EnumHelper). Be aware that enums are sometimes optimized by the JVM and adding new values may have unexpected behavior.
    1 point
  2. Unless you've changed your previous code, since "stack == new ItemStack(Block blockIn, int amount, int meta)" will never be true. Instead of direct comparison, it would be better to check the meta of the already existing ItemStack.
    1 point
  3. gobber2_goo still needs to be an Item, which Food is not (it doesn't extend Item like ItemFood did). Take your original code using ItemFood and change it to Item. This will give you a generic non-food item, like you've probably created elsewhere. You can now call another method on the Item.Properties object you are giving it to give the Item.Properties food properties. If you look into the Items class, you'll see where all the vanilla items are created. This is where you can find the method you need, because vanilla foods use it (this will also give you some usage examples). The method is in Item.Properties (my mappings are a bit old so it's func_221540_a for me, it might have a name for you updated my mappings, it's called food now). This method takes a single argument, which would be the Food you just constructed. It'd end up looking like this: Food gooFood = (new Food.Builder()).value(4).saturation(0.6F).build(); ItemList.gobber2_goo = new Item(new Item.Properties().group(gobber2).setRegistryName(location("gobber2_goo").food(gooFood));
    1 point
  4. Also thanks again, for tripping over this change and finding out about it and the solution before I did, or this would have been my post. ?
    1 point
  5. For the end I used a costume feature to replace the 1.13 MinableConfig (See attachments) And then added the Feature to the biom using the following line! Feature ft = new MinableFeature(MinableConfig::func_214641_a); Biomes.THE_END.addFeature(Decoration.UNDERGROUND_ORES, Biome.func_222280_a(ft, new MinableConfig(Blocks.END_STONE.getDefaultState(), Blocks.GRASS.getDefaultState(), 30), Placement.field_215028_n, new CountRangeConfig(100, 0, 0, 200))); I hope this helps all of you! Cheers ~MrTroble MinableConfig.java MinableFeature.java
    1 point
  6. @desht THANK YOU! Finaly it works. First of yes the data.... folder is the right one. And I finally found the problem I've had { "type": "cockmod:block", "pools": [ { "name": "cockmod:cockpool", "rolls": 1, "entries": [ { "type": "cockmod:item", "name": "cockmod:cockingot" } ], "conditions": [ { "condition": "minecraft:survives_explosion" } ] } ] } but I need { "type": "minecraft:block", "pools": [ { "name": "cockmod:cockpool", "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "cockmod:cockblock" } ], "conditions": [ { "condition": "minecraft:survives_explosion" } ] } ] } just change the types to minecraft:item and minecraft:block and then it works. I have only one more question. Can I keep the cockpool for all my items or do I have to change it to something else for each one?
    1 point
  7. Use the container item system for this, not ItemCraftedEvent. If the sandpaper is returned to the player without change, call Item#setContainerItem with this as the argument in the sandpaper Item's constructor to set it as its own container item. If the sandpaper is changed (e.g. damaged) by the crafting, override Item#getContainerItem(ItemStack) to copy its argument (ItemStack#copy), damage the copy (ItemStack#attemptDamageItem) and return the copy.
    1 point
  8. Im sorry with my lack of knowledge with java, Im just starting with my first mod and im only 14, I thought it would be some fun and that I might be a ble to get some help but some people just judge and Im not someone that can just read a tutorial, im more a visual learner so thats why i find it a bit tough. but thank you to those that have helped, its very appreciated
    0 points
×
×
  • Create New...

Important Information

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