-
Recently Browsing
No registered users viewing this page.
-
Posts
-
Hey there, I'm trying to setup a basic keybinding, but I can't seem to get the event to fire. Here's my code for subscribing to the event: @Mod.EventBusSubscriber public class ModKeyInputs { @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { if (ModKeyBindings.OPEN_DIVINE_FAVOUR_RELATIONSHIP.isPressed()) { Minecraft.getInstance().displayGuiScreen(new DivineFavourRelationshipsScreen(Minecraft.getInstance().player)); } } } Now I've put a breakpoint in the method there at the start, and I can never get it to fire. Am I subscribing to this event incorrectly? As a side note, is there much difference between using @Mod.EventBusSubscriber on a class versus MOD_EVENT_BUS.register(ModKeyInputs.class); in the constructor of the main mod class?
-
just two maps and two strings. I use json files, so anyone can override them with datapacks. Basically each item, that should have default values, also has a corresponding json file. (if an item does not have a corresponding json file, then it will get default default values.) The information in the files are loaded into a Map<ResourceLocation, DataFromJson> once when the server starts, so i can get them whenever i need them. When the attach event (or the item craft event) trigger i resolve the resourceLocation, get the DataFromJson and then set the itemstack capability. As long as the Map doesn't get humongous, this method shouldn't be a performance issure.
-
By StormyRiley1 · Posted
https://drive.google.com/file/d/1uhUglwuMq_nroPQpDWXsBxggv9MwzXyS/view?usp=sharing there you go -
By diesieben07 · Posted
The debug.log from the logs folder.
-
-
Topics
-
Who's Online (See full list)