the (un)binding of isa(d)a(sh)c

asbcc ascdsvcac scaociac c
This commit is contained in:
Pheonix 2022-04-10 00:49:49 +01:00
parent 6dc3ebaf51
commit 49d81ef3da
6 changed files with 97 additions and 77 deletions

View File

@ -24,6 +24,7 @@ public class GeneralConfig {
public static boolean enableBabyMode = false; public static boolean enableBabyMode = false;
public static boolean enableReflectorCompat = false; public static boolean enableReflectorCompat = false;
public static boolean enableRenderDistCheck = true; public static boolean enableRenderDistCheck = true;
public static boolean enableCustomDashKeybind = false;
public static boolean enable528 = false; public static boolean enable528 = false;
public static boolean enable528ReasimBoilers = true; public static boolean enable528ReasimBoilers = true;
@ -57,13 +58,14 @@ public class GeneralConfig {
enableBabyMode = config.get(CATEGORY_GENERAL, "1.23_enableBabyMode", false).getBoolean(false); enableBabyMode = config.get(CATEGORY_GENERAL, "1.23_enableBabyMode", false).getBoolean(false);
enableReflectorCompat = config.get(CATEGORY_GENERAL, "1.24_enableReflectorCompat", false).getBoolean(false); enableReflectorCompat = config.get(CATEGORY_GENERAL, "1.24_enableReflectorCompat", false).getBoolean(false);
enableRenderDistCheck = config.get(CATEGORY_GENERAL, "1.25_enableRenderDistCheck", true).getBoolean(true); enableRenderDistCheck = config.get(CATEGORY_GENERAL, "1.25_enableRenderDistCheck", true).getBoolean(true);
enableCustomDashKeybind = config.get(CATEGORY_GENERAL, "1.26_enableCustomDashKeybind", false).getBoolean(false);
final String CATEGORY_528 = CommonConfig.CATEGORY_528; final String CATEGORY_528 = CommonConfig.CATEGORY_528;
config.addCustomCategoryComment(CATEGORY_528, "CAUTION\n" config.addCustomCategoryComment(CATEGORY_528, "CAUTION\n"
+ "528 Mode: Please proceed with caution!\n" + "528 Mode: Please proceed with caution!\n"
+ "528-Modus: Lassen Sie Vorsicht walten!\n" + "528-Modus: Lassen Sie Vorsicht walten!\n"
+ "способ-528: действовать с осторожностью!"); + "Ñ<EFBFBD>поÑ<EFBFBD>об-528: дейÑ<C2B9>ÑвоваÑÑŒ Ñ<> оÑ<C2BE>ÑорожноÑ<C2BE>Ñью!");
enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode.", false); enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode.", false);
enable528ReasimBoilers = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_forceReasimBoilers", "Keeps the RBMK dial for ReaSim boilers on, preventing use of non-ReaSim boiler columns and forcing the use of steam in-/outlets", true); enable528ReasimBoilers = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_forceReasimBoilers", "Keeps the RBMK dial for ReaSim boilers on, preventing use of non-ReaSim boiler columns and forcing the use of steam in-/outlets", true);

View File

@ -20,6 +20,8 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
private boolean[] keysPressed = new boolean[EnumKeybind.values().length]; private boolean[] keysPressed = new boolean[EnumKeybind.values().length];
public boolean dashActivated = true;
public static final int dashCooldownLength = 5; public static final int dashCooldownLength = 5;
public int dashCooldown = 0; public int dashCooldown = 0;

View File

