Everything posted by Draco18s
-
Overriding vanilla loot tables
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.
-
Overriding vanilla loot tables
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
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
Don't. Get rid of ISidedInventory and use ItemStackHandler fields instead.
-
[1.15.2] Recipe getRemainingItems not triggered
You aren't using your own IRecipe type.
-
[1.15.2] Getting Recipes using RecipeManager
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
All sorts of data reasons. Recipes and loot tables deal with this sort of lookup too.
-
[1.15.2] Getting Recipes using RecipeManager
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
-
Overriding vanilla loot tables
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.
-
Bypassing JSON for texture registering
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
You have to adjust your VoxelShape.
-
problem with Reflections
Apparently the earlier thread was insufficient?
-
[1.15.2] Get block instance or it's id from registry name
Depends on what they're doing. But for the given code, yes, this is better.
-
[1.15.2] Set seed to World object
I linked you a tutorial and you can't even follow it.
-
Transparent Ground Under The Custom Model
isSolid does not affect this. You need to adjust your block's VoxelShape.
-
[1.15.2] Advice needed on selecting Map<K, V> implementation
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.
-
[1.15.2] Set seed to World object
At what point is fieldWorld.setAccessible(true) executed?
-
Overriding vanilla loot tables
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.
-
[1.15.2] Set seed to World object
That's not how reflection works.
-
Exception when connection is closed
1.12 is no longer supported here. Your options are: Update Go somewhere else for help
-
[1.15.2] Set seed to World object
http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html
-
Exception when connection is closed
...and your mod's code?
-
Trying to replace vanilla items with my own
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.
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
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.
IPS spam blocked by CleanTalk.