Skip to content

Port to 1.21.1#17

Open
evelant wants to merge 3 commits into
mickelus:1.20from
evelant:1.21.1
Open

Port to 1.21.1#17
evelant wants to merge 3 commits into
mickelus:1.20from
evelant:1.21.1

Conversation

@evelant

@evelant evelant commented Apr 10, 2026

Copy link
Copy Markdown

Ported to 1.21.1 to make Tetra 1.21.1 port work, should probably be a new branch but github won't allow a PR against a branch that doesn't exist yet. See mickelus/tetra#931

Comment on lines +26 to +32
public void setPosition(int x, int y) {
this.x = x;
this.y = y;
realX = x;
realY = y;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What's this for?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Needed for workbench UI, otherwise material slots are wrongly positioned. Could remove the unused realX and realY however, I will do that.

@Override
public boolean mayPlace(@Nullable ItemStack stack) {
return isEnabled;
return isEnabled && super.mayPlace(stack == null ? ItemStack.EMPTY : stack);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Shouldn't this pass the itemstack as is to the parent method?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Super does not accept nullable, but you're right, all callers are non-nullable so it can be removed along with the @nullable annotation.

@@ -1 +1,2 @@
public net.minecraft.client.gui.GuiGraphics m_280479_(Lnet/minecraft/resources/ResourceLocation;IIIIIFFFFFFFF)V # innerBlit No newline at end of file
public-f net.minecraft.world.inventory.Slot x
public-f net.minecraft.world.inventory.Slot y

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This can be removed if ToggleableSlot.setPosition isn't needed

Comment thread .gitignore
forge*changelog.txt

# local publishing output
/repo/

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What's going on here? Were there changes to artifact name and locations in 1.21?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's standard from the neoforge 1.21 mdk template -- neoforge uses "runs" rather than "run" and "repo" for local output.

Comment thread build.gradle
@@ -1,134 +1,133 @@
plugins {
id 'eclipse'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Is this based on the boilerplate mod for neo 1.21.1 or is it just vibes?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's almost entirely identical to the neoforge 1.21 mdk template

@WFPhantom

Copy link
Copy Markdown

please use MDG evelant#1

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.

3 participants