Skip to content

Commit

Permalink
fix: weightedreciperesult polymorphism
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jul 23, 2024
1 parent 8cb0370 commit 45212a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ group=com.klikli_dev
mod_id=occultism
mod_name=Occultism
mod_license=MIT
mod_version=1.138.0
mod_version=1.139.1
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.util.random.WeightedEntry;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;

/**
* A recipe result for recipes that need a random weight (eg miner recipes)
Expand Down Expand Up @@ -53,10 +54,13 @@ public int weight() {
return this.weight.asInt();
}

public abstract RecipeResult copyWithWeight(int weight);
@Override
public abstract WeightedRecipeResult copyWithCount(int count);

public abstract WeightedRecipeResult copyWithWeight(int weight);

@Override
public Weight getWeight() {
public @NotNull Weight getWeight() {
return this.weight;
}
}

0 comments on commit 45212a0

Please sign in to comment.