-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce game rule for long reach increment
This feature allows players to configure the increment of the long reach effect on a per-world basis. The default value is now '2' as opposed to the previously hardcoded '5', because I felt it was too powerful.
- Loading branch information
Showing
5 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/dev/sapphic/beacons/mixin/GameRulesAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.sapphic.beacons.mixin; | ||
|
||
import net.minecraft.world.level.GameRules; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(GameRules.class) | ||
public interface GameRulesAccessor { | ||
@Invoker | ||
static <T extends GameRules.Value<T>> GameRules.Key<T> callRegister( | ||
final String name, final GameRules.Category category, final GameRules.Type<T> type | ||
) { | ||
throw new AssertionError(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/dev/sapphic/beacons/mixin/IntegerValueAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dev.sapphic.beacons.mixin; | ||
|
||
import net.minecraft.world.level.GameRules; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(GameRules.IntegerValue.class) | ||
public interface IntegerValueAccessor { | ||
@Invoker | ||
static GameRules.Type<GameRules.IntegerValue> callCreate(final int defaultValue) { | ||
throw new AssertionError(); | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
src/main/java/dev/sapphic/beacons/mixin/MobEffectAccessor.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters