Added foods, starting awesome Foody Project!
|
@ -9,6 +9,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import ellpeck.someprettytechystuff.blocks.InitBlocks;
|
||||
import ellpeck.someprettytechystuff.crafting.InitCrafting;
|
||||
import ellpeck.someprettytechystuff.event.UpdateEvent;
|
||||
import ellpeck.someprettytechystuff.gen.OreGen;
|
||||
import ellpeck.someprettytechystuff.inventory.GuiHandler;
|
||||
import ellpeck.someprettytechystuff.items.InitItems;
|
||||
|
@ -40,6 +41,7 @@ public class SPTS{
|
|||
GuiHandler.init();
|
||||
OreGen.init();
|
||||
TileEntityBase.init();
|
||||
UpdateEvent.init();
|
||||
proxy.init();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public abstract class BlockContainerBase extends BlockContainer{
|
|||
}
|
||||
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta){
|
||||
this.dropInventory(world, x, y, z);
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityInventoryBase) this.dropInventory(world, x, y, z);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
package ellpeck.someprettytechystuff.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockCrop extends BlockCrops{
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
private Item seedItem;
|
||||
private ItemStack cropItemStack;
|
||||
private int growthStages;
|
||||
|
||||
public BlockCrop(String blockName, int growthStages){
|
||||
super();
|
||||
this.growthStages = growthStages;
|
||||
this.textures = new IIcon[growthStages];
|
||||
this.setBlockName(blockName);
|
||||
}
|
||||
|
||||
public void setSeedItem(Item seedItem){
|
||||
this.seedItem = seedItem;
|
||||
}
|
||||
|
||||
public void setCropItem(ItemStack cropItemStack){
|
||||
this.cropItemStack = cropItemStack;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta){
|
||||
if(meta < 7){
|
||||
if(meta == 6) meta = 5;
|
||||
return this.textures[meta >> 1];
|
||||
}
|
||||
return textures[growthStages-1];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
for(int i = 0; i < this.textures.length-1; i++){
|
||||
this.textures[i] = iconReg.registerIcon(Util.MOD_ID + ":" + "blockCropStage" + i);
|
||||
}
|
||||
this.textures[this.textures.length-1] = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5) + "Stage" + (this.textures.length-1));
|
||||
}
|
||||
|
||||
public Item func_149866_i(){
|
||||
return seedItem;
|
||||
}
|
||||
|
||||
public Item func_149865_P(){
|
||||
return cropItemStack.getItem();
|
||||
}
|
||||
|
||||
public int damageDropped(int par1){
|
||||
return cropItemStack.getItemDamage();
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ public class DefaultItemBlock extends ItemBlock{
|
|||
|
||||
public DefaultItemBlock(Block block){
|
||||
super(block);
|
||||
setHasSubtypes(false);
|
||||
this.setHasSubtypes(false);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
|
|
|
@ -7,4 +7,5 @@ public class ModelBaseSPTS extends ModelBase{
|
|||
public void render(float f){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package ellpeck.someprettytechystuff.blocks.renderer;
|
||||
|
||||
import ellpeck.someprettytechystuff.blocks.models.ModelBaseSPTS;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class BlockBaseRenderer extends TileEntitySpecialRenderer{
|
||||
|
||||
private final ResourceLocation resLoc;
|
||||
private ModelBaseSPTS model;
|
||||
|
||||
public BlockBaseRenderer(ModelBaseSPTS model, ResourceLocation resLoc){
|
||||
this.resLoc = resLoc;
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x+0.5F, (float)y+1.5F, (float)z+0.5F);
|
||||
|
||||
if(tile.getBlockMetadata() == 2 || tile.getBlockMetadata() == 3) GL11.glRotatef(180, 1F, 0F, 1F);
|
||||
else if(tile.getBlockMetadata() == 4 || tile.getBlockMetadata() == 5) GL11.glRotatef(180, 1F, 0F, 0F);
|
||||
else GL11.glRotatef(180, 0F, 0F, 0F);
|
||||
|
||||
this.bindTexture(resLoc);
|
||||
GL11.glPushMatrix();
|
||||
this.model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package ellpeck.someprettytechystuff.blocks.renderer;
|
||||
|
||||
import ellpeck.someprettytechystuff.blocks.models.ModelBaseSPTS;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ItemBaseRenderer implements IItemRenderer{
|
||||
|
||||
private final ModelBaseSPTS model;
|
||||
private final ResourceLocation resLoc;
|
||||
|
||||
public ItemBaseRenderer(ModelBaseSPTS model, ResourceLocation resLoc){
|
||||
this.model = model;
|
||||
this.resLoc = resLoc;
|
||||
}
|
||||
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type){
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data){
|
||||
switch(type){
|
||||
case INVENTORY:{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.4F, -1.27F, 0.5F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resLoc);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
}
|
||||
case EQUIPPED:{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(180F, -2.3F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.1F, -0.8F, 0.68F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resLoc);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
}
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180, 1F, -0F, 0.5F);
|
||||
GL11.glTranslatef(0.3F, -1.7F, -0.3F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resLoc);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
}
|
||||
|
||||
default:{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.5F, 0.0F);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, -1.27F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resLoc);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package ellpeck.someprettytechystuff.blocks.renderer;
|
||||
|
||||
public class RenderRegistry{
|
||||
|
||||
public static void init(){
|
||||
//ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPowerRelay.class, new PowerRelayRenderer(new ModelPowerRelay(), powerRelayResLoc));
|
||||
//MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockPowerRelay), new ItemBaseRenderer(new ModelPowerRelay(), powerRelayResLoc));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package ellpeck.someprettytechystuff.creative;
|
||||
|
||||
import ellpeck.someprettytechystuff.items.InitItems;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class CreativeTab extends CreativeTabs{
|
||||
|
@ -14,6 +14,6 @@ public class CreativeTab extends CreativeTabs{
|
|||
}
|
||||
|
||||
public Item getTabIconItem() {
|
||||
return InitItems.itemInfoBook;
|
||||
return Items.command_block_minecart;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package ellpeck.someprettytechystuff.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
|
||||
public class UpdateEvent{
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingUpdateEvent(LivingUpdateEvent event){
|
||||
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
MinecraftForge.EVENT_BUS.register(new UpdateEvent());
|
||||
}
|
||||
}
|
|
@ -1,8 +1,23 @@
|
|||
package ellpeck.someprettytechystuff.items;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class InitItems{
|
||||
|
||||
public static Item itemFertilizer;
|
||||
public static Item itemMisc;
|
||||
public static Item itemCombinedFood;
|
||||
|
||||
public static void init(){
|
||||
|
||||
itemFertilizer = new ItemFertilizer();
|
||||
GameRegistry.registerItem(itemFertilizer, itemFertilizer.getUnlocalizedName().substring(5));
|
||||
|
||||
itemMisc = new ItemMisc();
|
||||
GameRegistry.registerItem(itemMisc, itemMisc.getUnlocalizedName().substring(5));
|
||||
|
||||
itemCombinedFood = new ItemFoods();
|
||||
GameRegistry.registerItem(itemCombinedFood, itemCombinedFood.getUnlocalizedName().substring(5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,26 +2,30 @@ package ellpeck.someprettytechystuff.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.blocks.BlockCrop;
|
||||
import ellpeck.someprettytechystuff.creative.CreativeTab;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemSeeds;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSeed extends ItemSeeds{
|
||||
public class ItemFertilizer extends Item{
|
||||
|
||||
public ItemSeed(Block blockCrop, ItemStack cropItemStack, String unlocalizedName){
|
||||
super(blockCrop, Blocks.farmland);
|
||||
((BlockCrop)blockCrop).setSeedItem(this);
|
||||
((BlockCrop)blockCrop).setCropItem(cropItemStack);
|
||||
public ItemFertilizer(){
|
||||
this.setUnlocalizedName("itemFertilizer");
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
this.setUnlocalizedName(unlocalizedName);
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10) {
|
||||
if(ItemDye.applyBonemeal(stack, world, x, y, z, player)){
|
||||
if(!world.isRemote) world.playAuxSFX(2005, x, y, z, 0);
|
||||
return true;
|
||||
}
|
||||
return super.onItemUse(stack, player, world, x, y, z, par7, par8, par9, par10);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -34,5 +38,4 @@ public class ItemSeed extends ItemSeeds{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
}
|
120
src/main/java/ellpeck/someprettytechystuff/items/ItemFoods.java
Normal file
|
@ -0,0 +1,120 @@
|
|||
package ellpeck.someprettytechystuff.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.creative.CreativeTab;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFoods extends ItemFood{
|
||||
|
||||
public enum TheFoods{
|
||||
|
||||
/*Name of every single one:
|
||||
* "itemFoodNAMEHERE
|
||||
* Every food in a 16x16 .png file with that name
|
||||
* v this is said name*/
|
||||
PUMPKIN_STEW("PumpkinStew", 10, 0.4F, true, 30),
|
||||
CARROT_JUICE("CarrotJuice", 6, 0.2F, true, 20),
|
||||
FISH_N_CHIPS("FishNChips", 20, 1F, false, 40),
|
||||
FRENCH_FRIES("FrenchFries", 16, 0.7F, false, 32),
|
||||
FRENCH_FRY("FrenchFry", 1, 0.01F, false, 3),
|
||||
SPAGHETTI("Spaghetti", 18, 0.8F, false, 38),
|
||||
NOODLE("Noodle", 1, 0.01F, false, 3),
|
||||
CHOCOLATE_CAKE("ChocolateCake", 16, 0.45F, false, 45),
|
||||
CHOCOLATE("Chocolate", 5, 0.05F, false, 15),
|
||||
TOAST("Toast", 7, 0.4F, false, 25),
|
||||
SUBMARINE_SANDWICH("SubmarineSandwich", 10, 0.7F, false, 40),
|
||||
BIG_COOKIE("BigCookie", 6, 0.1F, false, 20),
|
||||
HAMBURGER("Hamburger", 14, 0.9F, false, 40),
|
||||
PIZZA("Pizza", 20, 1F, false, 45),
|
||||
BAGUETTE("Baguette", 7, 0.2F, false, 25);
|
||||
|
||||
public final String name;
|
||||
public final int healAmount;
|
||||
public final float saturation;
|
||||
public final boolean getsDrunken;
|
||||
public final int useDuration;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon theIcon;
|
||||
|
||||
private TheFoods(String name, int healAmount, float saturation, boolean getsDrunken, int useDuration){
|
||||
this.name = name;
|
||||
this.getsDrunken = getsDrunken;
|
||||
this.healAmount = healAmount;
|
||||
this.saturation = saturation;
|
||||
this.useDuration = useDuration;
|
||||
}
|
||||
}
|
||||
|
||||
private final TheFoods[] allFoods = TheFoods.values();
|
||||
|
||||
public ItemFoods(){
|
||||
super(0, 0.0F, false);
|
||||
this.setUnlocalizedName("itemFood");
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
this.setAlwaysEdible();
|
||||
}
|
||||
|
||||
public int func_150905_g(ItemStack stack){
|
||||
return allFoods[stack.getItemDamage()].healAmount;
|
||||
}
|
||||
|
||||
public float func_150906_h(ItemStack stack){
|
||||
return allFoods[stack.getItemDamage()].saturation;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
for(TheFoods theFood : allFoods){
|
||||
theFood.theIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5) + theFood.name);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1){
|
||||
return allFoods[par1].theIcon;
|
||||
}
|
||||
|
||||
public EnumAction getItemUseAction(ItemStack stack){
|
||||
return allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.drink : EnumAction.eat;
|
||||
}
|
||||
|
||||
public int getMaxItemUseDuration(ItemStack stack){
|
||||
return allFoods[stack.getItemDamage()].useDuration;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
for (int j = 0; j < allFoods.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + allFoods[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
if(Util.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip.hunger.desc") + ": " + allFoods[stack.getItemDamage()].healAmount);
|
||||
list.add(StatCollector.translateToLocal("tooltip.saturation.desc") + ": " + allFoods[stack.getItemDamage()].saturation);
|
||||
}
|
||||
else list.add(Util.shiftForInfo());
|
||||
}
|
||||
}
|
|
@ -14,50 +14,45 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPile extends Item{
|
||||
public class ItemMisc extends Item{
|
||||
|
||||
public final String[] pileTypes = new String[]{"Iron", "Gold", "Redstone", "Diamond"};
|
||||
public final IIcon[] textures = new IIcon[pileTypes.length];
|
||||
private final String[] items = new String[]{"MashedFood", "RefinedIron", "RefinedRedstone", "CompressedIron", "Steel"};
|
||||
|
||||
public ItemPile(){
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons = new IIcon[items.length];
|
||||
|
||||
public ItemMisc(){
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName("itemMisc");
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
this.setUnlocalizedName("itemPile");
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + items[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
for(int i = 0; i < items.length; i++){
|
||||
icons[i] = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5) + this.items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public IIcon getIconFromDamage(int i){
|
||||
return icons[i];
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for (int i = 0; i < items.length; i++){
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
if(Util.isShiftPressed()){
|
||||
for(int i = 0; i < this.pileTypes.length; i++){
|
||||
if(this.getDamage(stack) == i) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName().substring(5) + this.pileTypes[i] + ".desc"));
|
||||
}
|
||||
}
|
||||
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
|
||||
else list.add(Util.shiftForInfo());
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName() + this.pileTypes[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list){
|
||||
for (int i = 0; i < this.pileTypes.length; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1){
|
||||
return textures[par1];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
for (int i = 0; i < this.pileTypes.length; i++) {
|
||||
textures[i] = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5) + this.pileTypes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package ellpeck.someprettytechystuff.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.creative.CreativeTab;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemHoeG extends ItemHoe{
|
||||
|
||||
public ItemHoeG(ToolMaterial toolMat, String unlocalizedName){
|
||||
super(toolMat);
|
||||
this.setUnlocalizedName(unlocalizedName);
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName().substring(5) + ".desc"));
|
||||
else list.add(Util.shiftForInfo());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5));
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package ellpeck.someprettytechystuff.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.creative.CreativeTab;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPickaxeG extends ItemPickaxe{
|
||||
|
||||
public ItemPickaxeG(ToolMaterial toolMat, String unlocalizedName){
|
||||
super(toolMat);
|
||||
this.setUnlocalizedName(unlocalizedName);
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName().substring(5) + ".desc"));
|
||||
else list.add(Util.shiftForInfo());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5));
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package ellpeck.someprettytechystuff.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.someprettytechystuff.creative.CreativeTab;
|
||||
import ellpeck.someprettytechystuff.util.Util;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSwordG extends ItemSword{
|
||||
|
||||
public ItemSwordG(ToolMaterial toolMat, String unlocalizedName){
|
||||
super(toolMat);
|
||||
this.setUnlocalizedName(unlocalizedName);
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName().substring(5) + ".desc"));
|
||||
else list.add(Util.shiftForInfo());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5));
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
package ellpeck.someprettytechystuff.proxy;
|
||||
|
||||
|
||||
import ellpeck.someprettytechystuff.blocks.renderer.RenderRegistry;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ClientProxy implements IProxy{
|
||||
|
||||
|
@ -8,7 +11,7 @@ public class ClientProxy implements IProxy{
|
|||
}
|
||||
|
||||
public void init(){
|
||||
|
||||
RenderRegistry.init();
|
||||
}
|
||||
|
||||
public void postInit(){
|
||||
|
|
|
@ -15,6 +15,11 @@ public class Util{
|
|||
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
||||
}
|
||||
|
||||
public static boolean isControlPressed(){
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
|
||||
}
|
||||
|
||||
|
||||
public static String shiftForInfo() {
|
||||
return (char)167+"2" + (char)167+"o" + StatCollector.translateToLocal("tooltip.shiftForInfo.desc");
|
||||
}
|
||||
|
|
|
@ -1,122 +1,43 @@
|
|||
itemGroup.gemification=Gemification
|
||||
itemGroup.someprettytechystuff=SomePrettyTechyStuff
|
||||
|
||||
tile.oreGemOnyx.name=Onyx Ore
|
||||
tile.oreGemAlmandineGarnet.name=Almandine Garnet Ore
|
||||
tile.oreGemChromeDiopside.name=Chrome Diopside Ore
|
||||
tile.oreGemJasper.name=Jasper Ore
|
||||
tile.oreGemSodalite.name=Sodalite Ore
|
||||
tile.oreGemIolite.name=Iolite Ore
|
||||
tile.oreGemSmithsonite.name=Smithsonite Ore
|
||||
tile.oreGemDanburite.name=Danburite Ore
|
||||
tile.oreGemHematite.name=Hematite Ore
|
||||
tile.oreGemLepidolite.name=Lepidolite Ore
|
||||
tile.oreGemTourmaline.name=Tourmaline Ore
|
||||
tile.oreGemSphene.name=Sphene Ore
|
||||
tile.oreGemParaibaTourlamine.name=Paraiba Tourlamine Ore
|
||||
tile.oreGemRhodochrosite.name=Rhodochrosite Ore
|
||||
tile.oreGemClinohumite.name=Clinohumite Ore
|
||||
tile.oreGemGoshenite.name=Goshenite Ore
|
||||
item.itemMiscMashedFood.name=Mashed Food
|
||||
item.itemMiscMatterAccellerator.name=Matter Accellerator
|
||||
item.itemMiscRefinedIron.name=Refined Iron
|
||||
item.itemMiscRefinedRedstone.name=Refined Redstone
|
||||
item.itemMiscCompressedIron.name=Compressed Iron
|
||||
item.itemMiscSteel.name=Steel
|
||||
item.itemFertilizer.name=Fertilizer
|
||||
|
||||
tile.blockCrucible.name=The Crucible
|
||||
tile.blockCrucibleFire.name=Crucible Fire
|
||||
tile.blockCropIron.name=Fea
|
||||
tile.blockCropGold.name=Ahu
|
||||
tile.blockCropDiamond.name=Cee
|
||||
tile.blockCropRedstone.name=Rad
|
||||
tile.blockOreCopper.name=Copper Ore
|
||||
tile.blockOreTin.name=Tin Ore
|
||||
tile.blockOreLead.name=Lead Ore
|
||||
tile.blockOreSilver.name=Silver Ore
|
||||
tile.blockOreTungsten.name=Tungsten Ore
|
||||
tile.blockOreQuartz.name=Quartz Ore
|
||||
tile.blockOrePlatinum.name=Platinum Ore
|
||||
tile.blockOreAluminum.name=Aluminum Ore
|
||||
tile.blockOreZinc.name=Zinc Ore
|
||||
tile.blockOreCobalt.name=Cobalt Ore
|
||||
|
||||
item.itemGemOnyx.name=Onyx
|
||||
item.itemGemAlmandineGarnet.name=Almandine Garnet
|
||||
item.itemGemChromeDiopside.name=Chrome Diopside
|
||||
item.itemGemJasper.name=Jasper
|
||||
item.itemGemSodalite.name=Sodalite
|
||||
item.itemGemIolite.name=Iolite
|
||||
item.itemGemSmithsonite.name=Smithsonite
|
||||
item.itemGemDanburite.name=Danburite
|
||||
item.itemGemHematite.name=Hematite
|
||||
item.itemGemLepidolite.name=Lepidolite
|
||||
item.itemGemTourmaline.name=Tourmaline
|
||||
item.itemGemSphene.name=Sphene
|
||||
item.itemGemParaibaTourlamine.name=Paraiba Tourlamine
|
||||
item.itemGemRhodochrosite.name=Rhodochrosite
|
||||
item.itemGemClinohumite.name=Clinohumite
|
||||
item.itemGemGoshenite.name=Goshenite
|
||||
tooltip.shiftForInfo.desc=Press Shift for Info
|
||||
tooltip.hunger.desc=Fills
|
||||
tooltip.saturation.desc=Saturation
|
||||
|
||||
item.itemInfoBook.name=Gemificationic Lexicon
|
||||
item.itemSeedIron.name=Fea Seeds
|
||||
item.itemSeedGold.name=Ahu Seeds
|
||||
item.itemSeedDiamond.name=Cee Seeds
|
||||
item.itemSeedRedstone.name=Rad Seeds
|
||||
tooltip.blockOreCopper.desc=Used for ...something.
|
||||
tooltip.blockOreTin.desc=Used for ...something.
|
||||
tooltip.blockOreLead.desc=Used for ...something.
|
||||
tooltip.blockOreSilver.desc=Used for ...something.
|
||||
tooltip.blockOreTungsten.desc=Used for ...something.
|
||||
tooltip.blockOreQuartz.desc=Used for ...something.
|
||||
tooltip.blockOrePlatinum.desc=Used for ...something.
|
||||
tooltip.blockOreAluminum.desc=Used for ...something.
|
||||
tooltip.blockOreZinc.desc=Used for ...something.
|
||||
tooltip.blockOreCobalt.desc=Used for ...something.
|
||||
|
||||
item.itemPileIron.name=Pile of Iron
|
||||
item.itemPileGold.name=Pile of Gold
|
||||
item.itemPileDiamond.name=Pile of Diamond
|
||||
item.itemPileRedstone.name=Pile of Redstone
|
||||
|
||||
item.itemInfusedIronPickaxe.name=Infused Iron Pick
|
||||
item.itemInfusedIronAxe.name=Infused Iron Axe
|
||||
item.itemInfusedIronShovel.name=Infused Iron Shovel
|
||||
item.itemInfusedIronSword.name=Infused Iron Sword
|
||||
item.itemInfusedIronHoe.name=Infused Iron Hoe
|
||||
item.itemInfusedIronIngot.name=Infused Iron Ingot
|
||||
|
||||
tooltip.shiftForInfo.desc=<Hold Shift>
|
||||
|
||||
tooltip.blockCrucible.desc=Better than Cauldrons, better than everything!
|
||||
tooltip.blockCrucibleFire.desc=Powers Crucibles, just put 'em on top!
|
||||
tooltip.gemIsOre.desc=Ore Form, needs to get broken down to use.
|
||||
|
||||
tooltip.itemInfoBook.desc=Still UNIMPLEMENTED, go look at it though! It's FANCY I tell ya!
|
||||
tooltip.itemSeedIron.desc=Grows Iron. ...no, seriously. STOP LAUGHING.
|
||||
tooltip.itemSeedGold.desc=Grows Gold. ...no, seriously. STOP LAUGHING.
|
||||
tooltip.itemSeedRedstone.desc=Grows Redstone. ...no, seriously. STOP LAUGHING.
|
||||
tooltip.itemSeedDiamond.desc=Grows Diamond. ...no, seriously. STOP LAUGHING.
|
||||
tooltip.itemPileIron.desc=Craft in a 2x2 to get an Iron Ingot!
|
||||
tooltip.itemPileGold.desc=Craft in a 2x2 to get a Gold Ingot!
|
||||
tooltip.itemPileDiamond.desc=Craft in a 2x2 to get a Diamond!
|
||||
tooltip.itemPileRedstone.desc=Craft in a 2x2 to get a piece of Redstone!
|
||||
|
||||
tooltip.itemInfusedIronPickaxe.desc=Want some InstaMine? Efficiency V!
|
||||
tooltip.itemInfusedIronAxe.desc=Chops trees! Fast!
|
||||
tooltip.itemInfusedIronShovel.desc=InstaMine? Heck yes!
|
||||
tooltip.itemInfusedIronSword.desc=Kill all 'dem Mobs!
|
||||
tooltip.itemInfusedIronHoe.desc=...well. It's a Hoe.
|
||||
tooltip.itemInfusedIronIngot.desc=Feel the Strength! The Power! The... colory mess!
|
||||
|
||||
tooltip.gemOnyx.desc=Black form of chalcedony, a form of quartz
|
||||
tooltip.gemAlmandineGarnet.desc=Popular for its excellent hardness and brilliance
|
||||
tooltip.gemChromeDiopside.desc=Colored by chromium, has similarities to chrome tourmaline
|
||||
tooltip.gemJasper.desc=In a gem group by itself because of its grainy structure
|
||||
tooltip.gemSodalite.desc=Gets its name from its sodium content, contains white veins of calcite
|
||||
tooltip.gemIolite.desc=Is seen as three different color shades
|
||||
tooltip.gemSmithsonite.desc=Discovered by the British mineralogist James Smithson
|
||||
tooltip.gemDanburite.desc=First discovered in 1839, quite hard
|
||||
tooltip.gemHematite.desc=When highly polished it can sometimes look like silver, remarkably dense
|
||||
tooltip.gemLepidolite.desc=One of the major sources of the rare alkali metals rubidium and caesium
|
||||
tooltip.gemTourmaline.desc=One of the most versatile of gems, found in every color
|
||||
tooltip.gemSphene.desc=Of high luster, unique color shades and an intense fire
|
||||
tooltip.gemParaibaTourlamine.desc=First found in Brazil in 1989, similar material has since been found in Africa.
|
||||
tooltip.gemRhodochrosite.desc=Usually found in an aggregate form with alternating light
|
||||
tooltip.gemClinohumite.desc=Rare gemstone, only three sources of gem-quality material are known
|
||||
tooltip.gemGoshenite.desc=Named after the small town of Goshen in Western Massachusetts
|
||||
|
||||
tooltip.fluidNone.name=Empty
|
||||
tooltip.fluidWater.name=Water
|
||||
tooltip.fluidOnyx.name=Aqueous Onyx
|
||||
tooltip.fluidAlmandineGarnet.name=Aqueous Almandine Garnet
|
||||
tooltip.fluidChromeDiopside.name=Aqueous Chrome Diopside
|
||||
tooltip.fluidJasper.name=Aqueous Jasper
|
||||
tooltip.fluidSodalite.name=Aqueous Sodalite
|
||||
tooltip.fluidIolite.name=Aqueous Iolite
|
||||
tooltip.fluidSmithsonite.name=Aqueous Smithsonite
|
||||
tooltip.fluidDanburite.name=Aqueous Danburite
|
||||
tooltip.fluidHematite.name=Aqueous Hematite
|
||||
tooltip.fluidLepidolite.name=Aqueous Lepidolite
|
||||
tooltip.fluidTourmaline.name=Aqueous Tourmaline
|
||||
tooltip.fluidSphene.name=Aqueous Sphene
|
||||
tooltip.fluidParaibaTourlamine.name=Aqueous ParaibaTourmaline
|
||||
tooltip.fluidRhodochrosite.name=Aqueous Rhodochrosite
|
||||
tooltip.fluidClinohumite.name=Aqueous Clinohumite
|
||||
tooltip.fluidGoshenite.name=Aqueous Goshenite
|
||||
|
||||
infoBook.crucibleChapter.title=Crucible
|
||||
infoBook.crucibleChapter.page0.text=The Crucible is a block that is crafted using iron and a cauldron. It is used for nearly all of the Gem involving recipes. It needs a Crucible Fire below and a liquid Gem inside to be able to craft something. The liquid Gem is obtained by putting a water bucket and a Gem into the two slots at the top right. When crafting is done, the item is going to end up at the bottom right.
|
||||
tooltip.itemMiscMashedFood.desc=Used to make Fertilizer
|
||||
tooltip.itemMiscMatterAccellerator.desc=Accellerates Matter. What did you expect?
|
||||
tooltip.itemMiscRefinedIron.desc=Iron, but better
|
||||
tooltip.itemMiscRefinedRedstone.desc=Redstone, but better
|
||||
tooltip.itemMiscCompressedIron.desc=Iron, but compressed
|
||||
tooltip.itemMiscSteel.desc=Like Iron, but stronger. Much stronger.
|
||||
tooltip.itemFertilizer.desc=Om nom nom. Don't eat it.
|
Before Width: | Height: | Size: 940 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 362 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 399 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 270 B |
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 275 B |
After Width: | Height: | Size: 282 B |