-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adds packager cycle config #8577
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
base: mc1.20.1/dev
Are you sure you want to change the base?
Adds packager cycle config #8577
Conversation
@@ -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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@@ -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); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Adds a config for packager cycle config, allowing packager packing time to be controlled. I added this as I believe that some aspects of factories can be bottlenecked by a single packager having to export large amounts of a single resource. Added as a config to keep balance for those who want to keep the vanilla feel.