Skip to content

Commit

Permalink
remove mixins from NeoZume
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolij committed Jan 18, 2024
1 parent 899e731 commit 8408ff9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 49 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ forge_version_range=[1.14,)

## NeoForge
neoforge_minecraft_version=1.20.4
neoforge_version=88-beta
neoforge_version=115-beta-pr-534-1.20.x
neoforge_parchment_version=2023.12.31
neoforge_version_range=[1.20,)
neoforge_version_range=[1.20.4,)

## LexForge
lexforge_minecraft_version=1.20.1
Expand Down
9 changes: 8 additions & 1 deletion neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ operator fun String.invoke(): String {
return (rootProject.properties[this] as String?)!!
}

repositories {
maven("https://prmaven.neoforged.net/NeoForge/pr534") {
content {
includeModule("net.neoforged", "neoforge")
}
}
}

unimined.minecraft {
version("neoforge_minecraft_version"())

Expand All @@ -13,7 +21,6 @@ unimined.minecraft {

neoForged {
loader("neoforge_version"())
mixinConfig("zume-neoforge.mixins.json")
}

mappings {
Expand Down
7 changes: 7 additions & 0 deletions neoforge/src/main/java/dev/nolij/zume/neoforge/NeoZume.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLPaths;
import net.neoforged.neoforge.client.event.CalculateTurnPlayerValuesEvent;
import net.neoforged.neoforge.client.event.InputEvent;
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent;
import net.neoforged.neoforge.client.event.ViewportEvent;
Expand All @@ -28,6 +29,7 @@ public NeoZume(IEventBus modEventBus) {
modEventBus.addListener(this::registerKeyBindings);
NeoForge.EVENT_BUS.addListener(this::render);
NeoForge.EVENT_BUS.addListener(EventPriority.LOWEST, this::calculateFOV);
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, this::calculateTurnPlayerValues);
NeoForge.EVENT_BUS.addListener(EventPriority.HIGHEST, this::onMouseScroll);
}

Expand Down Expand Up @@ -64,6 +66,11 @@ private void calculateFOV(ViewportEvent.ComputeFov event) {
}
}

private void calculateTurnPlayerValues(CalculateTurnPlayerValuesEvent event) {
event.setMouseSensitivity(Zume.transformMouseSensitivity(event.getMouseSensitivity()));
event.setCinematicCameraEnabled(Zume.transformCinematicCamera(event.getCinematicCameraEnabled()));
}

private void onMouseScroll(InputEvent.MouseScrollingEvent event) {
final int scrollAmount = (int) event.getScrollDeltaY();
if (scrollAmount != 0 &&
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions neoforge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ loaderVersion = "[1,)"
license = "OSL-3.0"
issueTrackerURL="${issue_url}"

[[mixins]]
config="zume-neoforge.mixins.json"

[[mods]]
modId="zume"
version="${mod_version}"
Expand Down
14 changes: 0 additions & 14 deletions neoforge/src/main/resources/zume-neoforge.mixins.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ loaderVersion = "[1,)"
license = "OSL-3.0"
issueTrackerURL="${issue_url}"

[[mixins]]
config="zume-neoforge.mixins.json"

[[mods]]
modId="zume"
version="${mod_version}"
Expand Down

0 comments on commit 8408ff9

Please sign in to comment.