Now using the template TotemItem class.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package dev.micle.totemofreviving.item.crafting;
|
||||
|
||||
import dev.micle.totemofreviving.config.Config;
|
||||
import dev.micle.totemofreviving.item.StrawTotemItem;
|
||||
import dev.micle.totemofreviving.item.TotemItem;
|
||||
import dev.micle.totemofreviving.setup.ModRecipes;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -21,16 +20,14 @@ public class TotemRecipe extends ExtendedShapedRecipe {
|
||||
|
||||
@Override
|
||||
public boolean matches(CraftingInventory inventory, World world) {
|
||||
if (!Config.Server.getStrawTotemConfig().getIsEnabled()) {
|
||||
if (getResultItem().getItem() instanceof StrawTotemItem) {
|
||||
return false;
|
||||
}
|
||||
if (!TotemItem.isEnabled(getResultItem())) {
|
||||
return false;
|
||||
}
|
||||
return getBaseRecipe().matches(inventory, world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack assemble(CraftingInventory inventory) {
|
||||
return getResultItem();
|
||||
return getBaseRecipe().getResultItem();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user