Skip to content

Commit

Permalink
Changed uplink errors to print every build tick
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursivePineapple committed Jan 20, 2025
1 parent 5f38b8d commit 978f91b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void givePlayerFluids(List<BigFluidStack> fluids) {
* If items can't be inserted, they're dropped on the ground as an EntityItemLarge.
* If fluids can't be inserted, they're voided.
*/
public void actuallyGivePlayerStuff() {
protected void actuallyGivePlayerStuff() {
if (player.capabilities.isCreativeMode) {
pendingItems.clear();
pendingFluids.clear();
Expand Down Expand Up @@ -583,4 +583,8 @@ private void consumeItemsFromUplink(

if (result.right() != null) extractedItems.addAll(result.right());
}

protected void resetWarnings() {
printedUplinkWarning = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public PendingBuild(

@Override
public void tryPlaceBlocks(ItemStack stack, EntityPlayer player) {
resetWarnings();

List<PendingBlock> toPlace = new ArrayList<>(tier.placeSpeed);

Integer lastChunkX = null, lastChunkZ = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public PendingMove(EntityPlayer player, MMState state, ManipulatorTier tier) {

@Override
public void tryPlaceBlocks(ItemStack stack, EntityPlayer player) {
resetWarnings();

if (moves == null) {
initMoves();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public enum UplinkStatus {
@Override
public String toString() {
return switch (this) {
case OK -> "ok";
case NO_PLASMA -> "insufficient plasma";
case AE_OFFLINE -> "could not connect to the ME system";
case NO_HATCH -> "missing ME hatch";
case OK -> "Ok";
case NO_PLASMA -> "Insufficient plasma";
case AE_OFFLINE -> "Could not connect to the ME system";
case NO_HATCH -> "Missing ME hatch";
};
}
}

0 comments on commit 978f91b

Please sign in to comment.