fix fabric r click bug
add thoraxis music
This commit is contained in:
1 parent
6f47e59ff0
commit
918a5be5a8
8 files changed
+35
-35
No files matched your search
@@ -1049,6 +1049,8 @@
|
||||
"message.antarchy.tiger_eye_camouflage.invalid_block": "There is no suitable block beneath you",
|
||||
"music.antarchy.lucid_lullaby": "Lucid Lullaby",
|
||||
"music.antarchy.lucid_lullaby.credit": "hewo_",
|
||||
"music.antarchy.whistling_void": "Whistling Void",
|
||||
"music.antarchy.whistling_void.credit": "docshrekbot",
|
||||
"music.antarchy.venenatus": "Venenatus",
|
||||
"music.antarchy.venenatus.credit": "hewo_",
|
||||
"music.antarchy.wistful_wanderings": "Wistful Wanderings",
|
||||
|
||||
@@ -994,12 +994,25 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"whistling_void": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "antarchy:music/game/thoraxis/whistling_void",
|
||||
"stream": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"music.game.thoraxis": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "antarchy:lucid_lullaby",
|
||||
"type": "event",
|
||||
"stream": true
|
||||
},
|
||||
{
|
||||
"name": "antarchy:whistling_void",
|
||||
"type": "event",
|
||||
"stream": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1033,7 +1046,14 @@
|
||||
{
|
||||
"name": "antarchy:wistful_wanderings",
|
||||
"type": "event",
|
||||
"stream": true
|
||||
"stream": true,
|
||||
"weight": 3
|
||||
},
|
||||
{
|
||||
"name": "minecraft:music.game",
|
||||
"type": "event",
|
||||
"stream": true,
|
||||
"weight": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+4
@@ -8,12 +8,16 @@ import java.util.Map;
|
||||
import net.minecraft.client.KeyMapping;
|
||||
|
||||
public final class KeybindingConflictFixStore {
|
||||
private static final String ANTARCHY_KEY_PREFIX = "key.antarchy.";
|
||||
private static final Map<InputConstants.Key, List<KeyMapping>> MAPPINGS = new HashMap<>();
|
||||
|
||||
private KeybindingConflictFixStore() {
|
||||
}
|
||||
|
||||
public static void add(InputConstants.Key key, KeyMapping mapping) {
|
||||
if (!mapping.getName().startsWith(ANTARCHY_KEY_PREFIX)) {
|
||||
return;
|
||||
}
|
||||
List<KeyMapping> mappings = MAPPINGS.computeIfAbsent(key, ignored -> new ArrayList<>());
|
||||
if (!mappings.contains(mapping)) {
|
||||
mappings.add(mapping);
|
||||
|
||||
-17
@@ -19,7 +19,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
@Shadow @Final private static Map<String, KeyMapping> ALL;
|
||||
@Shadow private InputConstants.Key key;
|
||||
@Shadow private boolean isDown;
|
||||
@Shadow private int clickCount;
|
||||
|
||||
@Inject(method = "<init>(Ljava/lang/String;Lcom/mojang/blaze3d/platform/InputConstants$Type;ILjava/lang/String;)V", at = @At("TAIL"))
|
||||
private void antarchy$addInitialMapping(String name, InputConstants.Type type, int key, String category, CallbackInfo ci) {
|
||||
@@ -34,17 +33,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "click", at = @At("TAIL"))
|
||||
private static void antarchy$clickConflicts(InputConstants.Key key, CallbackInfo ci) {
|
||||
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||
return;
|
||||
}
|
||||
KeyMapping active = MAP.get(key);
|
||||
for (KeyMapping mapping : KeybindingConflictFixStore.others(key, active)) {
|
||||
((KeybindingConflictFixMixin) (Object) mapping).antarchy$click();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "set", at = @At("TAIL"))
|
||||
private static void antarchy$setConflicts(InputConstants.Key key, boolean down, CallbackInfo ci) {
|
||||
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||
@@ -56,11 +44,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
}
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void antarchy$click() {
|
||||
this.clickCount++;
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void antarchy$setDown(boolean down) {
|
||||
this.isDown = down;
|
||||
|
||||
+4
@@ -8,12 +8,16 @@ import java.util.Map;
|
||||
import net.minecraft.client.KeyMapping;
|
||||
|
||||
public final class KeybindingConflictFixStore {
|
||||
private static final String ANTARCHY_KEY_PREFIX = "key.antarchy.";
|
||||
private static final Map<InputConstants.Key, List<KeyMapping>> MAPPINGS = new HashMap<>();
|
||||
|
||||
private KeybindingConflictFixStore() {
|
||||
}
|
||||
|
||||
public static void add(InputConstants.Key key, KeyMapping mapping) {
|
||||
if (!mapping.getName().startsWith(ANTARCHY_KEY_PREFIX)) {
|
||||
return;
|
||||
}
|
||||
List<KeyMapping> mappings = MAPPINGS.computeIfAbsent(key, ignored -> new ArrayList<>());
|
||||
if (!mappings.contains(mapping)) {
|
||||
mappings.add(mapping);
|
||||
|
||||
-17
@@ -19,7 +19,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
@Shadow @Final private static Map<String, KeyMapping> ALL;
|
||||
@Shadow private InputConstants.Key key;
|
||||
@Shadow private boolean isDown;
|
||||
@Shadow private int clickCount;
|
||||
|
||||
@Inject(method = "<init>(Ljava/lang/String;Lcom/mojang/blaze3d/platform/InputConstants$Type;ILjava/lang/String;)V", at = @At("TAIL"))
|
||||
private void antarchy$addInitialMapping(String name, InputConstants.Type type, int key, String category, CallbackInfo ci) {
|
||||
@@ -34,17 +33,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "click", at = @At("TAIL"))
|
||||
private static void antarchy$clickConflicts(InputConstants.Key key, CallbackInfo ci) {
|
||||
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||
return;
|
||||
}
|
||||
KeyMapping active = MAP.get(key);
|
||||
for (KeyMapping mapping : KeybindingConflictFixStore.others(key, active)) {
|
||||
((KeybindingConflictFixMixin) (Object) mapping).antarchy$click();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "set", at = @At("TAIL"))
|
||||
private static void antarchy$setConflicts(InputConstants.Key key, boolean down, CallbackInfo ci) {
|
||||
if (!AntarchySettings.fabricKeybindingConflictFixEnabled()) {
|
||||
@@ -56,11 +44,6 @@ public abstract class KeybindingConflictFixMixin {
|
||||
}
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void antarchy$click() {
|
||||
this.clickCount++;
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void antarchy$setDown(boolean down) {
|
||||
this.isDown = down;
|
||||
|
||||
+3
@@ -184,6 +184,9 @@ public final class AntarchyFabricSounds {
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> LUCID_LULLABY = registerSoundEvent("lucid_lullaby");
|
||||
|
||||
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> WHISTLING_VOID = registerSoundEvent("whistling_void");
|
||||
|
||||
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> MUSIC_GAME_THORAXIS = registerSoundEvent("music.game.thoraxis");
|
||||
|
||||
|
||||
|
||||
+1
@@ -69,6 +69,7 @@ public final class AntarchyNeoforgeSounds {
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> THORAXIS_LUCID_POOLS_BIOME_ADDITIONS = registerSoundEvent("thoraxis_lucid_pools_biome_additions");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> THORAXIS_LUCID_POOLS_MOOD = registerSoundEvent("thoraxis_lucid_pools_mood");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> LUCID_LULLABY = registerSoundEvent("lucid_lullaby");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> WHISTLING_VOID = registerSoundEvent("whistling_void");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> MUSIC_GAME_THORAXIS = registerSoundEvent("music.game.thoraxis");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> MUSIC_GAME_CAVARYN = registerSoundEvent("music.game.cavaryn");
|
||||
public static final DeferredHolder<SoundEvent, SoundEvent> WISTFUL_WANDERINGS = registerSoundEvent("wistful_wanderings");
|
||||
|
||||
Reference in new issue
Block a user