Skip to content

Commit

Permalink
Merge branch 'neoforged:1.21.x' into dataproviderhelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
BarionLP authored Oct 29, 2024
2 parents 1fc2abf + 5a82cc6 commit abb90a5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jetbrains_annotations_version=24.0.1
slf4j_api_version=2.0.7
apache_maven_artifact_version=3.8.5
jarjar_version=0.4.1
fancy_mod_loader_version=4.0.29
fancy_mod_loader_version=4.0.31
mojang_logging_version=1.1.1
log4j_version=2.22.1
guava_version=31.1.2-jre
Expand Down
17 changes: 17 additions & 0 deletions patches/net/minecraft/world/effect/MobEffect.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@
public static final Codec<Holder<MobEffect>> CODEC = BuiltInRegistries.MOB_EFFECT.holderByNameCodec();
public static final StreamCodec<RegistryFriendlyByteBuf, Holder<MobEffect>> STREAM_CODEC = ByteBufCodecs.holderRegistry(Registries.MOB_EFFECT);
private static final int AMBIENT_ALPHA = Mth.floor(38.25F);
@@ -65,6 +_,16 @@
this.particleFactory = p_333515_ -> p_333716_;
}

+ /**
+ * Neo: Constructor that can take in the particle factory as a function of the {@link MobEffectInstance}.
+ * This should be used if the desired {@link ParticleOptions} depends on the presence of other registry entries.
+ */
+ protected MobEffect(MobEffectCategory category, int color, Function<MobEffectInstance, ParticleOptions> particleFactory) {
+ this.category = category;
+ this.color = color;
+ this.particleFactory = particleFactory;
+ }
+
public int getBlendDurationTicks() {
return this.blendDurationTicks;
}
@@ -133,6 +_,18 @@
return this;
}
Expand Down
14 changes: 14 additions & 0 deletions patches/net/minecraft/world/item/crafting/RecipeManager.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/net/minecraft/world/item/crafting/RecipeManager.java
@@ -260,6 +_,11 @@
: Optional.empty();
}

+ // Neo: expose recipe map
+ public RecipeMap recipeMap() {
+ return this.recipes;
+ }
+
public interface CachedCheck<I extends RecipeInput, T extends Recipe<I>> {
Optional<RecipeHolder<T>> getRecipeFor(I p_344938_, ServerLevel p_379487_);
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ default void blitInscribed(ResourceLocation texture, int x, int y, int boundsWid
if (centerX) x += (w - boundsWidth) / 2;
}

self().blit(RenderType::guiTextured, texture, x, y, boundsWidth, boundsHeight, 0, 0, rectWidth, rectHeight, rectWidth, rectHeight);
self().blit(RenderType::guiTextured, texture, x, y, 0, 0, boundsWidth, boundsHeight, rectWidth, rectHeight, rectWidth, rectHeight);
}

// TODO: 1.20.2: do we need to fix these or can we just remove them?
Expand Down

0 comments on commit abb90a5

Please sign in to comment.