Why not just return one stack...Pass in the raw enchantment data. IE the registry names and levels. Then compute the enchantments after the registry has been loaded. In both the output methods in your IRecipe implementation because it appears you are only doing it in one.
Oh wrong event then lol. I think PlayerLoggedInEvent is too early to open a GUI so you need to use EntityJoinWorldEvent.
This should be used if it has a contnainer. No reason to use it if it doesn't.
Can't tell if you are messing with them or not lol.
You need to override their registry value with a new value that overrides getRenderLayer and returns the appropriate value.
This is for 1.12 you didn't click to go to 1.13.
Mind you this is not what you should do to edit block loot tables anyways. Just create a json with the same name as the ones in the minecraft jar file under the folders data/minecraft/loot_tables/blocks.
Then in your mod create the package under your resources folder data.minecraft.loot_tables.blocks. And put your json loot table there.
It's a bit of a pain, but you should just be able to highlight and hopefully the "Quote Selection" box will come up.
I would probably just give the block an arbitrary range maybe make it increase-able. And only for loop for that range until I find a solid block. Otherwise you just have to go until you reach a solid block. Then I would take that range I have found (the y height of the solid block) and use World#getEntitiesInAABB (Or whatever it is called now).
Write your own IRecipe implementation. Potentially just override getResult() from one of the ShapedRecipes. (I think that is the methods name). And have it return a new ItemStack with the EnchantmentData that is stored in your IRecipe implementation.
Use the config they have to obtain the information like so for IRON_ORE.
for (ConfiguredFeature<?> f : biome.getFeatures(Decoration.UNDERGROUND_ORES)) {
if (f.config instanceof OreFeatureConfig) {
if (((OreFeatureConfig)f.config).state.getBlock() == Blocks.IRON_ORE) {
}
}
}
First you'll probably want to get some experience in coding. Making a mod is not that easy. Second don't use IHasModel sure it works, and it was in the tutorial, but all Items have models. Why would you need an interface that says I have a model.