Skip to content

Commit

Permalink
Fix duplicate keybind registration on NeoForge (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNijjar committed Feb 5, 2024
1 parent a4eb389 commit 425bc24
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
- 1.20.4 Port
- Added better claim settings errors. It'll now tell you if you don't have permission
on your team or if your role doesn't have the permission.
- Claim settings permissions are now enabled by default for Prometheus.
- Fixed duplicate keybind registration on NeoForge (#38)
2 changes: 1 addition & 1 deletion common/src/main/resources/assets/cadmus/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"tooltip.cadmus.claim_map.admin_claim": "Admin Claim",
"message.cadmus.wilderness": "§2Wilderness",
"key.cadmus.open_claim_map": "Open Claim Map",
"key.categories.project_odyssey": "Odyssey",
"key.categories.project_odyssey": "Project Odyssey",

"text.cadmus.claiming.claimed_chunk_at": "Claimed chunk at: x: %s, z: %s",
"text.cadmus.claiming.chunk_loaded_chunk_at": "Chunk loaded chunk at: x: %s, z: %s",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2G

enabledPlatforms=fabric,neoforge

version=1.2.0
version=1.2.1
group=earth.terrarium.cadmus

minecraftVersion=1.20.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraft.client.Minecraft;
import net.minecraft.commands.Commands;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
Expand All @@ -16,10 +15,9 @@
@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
public class CadmusClientNeoForge {

public static void init(IEventBus bus) {
public static void init() {
NeoForge.EVENT_BUS.addListener(CadmusClientNeoForge::onClientTick);
NeoForge.EVENT_BUS.addListener(CadmusClientNeoForge::onRegisterClientCommands);
bus.addListener(CadmusClientNeoForge::onRegisterKeyBindings);
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public CadmusNeoForge(IEventBus bus) {
NeoForge.EVENT_BUS.addListener(CadmusNeoForge::onRightClick);
registerChunkProtectionEvents(bus);
if (FMLEnvironment.dist.isClient()) {
CadmusClientNeoForge.init(bus);
CadmusClientNeoForge.init();
}
}

Expand Down

0 comments on commit 425bc24

Please sign in to comment.