Skip to content

Commit

Permalink
fix: spawn egg usage in EMI ritual recipe category
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jun 27, 2024
1 parent 6c64cf5 commit 7fadfe3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ plugins {
id 'net.neoforged.gradle.userdev' version "${neogradle_version}"
}

tasks.named('wrapper', Wrapper).configure {
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
distributionType = Wrapper.DistributionType.ALL
}


if (System.getenv('MOD_VERSION') != null) {
mod_version = System.getenv('MOD_VERSION')
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ minecraft_version_range=[1.21,1.22)

## Neo
# The neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.0.31-beta
neo_version=21.0.40-beta
# The neo version range can use any version of neo as bounds or match the loader version range
neo_version_range=[21.0.31-beta,)
# The loader version range can only use the major version of Neo/FML as bounds
neo_loader_version_range=[3,)
neogradle_version=7.0.142
neogradle_version=7.0.150

# neo directly reads these properties
# the version the mappings were created for, does not need to match the current mc version
Expand All @@ -37,7 +37,7 @@ mod_authors=Kli Kli
mod_description=A magic mod inspired by the world of Jonathan Stroud's Bartimaeus. With the help of occult rituals players can summon entities from the "Other Side" to perform magic.

## Dependency Properties
jei_version=19.0.0.1
jei_version=19.0.0.11
jei_version_range=[19.0.0.1,)
curios_version=8.0.0-beta.4
curios_version_range=[8.0.0-beta.4,)
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.core.Vec3i;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.RecipeHolder;
Expand Down Expand Up @@ -64,7 +65,7 @@ public List<EmiStack> getOutputs() {
outputs.add(EmiStack.of(recipe.getResultItem(Minecraft.getInstance().level.registryAccess())));
if(recipe.getEntityToSummon()!=null) {
for(SpawnEggItem egg:SpawnEggItem.eggs()) {
if(egg.getType(null).equals(recipe.getEntityToSummon())) {
if(egg.getType(new ItemStack(egg)).equals(recipe.getEntityToSummon())) {
outputs.add(EmiStack.of(egg));
}
}
Expand Down

0 comments on commit 7fadfe3

Please sign in to comment.