Added foods, starting awesome Foody Project!

This commit is contained in:
Ellpeck 2015-01-29 20:23:19 +01:00
parent 4bb53b5510
commit 043ef272d7
71 changed files with 373 additions and 339 deletions

View file

@ -9,6 +9,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import ellpeck.someprettytechystuff.blocks.InitBlocks; import ellpeck.someprettytechystuff.blocks.InitBlocks;
import ellpeck.someprettytechystuff.crafting.InitCrafting; import ellpeck.someprettytechystuff.crafting.InitCrafting;
import ellpeck.someprettytechystuff.event.UpdateEvent;
import ellpeck.someprettytechystuff.gen.OreGen; import ellpeck.someprettytechystuff.gen.OreGen;
import ellpeck.someprettytechystuff.inventory.GuiHandler; import ellpeck.someprettytechystuff.inventory.GuiHandler;
import ellpeck.someprettytechystuff.items.InitItems; import ellpeck.someprettytechystuff.items.InitItems;
@ -40,6 +41,7 @@ public class SPTS{
GuiHandler.init(); GuiHandler.init();
OreGen.init(); OreGen.init();
TileEntityBase.init(); TileEntityBase.init();
UpdateEvent.init();
proxy.init(); proxy.init();
} }

View file

@ -19,7 +19,7 @@ public abstract class BlockContainerBase extends BlockContainer{
public TileEntityInventoryBase dropInventory(World world, int x, int y, int z) { public TileEntityInventoryBase dropInventory(World world, int x, int y, int z) {
TileEntityInventoryBase tileEntity = (TileEntityInventoryBase) world.getTileEntity(x, y, z); TileEntityInventoryBase tileEntity = (TileEntityInventoryBase) world.getTileEntity(x, y, z);
for (int i = 0; i < tileEntity.getSizeInventory(); i++) { for (int i = 0; i < tileEntity.getSizeInventory(); i++){
ItemStack itemStack = tileEntity.getStackInSlot(i); ItemStack itemStack = tileEntity.getStackInSlot(i);
if (itemStack != null && itemStack.stackSize > 0) { if (itemStack != null && itemStack.stackSize > 0) {
Random rand = new Random(); Random rand = new Random();
@ -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){ 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); super.breakBlock(world, x, y, z, block, meta);
} }
} }

View file

@ -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();
}
}

View file

@ -14,10 +14,10 @@ public class DefaultItemBlock extends ItemBlock{
public DefaultItemBlock(Block block){ public DefaultItemBlock(Block block){
super(block); super(block);
setHasSubtypes(false); this.setHasSubtypes(false);
} }
public String getUnlocalizedName(ItemStack stack) { public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName(); return this.getUnlocalizedName();
} }

View file

@ -7,4 +7,5 @@ public class ModelBaseSPTS extends ModelBase{
public void render(float f){ public void render(float f){
} }
} }

View file

@ -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();
}
}

View file

@ -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;
}
}
}
}

View file

@ -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));
}
}

View file

@ -1,8 +1,8 @@
package ellpeck.someprettytechystuff.creative; package ellpeck.someprettytechystuff.creative;
import ellpeck.someprettytechystuff.items.InitItems;
import ellpeck.someprettytechystuff.util.Util; import ellpeck.someprettytechystuff.util.Util;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
public class CreativeTab extends CreativeTabs{ public class CreativeTab extends CreativeTabs{
@ -14,6 +14,6 @@ public class CreativeTab extends CreativeTabs{
} }
public Item getTabIconItem() { public Item getTabIconItem() {
return InitItems.itemInfoBook; return Items.command_block_minecart;
} }
} }

View file

@ -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());
}
}

View file

@ -1,8 +1,23 @@
package ellpeck.someprettytechystuff.items; package ellpeck.someprettytechystuff.items;
public class InitItems { 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(){ 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));
} }
} }

View file

@ -2,26 +2,30 @@ package ellpeck.someprettytechystuff.items;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.someprettytechystuff.blocks.BlockCrop;
import ellpeck.someprettytechystuff.creative.CreativeTab; import ellpeck.someprettytechystuff.creative.CreativeTab;
import ellpeck.someprettytechystuff.util.Util; import ellpeck.someprettytechystuff.util.Util;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.item.Item;
import net.minecraft.item.ItemSeeds; import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import java.util.List; import java.util.List;
public class ItemSeed extends ItemSeeds{ public class ItemFertilizer extends Item{
public ItemSeed(Block blockCrop, ItemStack cropItemStack, String unlocalizedName){ public ItemFertilizer(){
super(blockCrop, Blocks.farmland); this.setUnlocalizedName("itemFertilizer");
((BlockCrop)blockCrop).setSeedItem(this);
((BlockCrop)blockCrop).setCropItem(cropItemStack);
this.setCreativeTab(CreativeTab.instance); 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") @SuppressWarnings("unchecked")
@ -34,5 +38,4 @@ public class ItemSeed extends ItemSeeds{
public void registerIcons(IIconRegister iconReg){ public void registerIcons(IIconRegister iconReg){
this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5)); this.itemIcon = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5));
} }
} }

View 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());
}
}

View file

@ -14,50 +14,45 @@ import net.minecraft.util.StatCollector;
import java.util.List; import java.util.List;
public class ItemPile extends Item{ public class ItemMisc extends Item{
public final String[] pileTypes = new String[]{"Iron", "Gold", "Redstone", "Diamond"}; private final String[] items = new String[]{"MashedFood", "RefinedIron", "RefinedRedstone", "CompressedIron", "Steel"};
public final IIcon[] textures = new IIcon[pileTypes.length];
public ItemPile(){
this.setHasSubtypes(true);
this.setCreativeTab(CreativeTab.instance);
this.setUnlocalizedName("itemPile");
}
@SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { private IIcon[] icons = new IIcon[items.length];
if(Util.isShiftPressed()){
for(int i = 0; i < this.pileTypes.length; i++){ public ItemMisc(){
if(this.getDamage(stack) == i) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName().substring(5) + this.pileTypes[i] + ".desc")); this.setHasSubtypes(true);
} this.setUnlocalizedName("itemMisc");
} this.setCreativeTab(CreativeTab.instance);
else list.add(Util.shiftForInfo());
} }
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName() + this.pileTypes[stack.getItemDamage()]; return this.getUnlocalizedName() + items[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) @SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){ public void registerIcons(IIconRegister iconReg){
for (int i = 0; i < this.pileTypes.length; i++) { for(int i = 0; i < items.length; i++){
textures[i] = iconReg.registerIcon(Util.MOD_ID + ":" + this.getUnlocalizedName().substring(5) + this.pileTypes[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()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
else list.add(Util.shiftForInfo());
}
} }

View file

@ -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));
}
}

View file

@ -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));
}
}

View file

@ -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));
}
}

View file

@ -1,17 +1,20 @@
package ellpeck.someprettytechystuff.proxy; package ellpeck.someprettytechystuff.proxy;
import ellpeck.someprettytechystuff.blocks.renderer.RenderRegistry;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ClientProxy implements IProxy{ public class ClientProxy implements IProxy{
public void preInit() { public void preInit(){
} }
public void init() { public void init(){
RenderRegistry.init();
} }
public void postInit() { public void postInit(){
} }
} }

View file

@ -15,6 +15,11 @@ public class Util{
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); 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() { public static String shiftForInfo() {
return (char)167+"2" + (char)167+"o" + StatCollector.translateToLocal("tooltip.shiftForInfo.desc"); return (char)167+"2" + (char)167+"o" + StatCollector.translateToLocal("tooltip.shiftForInfo.desc");
} }

View file

@ -1,122 +1,43 @@
itemGroup.gemification=Gemification itemGroup.someprettytechystuff=SomePrettyTechyStuff
tile.oreGemOnyx.name=Onyx Ore item.itemMiscMashedFood.name=Mashed Food
tile.oreGemAlmandineGarnet.name=Almandine Garnet Ore item.itemMiscMatterAccellerator.name=Matter Accellerator
tile.oreGemChromeDiopside.name=Chrome Diopside Ore item.itemMiscRefinedIron.name=Refined Iron
tile.oreGemJasper.name=Jasper Ore item.itemMiscRefinedRedstone.name=Refined Redstone
tile.oreGemSodalite.name=Sodalite Ore item.itemMiscCompressedIron.name=Compressed Iron
tile.oreGemIolite.name=Iolite Ore item.itemMiscSteel.name=Steel
tile.oreGemSmithsonite.name=Smithsonite Ore item.itemFertilizer.name=Fertilizer
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
tile.blockCrucible.name=The Crucible tile.blockOreCopper.name=Copper Ore
tile.blockCrucibleFire.name=Crucible Fire tile.blockOreTin.name=Tin Ore
tile.blockCropIron.name=Fea tile.blockOreLead.name=Lead Ore
tile.blockCropGold.name=Ahu tile.blockOreSilver.name=Silver Ore
tile.blockCropDiamond.name=Cee tile.blockOreTungsten.name=Tungsten Ore
tile.blockCropRedstone.name=Rad 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 tooltip.shiftForInfo.desc=Press Shift for Info
item.itemGemAlmandineGarnet.name=Almandine Garnet tooltip.hunger.desc=Fills
item.itemGemChromeDiopside.name=Chrome Diopside tooltip.saturation.desc=Saturation
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
item.itemInfoBook.name=Gemificationic Lexicon tooltip.blockOreCopper.desc=Used for ...something.
item.itemSeedIron.name=Fea Seeds tooltip.blockOreTin.desc=Used for ...something.
item.itemSeedGold.name=Ahu Seeds tooltip.blockOreLead.desc=Used for ...something.
item.itemSeedDiamond.name=Cee Seeds tooltip.blockOreSilver.desc=Used for ...something.
item.itemSeedRedstone.name=Rad Seeds 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 tooltip.itemMiscMashedFood.desc=Used to make Fertilizer
item.itemPileGold.name=Pile of Gold tooltip.itemMiscMatterAccellerator.desc=Accellerates Matter. What did you expect?
item.itemPileDiamond.name=Pile of Diamond tooltip.itemMiscRefinedIron.desc=Iron, but better
item.itemPileRedstone.name=Pile of Redstone tooltip.itemMiscRefinedRedstone.desc=Redstone, but better
tooltip.itemMiscCompressedIron.desc=Iron, but compressed
item.itemInfusedIronPickaxe.name=Infused Iron Pick tooltip.itemMiscSteel.desc=Like Iron, but stronger. Much stronger.
item.itemInfusedIronAxe.name=Infused Iron Axe tooltip.itemFertilizer.desc=Om nom nom. Don't eat it.
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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B