Skip to content

Rework injects in preparation for NeoForge enum extensions.#776

Merged
BluSpring merged 8 commits into
KiltMC:version/1.21.1from
Acuadragon100:version/1.21.1-enum-extension-inject-prep
May 24, 2026
Merged

Rework injects in preparation for NeoForge enum extensions.#776
BluSpring merged 8 commits into
KiltMC:version/1.21.1from
Acuadragon100:version/1.21.1-enum-extension-inject-prep

Conversation

@Acuadragon100
Copy link
Copy Markdown
Contributor

@Acuadragon100 Acuadragon100 commented May 22, 2026

I went through all the injects to make sure they would be ready for enum extensions.
All of them appear to work with my enum extension draft (they don't crash at least).

This also removes the older static create methods because they don't seem to be present on NeoForge anyway.

Also, how would you feel about removing RecipeBookCategoriesInjection and RecipeBookTypeInjection?
RecipeBookCategoriesInjection doesn't seem to be used for anything anywhere, but RecipeBookTypeInjection is used to invoke getExtensionInfo from the forge module, although I'm unsure if that will return the correct value.

Edit: Now depends on KiltMC/NeoForge#12

@BluSpring
Copy link
Copy Markdown
Member

go ahead

@Acuadragon100 Acuadragon100 marked this pull request as draft May 22, 2026 11:39
@Acuadragon100 Acuadragon100 marked this pull request as ready for review May 22, 2026 14:57
Copy link
Copy Markdown
Member

@BluSpring BluSpring left a comment

Choose a reason for hiding this comment

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

Also fix merge conflicts

target = "Lnet/minecraft/resources/ResourceLocation;withDefaultNamespace(Ljava/lang/String;)Lnet/minecraft/resources/ResourceLocation;"
)
)
private static ResourceLocation kilt$getNamspeacedTextureLocation(String texture, Operation<ResourceLocation> original) {
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.

typo

RarityInject(String fieldName, int ordinal, int id, String name, ChatFormatting color) {}

@Inject(method = "<init>(Ljava/lang/String;IILjava/lang/String;Lnet/minecraft/ChatFormatting;)V", at = @At("RETURN"))
public void kilt$init(String string, int i, int id, String name, ChatFormatting color, CallbackInfo ci) {
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.

kilt$setupDefaultStyleModifier

@Acuadragon100 Acuadragon100 marked this pull request as draft May 23, 2026 23:23
@Acuadragon100 Acuadragon100 marked this pull request as ready for review May 23, 2026 23:24
@BluSpring BluSpring merged commit ec4f596 into KiltMC:version/1.21.1 May 24, 2026
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.

2 participants