Skip to content

Quiltify 1.21.1#170

Open
OroArmor wants to merge 37 commits into
QuiltMC:1.21.1from
OroArmorModding:1.21.1
Open

Quiltify 1.21.1#170
OroArmor wants to merge 37 commits into
QuiltMC:1.21.1from
OroArmorModding:1.21.1

Conversation

@OroArmor
Copy link
Copy Markdown
Member

No description provided.

Comment thread UPDATING.md
FabricMCBot and others added 4 commits August 26, 2024 12:01
* New translations en_us.json (Korean)

* New translations en_us.json (Japanese)

* New translations en_us.json (German)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Italian)
* after damage event

* add after damage event to testmod

* remove amount > 0 check to capture shield blocking

* add javadoc

* dont fire event if killed

* clarify javadoc a bit more

* fix checkstyle issue

* fix other checkstyle issues lol

* rename damageDealt to baseDamageTaken
@OroArmor OroArmor force-pushed the 1.21.1 branch 6 times, most recently from 8ce916b to cb8e7a2 Compare September 4, 2024 02:33
TelepathicGrunt and others added 13 commits September 10, 2024 13:15
* Add `c:animal_foods` tag

* checkstyle

* Spotless

* Add to lang generator

* Actually use the generated lang file

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Malay)

* New translations en_us.json (Korean)

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Polish)

* New translations en_us.json (Portuguese, Brazilian)
* Add TransferVariant.getComponentMap()

* used the cached stack

* Even better

(cherry picked from commit 0771530)
…cMC#4085)

* modify effects event

* give impaling fire aspect

* add fabric component map builder

* change interface name to match event

* gametests for weird impaling enchantment

* fix checkstyle issues

* fabric map builder javadoc

* modify effects javadoc

* fix checkstyle issues

* prefer extension methods over add

* add enchantment source

* fix missing asterisk on fabricitemstack javadoc

* switch to enchantment builder

* fix effects list

* fix checkstyle

* add note on exclusive set to javadoc

* add fabric component builder extensions to default component testmod

* remove threadlocal usage from mixin

* remove modid prefix from accessors

* remove unused import

* fix recursive invoker

* add test to automatically check modified item name
* New translations en_us.json (German)

* New translations en_us.json (Turkish)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Polish)

* New translations en_us.json (Czech)

* New translations en_us.json (Japanese)
* Create `c:obsidians`

* Add obsidians subtags
…anges (FabricMC#4082)

* add ItemVariant#withChanges and FluidVariant#withChanges

* withChanges -> withComponentChanges

* add TransferVariant#withComponentChanges

* make TransferVariant#withComponentChanges throw

(cherry picked from commit 1d5c243)
@OroArmor OroArmor force-pushed the 1.21.1 branch 2 times, most recently from 1ea68f5 to 0d43a80 Compare September 27, 2024 22:53
@OroArmor OroArmor marked this pull request as ready for review September 22, 2025 22:42
@OroArmor
Copy link
Copy Markdown
Member Author

Finally finished!

Full diff: https://github.com/QuiltMC/quilted-fabric-api/pull/170/files/3b9245a97679f6c58089dd803021f93d91402b29..8e9a97b80616d923b2a9f12868d7c65001e46f02

I would recommend going commit by commit for smaller and more focused changes.

Copy link
Copy Markdown
Member

@supersaiyansubtlety supersaiyansubtlety left a comment

Choose a reason for hiding this comment

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

incredible work
only a few notes
I'm also assuming some warnings aren't suppressed to minimize the diff (esp. deprecation)

Comment on lines +122 to +123
// TODO: Depends block
// this shouldn't be a huge deal because
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this still relevant?

Comment thread settings.gradle
@@ -1,14 +1,21 @@
pluginManagement {
repositories {
gradlePluginPortal()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is it important to move this before Fabric?

Registries.init();

// .Quilt code for initializing its main entrypoint
setOutputStreams(); // We need to make this a bit early in case a mod uses System.out to print stuff
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

vanilla's setOutputStreams() call should probably be canceled

Comment on lines +36 to +39
static void invokeFreezeRegistries() { }

@Invoker
static <T extends Registry<?>> void invokeValidate(Registry<T> registries) { }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these should have the quilt$ prefix to avoid potential conflicts

invokerGetter -> (server, resourceManager, success) -> {
invokerGetter.get().onEndDataPackReload(new org.quiltmc.qsl.resource.loader.impl.ResourceLoaderEventContextsImpl.ReloadEndContext(
resourceManager, server.getRegistryManager(), Optional.ofNullable(
success ? null : new RuntimeException("Unknown error")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this error message be more descriptive?

}

/**
* @throws UnsupportedOperationException if ran on Fabric API, which currently doesn't implement this method
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* @throws UnsupportedOperationException if ran on Fabric API, which currently doesn't implement this method
* @throws UnsupportedOperationException if run on Fabric API, which currently doesn't implement this method


@Mixin(org.quiltmc.qsl.item.setting.api.RecipeRemainderLogicHandler.class)
public interface RecipeRemainderLogicHandlerMixin {
@ModifyVariable(method = "getRemainder", index = 4, at = @At(value = "INVOKE", target = "Ljava/util/Set;contains(Ljava/lang/Object;)Z"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is index = 4 necessary?
there's only one RecipeRemainderProvider
if the goal is to fail if there's ever more than one, allow = 1 could be used instead
if the goal is to use the first RecipeRemainderProvider when there's more than one, ordinal = 0 could be used instead (but I think failing is safer)

return context.getBiomeKey().getValue().getNamespace().equals("minecraft")
&& BuiltInRegistryKeys.isBuiltinBiome(context.getBiomeKey());
};
return context -> org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors.foundInTheEnd().test(context);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return context -> org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors.foundInTheEnd().test(context);
return context -> org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors.vanilla().test(context);


@ApiStatus.Internal
protected org.quiltmc.qsl.worldgen.biome.api.ModificationPhase toQuilt() {
return this.quiltEquivalent;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would it be more maintainable to use a switch instead of a field here, like a few other enums have done?

}

public static void initializeQuiltEventBridges(ModContainer mod) {
// Our events are for all screens, while Fabric's are per screen. This ensures that the Quilt events are only run for the right Fabric screen.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in the future it might be worth adding per-screen events to qsl so they needn't be implemented here

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.