-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
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.
-
Sooo...you name your loot table spawner.json and place it in your mod's assets folder at data/minecraft/loot_tables/blocks/.
-
[1.15.2] Getting Recipes using RecipeManager
Draco18s replied to Blu_Nighttime's topic in Modder Support
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. -
[1.15.2] Getting Recipes using RecipeManager
Draco18s replied to Blu_Nighttime's topic in Modder Support
Don't. Get rid of ISidedInventory and use ItemStackHandler fields instead. -
[1.15.2] Recipe getRemainingItems not triggered
Draco18s replied to Slexom's topic in Modder Support
You aren't using your own IRecipe type. -
[1.15.2] Getting Recipes using RecipeManager
Draco18s replied to Blu_Nighttime's topic in Modder Support
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. -
[1.15.2] Get block instance or it's id from registry name
Draco18s replied to Forix's topic in Modder Support
All sorts of data reasons. Recipes and loot tables deal with this sort of lookup too. -
[1.15.2] Getting Recipes using RecipeManager
Draco18s replied to Blu_Nighttime's topic in Modder Support
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 -
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.
-
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.
-
My Models Make it so you can see through the world
Draco18s replied to jakethesnake123's topic in Modder Support
You have to adjust your VoxelShape. -
Apparently the earlier thread was insufficient?
-
[1.15.2] Get block instance or it's id from registry name
Draco18s replied to Forix's topic in Modder Support
Depends on what they're doing. But for the given code, yes, this is better. -
I linked you a tutorial and you can't even follow it.
-
isSolid does not affect this. You need to adjust your block's VoxelShape.
-
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.
-
At what point is fieldWorld.setAccessible(true) executed?
-
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.
-
That's not how reflection works.
-
1.12 is no longer supported here. Your options are: Update Go somewhere else for help
-
http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html
-
...and your mod's code?
-
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.
-
I am trying to make a 1.15.2 mod and its not working.
Draco18s replied to DomDaTurtl's topic in Modder Support
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. -
[1.15.2] Get block instance or it's id from registry name
Draco18s replied to Forix's topic in Modder Support
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.