mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2025-01-08 10:42:49 +01:00
Move AltGr fix into a separate mod
This commit is contained in:
parent
4c3332a2ba
commit
93aca7c562
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,6 +34,7 @@ run/*
|
||||
!run/mods
|
||||
run/mods/*
|
||||
!run/mods/CustomWindowTitle-*
|
||||
!run/mods/FixAltGr.jar
|
||||
!run/config
|
||||
run/config/*
|
||||
!run/config/customwindowtitle-client.toml
|
||||
|
BIN
run/mods/FixAltGr.jar
Normal file
BIN
run/mods/FixAltGr.jar
Normal file
Binary file not shown.
@ -6,6 +6,5 @@
|
||||
"HEE_MobDisableTickParticles": "coremods/mob_disable_tick_particles.js",
|
||||
"HEE_PotionCreativeMenuDuplicates": "coremods/potion_creative_menu_duplicates.js",
|
||||
"HEE_PotionHookCorruption": "coremods/potion_hook_corruption.js",
|
||||
"HEE_SwordHookSweep": "coremods/sword_hook_sweep.js",
|
||||
"HEE_UnfuckAltGr": "coremods/unfuck_alt_gr.js"
|
||||
"HEE_SwordHookSweep": "coremods/sword_hook_sweep.js"
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
function initializeCoreMod(){
|
||||
Java.type("net.minecraftforge.coremod.api.ASMAPI").loadFile("coremods/utils/bootstrap.js");
|
||||
|
||||
// TODO remove or move to another mod..
|
||||
|
||||
return {
|
||||
"HEE_UnfuckAltGr": methodTransformer("net.minecraft.client.gui.screen.Screen", "hasControlDown", "()Z", function(method, instructions){
|
||||
var start = instructions.get(0);
|
||||
|
||||
instructions.insertBefore(start, makeInstructions(function(node){
|
||||
node.visitMethodInsn(op.INVOKESTATIC, "chylex/hee/system/Debug", "cancelControlKey", "()Z");
|
||||
node.visitJumpInsn(op.IFEQ, getSkipInst(start));
|
||||
node.visitInsn(op.ICONST_0);
|
||||
node.visitInsn(op.IRETURN);
|
||||
}));
|
||||
|
||||
return method;
|
||||
})
|
||||
};
|
||||
}
|
@ -74,12 +74,6 @@ object Debug{
|
||||
player.sendChatMessage("/gamemode creative")
|
||||
}
|
||||
}
|
||||
else if (e.key == GLFW.GLFW_KEY_RIGHT_ALT){
|
||||
forceCancelCtrl = true
|
||||
}
|
||||
else if (e.key == GLFW.GLFW_KEY_LEFT_CONTROL){
|
||||
forceCancelCtrl = false
|
||||
}
|
||||
}
|
||||
|
||||
private fun isHoldingBuildStick(player: EntityPlayer): Boolean{
|
||||
@ -198,14 +192,6 @@ object Debug{
|
||||
}
|
||||
}
|
||||
|
||||
private var forceCancelCtrl = false
|
||||
|
||||
@JvmStatic
|
||||
@Suppress("unused")
|
||||
fun cancelControlKey(): Boolean{
|
||||
return forceCancelCtrl
|
||||
}
|
||||
|
||||
fun setClipboardContents(file: File){
|
||||
if (canExecutePowershell("filecopy.ps1")){
|
||||
ProcessBuilder("powershell.exe", "-ExecutionPolicy", "Unrestricted", "-Sta", "-File", "filecopy.ps1", file.absolutePath).start()
|
||||
|
Loading…
Reference in New Issue
Block a user