Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation('com.github.GTNewHorizons:NotEnoughItems:2.8.48-GTNH:dev')
compileOnly("com.github.GTNewHorizons:Postea:1.1.5:dev")

compileOnly('com.github.GTNewHorizons:ThaumicBoots:1.5.5:dev') {transitive=false}
devOnlyNonPublishable('com.github.GTNewHorizons:ThaumicBoots:1.5.5:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ThaumicBases:1.9.6:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.2:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Botania:1.13.6-GTNH:api') {transitive=false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
}

if (this.armorType == 3) {
if (getIntertialState(stack) && player.moveForward == 0
if (getInertiaState(stack) && player.moveForward == 0
&& player.moveStrafing == 0
&& player.capabilities.isFlying) {
player.motionX *= 0.5;
Expand Down Expand Up @@ -269,8 +269,7 @@ public static boolean playerHasFoot(EntityPlayer player) {

@SubscribeEvent
public void jumpBoost(LivingJumpEvent event) {
if (event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
if (event.entityLiving instanceof EntityPlayer player) {
ItemStack boots = player.getCurrentArmor(0);
if (playerHasFoot(player)) {
player.motionY += 0.55f * getJumpModifier(boots);
Expand All @@ -283,12 +282,12 @@ public void jumpBoost(LivingJumpEvent event) {
public void movementEffects(EntityPlayer player, float bonus, ItemStack itemStack) {
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F || player.motionY != 0.0F) {
if (WitchingGadgets.isBootsActive) {
boolean omniMode = isOmniEnabled(itemStack);
boolean omniMode = getOmniState(itemStack);
if (player.moveForward <= 0F && !omniMode) {
return;
}
}
if (player.worldObj.isRemote && !player.isSneaking()) {
if (player.worldObj.isRemote && !player.isSneaking() && getStepAssistState(itemStack)) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
}
Expand Down Expand Up @@ -362,13 +361,20 @@ public static double getJumpModifier(ItemStack stack) {
}

public boolean getOmniState(ItemStack stack) {
if (stack.stackTagCompound != null) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("omni")) {
return stack.stackTagCompound.getBoolean("omni");
}
return false;
return true;
}

public boolean getStepAssistState(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("step")) {
return stack.stackTagCompound.getBoolean("step");
}
return true;
}

public boolean getIntertialState(ItemStack stack) {
public boolean getInertiaState(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getBoolean("inertiacanceling");
}
Expand Down