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

Port to 1.21.1 #3

Open
wants to merge 16 commits into
base: 1.20
Choose a base branch
from

Conversation

EnderTurret
Copy link

@EnderTurret EnderTurret commented Nov 27, 2024

Alright, so I wanted to use this mod in a private modpack I'm developing on 1.21.1 NeoForge, which necessitated porting this mod to that version (and loader). I'm submitting this PR in case you would like to have this port, but if you don't that's fine. (I would recommend reviewing this PR by commit, since those will be more approachable than 300 generated files. Also if you choose to merge this PR you'll want to create a new branch based on 1.20 and change the base branch of this PR to it.)

Besides porting to 1.21.1, I also made a few other changes.

First and foremost is the removal of the redstone/glowstone keybinds — the configuration tool now has a mode that can be cycled through by shift-right-clicking. The reason for this change was because I'm fairly certain accessing keybinds on the server like that would cause a hard-crash on dedicated servers. (I'm guessing the mod simply hasn't been rigorously tested on dedicated servers — something common among the vast majority of Minecraft mods.) The new alternative, while a bit more complicated on the code side, shouldn't crash servers (and might be more convenient for bulk glowstone/redstone removal). Related to this, I also removed the 'show details' keybind since it didn't seem very useful in its current state; if it's ever re-added care must be taken not to load it on servers. (This could be achieved by doing something like if (FMLEnvironment.dist == Dist.CLIENT) if (ClientUtils.isShowDetailsDown()) tooltip.add(...);.)

Aside from that I also reinstated the chiseled bookshelf glowstone application/removal code. I assume it was commented out because of the chiseled bookshelf dropping its contents, which I've since fixed. If you'd prefer it to stay commented out though I can change that.

I also fixed reversing redstone control not always visibly updating the block's powered state. Finally, I also made a bunch of changes to clean up other code — mainly the glowstone application/removal code.

Besides all this, I also noticed some other potential problems (which I have not fixed):

  • Adding/removing glowstone/redstone doesn't come with associated subtitles (and even worse they include vanilla ones like "Wax off" and "Respawn Anchor is charged")
  • None of the advancements have translated titles and descriptions

Specifically, to consolidate all the glowstone application/removal code
into one spot.

Also fix a few tabs that snuck in.
I think this was why the code was commented out, but it's working now.
`KeyMappings` are client-only — they're not available on the server.
Keybinds are a client concept; the server doesn't know about them, and
attempts to use them on the server will cause `NoClassDefFoundError`s
(or whatever `Error`/`Exception` the JVM feels like throwing). Instead,
the configuration tool now has different modes which can be cycled
through by shift-right-clicking. (Also the 'show details' keybind was
removed from the configuration tool since it didn't seem very useful to
me, and the tooltip method *is* available and used on both sides,
contrary to earlier versions of Minecraft.)

Also fix redstone-controlled blocks not updating correctly when
inverting the redstone state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant