Fixed crafting bug. Added Logger output.
This commit is contained in:
@@ -2,6 +2,7 @@ package de.skate702.craftingkeys.util;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,22 @@ public class Util {
|
||||
private Util() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current held item stack.
|
||||
* @return A item stack
|
||||
*/
|
||||
public static ItemStack getHeldStack() {
|
||||
return client.thePlayer.inventory.getItemStack();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the current player is helding a item stack.
|
||||
* @return True, if held stack != null
|
||||
*/
|
||||
public static boolean isHeldingStack() {
|
||||
return (getHeldStack() != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns, if this is the first method call in a fresh opened world.
|
||||
*
|
||||
@@ -48,13 +65,4 @@ public class Util {
|
||||
client.thePlayer.addChatMessage(new ChatComponentTranslation(lang_key));
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a warning, that this mod is still in alpha-state.
|
||||
*/
|
||||
public static void printWarning() {
|
||||
printMessage("de.skate702.craftingkeys.warn.line1");
|
||||
printMessage("de.skate702.craftingkeys.warn.line2");
|
||||
printMessage("de.skate702.craftingkeys.warn.line3");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user