Skip to content

Remove references to resource location constructor, use static methods instead - #5236

Open
gustovafing wants to merge 10 commits into
1.20.1from
gus/version-parity
Open

Remove references to resource location constructor, use static methods instead#5236
gustovafing wants to merge 10 commits into
1.20.1from
gus/version-parity

Conversation

@gustovafing

Copy link
Copy Markdown
Member

What

Removes usages of the ResourceLocation constructor in favour of using the static construction methods. This change was made mandatory on 1.21, but can also be done on 1.20. No AI.

@gustovafing
gustovafing requested a review from a team as a code owner August 4, 2026 03:39
@github-actions github-actions Bot added 1.20.1 Tests: Passed Game Tests have passed on this PR labels Aug 4, 2026

@screret screret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

apply spotless

Comment thread docs/content/Modpacks/Other-Topics/Ambiguous-Methods.md Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/api/capability/ICoverable.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/api/cosmetics/CapeRegistry.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/data/recipe/MaterialInfoLoader.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/data/tags/BlockTagLoader.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/data/tags/BlockTagLoader.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/utils/GTUtil.java Outdated
gustovafing and others added 4 commits August 4, 2026 19:46
Co-authored-by: screret <68943070+screret@users.noreply.github.com>
…java

Co-authored-by: screret <68943070+screret@users.noreply.github.com>
Co-authored-by: screret <68943070+screret@users.noreply.github.com>

@screret screret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

spotted a few more things, sorgy

Comment on lines +352 to 353
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(blockEntry.getId().getNamespace(),
"blocks/" + blockEntry.getId().getPath());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(blockEntry.getId().getNamespace(),
"blocks/" + blockEntry.getId().getPath());
ResourceLocation lootTableId = blockEntry.getId().withPrefix("blocks/");

Comment on lines +341 to +342
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(id.getNamespace(),
"blocks/" + id.getPath());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(id.getNamespace(),
"blocks/" + id.getPath());
ResourceLocation lootTableId = blockEntry.getId().withPrefix("blocks/");

Comment on lines +329 to 330
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(blockEntry.getId().getNamespace(),
"blocks/" + blockEntry.getId().getPath());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(blockEntry.getId().getNamespace(),
"blocks/" + blockEntry.getId().getPath());
ResourceLocation lootTableId = blockEntry.getId().withPrefix("blocks/");

Comment thread src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java Outdated
Comment thread src/main/java/com/gregtechceu/gtceu/data/pack/GTDynamicDataPack.java Outdated
gustovafing and others added 4 commits August 4, 2026 20:19
Co-authored-by: screret <68943070+screret@users.noreply.github.com>
# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/data/recipe/configurable/RecipeRemoval.java
@ParametersAreNonnullByDefault
public class GTDynamicDataPack implements PackResources {

// change the path to `recipe` on 1.21!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

keep this comment pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Tests: Passed Game Tests have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants