Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Because I think of it as a modify system, not a override system. It was a replacement for HarvestDropsEvent where you'd want to do conditional things. But sure, you want to tell this guy how to use the more complicated system when he couldn't even understand my first post that already had literal instructions, go right ahead.
  2. Sooo...you name your loot table spawner.json and place it in your mod's assets folder at data/minecraft/loot_tables/blocks/.
  3. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/entity/SifterTileEntity.java#L39 https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/entity/SifterTileEntity.java#L147 I don't deal with recipes in the same way the furnace does, but that's how you use ItemStackHandlers. The output wrapper is a custom ItemStackWrapper class that accepts another in its constructor and prevents insertion, so that it can be exposed via getCapability to allow extraction, but the original stack handler can still modified by the machine itself.
  4. Don't. Get rid of ISidedInventory and use ItemStackHandler fields instead.
  5. You aren't using your own IRecipe type.
  6. Yeah, its changed, but the info is still there somewhere. I just haven't updated it because the portion of my mod that relied on it I haven't re-written yet. So its been low priority.
  7. All sorts of data reasons. Recipes and loot tables deal with this sort of lookup too.
  8. Not only that, but registry names CAN'T be null, so "require non-null" is useless. Now...where are my recipe utils... Hm, not updated since 1.12, but might give some insight. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/RecipesUtils.java#L164
  9. In the same place, with the same name, as the vanilla loot table. I can't tell you exactly because you haven't told me what loot table you're overriding.
  10. It got "removed" because recipes are now data assets, which means that mod pack makers don't need to use CraftTweaker. They can just supply fixed json files.
  11. You have to adjust your VoxelShape.
  12. Apparently the earlier thread was insufficient?
  13. Depends on what they're doing. But for the given code, yes, this is better.
  14. I linked you a tutorial and you can't even follow it.
  15. isSolid does not affect this. You need to adjust your block's VoxelShape.
  16. That sounds very similar to what I did. My implementation is just "you mine the block" and not a special tool. I handled the variants as a variant value (the silk-touch and block item issue I dealt with using a custom loot table function). https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/ore/HardOreBlock.java I don't necessarily think this was a great solution, but it made more sense to leave the "density" as a query-able block property (for several reasons) rather than separate blocks.
  17. At what point is fieldWorld.setAccessible(true) executed?
  18. Create a new loot table. Give it the same name as the vanilla one you want to override Place it in the same directory under assets as the vanilla one has (so for example, data/minecraft/loot_tables/blocks/gold_ore.json) Fucking magic.
  19. That's not how reflection works.
  20. 1.12 is no longer supported here. Your options are: Update Go somewhere else for help
  21. http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html
  22. ...and your mod's code?
  23. You also don't need to update the Items and Blocks references, Forge already does that if you register your item using the vanilla registry name.
  24. the "epicgamer" in "epicgamer.MODID" is not the mod ID. It is a class reference, which can totally have upper case letters. What you need to change is the string assigned to that field.
  25. ForgeRegistries.BLOCKS.get(...) Might have the function name wrong, could be "getFromName" or similar. Should be easy to work out. Items are in ForgeRegistries.ITEMS, etc. You can also use @ObjectHolder annotations. See the docs.
×
×
  • Create New...

Important Information

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