2015-01-05 22:14:01 +01:00
|
|
|
package ellpeck.someprettytechystuff.util;
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-01-05 22:14:01 +01:00
|
|
|
import net.minecraft.item.Item;
|
2014-11-10 16:47:04 +01:00
|
|
|
import net.minecraft.util.StatCollector;
|
|
|
|
import org.lwjgl.input.Keyboard;
|
|
|
|
|
2014-12-20 21:34:07 +01:00
|
|
|
@SuppressWarnings("unused")
|
|
|
|
public class Util{
|
2014-11-10 16:47:04 +01:00
|
|
|
|
2015-01-05 22:14:01 +01:00
|
|
|
public static final String MOD_ID = "someprettytechystuff";
|
2015-01-05 22:50:20 +01:00
|
|
|
public static final String NAME = "SomePrettyTechyStuff";
|
|
|
|
public static final String VERSION = "1.7.10-0.0.1";
|
2014-11-10 16:47:04 +01:00
|
|
|
|
|
|
|
public static boolean isShiftPressed(){
|
|
|
|
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
|
|
|
}
|
|
|
|
|
2014-12-18 19:24:06 +01:00
|
|
|
public static String shiftForInfo() {
|
2014-12-20 21:34:07 +01:00
|
|
|
return (char)167+"2" + (char)167+"o" + StatCollector.translateToLocal("tooltip.shiftForInfo.desc");
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|
2015-01-05 22:14:01 +01:00
|
|
|
|
|
|
|
public static String addStandardInformation(Item item){
|
|
|
|
if(isShiftPressed()) return StatCollector.translateToLocal("tooltip." + item.getUnlocalizedName().substring(5) + ".desc");
|
|
|
|
else return shiftForInfo();
|
|
|
|
}
|
2014-11-10 16:47:04 +01:00
|
|
|
}
|