[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 18:04:28 -08:00
1 parent 83698cb73c
commit 84c2239244
561 files changed
+8872 -9300

No files matched your search

@@ -1,19 +1,17 @@
package tconstruct.client;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
import mantle.common.network.AbstractPacket;
import modwarriors.notenoughkeys.api.Api;
import modwarriors.notenoughkeys.api.KeyBindingPressedEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import org.lwjgl.input.Keyboard;
import tconstruct.TConstruct;
import tconstruct.armor.ArmorProxyClient;
import tconstruct.armor.ArmorProxyCommon;
@@ -23,11 +21,16 @@ import tconstruct.util.network.AccessoryInventoryPacket;
import tconstruct.util.network.BeltPacket;
import tconstruct.util.network.DoubleJumpPacket;
import tconstruct.util.network.GogglePacket;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
public class ArmorControls {
public static final String keybindCategory = "tconstruct.keybindings";
public static final String[] keyDescs = new String[] {"key.tarmor", "key.tgoggles", "key.tbelt", "key.tzoom"};
public static final String[] keyDescs = new String[] { "key.tarmor", "key.tgoggles", "key.tbelt", "key.tzoom" };
public static KeyBinding armorKey = new KeyBinding(keyDescs[0], Keyboard.KEY_NONE, keybindCategory);
public static KeyBinding toggleGoggles = new KeyBinding(keyDescs[1], Keyboard.KEY_NONE, keybindCategory);
public static KeyBinding beltSwap = new KeyBinding(keyDescs[2], Keyboard.KEY_NONE, keybindCategory);
@@ -51,7 +54,7 @@ public class ArmorControls {
public ArmorControls() {
getVanillaKeyBindings();
keys = new KeyBinding[] {armorKey, toggleGoggles, beltSwap, zoomKey, null, null};
keys = new KeyBinding[] { armorKey, toggleGoggles, beltSwap, zoomKey, null, null };
}
public void registerKeys() {
@@ -122,8 +125,8 @@ public class ArmorControls {
mc.thePlayer.motionY = 0.42D;
mc.thePlayer.fallDistance = 0;
if (mc.thePlayer.isPotionActive(Potion.jump)) {
mc.thePlayer.motionY +=
(float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
mc.thePlayer.motionY += (float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1)
* 0.1F;
}
midairJumps--;
resetFallDamage();
@@ -131,16 +134,12 @@ public class ArmorControls {
if (!jumping) {
jumping = mc.thePlayer.isAirBorne;
ItemStack shoes = mc.thePlayer.getCurrentArmor(0);
if (shoes != null
&& shoes.hasTagCompound()
&& shoes.getTagCompound().hasKey("TinkerArmor")) {
if (shoes != null && shoes.hasTagCompound() && shoes.getTagCompound().hasKey("TinkerArmor")) {
NBTTagCompound shoeTag = shoes.getTagCompound().getCompoundTag("TinkerArmor");
midairJumps += shoeTag.getInteger("Double-Jump");
}
ItemStack wings = mc.thePlayer.getCurrentArmor(1);
if (wings != null
&& wings.hasTagCompound()
&& wings.getTagCompound().hasKey("TinkerArmor")) {
if (wings != null && wings.hasTagCompound() && wings.getTagCompound().hasKey("TinkerArmor")) {
NBTTagCompound shoeTag = wings.getTagCompound().getCompoundTag("TinkerArmor");
midairJumps += shoeTag.getInteger("Double-Jump");
}
@@ -150,10 +149,8 @@ public class ArmorControls {
private void checkAndToggleNightVision() {
ItemStack goggles = mc.thePlayer.getCurrentArmor(3);
if (goggles != null && goggles.getItem() instanceof TravelGear) { // TODO: Genericize this
if (goggles.hasTagCompound()
&& goggles.getTagCompound()
.getCompoundTag(((TravelGear) goggles.getItem()).getBaseTagName())
.getBoolean("Night Vision")) {
if (goggles.hasTagCompound() && goggles.getTagCompound()
.getCompoundTag(((TravelGear) goggles.getItem()).getBaseTagName()).getBoolean("Night Vision")) {
activeGoggles = !activeGoggles;
PlayerAbilityHelper.toggleGoggles(mc.thePlayer, activeGoggles);
toggleGoggles();