Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ public class LightOverlay {

public static LightOverlayTicker ticker = new LightOverlayTicker();
public static LightOverlayRenderer renderer = new LightOverlayRenderer(ticker);


public static final KeyMapping.Category LIGHT_OVERLAY = KeyMapping.Category.register(ResourceLocation.fromNamespaceAndPath("lightoverlay", "category"));

public static void register() {
// Load Config
configFile = new File(Platform.getConfigFolder().toFile(), "lightoverlay.properties");
loadConfig(configFile);

enableOverlay = createKeyBinding(ResourceLocation.fromNamespaceAndPath("lightoverlay", "enable_overlay"), InputConstants.Type.KEYSYM, 296, "key.lightoverlay.category");


enableOverlay = createKeyBinding(ResourceLocation.fromNamespaceAndPath("lightoverlay", "enable_overlay"), InputConstants.Type.KEYSYM, 296, LIGHT_OVERLAY);
KeyMappingRegistry.register(enableOverlay);

registerDebugRenderer(renderer);
Expand Down Expand Up @@ -197,7 +200,7 @@ public static void saveConfig(File file) throws IOException {
fos.close();
}

private static KeyMapping createKeyBinding(ResourceLocation id, InputConstants.Type type, int code, String category) {
private static KeyMapping createKeyBinding(ResourceLocation id, InputConstants.Type type, int code, KeyMapping.Category category) {
return new KeyMapping("key." + id.getNamespace() + "." + id.getPath(), type, code, category);
}

Expand Down
8 changes: 4 additions & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
],
"accessWidener": "lightoverlay.accesswidener",
"depends": {
"fabricloader": ">=0.14.11",
"fabricloader": ">=0.17.3",
"fabric-api": "*",
"minecraft": ">=1.21.6 <=1.21.8",
"minecraft": ">=1.21.9 <=1.21.10",
"java": ">=17",
"architectury": ">=13-",
"cloth-config2": ">=15-"
"architectury": ">=17-",
"cloth-config2": ">=20-"
}
}
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=12.0.0
minecraft_version=1.21.6
minecraft_version=1.21.9

architectury_version=17.0.6

# fabric
fabric_loader_version=0.17.3
fabric_api_version=0.128.2+1.21.6
cloth_config_version=19.0.147
modmenu_version=15.0.0
fabric_api_version=0.134.0+1.21.9
cloth_config_version=20.0.148
modmenu_version=16.0.0-rc.1

# forge
forge_version=56.0.9
neoforge_version=21.6.20-beta
forge_version=56.0.12
neoforge_version=21.9.16-beta