respect step assist config and make it enabled by default (#111)

Co-authored-by: Wilhelm Schuster <dev@rot13.io>
This commit is contained in:
danyadevandWilhelm Schuster authored and GitHub committed 2026-01-07 12:30:15 +01:00
1 parent f657893feb
commit eab5ce16af
2 files changed
+18 -20

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
![](/src/main/resources/logo.png?raw=true)
#Electro-Magic Tools
# Electro-Magic Tools
Electro-Magic Tools is a Minecraft mod which integrates Thaumcraft 4 with IndustrialCraft 2 by adding cross-mod tools and items, such as magic solar panels, essentia generators and legendary items.
@@ -19,7 +19,7 @@ Before posting to the issue tracker, make sure you meet the following criteria:
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
- You've gone through the effort to find what conditions are necessary to reproduce the issue.
- The issue is subtle enough and has been around long enough that you think we might have missed it.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
# Upstream
@@ -27,4 +27,4 @@ Before posting to the issue tracker, make sure you meet the following criteria:
# License
Electro-Magic-Tools is licensed under the GPL 3
Electro-Magic-Tools is licensed under the GPL 3
@@ -126,22 +126,21 @@ public class ItemElectricBootsTraveller extends ItemArmor
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (getIntertialState(itemStack) && player.moveForward == 0
if (getInertiaState(itemStack) && player.moveForward == 0
&& player.moveStrafing == 0
&& player.capabilities.isFlying) {
player.motionX *= 0.5;
player.motionZ *= 0.5;
}
boolean omniMode = false;
if (EMT.isBootsActive) {
omniMode = isOmniEnabled(itemStack);
boolean omniMode = getOmniState(itemStack);
if ((player.moveForward == 0F && player.moveStrafing == 0F && omniMode)
|| (player.moveForward <= 0F && !omniMode)) {
return;
}
}
if (player.moveForward != 0.0F || player.moveStrafing != 0.0F) {
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);
}
@@ -216,20 +215,12 @@ public class ItemElectricBootsTraveller extends ItemArmor
@Override
public int getItemEnchantability() {
if (EMTConfigHandler.enchanting == false) {
return 0;
} else {
return 4;
}
return EMTConfigHandler.enchanting ? 4 : 0;
}
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
if (EMTConfigHandler.enchanting == false) {
return false;
} else {
return true;
}
return EMTConfigHandler.enchanting;
}
public int getEnergyPerDamage() {
@@ -289,13 +280,20 @@ public class ItemElectricBootsTraveller extends ItemArmor
}
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 getIntertialState(ItemStack stack) {
public boolean getStepAssistState(ItemStack stack) {
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("step")) {
return stack.stackTagCompound.getBoolean("step");
}
return true;
}
public boolean getInertiaState(ItemStack stack) {
if (stack.stackTagCompound != null) {
return stack.stackTagCompound.getBoolean("inertiacanceling");
}