Oliviafrostpaw
Members-
Posts
10 -
Joined
-
Last visited
Everything posted by Oliviafrostpaw
-
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
I had this previously because I was attempting to log any movement inside of the function to a separate file, which required an IO Exception on the function, though before and after adding and removal it still didnt trigger -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
I dont know how Im having this much trouble either haha So, implementing the code as a new class and it still does nothing package com.oliviafrostpaw.untitledmess; import java.io.IOException; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootPool; import net.minecraft.world.storage.loot.TableLootEntry; import net.minecraftforge.event.LootTableLoadEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = UntitledMess.modid) public class EventHandlers { private static ResourceLocation grass = new ResourceLocation("minecraft", "blocks/grass"); @SubscribeEvent public static void onLootLoad(LootTableLoadEvent event) throws IOException { if (event.getName().equals(grass)) { event.getTable().addPool(LootPool.builder().addEntry(TableLootEntry.builder(new ResourceLocation(UntitledMess.modid, "blocks/grass"))).build()); } } } -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
So, I have attempted with changing the whole class EventBusSubscriber to being Forge, which didnt trigger the event, I attempted creating a new class inside of the main class that has the Forge Subscriber, tried with having no conditions on the Mod.EventBusSubscriber, and finally tried with a whole new class, InjectionHandler.java, that has Mod.EventBusSubscriber with and without Mod.EventBusSubscriber.Bus.FORGE as a condition and just the onLootLoad function inside and still didnt trigger So Im about as lost as before. Once again, apologies for my lack of knowledge about the EventBus Intricacies. Spent the time the last few days and few hours searching for examples and other peoples questions on the topic and never came up with much conclusive -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
Ah, thank you very very much. Having attempted to look and find the correct bus/subscriber and or examples for its usage I found no instance of @Mod.EventBusSubscriber on the classes, is this necessary or am I just looking in the wrong places? Any Guidance would be appreciated -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
Making it easier for showing the code, please see GitHub repository that I ideally should have set up to begin with so that I would have known when exactly all of this broke Github Link -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
After some poking, the function is not firing whatsoever -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
The only error in the logs I can find is a warning on looking up profile properties, Logs gathered from the console posted in Logs Post Game Load - During world load.txt Logs During Game load.txt -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
Bump? -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw replied to Oliviafrostpaw's topic in Modder Support
Other loot tables for block drops are currently working fine, and the recipes also work fine, only the injection into the vanilla block seems to be affected -
[1.14.4] Injecting into Existing Loot Tables, Blocks
Oliviafrostpaw posted a topic in Modder Support
Couldn't find what I was doing wrong so apologies for wasting anyone's time if its stupid and simple, when trying to add an item to the existing grass block (the one that drops seeds) I got it to work originally, and then continued working on my mod and then it inexplicably stopped working. Item is in the game so I know that its just not due to the item being registered. Current Forge version being 28.1.87 Please see code below, thank you for assistance in advance.