Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable wirecutter interaction on EOH when it's working #3710

Merged
merged 6 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
Expand Down Expand Up @@ -938,17 +939,30 @@ public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPla
public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer,
float aX, float aY, float aZ, ItemStack aTool) {
if (astralArrayAmount != 0) {
while (astralArrayAmount >= 64) {
if (recipeRunning) {
GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("eoh.rightclick.wirecutter.1"));
} else {
long originalAmount = astralArrayAmount;
while (astralArrayAmount >= 64) {
if (aPlayer.inventory.getFirstEmptyStack() != -1) {
aPlayer.inventory.addItemStackToInventory(CustomItemList.astralArrayFabricator.get(64));
astralArrayAmount -= 64;
} else {
break;
}
}
if (aPlayer.inventory.getFirstEmptyStack() != -1) {
aPlayer.inventory.addItemStackToInventory(CustomItemList.astralArrayFabricator.get(64));
astralArrayAmount -= 64;
} else {
break;
aPlayer.inventory
.addItemStackToInventory(CustomItemList.astralArrayFabricator.get(astralArrayAmount));
astralArrayAmount = 0;
}
if (originalAmount - astralArrayAmount > 0) {
GTUtility.sendChatToPlayer(
aPlayer,
StatCollector.translateToLocalFormatted(
"eoh.rightclick.wirecutter.2",
GTUtility.formatNumbers(originalAmount - astralArrayAmount)));
}
}
if (aPlayer.inventory.getFirstEmptyStack() != -1) {
aPlayer.inventory.addItemStackToInventory(CustomItemList.astralArrayFabricator.get(astralArrayAmount));
astralArrayAmount = 0;
}
}
return true;
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/tectech/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ gt.blockcasingsBA0.11.desc.1=Can survive at least one big bang, maybe two...
achievement.gt.blockcasingsBA0.10=Reinforced Temporal Structure Casing
gt.blockcasingsBA0.10.desc.0=Resistant to temporal shearing from time dilation differences.
gt.blockcasingsBA0.10.desc.1=This block can last an eternity without any decay.

eoh.rightclick.wirecutter.1=Can't retrieve Astral Array Fabricators when the machine is working!
eoh.rightclick.wirecutter.2=Retrieved %s Astral Array Fabricators

# Antimatter
gt.blockmachines.antimatterForge.name=Semi-Stable Antimatter Stabilization Sequencer
Expand Down
Loading