Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import java.util.Set;
import java.util.UUID;

import com.simibubi.create.infrastructure.config.AllConfigs;

import org.jetbrains.annotations.Nullable;

import com.simibubi.create.AllBlocks;
Expand Down Expand Up @@ -76,7 +78,7 @@ public class PackagerBlockEntity extends SmartBlockEntity {
public PackagerItemHandler inventory;
private final LazyOptional<IItemHandler> invProvider;

public static final int CYCLE = 20;
public static final int CYCLE = AllConfigs.server().logistics.packagePackCycle.get();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config value is only applied after the game is reloaded, when used this way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CYCLE is also used outside PackagerBlockEntity.java, which this PR doesn't account for.

public int animationTicks;
public boolean animationInward;

Expand Down Expand Up @@ -133,11 +135,11 @@ public void tick() {
if (!level.isClientSide() && !queuedExitingPackages.isEmpty() && heldBox.isEmpty()) {
BigItemStack entry = queuedExitingPackages.get(0);
heldBox = entry.stack.copy();

entry.count--;
if (entry.count <= 0)
queuedExitingPackages.remove(0);

animationInward = false;
animationTicks = CYCLE;
notifyUpdate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class CLogistics extends ConfigBase {
public final ConfigInt psiTimeout = i(60, 1, "psiTimeout", Comments.psiTimeout);
public final ConfigInt mechanicalArmRange = i(5, 1, "mechanicalArmRange", Comments.mechanicalArmRange);
public final ConfigInt packagePortRange = i(5, 1, "packagePortRange", Comments.packagePortRange);
public final ConfigInt packagePackCycle = i(20, 0, "packagePackCycle", Comments.packagePackCycle);
Copy link
Collaborator

@VoidLeech VoidLeech May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low enough values here will cause the package to always be invisible, or the tray to not move. (see animationTicks) (the animation looks fine (though slower) with higher values)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do apologise as this is my first ever PR, do you need me to fix these issues and remake the PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create additional commits & push those on the branch you used for this, it'll get added to the PR automatically.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, issues resolved:

  • changed minimum cycle ticks to make sure animation gets played
  • fixed config to actually work on reload
    Potential changes needed:
    Separate configs so re-packager can have its own cycle config time?

public final ConfigInt linkRange = i(256, 1, "linkRange", Comments.linkRange);
public final ConfigInt displayLinkRange = i(64, 1, "displayLinkRange", Comments.displayLinkRange);
public final ConfigInt vaultCapacity = i(20, 1, 2048, "vaultCapacity", Comments.vaultCapacity);
Expand All @@ -32,6 +33,7 @@ private static class Comments {
"The amount of ticks a portable storage interface waits for transfers until letting contraptions move along.";
static String mechanicalArmRange = "Maximum distance in blocks a Mechanical Arm can reach across.";
static String packagePortRange = "Maximum distance in blocks a Package Port can be placed at from its target.";
static String packagePackCycle = "The amount of ticks the packager waits to pack the next package";
static String vaultCapacity = "The total amount of stacks a vault can hold per block in size.";
static String chainConveyorCapacity = "The amount of packages a chain conveyor can carry at a time.";
static String brassTunnelTimer = "The amount of ticks a brass tunnel waits between distributions.";
Expand Down