2020-08-03 17:50:13 +00:00
|
|
|
package com.thebrokenrail.energonrelics.client.rei.infuser;
|
2020-07-30 19:49:18 +00:00
|
|
|
|
2020-08-03 17:00:08 +00:00
|
|
|
import com.thebrokenrail.energonrelics.block.entity.infuser.InfuserOutputItem;
|
2020-08-03 17:50:13 +00:00
|
|
|
import com.thebrokenrail.energonrelics.client.rei.EnergonRelicsPlugin;
|
2020-07-30 19:49:18 +00:00
|
|
|
import me.shedaniel.rei.api.EntryStack;
|
|
|
|
import me.shedaniel.rei.api.RecipeDisplay;
|
|
|
|
import net.fabricmc.api.EnvType;
|
|
|
|
import net.fabricmc.api.Environment;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.Identifier;
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Environment(EnvType.CLIENT)
|
|
|
|
public class InfuserDisplay implements RecipeDisplay {
|
|
|
|
private final EntryStack input;
|
2020-08-03 17:00:08 +00:00
|
|
|
private final EntryStack output;
|
|
|
|
public final boolean outputsItem;
|
2020-07-30 19:49:18 +00:00
|
|
|
public final double successChance;
|
|
|
|
public final long cost;
|
|
|
|
|
2020-08-03 17:00:08 +00:00
|
|
|
public InfuserDisplay(ItemStack input, InfuserOutputItem output, double successChance, long cost) {
|
2020-07-30 19:49:18 +00:00
|
|
|
this.input = EntryStack.create(input);
|
2020-08-03 17:00:08 +00:00
|
|
|
this.output = EntryStack.create(output.stack.copy());
|
|
|
|
outputsItem = output.outputsItem;
|
2020-07-30 19:49:18 +00:00
|
|
|
this.successChance = successChance;
|
|
|
|
this.cost = cost;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<List<EntryStack>> getInputEntries() {
|
|
|
|
return Collections.singletonList(Collections.singletonList(input));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<EntryStack> getOutputEntries() {
|
2020-08-03 17:00:08 +00:00
|
|
|
return Collections.singletonList(output);
|
2020-07-30 19:49:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Identifier getRecipeCategory() {
|
|
|
|
return EnergonRelicsPlugin.INFUSER;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<List<EntryStack>> getRequiredEntries() {
|
|
|
|
return getInputEntries();
|
|
|
|
}
|
|
|
|
}
|