@ -11,6 +11,7 @@ import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.extprop.HbmLivingProps; import com.hbm.extprop.HbmLivingProps;
import com.hbm.extprop.HbmPlayerProps; import com.hbm.extprop.HbmPlayerProps;
import com.hbm.extprop.HbmLivingProps.ContaminationEffect; import com.hbm.extprop.HbmLivingProps.ContaminationEffect;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.radiation.ChunkRadiationManager; import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.interfaces.IArmorModDash; import com.hbm.interfaces.IArmorModDash;
import com.hbm.items.armor.ArmorFSB; import com.hbm.items.armor.ArmorFSB;
@ -455,6 +456,15 @@ public class EntityEffectHandler {
int dashCount = armorDashCount + armorModDashCount; int dashCount = armorDashCount + armorModDashCount;
boolean dashActivated = false;
if(!GeneralConfig.enableCustomDashKeybind) {
dashActivated = !player.capabilities.isFlying && player.isSneaking();
} else {
dashActivated = props.getKeyPressed(EnumKeybind.DASH);
}
//System.out.println(dashCount); //System.out.println(dashCount);
if(dashCount * 30 < props.getStamina()) if(dashCount * 30 < props.getStamina())
@ -470,7 +480,7 @@ public class EntityEffectHandler {
if(props.getDashCooldown() <= 0) { if(props.getDashCooldown() <= 0) {
if(!player.capabilities.isFlying && player.isSneaking() && stamina >= perDash) { if(dashActivated && stamina >= perDash) {
Vec3 lookingIn = player.getLookVec(); Vec3 lookingIn = player.getLookVec();
Vec3 strafeVec = player.getLookVec(); Vec3 strafeVec = player.getLookVec();

View File

@ -22,6 +22,7 @@ public class HbmKeybinds {
public static KeyBinding jetpackKey = new KeyBinding(category + ".toggleBack", Keyboard.KEY_C, category); public static KeyBinding jetpackKey = new KeyBinding(category + ".toggleBack", Keyboard.KEY_C, category);
public static KeyBinding hudKey = new KeyBinding(category + ".toggleHUD", Keyboard.KEY_V, category); public static KeyBinding hudKey = new KeyBinding(category + ".toggleHUD", Keyboard.KEY_V, category);
public static KeyBinding reloadKey = new KeyBinding(category + ".reload", Keyboard.KEY_R, category); public static KeyBinding reloadKey = new KeyBinding(category + ".reload", Keyboard.KEY_R, category);
public static KeyBinding dashKey = new KeyBinding(category + ".dash", Keyboard.KEY_F, category);
public static KeyBinding craneUpKey = new KeyBinding(category + ".craneMoveUp", Keyboard.KEY_UP, category); public static KeyBinding craneUpKey = new KeyBinding(category + ".craneMoveUp", Keyboard.KEY_UP, category);
public static KeyBinding craneDownKey = new KeyBinding(category + ".craneMoveDown", Keyboard.KEY_DOWN, category); public static KeyBinding craneDownKey = new KeyBinding(category + ".craneMoveDown", Keyboard.KEY_DOWN, category);
@ -34,6 +35,7 @@ public class HbmKeybinds {
ClientRegistry.registerKeyBinding(jetpackKey); ClientRegistry.registerKeyBinding(jetpackKey);
ClientRegistry.registerKeyBinding(hudKey); ClientRegistry.registerKeyBinding(hudKey);
ClientRegistry.registerKeyBinding(reloadKey); ClientRegistry.registerKeyBinding(reloadKey);
ClientRegistry.registerKeyBinding(dashKey);
ClientRegistry.registerKeyBinding(craneUpKey); ClientRegistry.registerKeyBinding(craneUpKey);
ClientRegistry.registerKeyBinding(craneDownKey); ClientRegistry.registerKeyBinding(craneDownKey);
@ -57,6 +59,7 @@ public class HbmKeybinds {
if(last != current) { if(last != current) {
PacketDispatcher.wrapper.sendToServer(new KeybindPacket(key, current)); PacketDispatcher.wrapper.sendToServer(new KeybindPacket(key, current));
props.setKeyPressed(key, current); props.setKeyPressed(key, current);
System.out.println(key);
} }
} }
} }
@ -66,6 +69,7 @@ public class HbmKeybinds {
TOGGLE_JETPACK, TOGGLE_JETPACK,
TOGGLE_HEAD, TOGGLE_HEAD,
RELOAD, RELOAD,
DASH,
CRANE_UP, CRANE_UP,
CRANE_DOWN, CRANE_DOWN,
CRANE_LEFT, CRANE_LEFT,

View File

@ -1632,6 +1632,7 @@ public class ClientProxy extends ServerProxy {
case TOGGLE_JETPACK: return HbmKeybinds.jetpackKey.getIsKeyPressed(); case TOGGLE_JETPACK: return HbmKeybinds.jetpackKey.getIsKeyPressed();
case TOGGLE_HEAD: return HbmKeybinds.hudKey.getIsKeyPressed(); case TOGGLE_HEAD: return HbmKeybinds.hudKey.getIsKeyPressed();
case RELOAD: return HbmKeybinds.reloadKey.getIsKeyPressed(); case RELOAD: return HbmKeybinds.reloadKey.getIsKeyPressed();
case DASH: return HbmKeybinds.dashKey.getIsKeyPressed();
case CRANE_UP: return HbmKeybinds.craneUpKey.getIsKeyPressed(); case CRANE_UP: return HbmKeybinds.craneUpKey.getIsKeyPressed();
case CRANE_DOWN: return HbmKeybinds.craneDownKey.getIsKeyPressed(); case CRANE_DOWN: return HbmKeybinds.craneDownKey.getIsKeyPressed();
case CRANE_LEFT: return HbmKeybinds.craneLeftKey.getIsKeyPressed(); case CRANE_LEFT: return HbmKeybinds.craneLeftKey.getIsKeyPressed();

View File

@ -652,6 +652,7 @@ hbm.key.craneMoveDown=Move Crane Backward
hbm.key.craneMoveLeft=Move Crane Left hbm.key.craneMoveLeft=Move Crane Left
hbm.key.craneMoveRight=Move Crane Right hbm.key.craneMoveRight=Move Crane Right
hbm.key.craneMoveUp=Move Crane Forward hbm.key.craneMoveUp=Move Crane Forward
hbm.key.dash=Dash (Unbind from Crouch in config)
hbm.key.toggleBack=Toggle Backpack hbm.key.toggleBack=Toggle Backpack
hbm.key.toggleHUD=Toggle HUD hbm.key.toggleHUD=Toggle HUD
hbm.key.reload=Reload hbm.key.reload=Reload