修复按键输入bug
This commit is contained in:
parent
a7f5d8f36a
commit
2ceef7636c
3 changed files with 19 additions and 19 deletions
|
@ -178,7 +178,7 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
@Override
|
@Override
|
||||||
public DamageModifier getDamageModifier() {
|
public DamageModifier getDamageModifier() {
|
||||||
return super.getDamageModifier()
|
return super.getDamageModifier()
|
||||||
.multiply(0.2f)
|
.multiply(0.6f)
|
||||||
.multiply(1.5f, DamageTypes.ARROW)
|
.multiply(1.5f, DamageTypes.ARROW)
|
||||||
.multiply(1.5f, DamageTypes.TRIDENT)
|
.multiply(1.5f, DamageTypes.TRIDENT)
|
||||||
.multiply(2.5f, DamageTypes.MOB_ATTACK)
|
.multiply(2.5f, DamageTypes.MOB_ATTACK)
|
||||||
|
@ -187,8 +187,8 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
.multiply(12.5f, DamageTypes.LAVA)
|
.multiply(12.5f, DamageTypes.LAVA)
|
||||||
.multiply(6f, DamageTypes.EXPLOSION)
|
.multiply(6f, DamageTypes.EXPLOSION)
|
||||||
.multiply(6f, DamageTypes.PLAYER_EXPLOSION)
|
.multiply(6f, DamageTypes.PLAYER_EXPLOSION)
|
||||||
.multiply(2.4f, ModDamageTypes.CUSTOM_EXPLOSION)
|
.multiply(1.4f, ModDamageTypes.CUSTOM_EXPLOSION)
|
||||||
.multiply(2f, ModDamageTypes.PROJECTILE_BOOM)
|
.multiply(1f, ModDamageTypes.PROJECTILE_BOOM)
|
||||||
.multiply(0.75f, ModDamageTypes.MINE)
|
.multiply(0.75f, ModDamageTypes.MINE)
|
||||||
.multiply(1.5f, ModDamageTypes.CANNON_FIRE)
|
.multiply(1.5f, ModDamageTypes.CANNON_FIRE)
|
||||||
.multiply(0.25f, ModTags.DamageTypes.PROJECTILE)
|
.multiply(0.25f, ModTags.DamageTypes.PROJECTILE)
|
||||||
|
|
|
@ -123,21 +123,21 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
||||||
@Override
|
@Override
|
||||||
public void processInput(short keys) {
|
public void processInput(short keys) {
|
||||||
leftInputDown
|
leftInputDown
|
||||||
= (keys & 0b0000001) > 0;
|
= (keys & 0b00000001) > 0;
|
||||||
rightInputDown
|
rightInputDown
|
||||||
= (keys & 0b0000010) > 0;
|
= (keys & 0b00000010) > 0;
|
||||||
forwardInputDown
|
forwardInputDown
|
||||||
= (keys & 0b0000100) > 0;
|
= (keys & 0b00000100) > 0;
|
||||||
backInputDown
|
backInputDown
|
||||||
= (keys & 0b0001000) > 0;
|
= (keys & 0b00001000) > 0;
|
||||||
upInputDown
|
upInputDown
|
||||||
= (keys & 0b0010000) > 0;
|
= (keys & 0b00010000) > 0;
|
||||||
downInputDown
|
downInputDown
|
||||||
= (keys & 0b0100000) > 0;
|
= (keys & 0b00100000) > 0;
|
||||||
decoyInputDown
|
decoyInputDown
|
||||||
= (keys & 0b1000000) > 0;
|
= (keys & 0b01000000) > 0;
|
||||||
fireInputDown
|
fireInputDown
|
||||||
= (keys & 0b1000001) > 0;
|
= (keys & 0b10000000) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -250,28 +250,28 @@ public class ClientEventHandler {
|
||||||
&& tag.getBoolean("Linked"))
|
&& tag.getBoolean("Linked"))
|
||||||
) {
|
) {
|
||||||
if (options.keyLeft.isDown()) {
|
if (options.keyLeft.isDown()) {
|
||||||
keys |= 0b0000001;
|
keys |= 0b00000001;
|
||||||
}
|
}
|
||||||
if (options.keyRight.isDown()) {
|
if (options.keyRight.isDown()) {
|
||||||
keys |= 0b0000010;
|
keys |= 0b00000010;
|
||||||
}
|
}
|
||||||
if (options.keyUp.isDown()) {
|
if (options.keyUp.isDown()) {
|
||||||
keys |= 0b0000100;
|
keys |= 0b00000100;
|
||||||
}
|
}
|
||||||
if (options.keyDown.isDown()) {
|
if (options.keyDown.isDown()) {
|
||||||
keys |= 0b0001000;
|
keys |= 0b00001000;
|
||||||
}
|
}
|
||||||
if (options.keyJump.isDown()) {
|
if (options.keyJump.isDown()) {
|
||||||
keys |= 0b0010000;
|
keys |= 0b00010000;
|
||||||
}
|
}
|
||||||
if (options.keyShift.isDown()) {
|
if (options.keyShift.isDown()) {
|
||||||
keys |= 0b0100000;
|
keys |= 0b00100000;
|
||||||
}
|
}
|
||||||
if (ModKeyMappings.RELEASE_DECOY.isDown()) {
|
if (ModKeyMappings.RELEASE_DECOY.isDown()) {
|
||||||
keys |= 0b1000000;
|
keys |= 0b01000000;
|
||||||
}
|
}
|
||||||
if (holdFireVehicle) {
|
if (holdFireVehicle) {
|
||||||
keys |= 0b1000001;
|
keys |= 0b10000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue