Finally getting a var in to hold the cost of transmuting
This commit is contained in:
parent
61139106bf
commit
270054c964
|
@ -3,6 +3,7 @@ package ee3.core;
|
||||||
import ee3.core.interfaces.IProxy;
|
import ee3.core.interfaces.IProxy;
|
||||||
import ee3.item.ItemPhilosopherStone;
|
import ee3.item.ItemPhilosopherStone;
|
||||||
import ee3.item.ModItems;
|
import ee3.item.ModItems;
|
||||||
|
import ee3.lib.Reference;
|
||||||
import net.minecraft.src.EntityPlayer;
|
import net.minecraft.src.EntityPlayer;
|
||||||
import net.minecraft.src.IInventory;
|
import net.minecraft.src.IInventory;
|
||||||
import net.minecraft.src.ItemStack;
|
import net.minecraft.src.ItemStack;
|
||||||
|
@ -16,7 +17,7 @@ public class CraftingHandler implements ICraftingHandler {
|
||||||
if (mod_EE3.proxy.isPortableCraftingGUIOpen()) {
|
if (mod_EE3.proxy.isPortableCraftingGUIOpen()) {
|
||||||
ItemStack currentInventoryItem = player.inventory.getCurrentItem();
|
ItemStack currentInventoryItem = player.inventory.getCurrentItem();
|
||||||
if (currentInventoryItem != null) {
|
if (currentInventoryItem != null) {
|
||||||
currentInventoryItem.damageItem(1, player);
|
currentInventoryItem.damageItem(Reference.MINIUM_STONE_TRANSMUTE_COST, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ public class CraftingHandler implements ICraftingHandler {
|
||||||
currentItemStack = craftMatrix.getStackInSlot(i);
|
currentItemStack = craftMatrix.getStackInSlot(i);
|
||||||
if (currentItemStack != null) {
|
if (currentItemStack != null) {
|
||||||
if (currentItemStack.itemID == ModItems.miniumStone.shiftedIndex) {
|
if (currentItemStack.itemID == ModItems.miniumStone.shiftedIndex) {
|
||||||
currentItemStack.damageItem(1, player);
|
currentItemStack.damageItem(Reference.MINIUM_STONE_TRANSMUTE_COST, player);
|
||||||
currentItemStack.stackSize++;
|
currentItemStack.stackSize++;
|
||||||
}
|
}
|
||||||
else if (currentItemStack.itemID == ModItems.philStone.shiftedIndex) {
|
else if (currentItemStack.itemID == ModItems.philStone.shiftedIndex) {
|
||||||
|
|
|
@ -11,12 +11,13 @@ import ee3.core.helper.Helper;
|
||||||
import ee3.core.helper.TransmutationHelper;
|
import ee3.core.helper.TransmutationHelper;
|
||||||
import ee3.core.interfaces.ITransmuteStone;
|
import ee3.core.interfaces.ITransmuteStone;
|
||||||
import ee3.lib.CustomItemRarity;
|
import ee3.lib.CustomItemRarity;
|
||||||
|
import ee3.lib.Reference;
|
||||||
|
|
||||||
public class ItemMiniumStone extends ItemEE implements ITransmuteStone {
|
public class ItemMiniumStone extends ItemEE implements ITransmuteStone {
|
||||||
|
|
||||||
public ItemMiniumStone(int i) {
|
public ItemMiniumStone(int i) {
|
||||||
super(i);
|
super(i);
|
||||||
this.setMaxDamage(50);
|
this.setMaxDamage(Reference.MINIUM_STONE_DURABILITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,4 +22,6 @@ public class Reference {
|
||||||
public static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
public static final String SOUND_RESOURCE_LOCATION = "ee3/sound/";
|
||||||
public static final String SOUND_PREFIX = "ee3.sound.";
|
public static final String SOUND_PREFIX = "ee3.sound.";
|
||||||
|
|
||||||
|
public static final int MINIUM_STONE_DURABILITY = 1531;
|
||||||
|
public static final int MINIUM_STONE_TRANSMUTE_COST = 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue