Skip to content

Commit

Permalink
removed getChancesWithStacks method
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jan 22, 2025
1 parent 2fe2495 commit 5158ef4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions common/src/main/java/muramasa/antimatter/recipe/IRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ default long getTotalPower(){

Set<RecipeTag> getTags();

Map<ItemStack, Integer> getChancesWithStacks();

String getMapId();

default JsonObject toJson() {
Expand Down
23 changes: 0 additions & 23 deletions common/src/main/java/muramasa/antimatter/recipe/Recipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class Recipe implements IRecipe {
private boolean hidden, fake;
@Getter
private Set<RecipeTag> tags = new ObjectOpenHashSet<>();
private Map<ItemStack, Integer> itemsWithChances = null;
public ResourceLocation id;
public String mapId;
//Used for recipe validators, e.g. cleanroom.
Expand Down Expand Up @@ -237,28 +236,6 @@ public boolean isFake() {
return fake;
}

//todo fix tis
public Map<ItemStack, Integer> getChancesWithStacks(){
if (itemsWithChances == null) {
if (itemsOutput != null){
ImmutableMap.Builder<ItemStack, Integer> map = ImmutableMap.builder();
if (hasOutputChances()){
for (int i = 0; i < itemsOutput.length; i++) {
map.put(itemsOutput[i], outputChances[i]);
}
} else {
for (ItemStack itemStack : itemsOutput) {
map.put(itemStack, 10000);
}
}
itemsWithChances = map.build();
} else {
itemsWithChances = ImmutableMap.of();
}
}
return itemsWithChances;
}

@Override
public String toString() {
StringBuilder builder = new StringBuilder();
Expand Down

0 comments on commit 5158ef4

Please sign in to comment.