Skip to content

Conversation

Allmoz
Copy link
Contributor

@Allmoz Allmoz commented Sep 17, 2025

As well explained by the user that made #6076, when the schematic is out of range the cannon gets reseted as in all other errors, but the schematic is not emptied or moved from slot 0, so it immediately gets reloaded, over and over again.

Since the other schematics error also have the issue of voiding previous stack of schematics on the output, and on finish schematics get overstacked, this PR makes so that only 1 schematic can be in the canon at once by:

  • by not be letting place in slot 0 unless slot 1 is empty.
  • out of range error, the schematic is moved to the output.
  • for consistency when other error that stops the cannon also moved the schematic to the output.

I would like a visual indication that the slot 0 is disabled (like when it has an schematic in it), but I don't know how to do that yet .

@VoidLeech
Copy link
Collaborator

This fixes #4398 by extension.

This hover text should be adjusted when you're blocked from putting a schematic there, imo.
image

@VoidLeech VoidLeech added pr type: fix PR fixes a bug pr type: feature PR adds a new feature or changes an existing feature pr flag: simple PR has minimal changes labels Sep 18, 2025
@Allmoz
Copy link
Contributor Author

Allmoz commented Sep 19, 2025

This fixes #4398 by extension.

This hover text should be adjusted when you're blocked from putting a schematic there, imo. image

Then probably a proper method to check if can insert would be in order. I'm not very familiar yet with mc UIs, any advice/recommendation?

@Allmoz Allmoz marked this pull request as draft September 19, 2025 06:43
private final String _slotGunpowder = "gui.schematicannon.slot.gunpowder";
private final String _slotListPrinter = "gui.schematicannon.slot.listPrinter";
private final String _slotSchematic = "gui.schematicannon.slot.schematic";
private final String _slotSchematicEnabled = "gui.schematicannon.slot.schematic";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I migrate it to "gui.schematicannon.slot.schematicEnabled"? is enough just changing the id?

@Allmoz Allmoz marked this pull request as ready for review September 19, 2025 10:58
@Allmoz
Copy link
Contributor Author

Allmoz commented Sep 19, 2025

Ok, ready to review, I hope renaming a lang entry is not a bad thing

@VoidLeech
Copy link
Collaborator

Ok, ready to review, I hope renaming a lang entry is not a bad thing

If a key is renamed then it should also be changed in the other lang files so that the existing translations aren't lost.

@Allmoz
Copy link
Contributor Author

Allmoz commented Sep 19, 2025

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr flag: simple PR has minimal changes pr type: feature PR adds a new feature or changes an existing feature pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants