ESD Updates, Item Description Sorting, OreDictionary Crafting!
|
@ -18,7 +18,6 @@ import ellpeck.actuallyadditions.inventory.GuiHandler;
|
|||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.material.InitItemMaterials;
|
||||
import ellpeck.actuallyadditions.network.PacketHandler;
|
||||
import ellpeck.actuallyadditions.oredict.OreDictRegistry;
|
||||
import ellpeck.actuallyadditions.proxy.IProxy;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -42,7 +41,6 @@ public class ActuallyAdditions{
|
|||
InitItemMaterials.init();
|
||||
InitBlocks.init();
|
||||
InitItems.init();
|
||||
OreDictRegistry.init();
|
||||
proxy.preInit();
|
||||
|
||||
Util.logInfo("PreInitialization Finished.");
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
-Redstone Control for the ESD
|
||||
|
||||
-Quartz Enchanter
|
||||
-Lets you enchant Tools with Black Quartz
|
||||
-Doesn't use Levels
|
||||
-Needs Quartz and Diamond Blocks instead of Bookcases around
|
||||
|
||||
-Advanced ESD
|
||||
-Has a Filter
|
||||
|
||||
-Instant Teleport Device
|
||||
-Teleports Players to where they look (Much like the Bukkit Compass)
|
||||
|
||||
|
@ -30,10 +25,6 @@
|
|||
-Has a Recipe saved
|
||||
-Crafts Recipe on Shift-Right-Click if all Items are in Inventory
|
||||
|
||||
-Repair Station
|
||||
-Powered by Coal
|
||||
-Repairs Items slowly
|
||||
|
||||
-TNT Arrows
|
||||
|
||||
-Teleport Arrows
|
||||
|
|
|
@ -8,10 +8,7 @@ import ellpeck.actuallyadditions.items.ItemFertilizer;
|
|||
import ellpeck.actuallyadditions.items.ItemMisc;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityCompost;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -29,7 +26,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCompost extends BlockContainerBase implements IName{
|
||||
public class BlockCompost extends BlockContainerBase implements INameableItem{
|
||||
|
||||
public BlockCompost(){
|
||||
super(Material.wood);
|
||||
|
@ -125,6 +122,11 @@ public class BlockCompost extends BlockContainerBase implements IName{
|
|||
return "blockCompost";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlock{
|
||||
|
||||
private Block theBlock;
|
||||
|
@ -151,9 +153,10 @@ public class BlockCompost extends BlockContainerBase implements IName{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc.1"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc.1"));
|
||||
//TODO Remove second info
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc.2"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc.2"));
|
||||
BlockUtil.addOredictName(theBlock, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -5,9 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFeeder;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -18,12 +17,11 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockFeeder extends BlockContainerBase implements IName{
|
||||
public class BlockFeeder extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
|
||||
|
@ -34,6 +32,11 @@ public class BlockFeeder extends BlockContainerBase implements IName{
|
|||
this.setStepSound(soundTypeWood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityFeeder();
|
||||
|
@ -97,8 +100,7 @@ public class BlockFeeder extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,10 +4,8 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFishingNet;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -18,12 +16,11 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockFishingNet extends BlockContainerBase implements IName{
|
||||
public class BlockFishingNet extends BlockContainerBase implements INameableItem{
|
||||
|
||||
public BlockFishingNet(){
|
||||
super(Material.wood);
|
||||
|
@ -33,6 +30,11 @@ public class BlockFishingNet extends BlockContainerBase implements IName{
|
|||
this.setBlockBounds(0F, 0F, 0F, 1F, 1F/16F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityFishingNet();
|
||||
|
@ -94,8 +96,7 @@ public class BlockFishingNet extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFurnaceDouble;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -20,14 +19,13 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockFurnaceDouble extends BlockContainerBase implements IName{
|
||||
public class BlockFurnaceDouble extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
private IIcon onIcon;
|
||||
|
@ -41,6 +39,11 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IName{
|
|||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z){
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
|
@ -179,8 +182,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,10 +4,8 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFurnaceSolar;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -18,12 +16,11 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockFurnaceSolar extends BlockContainerBase implements IName{
|
||||
public class BlockFurnaceSolar extends BlockContainerBase implements INameableItem{
|
||||
|
||||
public BlockFurnaceSolar(){
|
||||
super(Material.wood);
|
||||
|
@ -33,6 +30,11 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IName{
|
|||
this.setBlockBounds(0F, 0F, 0F, 1F, 3F/16F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityFurnaceSolar();
|
||||
|
@ -94,8 +96,7 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGiantChest;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -18,14 +17,14 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockGiantChest extends BlockContainerBase implements IName{
|
||||
public class BlockGiantChest extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockGiantChest(){
|
||||
super(Material.wood);
|
||||
|
@ -34,6 +33,11 @@ public class BlockGiantChest extends BlockContainerBase implements IName{
|
|||
this.setStepSound(soundTypeWood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityGiantChest();
|
||||
|
@ -41,7 +45,7 @@ public class BlockGiantChest extends BlockContainerBase implements IName{
|
|||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata){
|
||||
return side == 1 ? this.topIcon : this.blockIcon;
|
||||
return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,6 +53,7 @@ public class BlockGiantChest extends BlockContainerBase implements IName{
|
|||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName() + "Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,8 +102,7 @@ public class BlockGiantChest extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,10 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGrinder;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,7 +22,7 @@ import net.minecraft.world.World;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockGrinder extends BlockContainerBase implements IName{
|
||||
public class BlockGrinder extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
private IIcon onIcon;
|
||||
|
@ -94,6 +91,11 @@ public class BlockGrinder extends BlockContainerBase implements IName{
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
||||
this.dropInventory(world, x, y, z);
|
||||
|
@ -132,8 +134,9 @@ public class BlockGrinder extends BlockContainerBase implements IName{
|
|||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
for(int i = 0; i < (((BlockGrinder)theBlock).isDouble ? 3 : 4); i++){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + (i+1)));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc." + (i+1)));
|
||||
}
|
||||
BlockUtil.addOredictName(theBlock, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityHeatCollector;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -21,7 +18,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockHeatCollector extends BlockContainerBase implements IName{
|
||||
public class BlockHeatCollector extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
private IIcon bottomIcon;
|
||||
|
@ -33,6 +30,11 @@ public class BlockHeatCollector extends BlockContainerBase implements IName{
|
|||
this.setStepSound(soundTypeStone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityHeatCollector();
|
||||
|
@ -83,8 +85,9 @@ public class BlockHeatCollector extends BlockContainerBase implements IName{
|
|||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
for(int i = 0; i < 3; i++){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + (i + 1)));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc." + (i + 1)));
|
||||
}
|
||||
BlockUtil.addOredictName(theBlock, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -21,21 +21,29 @@ import net.minecraft.world.World;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockInputter extends BlockContainerBase implements IName{
|
||||
public class BlockInputter extends BlockContainerBase implements INameableItem{
|
||||
|
||||
public static final int NAME_FLAVOUR_AMOUNTS = 12;
|
||||
public static final int NAME_FLAVOUR_AMOUNTS = 15;
|
||||
|
||||
public BlockInputter(){
|
||||
public boolean isAdvanced;
|
||||
|
||||
public BlockInputter(boolean isAdvanced){
|
||||
super(Material.rock);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(soundTypeStone);
|
||||
this.setTickRandomly(true);
|
||||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityInputter();
|
||||
return new TileEntityInputter(this.isAdvanced);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +61,7 @@ public class BlockInputter extends BlockContainerBase implements IName{
|
|||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityInputter inputter = (TileEntityInputter)world.getTileEntity(x, y, z);
|
||||
if (inputter != null) player.openGui(ActuallyAdditions.instance, GuiHandler.INPUTTER_ID, world, x, y, z);
|
||||
if (inputter != null) player.openGui(ActuallyAdditions.instance, this.isAdvanced ? GuiHandler.INPUTTER_ADVANCED_ID : GuiHandler.INPUTTER_ID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -67,7 +75,7 @@ public class BlockInputter extends BlockContainerBase implements IName{
|
|||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockInputter";
|
||||
return this.isAdvanced ? "blockInputterAdvanced" : "blockInputter";
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlock{
|
||||
|
@ -86,7 +94,7 @@ public class BlockInputter extends BlockContainerBase implements IName{
|
|||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
return ((BlockInputter)theBlock).isAdvanced ? EnumRarity.epic : EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -99,7 +107,7 @@ public class BlockInputter extends BlockContainerBase implements IName{
|
|||
this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS+1);
|
||||
}
|
||||
|
||||
return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name") + " (" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".add." + this.toPick + ".name") + ")";
|
||||
return StatCollector.translateToLocal(this.getUnlocalizedName() + ".name") + " (" + StatCollector.translateToLocal("tile." + ModUtil.MOD_ID_LOWER + ".blockInputter.add." + this.toPick + ".name") + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -112,10 +120,12 @@ public class BlockInputter extends BlockContainerBase implements IName{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocalFormatted("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + 1, StringUtil.OBFUSCATED, StringUtil.LIGHT_GRAY));
|
||||
for(int i = 1; i < 5; i++){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + (i + 1)));
|
||||
list.add(StatCollector.translateToLocalFormatted("tooltip." + ModUtil.MOD_ID_LOWER + ".blockInputter.desc." + 1, StringUtil.OBFUSCATED, StringUtil.LIGHT_GRAY));
|
||||
for(int i = 1; i < 6; i++){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".blockInputter.desc." + (i + 1)));
|
||||
}
|
||||
if((((BlockInputter)theBlock).isAdvanced)) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + ".desc"));
|
||||
BlockUtil.addOredictName(theBlock, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -5,9 +5,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityItemRepairer;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -18,14 +17,13 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockItemRepairer extends BlockContainerBase implements IName{
|
||||
public class BlockItemRepairer extends BlockContainerBase implements INameableItem{
|
||||
|
||||
private IIcon topIcon;
|
||||
private IIcon onIcon;
|
||||
|
@ -39,6 +37,11 @@ public class BlockItemRepairer extends BlockContainerBase implements IName{
|
|||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int par2){
|
||||
return new TileEntityItemRepairer();
|
||||
|
@ -118,10 +121,7 @@ public class BlockItemRepairer extends BlockContainerBase implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc"));
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
BlockUtil.addStandardInformation(theBlock, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -21,7 +18,7 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockMisc extends Block implements IName{
|
||||
public class BlockMisc extends Block implements INameableItem{
|
||||
|
||||
public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values();
|
||||
public IIcon[] textures = new IIcon[allMiscBlocks.length];
|
||||
|
@ -63,6 +60,11 @@ public class BlockMisc extends Block implements IName{
|
|||
return "blockMisc";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlock{
|
||||
|
||||
private Block theBlock;
|
||||
|
@ -88,7 +90,10 @@ public class BlockMisc extends Block implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + allMiscBlocks[stack.getItemDamage()].getName() + ".desc"));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)theBlock).getName() + allMiscBlocks[stack.getItemDamage()].getName() + ".desc"));
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allMiscBlocks[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ public class InitBlocks{
|
|||
public static Block blockGrinderDouble;
|
||||
public static Block blockFurnaceDouble;
|
||||
public static Block blockInputter;
|
||||
public static Block blockInputterAdvanced;
|
||||
public static Block blockFishingNet;
|
||||
public static Block blockFurnaceSolar;
|
||||
public static Block blockHeatCollector;
|
||||
|
@ -27,7 +28,7 @@ public class InitBlocks{
|
|||
BlockUtil.register(blockCompost, BlockCompost.TheItemBlock.class);
|
||||
|
||||
blockMisc = new BlockMisc();
|
||||
BlockUtil.register(blockMisc, BlockMisc.TheItemBlock.class);
|
||||
BlockUtil.register(blockMisc, BlockMisc.TheItemBlock.class, BlockMisc.allMiscBlocks);
|
||||
|
||||
blockFeeder = new BlockFeeder();
|
||||
BlockUtil.register(blockFeeder, BlockFeeder.TheItemBlock.class);
|
||||
|
@ -44,9 +45,12 @@ public class InitBlocks{
|
|||
blockFurnaceDouble = new BlockFurnaceDouble();
|
||||
BlockUtil.register(blockFurnaceDouble, BlockFurnaceDouble.TheItemBlock.class);
|
||||
|
||||
blockInputter = new BlockInputter();
|
||||
blockInputter = new BlockInputter(false);
|
||||
BlockUtil.register(blockInputter, BlockInputter.TheItemBlock.class);
|
||||
|
||||
blockInputterAdvanced = new BlockInputter(true);
|
||||
BlockUtil.register(blockInputterAdvanced, BlockInputter.TheItemBlock.class);
|
||||
|
||||
blockFishingNet = new BlockFishingNet();
|
||||
BlockUtil.register(blockFishingNet, BlockFishingNet.TheItemBlock.class);
|
||||
|
||||
|
|
|
@ -1,25 +1,34 @@
|
|||
package ellpeck.actuallyadditions.blocks.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
||||
public enum TheMiscBlocks implements IName{
|
||||
public enum TheMiscBlocks implements INameableItem{
|
||||
|
||||
QUARTZ_PILLAR("BlackQuartzPillar", EnumRarity.rare),
|
||||
QUARTZ_CHISELED("BlackQuartzChiseled", EnumRarity.rare),
|
||||
QUARTZ("BlackQuartz", EnumRarity.rare),
|
||||
ORE_QUARTZ("OreBlackQuartz", EnumRarity.epic);
|
||||
QUARTZ_PILLAR("BlackQuartzPillar", EnumRarity.rare, "blockQuartzBlack"),
|
||||
QUARTZ_CHISELED("BlackQuartzChiseled", EnumRarity.rare, "blockQuartzBlack"),
|
||||
QUARTZ("BlackQuartz", EnumRarity.rare, "blockQuartzBlack"),
|
||||
ORE_QUARTZ("OreBlackQuartz", EnumRarity.epic, "oreQuartzBlack"),
|
||||
WOOD_CASING("WoodCasing", EnumRarity.common, "blockCasingWood"),
|
||||
STONE_CASING("StoneCasing", EnumRarity.uncommon, "blockCasingStone");
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
public final EnumRarity rarity;
|
||||
|
||||
TheMiscBlocks(String name, EnumRarity rarity){
|
||||
TheMiscBlocks(String name, EnumRarity rarity, String oredictName){
|
||||
this.name = name;
|
||||
this.rarity = rarity;
|
||||
this.oredictName = oredictName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -4,12 +4,13 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class BlockCrafting{
|
||||
|
||||
|
@ -17,103 +18,124 @@ public class BlockCrafting{
|
|||
|
||||
//Compost
|
||||
if(ConfigValues.enableCompostRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockCompost),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCompost),
|
||||
"W W", "WFW", "WWW",
|
||||
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
||||
'F', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()));
|
||||
'W', "plankWood",
|
||||
'F', TheMiscItems.MASHED_FOOD.getOredictName()));
|
||||
|
||||
//Wood Casing
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
|
||||
"WSW", "SRS", "WSW",
|
||||
'W', "plankWood",
|
||||
'R', "dustRedstone",
|
||||
'S', "stickWood"));
|
||||
|
||||
//Stone Casing
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
|
||||
"WSW", "SRS", "WSW",
|
||||
'W', "cobblestone",
|
||||
'R', "dustRedstone",
|
||||
'S', "stickWood"));
|
||||
|
||||
//Quartz Block
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
|
||||
"QQ", "QQ",
|
||||
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
|
||||
'Q', TheMiscItems.QUARTZ.getOredictName()));
|
||||
|
||||
//Fishing Net
|
||||
if(ConfigValues.enableFishingNetRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockFishingNet),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet),
|
||||
"SSS", "SDS", "SSS",
|
||||
'D', new ItemStack(Items.diamond),
|
||||
'S', new ItemStack(Items.string));
|
||||
'D', "gemDiamond",
|
||||
'S', Items.string));
|
||||
|
||||
//Repairer
|
||||
if(ConfigValues.enableRepairerRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockItemRepairer),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer),
|
||||
"DID", "DCD", "DID",
|
||||
'D', new ItemStack(Items.diamond),
|
||||
'I', new ItemStack(Items.iron_ingot),
|
||||
'C', new ItemStack(Blocks.crafting_table));
|
||||
'D', "gemDiamond",
|
||||
'I', "ingotIron",
|
||||
'C', Blocks.crafting_table));
|
||||
|
||||
//Solar Panel
|
||||
if(ConfigValues.enableSolarRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
|
||||
"IBI", "BDB", "IBI",
|
||||
'D', new ItemStack(Blocks.diamond_block),
|
||||
'I', new ItemStack(Items.iron_ingot),
|
||||
'B', new ItemStack(Blocks.iron_bars));
|
||||
'D', "blockDiamond",
|
||||
'I', "ingotIron",
|
||||
'B', new ItemStack(Blocks.iron_bars)));
|
||||
|
||||
//Heat Collector
|
||||
if(ConfigValues.enableHeatCollectorRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockHeatCollector),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector),
|
||||
"BRB", "LDL", "BRB",
|
||||
'D', new ItemStack(Blocks.diamond_block),
|
||||
'D', "blockDiamond",
|
||||
'R', new ItemStack(Items.repeater),
|
||||
'L', new ItemStack(Items.lava_bucket),
|
||||
'B', new ItemStack(Blocks.iron_bars));
|
||||
'B', new ItemStack(Blocks.iron_bars)));
|
||||
|
||||
//Quartz Pillar
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()),
|
||||
"Q", "Q",
|
||||
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
|
||||
'Q', TheMiscItems.QUARTZ.getOredictName()));
|
||||
|
||||
//Chiseled Quartz
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()),
|
||||
"Q", "Q",
|
||||
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
|
||||
'Q', TheMiscBlocks.QUARTZ.getOredictName()));
|
||||
|
||||
//Inputter
|
||||
if(ConfigValues.enableInputterRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockInputter),
|
||||
if(ConfigValues.enableInputterRecipe){
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockInputter),
|
||||
"WWW", "WHW", "WWW",
|
||||
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
||||
'H', new ItemStack(Blocks.hopper));
|
||||
'W', "plankWood",
|
||||
'H', new ItemStack(Blocks.hopper)));
|
||||
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
|
||||
((INameableItem)InitBlocks.blockInputter).getOredictName(),
|
||||
"gemQuartz",
|
||||
TheMiscItems.QUARTZ.getOredictName(),
|
||||
"dustRedstone"));
|
||||
}
|
||||
|
||||
//Crusher
|
||||
if(ConfigValues.enableCrusherRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockGrinder),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder),
|
||||
"CFC", "CPC", "CFC",
|
||||
'C', new ItemStack(Blocks.cobblestone),
|
||||
'C', "cobblestone",
|
||||
'P', new ItemStack(Blocks.piston),
|
||||
'F', new ItemStack(Items.flint));
|
||||
'F', new ItemStack(Items.flint)));
|
||||
|
||||
//Double Crusher
|
||||
if(ConfigValues.enableCrusherDoubleRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
|
||||
"CCC", "RPR", "CCC",
|
||||
'C', new ItemStack(Blocks.cobblestone),
|
||||
'R', new ItemStack(InitBlocks.blockGrinder),
|
||||
'P', new ItemStack(Blocks.piston));
|
||||
'C', "cobblestone",
|
||||
'R', ((INameableItem)InitBlocks.blockGrinder).getOredictName(),
|
||||
'P', new ItemStack(Blocks.piston)));
|
||||
|
||||
//Double Furnace
|
||||
if(ConfigValues.enableFurnaceDoubleRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
|
||||
"CCC", "RPR", "CCC",
|
||||
'C', new ItemStack(Blocks.cobblestone),
|
||||
'C', "cobblestone",
|
||||
'R', new ItemStack(Blocks.furnace),
|
||||
'P', new ItemStack(Items.brick));
|
||||
'P', "ingotBrick"));
|
||||
|
||||
//Feeder
|
||||
if(ConfigValues.enableFeederRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockFeeder),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFeeder),
|
||||
"WCW", "WHW", "WCW",
|
||||
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
||||
'W', "plankWood",
|
||||
'C', new ItemStack(Items.golden_carrot),
|
||||
'H', new ItemStack(Items.wheat));
|
||||
'H', "cropWheat"));
|
||||
|
||||
//Giant Chest
|
||||
if(ConfigValues.enableGiantChestRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockGiantChest),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGiantChest),
|
||||
"CWC", "W W", "CWC",
|
||||
'C', new ItemStack(Blocks.chest),
|
||||
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD));
|
||||
'W', "plankWood"));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,16 +5,19 @@ import ellpeck.actuallyadditions.config.ConfigValues;
|
|||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class FoodCrafting{
|
||||
|
||||
public static void init(){
|
||||
|
||||
ItemStack knifeStack = new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD);
|
||||
String knifeStack = ((INameableItem)InitItems.itemKnife).getOredictName();
|
||||
|
||||
//Baguette
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.BAGUETTE.ordinal()])
|
||||
|
@ -23,61 +26,61 @@ public class FoodCrafting{
|
|||
|
||||
//Pizza
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.PIZZA.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
||||
"HKH", "MCF", " D ",
|
||||
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
||||
'D', TheMiscItems.DOUGH.getOredictName(),
|
||||
'M', new ItemStack(Blocks.brown_mushroom),
|
||||
'C', new ItemStack(Items.carrot),
|
||||
'C', "cropCarrot",
|
||||
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
|
||||
'K', knifeStack,
|
||||
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
|
||||
'H', TheFoods.CHEESE.getOredictName()));
|
||||
|
||||
//Hamburger
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.HAMBURGER.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
||||
"KT ", "CB ", " T ",
|
||||
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
|
||||
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
||||
'T', TheFoods.TOAST.getOredictName(),
|
||||
'C', TheFoods.CHEESE.getOredictName(),
|
||||
'K', knifeStack,
|
||||
'B', new ItemStack(Items.cooked_beef));
|
||||
'B', new ItemStack(Items.cooked_beef)));
|
||||
|
||||
//Big Cookie
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.BIG_COOKIE.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
|
||||
"DCD", "CDC", "DCD",
|
||||
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
||||
'C', new ItemStack(Items.dye, 1, 3));
|
||||
'D', TheMiscItems.DOUGH.getOredictName(),
|
||||
'C', new ItemStack(Items.dye, 1, 3)));
|
||||
|
||||
//Sub Sandwich
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.SUBMARINE_SANDWICH.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
||||
"KCP", "FB ", "PCP",
|
||||
'P', new ItemStack(Items.paper),
|
||||
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
||||
'C', TheFoods.CHEESE.getOredictName(),
|
||||
'F', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
|
||||
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
|
||||
'K', knifeStack);
|
||||
'B', TheFoods.BAGUETTE.getOredictName(),
|
||||
'K', knifeStack));
|
||||
|
||||
//French Fry
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRY.ordinal()])
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
|
||||
new ItemStack(Items.baked_potato),
|
||||
knifeStack);
|
||||
knifeStack));
|
||||
|
||||
//French Fries
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRIES.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
|
||||
"FFF", " P ",
|
||||
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
||||
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
||||
'P', TheMiscItems.PAPER_CONE.getOredictName(),
|
||||
'F', TheFoods.FRENCH_FRY.getOredictName()));
|
||||
|
||||
//Fish N Chips
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FISH_N_CHIPS.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
||||
"FIF", " P ",
|
||||
'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
|
||||
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
||||
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
||||
'P', TheMiscItems.PAPER_CONE.getOredictName(),
|
||||
'F', TheFoods.FRENCH_FRY.getOredictName()));
|
||||
|
||||
//Cheese
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.CHEESE.ordinal()])
|
||||
|
@ -93,20 +96,20 @@ public class FoodCrafting{
|
|||
|
||||
//Carrot Juice
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.CARROT_JUICE.ordinal()])
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
|
||||
new ItemStack(Items.glass_bottle), new ItemStack(Items.carrot), knifeStack);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
|
||||
new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack));
|
||||
|
||||
//Spaghetti
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.SPAGHETTI.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
|
||||
"NNN", " B ",
|
||||
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
||||
'B', new ItemStack(Items.bowl));
|
||||
'N', TheFoods.NOODLE.getOredictName(),
|
||||
'B', new ItemStack(Items.bowl)));
|
||||
|
||||
//Noodle
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.NOODLE.ordinal()])
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
||||
new ItemStack(Items.wheat), knifeStack);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
||||
"cropWheat", knifeStack));
|
||||
|
||||
//Chocolate
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.CHOCOLATE.ordinal()])
|
||||
|
@ -117,13 +120,13 @@ public class FoodCrafting{
|
|||
|
||||
//Chocolate Cake
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.CHOCOLATE_CAKE.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()),
|
||||
"MMM", "CCC", "EDS",
|
||||
'M', new ItemStack(Items.milk_bucket),
|
||||
'E', new ItemStack(Items.egg),
|
||||
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
||||
'D', TheMiscItems.DOUGH.getOredictName(),
|
||||
'S', new ItemStack(Items.sugar),
|
||||
'C', new ItemStack(Items.dye, 1, 3));
|
||||
'C', new ItemStack(Items.dye, 1, 3)));
|
||||
|
||||
//Toast
|
||||
if(ConfigValues.enabledFoodRecipes[TheFoods.TOAST.ordinal()])
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.ArrayList;
|
|||
public class GrinderCrafting{
|
||||
|
||||
public static void init(){
|
||||
Util.logInfo("Initializing Grinder Recipes...");
|
||||
Util.logInfo("Initializing Crusher Recipes...");
|
||||
|
||||
GrinderRecipes.instance().registerRecipe(new ItemStack(Blocks.iron_ore), new ItemStack(InitItems.itemDust, 2, TheDusts.IRON.ordinal()), new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), 10);
|
||||
GrinderRecipes.instance().registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10), null, 0);
|
||||
|
@ -66,7 +66,7 @@ public class GrinderCrafting{
|
|||
|
||||
if(name.equals("oreNickel")) specialStacks = OreDictionary.getOres("dustPlatinum");
|
||||
|
||||
if(specialStacks != null){
|
||||
if(specialStacks != null && specialStacks.size() > 0){
|
||||
for(ItemStack theSpecial : specialStacks){
|
||||
ItemStack special = theSpecial.copy();
|
||||
GrinderRecipes.instance().registerRecipe(input, output, special, 10);
|
||||
|
|
|
@ -15,6 +15,8 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class ItemCrafting{
|
||||
|
||||
|
@ -22,12 +24,26 @@ public class ItemCrafting{
|
|||
|
||||
//Leaf Blower
|
||||
if(ConfigValues.enableLeafBlowerRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemLeafBlower),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower),
|
||||
" F", "IP", "IR",
|
||||
'F', new ItemStack(Items.flint),
|
||||
'I', new ItemStack(Items.iron_ingot),
|
||||
'I', "ingotIron",
|
||||
'P', new ItemStack(Blocks.piston),
|
||||
'R', new ItemStack(Items.redstone));
|
||||
'R', "dustRedstone"));
|
||||
|
||||
//Coil
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.COIL.ordinal()])
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
|
||||
" R ", "RIR", " R ",
|
||||
'I', "ingotIron",
|
||||
'R', "dustRedstone"));
|
||||
|
||||
//Advanced Coil
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.COIL_ADVANCED.ordinal()])
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
|
||||
" G ", "GCG", " G ",
|
||||
'C', TheMiscItems.COIL.getOredictName(),
|
||||
'G', "ingotGold"));
|
||||
|
||||
//Ender Pearl
|
||||
GameRegistry.addRecipe(new ItemStack(Items.ender_pearl),
|
||||
|
@ -41,12 +57,12 @@ public class ItemCrafting{
|
|||
|
||||
//Advanced Leaf Blower
|
||||
if(ConfigValues.enableLeafBlowerAdvancedRecipe)
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
|
||||
" F", "DP", "DR",
|
||||
'F', new ItemStack(Items.flint),
|
||||
'D', new ItemStack(Items.diamond),
|
||||
'D', "gemDiamond",
|
||||
'P', new ItemStack(Blocks.piston),
|
||||
'R', new ItemStack(Items.redstone));
|
||||
'R', "dustRedstone"));
|
||||
|
||||
//Quartz
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.QUARTZ.ordinal()])
|
||||
|
@ -55,9 +71,9 @@ public class ItemCrafting{
|
|||
|
||||
//Knife
|
||||
if(ConfigValues.enableKnifeRecipe)
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemKnife),
|
||||
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
||||
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife),
|
||||
TheMiscItems.KNIFE_BLADE.getOredictName(),
|
||||
TheMiscItems.KNIFE_HANDLE.getOredictName()));
|
||||
|
||||
//Crafter on a Stick
|
||||
if(ConfigValues.enableCrafterRecipe)
|
||||
|
@ -94,11 +110,11 @@ public class ItemCrafting{
|
|||
}
|
||||
|
||||
public static void initPotionRingRecipes(){
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()),
|
||||
"IGI", "GDG", "IGI",
|
||||
'G', new ItemStack(Items.gold_ingot),
|
||||
'I', new ItemStack(Items.iron_ingot),
|
||||
'D', new ItemStack(Items.glowstone_dust));
|
||||
'G', "ingotGold",
|
||||
'I', "ingotIron",
|
||||
'D', "dustGlowstone"));
|
||||
|
||||
for(int i = 0; i < ThePotionRings.values().length; i++){
|
||||
if(ConfigValues.enablePotionRingRecipes[i]){
|
||||
|
|
|
@ -6,6 +6,8 @@ import ellpeck.actuallyadditions.items.InitItems;
|
|||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class MiscCrafting{
|
||||
|
||||
|
@ -13,8 +15,8 @@ public class MiscCrafting{
|
|||
|
||||
//Dough
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.DOUGH.ordinal()])
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
|
||||
new ItemStack(Items.wheat), new ItemStack(Items.wheat));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
|
||||
"cropWheat", "cropWheat"));
|
||||
|
||||
//Paper Cone
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.PAPER_CONE.ordinal()])
|
||||
|
@ -24,16 +26,16 @@ public class MiscCrafting{
|
|||
|
||||
//Knife Handle
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_HANDLE.ordinal()])
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
|
||||
new ItemStack(Items.stick),
|
||||
new ItemStack(Items.leather));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
|
||||
"stickWood",
|
||||
new ItemStack(Items.leather)));
|
||||
|
||||
//Knife Blade
|
||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_BLADE.ordinal()])
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
||||
"KF",
|
||||
'K', new ItemStack(Items.iron_ingot),
|
||||
'F', new ItemStack(Items.flint));
|
||||
'K', "ingotIron",
|
||||
'F', new ItemStack(Items.flint)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import ellpeck.actuallyadditions.items.InitItems;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
public class ToolCrafting{
|
||||
|
||||
|
@ -13,34 +14,34 @@ public class ToolCrafting{
|
|||
|
||||
if(ConfigValues.enableToolEmeraldRecipe){
|
||||
//Pickaxe
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemPickaxeEmerald),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPickaxeEmerald),
|
||||
"EEE", " S ", " S ",
|
||||
'E', new ItemStack(Items.emerald),
|
||||
'S', new ItemStack(Items.stick));
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
|
||||
//Sword
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemSwordEmerald),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSwordEmerald),
|
||||
"E", "E", "S",
|
||||
'E', new ItemStack(Items.emerald),
|
||||
'S', new ItemStack(Items.stick));
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
|
||||
//Axe
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemAxeEmerald),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemAxeEmerald),
|
||||
"EE", "ES", " S",
|
||||
'E', new ItemStack(Items.emerald),
|
||||
'S', new ItemStack(Items.stick));
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
|
||||
//Shovel
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemShovelEmerald),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemShovelEmerald),
|
||||
"E", "S", "S",
|
||||
'E', new ItemStack(Items.emerald),
|
||||
'S', new ItemStack(Items.stick));
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
|
||||
//Hoe
|
||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemHoeEmerald),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemHoeEmerald),
|
||||
"EE", " S", " S",
|
||||
'E', new ItemStack(Items.emerald),
|
||||
'S', new ItemStack(Items.stick));
|
||||
'E', "gemEmerald",
|
||||
'S', new ItemStack(Items.stick)));
|
||||
}
|
||||
|
||||
if(ConfigValues.enableToolObsidianRecipe){
|
||||
|
|
|
@ -27,6 +27,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
this.list = list;
|
||||
|
||||
this.addBlock(InitBlocks.blockInputter);
|
||||
this.addBlock(InitBlocks.blockInputterAdvanced);
|
||||
this.addBlock(InitBlocks.blockGrinder);
|
||||
this.addBlock(InitBlocks.blockGrinderDouble);
|
||||
this.addBlock(InitBlocks.blockFurnaceDouble);
|
||||
|
|
|
@ -22,9 +22,9 @@ public class RenderSpecial{
|
|||
|
||||
public void render(EntityPlayer player, float renderTick, float size, float offsetUp){
|
||||
int bobHeight = 70;
|
||||
double rotationModifier = 2;
|
||||
long theTime = Minecraft.getSystemTime();
|
||||
long time = theTime/50;
|
||||
|
||||
long time = player.worldObj.getTotalWorldTime();
|
||||
if(time-bobHeight >= lastTimeForBobbing){
|
||||
this.lastTimeForBobbing = time;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class RenderSpecial{
|
|||
GL11.glTranslated(0, -((double)time-lastTimeForBobbing)/100+(double)bobHeight/100, 0);
|
||||
}
|
||||
|
||||
GL11.glRotated((double)time*rotationModifier, 0, 1, 0);
|
||||
GL11.glRotated((double)theTime/20, 0, 1, 0);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(theTexture);
|
||||
theModel.render(0.0625F);
|
||||
|
|
|
@ -2,6 +2,7 @@ package ellpeck.actuallyadditions.inventory;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.inventory.slot.SlotFilter;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityInputter;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -22,18 +23,32 @@ public class ContainerInputter extends Container{
|
|||
private int lastPlaceToPutSlotAmount;
|
||||
private int lastPlaceToPullSlotAmount;
|
||||
|
||||
public ContainerInputter(InventoryPlayer inventory, TileEntityBase tile){
|
||||
this.tileInputter = (TileEntityInputter)tile;
|
||||
private boolean isAdvanced;
|
||||
|
||||
this.addSlotToContainer(new Slot(this.tileInputter, 0, 80, 21));
|
||||
public ContainerInputter(InventoryPlayer inventory, TileEntityBase tile, boolean isAdvanced){
|
||||
this.tileInputter = (TileEntityInputter)tile;
|
||||
this.isAdvanced = isAdvanced;
|
||||
|
||||
this.addSlotToContainer(new Slot(this.tileInputter, 0, 80, 21 + (isAdvanced ? 12 : 0)));
|
||||
|
||||
if(isAdvanced){
|
||||
for(int i = 0; i < 2; i++){
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 1+i*6, 20+i*84, 6));
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 2+i*6, 38+i*84, 6));
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 3+i*6, 56+i*85, 6));
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 4+i*6, 20+i*84, 24));
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 5+i*6, 38+i*84, 24));
|
||||
this.addSlotToContainer(new SlotFilter(this.tileInputter, 6+i*6, 56+i*84, 24));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++){
|
||||
for (int j = 0; j < 9; j++){
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
|
||||
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18 + (isAdvanced ? 12 : 0)));
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < 9; i++){
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155));
|
||||
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155 + (isAdvanced ? 12 : 0)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,7 +102,7 @@ public class ContainerInputter extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 1;
|
||||
final int inventoryStart = this.isAdvanced ? 13 : 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
|
|
|
@ -33,7 +33,10 @@ public class GuiHandler implements IGuiHandler{
|
|||
return new ContainerFurnaceDouble(entityPlayer.inventory, tileFurnace);
|
||||
case INPUTTER_ID:
|
||||
TileEntityBase tileInputter = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new ContainerInputter(entityPlayer.inventory, tileInputter);
|
||||
return new ContainerInputter(entityPlayer.inventory, tileInputter, false);
|
||||
case INPUTTER_ADVANCED_ID:
|
||||
TileEntityBase tileInputterAdvanced = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new ContainerInputter(entityPlayer.inventory, tileInputterAdvanced, true);
|
||||
case REPAIRER_ID:
|
||||
TileEntityBase tileRepairer = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new ContainerRepairer(entityPlayer.inventory, tileRepairer);
|
||||
|
@ -64,7 +67,10 @@ public class GuiHandler implements IGuiHandler{
|
|||
return new GuiFurnaceDouble(entityPlayer.inventory, tileFurnace);
|
||||
case INPUTTER_ID:
|
||||
TileEntityBase tileInputter = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new GuiInputter(entityPlayer.inventory, tileInputter, x, y, z, world);
|
||||
return new GuiInputter(entityPlayer.inventory, tileInputter, x, y, z, world, false);
|
||||
case INPUTTER_ADVANCED_ID:
|
||||
TileEntityBase tileInputterAdvanced = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new GuiInputter(entityPlayer.inventory, tileInputterAdvanced, x, y, z, world, true);
|
||||
case REPAIRER_ID:
|
||||
TileEntityBase tileRepairer = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||
return new GuiRepairer(entityPlayer.inventory, tileRepairer);
|
||||
|
@ -81,6 +87,7 @@ public class GuiHandler implements IGuiHandler{
|
|||
public static final int FURNACE_DOUBLE_ID = 5;
|
||||
public static final int INPUTTER_ID = 6;
|
||||
public static final int REPAIRER_ID = 7;
|
||||
public static final int INPUTTER_ADVANCED_ID = 8;
|
||||
|
||||
public static void init(){
|
||||
Util.logInfo("Initializing GuiHandler...");
|
||||
|
|
|
@ -23,6 +23,8 @@ import org.lwjgl.opengl.GL11;
|
|||
public class GuiInputter extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiInputter");
|
||||
private static final ResourceLocation resLocAdvanced = AssetUtil.getGuiLocation("guiInputterAdvanced");
|
||||
|
||||
private TileEntityInputter tileInputter;
|
||||
|
||||
private int x;
|
||||
|
@ -35,6 +37,8 @@ public class GuiInputter extends GuiContainer{
|
|||
private SmallerButton buttonSlotPutM;
|
||||
private SmallerButton buttonSlotPullM;
|
||||
|
||||
private boolean isAdvanced;
|
||||
|
||||
public static final String[] sideString = new String[]{
|
||||
StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.disabled"),
|
||||
StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.up"),
|
||||
|
@ -44,15 +48,16 @@ public class GuiInputter extends GuiContainer{
|
|||
StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.south"),
|
||||
StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.west")};
|
||||
|
||||
public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, int x, int y, int z, World world){
|
||||
super(new ContainerInputter(inventory, tile));
|
||||
public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, int x, int y, int z, World world, boolean isAdvanced){
|
||||
super(new ContainerInputter(inventory, tile, isAdvanced));
|
||||
this.tileInputter = (TileEntityInputter)tile;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.world = world;
|
||||
this.xSize = 176;
|
||||
this.ySize = 93+86;
|
||||
this.ySize = 93+86 + (isAdvanced ? 12 : 0);
|
||||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -60,15 +65,15 @@ public class GuiInputter extends GuiContainer{
|
|||
public void initGui(){
|
||||
super.initGui();
|
||||
|
||||
SmallerButton buttonSidePutP = new SmallerButton(0, guiLeft + 70, guiTop + 43, ">");
|
||||
SmallerButton buttonSidePutM = new SmallerButton(1, guiLeft + 5, guiTop + 43, "<");
|
||||
buttonSlotPutP = new SmallerButton(2, guiLeft + 70, guiTop + 64, "+");
|
||||
buttonSlotPutM = new SmallerButton(3, guiLeft + 5, guiTop + 64, "-");
|
||||
SmallerButton buttonSidePutP = new SmallerButton(0, guiLeft + 70, guiTop + 43 + (isAdvanced ? 12 : 0), ">");
|
||||
SmallerButton buttonSidePutM = new SmallerButton(1, guiLeft + 5, guiTop + 43 + (isAdvanced ? 12 : 0), "<");
|
||||
buttonSlotPutP = new SmallerButton(2, guiLeft + 70, guiTop + 64 + (isAdvanced ? 12 : 0), "+");
|
||||
buttonSlotPutM = new SmallerButton(3, guiLeft + 5, guiTop + 64 + (isAdvanced ? 12 : 0), "-");
|
||||
|
||||
SmallerButton buttonSidePullP = new SmallerButton(4, guiLeft + 155, guiTop + 43, ">");
|
||||
SmallerButton buttonSidePullM = new SmallerButton(5, guiLeft + 90, guiTop + 43, "<");
|
||||
buttonSlotPullP = new SmallerButton(6, guiLeft+ 155, guiTop + 64, "+");
|
||||
buttonSlotPullM = new SmallerButton(7, guiLeft + 90, guiTop + 64, "-");
|
||||
SmallerButton buttonSidePullP = new SmallerButton(4, guiLeft + 155, guiTop + 43 + (isAdvanced ? 12 : 0), ">");
|
||||
SmallerButton buttonSidePullM = new SmallerButton(5, guiLeft + 90, guiTop + 43 + (isAdvanced ? 12 : 0), "<");
|
||||
buttonSlotPullP = new SmallerButton(6, guiLeft+ 155, guiTop + 64 + (isAdvanced ? 12 : 0), "+");
|
||||
buttonSlotPullM = new SmallerButton(7, guiLeft + 90, guiTop + 64 + (isAdvanced ? 12 : 0), "-");
|
||||
|
||||
this.buttonList.add(buttonSidePutP);
|
||||
this.buttonList.add(buttonSlotPutP);
|
||||
|
@ -85,19 +90,19 @@ public class GuiInputter extends GuiContainer{
|
|||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93 + (isAdvanced ? 12 : 0), 0, 0, 176, 86);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(resLoc);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
|
||||
this.mc.getTextureManager().bindTexture(this.isAdvanced ? resLocAdvanced : resLoc);
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93 + (isAdvanced ? 12 : 0));
|
||||
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.put"), guiLeft + 22 + 3, guiTop + 32, 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.pull"), guiLeft + 107 + 3, guiTop + 32, 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.put"), guiLeft + 22 + 3, guiTop + 32 + (isAdvanced ? 12 : 0), 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.pull"), guiLeft + 107 + 3, guiTop + 32 + (isAdvanced ? 12 : 0), 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft + 24 + 1, guiTop + 45 + 3, 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPut == -1 ? StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPut).toString(), guiLeft + 24 + 3, guiTop + 66 + 3, 4210752);
|
||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft + 24 + 1, guiTop + 45 + 3 + (isAdvanced ? 12 : 0), 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPut == -1 ? StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPut).toString(), guiLeft + 24 + 3, guiTop + 66 + 3 + (isAdvanced ? 12 : 0), 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft + 109 + 1, guiTop + 45 + 3, 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPull == -1 ? StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPull).toString(), guiLeft + 109 + 3, guiTop + 66 + 3, 4210752);
|
||||
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft + 109 + 1, guiTop + 45 + 3 + (isAdvanced ? 12 : 0), 4210752);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPull == -1 ? StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPull).toString(), guiLeft + 109 + 3, guiTop + 66 + 3 + (isAdvanced ? 12 : 0), 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package ellpeck.actuallyadditions.inventory.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class SlotFilter extends Slot{
|
||||
|
||||
public SlotFilter(IInventory inventory, int id, int x, int y){
|
||||
super(inventory, id, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit(){
|
||||
return 1;
|
||||
}
|
||||
}
|
|
@ -44,10 +44,10 @@ public class InitItems{
|
|||
ItemUtil.register(itemFertilizer);
|
||||
|
||||
itemMisc = new ItemMisc();
|
||||
ItemUtil.register(itemMisc);
|
||||
ItemUtil.register(itemMisc, ItemMisc.allMiscItems);
|
||||
|
||||
itemFoods = new ItemFoods();
|
||||
ItemUtil.register(itemFoods);
|
||||
ItemUtil.register(itemFoods, ItemFoods.allFoods);
|
||||
|
||||
itemKnife = new ItemKnife();
|
||||
ItemUtil.register(itemKnife);
|
||||
|
@ -56,10 +56,10 @@ public class InitItems{
|
|||
ItemUtil.register(itemCrafterOnAStick);
|
||||
|
||||
itemDust = new ItemDust();
|
||||
ItemUtil.register(itemDust);
|
||||
ItemUtil.register(itemDust, ItemDust.allDusts);
|
||||
|
||||
itemSpecialDrop = new ItemSpecialDrop();
|
||||
ItemUtil.register(itemSpecialDrop);
|
||||
ItemUtil.register(itemSpecialDrop, ItemSpecialDrop.allDrops);
|
||||
|
||||
itemLeafBlower = new ItemLeafBlower(false);
|
||||
ItemUtil.register(itemLeafBlower);
|
||||
|
|
|
@ -4,7 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCrafterOnAStick extends Item implements IName{
|
||||
public class ItemCrafterOnAStick extends Item implements INameableItem{
|
||||
|
||||
public ItemCrafterOnAStick(){
|
||||
this.setMaxStackSize(1);
|
||||
|
@ -27,7 +27,7 @@ public class ItemCrafterOnAStick extends Item implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -56,4 +56,9 @@ public class ItemCrafterOnAStick extends Item implements IName{
|
|||
public String getName(){
|
||||
return "itemCrafterOnAStick";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheDusts;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -18,7 +15,7 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDust extends Item implements IName{
|
||||
public class ItemDust extends Item implements INameableItem{
|
||||
|
||||
public static final TheDusts[] allDusts = TheDusts.values();
|
||||
|
||||
|
@ -31,6 +28,11 @@ public class ItemDust extends Item implements IName{
|
|||
return "itemDust";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
|
@ -58,7 +60,10 @@ public class ItemDust extends Item implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allDusts[stack.getItemDamage()].getName() + ".desc"));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allDusts[stack.getItemDamage()].getName() + ".desc"));
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allDusts[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFertilizer extends Item implements IName{
|
||||
public class ItemFertilizer extends Item implements INameableItem{
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){
|
||||
|
@ -36,7 +36,7 @@ public class ItemFertilizer extends Item implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,4 +54,9 @@ public class ItemFertilizer extends Item implements IName{
|
|||
public String getName(){
|
||||
return "itemFertilizer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -18,7 +15,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFoods extends ItemFood implements IName{
|
||||
public class ItemFoods extends ItemFood implements INameableItem{
|
||||
|
||||
public static final TheFoods[] allFoods = TheFoods.values();
|
||||
public IIcon[] textures = new IIcon[allFoods.length];
|
||||
|
@ -30,6 +27,11 @@ public class ItemFoods extends ItemFood implements IName{
|
|||
TheFoods.setReturnItems();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return allFoods[stack.getItemDamage()].rarity;
|
||||
|
@ -97,6 +99,7 @@ public class ItemFoods extends ItemFood implements IName{
|
|||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allFoods[stack.getItemDamage()].getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".hunger.desc") + ": " + allFoods[stack.getItemDamage()].healAmount);
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".saturation.desc") + ": " + allFoods[stack.getItemDamage()].saturation);
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allFoods[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -17,7 +17,7 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemKnife extends Item implements IName{
|
||||
public class ItemKnife extends Item implements INameableItem{
|
||||
|
||||
public ItemKnife(){
|
||||
this.setMaxDamage(ConfigValues.knifeMaxDamage);
|
||||
|
@ -38,6 +38,11 @@ public class ItemKnife extends Item implements IName{
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
@ -50,6 +55,7 @@ public class ItemKnife extends Item implements IName{
|
|||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemLeafBlower extends Item implements IName{
|
||||
public class ItemLeafBlower extends Item implements INameableItem{
|
||||
|
||||
public final int range = ConfigValues.leafBlowerRangeSides;
|
||||
public final int rangeUp = ConfigValues.leafBlowerRangeUp;
|
||||
|
@ -48,6 +48,16 @@ public class ItemLeafBlower extends Item implements IName{
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRotateAroundWhenRendering(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public void breakStuff(World world, int x, int y, int z){
|
||||
ArrayList<ChunkCoordinates> theCoords = new ArrayList<ChunkCoordinates>();
|
||||
|
||||
|
@ -82,12 +92,12 @@ public class ItemLeafBlower extends Item implements IName{
|
|||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack){
|
||||
return 100000;
|
||||
return 1000000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack){
|
||||
return EnumAction.none;
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -109,6 +119,7 @@ public class ItemLeafBlower extends Item implements IName{
|
|||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + ".desc." + 1));
|
||||
list.add(StringUtil.ITALIC + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemLeafBlower.desc.2"));
|
||||
list.add(StringUtil.ITALIC + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemLeafBlower.desc.3"));
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -18,7 +15,7 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMisc extends Item implements IName{
|
||||
public class ItemMisc extends Item implements INameableItem{
|
||||
|
||||
public static final TheMiscItems[] allMiscItems = TheMiscItems.values();
|
||||
public IIcon[] textures = new IIcon[allMiscItems.length];
|
||||
|
@ -32,6 +29,11 @@ public class ItemMisc extends Item implements IName{
|
|||
return "itemMisc";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return allMiscItems[stack.getItemDamage()].rarity;
|
||||
|
@ -59,7 +61,10 @@ public class ItemMisc extends Item implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allMiscItems[stack.getItemDamage()].getName() + ".desc"));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allMiscItems[stack.getItemDamage()].getName() + ".desc"));
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allMiscItems[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPotionRing extends Item implements IName{
|
||||
public class ItemPotionRing extends Item implements INameableItem{
|
||||
|
||||
public static final ThePotionRings[] allRings = ThePotionRings.values();
|
||||
|
||||
|
@ -30,6 +30,11 @@ public class ItemPotionRing extends Item implements IName{
|
|||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5){
|
||||
|
@ -90,6 +95,7 @@ public class ItemPotionRing extends Item implements IName{
|
|||
list.add(StringUtil.RED + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemPotionRing.desc.off.1"));
|
||||
list.add(StringUtil.RED + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".itemPotionRing.desc.off.2"));
|
||||
}
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allRings[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
|
|
@ -3,10 +3,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
|
@ -21,7 +18,7 @@ import net.minecraft.world.World;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemSpecialDrop extends Item implements IName{
|
||||
public class ItemSpecialDrop extends Item implements INameableItem{
|
||||
|
||||
public static final TheSpecialDrops[] allDrops = TheSpecialDrops.values();
|
||||
public IIcon[] textures = new IIcon[allDrops.length];
|
||||
|
@ -51,6 +48,11 @@ public class ItemSpecialDrop extends Item implements IName{
|
|||
return allDrops[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
|
@ -73,7 +75,10 @@ public class ItemSpecialDrop extends Item implements IName{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||
if(KeyUtil.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allDrops[stack.getItemDamage()].getName() + ".desc"));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + this.getName() + allDrops[stack.getItemDamage()].getName() + ".desc"));
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + allDrops[stack.getItemDamage()].getOredictName());
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,32 +1,39 @@
|
|||
package ellpeck.actuallyadditions.items.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
||||
public enum TheDusts implements IName{
|
||||
public enum TheDusts implements INameableItem{
|
||||
|
||||
IRON("Iron", 7826534, EnumRarity.common),
|
||||
GOLD("Gold", 14335744, EnumRarity.uncommon),
|
||||
DIAMOND("Diamond", 292003, EnumRarity.rare),
|
||||
EMERALD("Emerald", 4319527, EnumRarity.epic),
|
||||
LAPIS("Lapis", 1849791, EnumRarity.uncommon),
|
||||
QUARTZ("Quartz", StringUtil.DECIMAL_COLOR_WHITE, EnumRarity.uncommon),
|
||||
COAL("Coal", 0, EnumRarity.uncommon),
|
||||
QUARTZ_BLACK("QuartzBlack", 18, EnumRarity.rare);
|
||||
IRON("Iron", 7826534, EnumRarity.common, "dustIron"),
|
||||
GOLD("Gold", 14335744, EnumRarity.uncommon, "dustGold"),
|
||||
DIAMOND("Diamond", 292003, EnumRarity.rare, "dustDiamond"),
|
||||
EMERALD("Emerald", 4319527, EnumRarity.epic, "dustEmerald"),
|
||||
LAPIS("Lapis", 1849791, EnumRarity.uncommon, "dustLapis"),
|
||||
QUARTZ("Quartz", StringUtil.DECIMAL_COLOR_WHITE, EnumRarity.uncommon, "dustQuartz"),
|
||||
COAL("Coal", 0, EnumRarity.uncommon, "dustCoal"),
|
||||
QUARTZ_BLACK("QuartzBlack", 18, EnumRarity.rare, "dustQuartzBlack");
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
public final int color;
|
||||
public final EnumRarity rarity;
|
||||
|
||||
TheDusts(String name, int color, EnumRarity rarity){
|
||||
TheDusts(String name, int color, EnumRarity rarity, String oredictName){
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
this.rarity = rarity;
|
||||
this.oredictName = oredictName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -1,29 +1,29 @@
|
|||
package ellpeck.actuallyadditions.items.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public enum TheFoods implements IName{
|
||||
public enum TheFoods implements INameableItem{
|
||||
|
||||
CHEESE("Cheese", 1, 0.5F, false, 3, EnumRarity.common),
|
||||
PUMPKIN_STEW("PumpkinStew", 10, 1F, true, 30, EnumRarity.common),
|
||||
CARROT_JUICE("CarrotJuice", 6, 0.6F, true, 20, EnumRarity.common),
|
||||
FISH_N_CHIPS("FishNChips", 20, 5F, false, 40, EnumRarity.uncommon),
|
||||
FRENCH_FRIES("FrenchFries", 16, 4F, false, 32, EnumRarity.common),
|
||||
FRENCH_FRY("FrenchFry", 3, 0.5F, false, 3, EnumRarity.common),
|
||||
SPAGHETTI("Spaghetti", 18, 3F, false, 38, EnumRarity.common),
|
||||
NOODLE("Noodle", 1, 0.5F, false, 3, EnumRarity.common),
|
||||
CHOCOLATE_CAKE("ChocolateCake", 16, 2F, false, 45, EnumRarity.uncommon),
|
||||
CHOCOLATE("Chocolate", 5, 1F, false, 15, EnumRarity.common),
|
||||
TOAST("Toast", 3, 0.4F, false, 25, EnumRarity.common),
|
||||
SUBMARINE_SANDWICH("SubmarineSandwich", 10, 8F, false, 40, EnumRarity.uncommon),
|
||||
BIG_COOKIE("BigCookie", 6, 1F, false, 20, EnumRarity.uncommon),
|
||||
HAMBURGER("Hamburger", 14, 6F, false, 40, EnumRarity.common),
|
||||
PIZZA("Pizza", 20, 10F, false, 45, EnumRarity.uncommon),
|
||||
BAGUETTE("Baguette", 7, 2F, false, 25, EnumRarity.common);
|
||||
CHEESE("Cheese", 1, 0.5F, false, 3, EnumRarity.common, "foodCheese"),
|
||||
PUMPKIN_STEW("PumpkinStew", 10, 1F, true, 30, EnumRarity.common, "foodPumpkinStew"),
|
||||
CARROT_JUICE("CarrotJuice", 6, 0.6F, true, 20, EnumRarity.common, "foodCarrotJuice"),
|
||||
FISH_N_CHIPS("FishNChips", 20, 5F, false, 40, EnumRarity.uncommon, "foodFishNChips"),
|
||||
FRENCH_FRIES("FrenchFries", 16, 4F, false, 32, EnumRarity.common, "foodFrenchFries"),
|
||||
FRENCH_FRY("FrenchFry", 3, 0.5F, false, 3, EnumRarity.common, "foodFrenchFry"),
|
||||
SPAGHETTI("Spaghetti", 18, 3F, false, 38, EnumRarity.common, "foodSpaghetti"),
|
||||
NOODLE("Noodle", 1, 0.5F, false, 3, EnumRarity.common, "foodNoodle"),
|
||||
CHOCOLATE_CAKE("ChocolateCake", 16, 2F, false, 45, EnumRarity.uncommon, "foodChocolateCake"),
|
||||
CHOCOLATE("Chocolate", 5, 1F, false, 15, EnumRarity.common, "foodChocolate"),
|
||||
TOAST("Toast", 3, 0.4F, false, 25, EnumRarity.common, "foodToast"),
|
||||
SUBMARINE_SANDWICH("SubmarineSandwich", 10, 8F, false, 40, EnumRarity.uncommon, "foodSubmarineSandwich"),
|
||||
BIG_COOKIE("BigCookie", 6, 1F, false, 20, EnumRarity.uncommon, "foodBigCookie"),
|
||||
HAMBURGER("Hamburger", 14, 6F, false, 40, EnumRarity.common, "foodHamburger"),
|
||||
PIZZA("Pizza", 20, 10F, false, 45, EnumRarity.uncommon, "foodPizza"),
|
||||
BAGUETTE("Baguette", 7, 2F, false, 25, EnumRarity.common, "foodBaguette");
|
||||
|
||||
public static void setReturnItems(){
|
||||
SPAGHETTI.returnItem = new ItemStack(Items.bowl);
|
||||
|
@ -34,6 +34,7 @@ public enum TheFoods implements IName{
|
|||
}
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
public final int healAmount;
|
||||
public final float saturation;
|
||||
public final boolean getsDrunken;
|
||||
|
@ -41,17 +42,23 @@ public enum TheFoods implements IName{
|
|||
public ItemStack returnItem;
|
||||
public final EnumRarity rarity;
|
||||
|
||||
TheFoods(String name, int healAmount, float saturation, boolean getsDrunken, int useDuration, EnumRarity rarity){
|
||||
TheFoods(String name, int healAmount, float saturation, boolean getsDrunken, int useDuration, EnumRarity rarity, String oredictName){
|
||||
this.name = name;
|
||||
this.getsDrunken = getsDrunken;
|
||||
this.healAmount = healAmount;
|
||||
this.saturation = saturation;
|
||||
this.useDuration = useDuration;
|
||||
this.rarity = rarity;
|
||||
this.oredictName = oredictName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -1,28 +1,37 @@
|
|||
package ellpeck.actuallyadditions.items.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
||||
public enum TheMiscItems implements IName{
|
||||
public enum TheMiscItems implements INameableItem{
|
||||
|
||||
PAPER_CONE("PaperCone", EnumRarity.common),
|
||||
MASHED_FOOD("MashedFood", EnumRarity.uncommon),
|
||||
KNIFE_BLADE("KnifeBlade", EnumRarity.common),
|
||||
KNIFE_HANDLE("KnifeHandle", EnumRarity.common),
|
||||
DOUGH("Dough", EnumRarity.common),
|
||||
QUARTZ("BlackQuartz", EnumRarity.epic),
|
||||
RING("Ring", EnumRarity.uncommon);
|
||||
PAPER_CONE("PaperCone", EnumRarity.common, "itemPaperCone"),
|
||||
MASHED_FOOD("MashedFood", EnumRarity.uncommon, "itemMashedFood"),
|
||||
KNIFE_BLADE("KnifeBlade", EnumRarity.common, "itemKnifeBlade"),
|
||||
KNIFE_HANDLE("KnifeHandle", EnumRarity.common, "itemKnifeHandle"),
|
||||
DOUGH("Dough", EnumRarity.common, "itemDough"),
|
||||
QUARTZ("BlackQuartz", EnumRarity.epic, "gemQuartzBlack"),
|
||||
RING("Ring", EnumRarity.uncommon, "itemRing"),
|
||||
COIL("Coil", EnumRarity.common, "itemCoilBasic"),
|
||||
COIL_ADVANCED("CoilAdvanced", EnumRarity.uncommon, "itemCoilAdvanced");
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
public final EnumRarity rarity;
|
||||
|
||||
TheMiscItems(String name, EnumRarity rarity){
|
||||
TheMiscItems(String name, EnumRarity rarity, String oredictName){
|
||||
this.name = name;
|
||||
this.rarity = rarity;
|
||||
this.oredictName = oredictName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
package ellpeck.actuallyadditions.items.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public enum ThePotionRings implements IName{
|
||||
public enum ThePotionRings implements INameableItem{
|
||||
|
||||
SPEED("Speed", 8171462, 1, 0, 3, 10, false, EnumRarity.uncommon, new ItemStack(Items.sugar)),
|
||||
//TODO Slowness
|
||||
|
@ -58,4 +58,9 @@ public enum ThePotionRings implements IName{
|
|||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return "itemPotionRing";
|
||||
}
|
||||
}
|
|
@ -1,40 +1,47 @@
|
|||
package ellpeck.actuallyadditions.items.metalists;
|
||||
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
||||
public enum TheSpecialDrops implements IName{
|
||||
public enum TheSpecialDrops implements INameableItem{
|
||||
|
||||
SOLIDIFIED_EXPERIENCE("SolidifiedExperience", 40, 3, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableExperienceDrop),
|
||||
BLOOD_FRAGMENT("BloodFragment", 15, 1, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableBloodDrop),
|
||||
HEART_PART("HeartPart", 5, 1, EntityCreature.class, EnumRarity.rare, ConfigValues.enableHeartDrop),
|
||||
UNKNOWN_SUBSTANCE("UnknownSubstance", 3, 1, EntitySkeleton.class, EnumRarity.epic, ConfigValues.enableSubstanceDrop),
|
||||
PEARL_SHARD("PearlShard", 30, 3, EntityEnderman.class, EnumRarity.epic, ConfigValues.enablePearlShardDrop),
|
||||
EMERALD_SHARD("EmeraldShard", 30, 3, EntityCreeper.class, EnumRarity.rare, ConfigValues.enableEmeraldShardDrop);
|
||||
SOLIDIFIED_EXPERIENCE("SolidifiedExperience", 40, 3, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableExperienceDrop, "itemSolidifiedExperience"),
|
||||
BLOOD_FRAGMENT("BloodFragment", 15, 1, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableBloodDrop, "itemBloodFragment"),
|
||||
HEART_PART("HeartPart", 5, 1, EntityCreature.class, EnumRarity.rare, ConfigValues.enableHeartDrop, "itemHeartPart"),
|
||||
UNKNOWN_SUBSTANCE("UnknownSubstance", 3, 1, EntitySkeleton.class, EnumRarity.epic, ConfigValues.enableSubstanceDrop, "itemUnknownSubstance"),
|
||||
PEARL_SHARD("PearlShard", 30, 3, EntityEnderman.class, EnumRarity.epic, ConfigValues.enablePearlShardDrop, "nuggetEnderpearl"),
|
||||
EMERALD_SHARD("EmeraldShard", 30, 3, EntityCreeper.class, EnumRarity.rare, ConfigValues.enableEmeraldShardDrop, "nuggetEmerald");
|
||||
|
||||
public final String name;
|
||||
public final String oredictName;
|
||||
public final int chance;
|
||||
public final int maxAmount;
|
||||
public final Class<? extends EntityCreature> dropFrom;
|
||||
public final boolean canDrop;
|
||||
public final EnumRarity rarity;
|
||||
|
||||
TheSpecialDrops(String name, int chance, int maxAmount, Class<? extends EntityCreature> dropFrom, EnumRarity rarity, boolean canDrop){
|
||||
TheSpecialDrops(String name, int chance, int maxAmount, Class<? extends EntityCreature> dropFrom, EnumRarity rarity, boolean canDrop, String oredictName){
|
||||
this.name = name;
|
||||
this.chance = chance;
|
||||
this.rarity = rarity;
|
||||
this.maxAmount = maxAmount;
|
||||
this.dropFrom = dropFrom;
|
||||
this.canDrop = canDrop;
|
||||
this.oredictName = oredictName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items.tools;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -16,27 +16,31 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemAxeAA extends ItemAxe implements IName{
|
||||
public class ItemAxeAA extends ItemAxe implements INameableItem{
|
||||
|
||||
private String name;
|
||||
private EnumRarity rarity;
|
||||
private ItemStack repairItem;
|
||||
private String oredictName;
|
||||
|
||||
public ItemAxeAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)this).getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,4 +68,9 @@ public class ItemAxeAA extends ItemAxe implements IName{
|
|||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items.tools;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -16,9 +16,10 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemHoeAA extends ItemHoe implements IName{
|
||||
public class ItemHoeAA extends ItemHoe implements INameableItem{
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private ItemStack repairItem;
|
||||
|
||||
|
@ -27,16 +28,19 @@ public class ItemHoeAA extends ItemHoe implements IName{
|
|||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)this).getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,4 +68,9 @@ public class ItemHoeAA extends ItemHoe implements IName{
|
|||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items.tools;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -16,9 +16,10 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPickaxeAA extends ItemPickaxe implements IName{
|
||||
public class ItemPickaxeAA extends ItemPickaxe implements INameableItem{
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private ItemStack repairItem;
|
||||
|
||||
|
@ -27,16 +28,19 @@ public class ItemPickaxeAA extends ItemPickaxe implements IName{
|
|||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)this).getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,4 +68,9 @@ public class ItemPickaxeAA extends ItemPickaxe implements IName{
|
|||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items.tools;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -16,9 +16,10 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemShovelAA extends ItemSpade implements IName{
|
||||
public class ItemShovelAA extends ItemSpade implements INameableItem{
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private ItemStack repairItem;
|
||||
|
||||
|
@ -27,16 +28,19 @@ public class ItemShovelAA extends ItemSpade implements IName{
|
|||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)this).getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,4 +68,9 @@ public class ItemShovelAA extends ItemSpade implements IName{
|
|||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items.tools;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IName;
|
||||
import ellpeck.actuallyadditions.util.INameableItem;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.KeyUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
|
@ -16,9 +16,10 @@ import net.minecraft.util.StatCollector;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSwordAA extends ItemSword implements IName{
|
||||
public class ItemSwordAA extends ItemSword implements INameableItem{
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private ItemStack repairItem;
|
||||
|
||||
|
@ -27,16 +28,19 @@ public class ItemSwordAA extends ItemSword implements IName{
|
|||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||
list.add(ItemUtil.addStandardInformation(this));
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)this).getName() + ".desc"));
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||
ItemUtil.addOredictName(this, list);
|
||||
}
|
||||
else ItemUtil.addStandardInformation(this, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,4 +68,9 @@ public class ItemSwordAA extends ItemSword implements IName{
|
|||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
package ellpeck.actuallyadditions.oredict;
|
||||
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheDusts;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class OreDictRegistry{
|
||||
|
||||
public static void init(){
|
||||
OreDictionary.registerOre("dustDiamond", new ItemStack(InitItems.itemDust, 1, TheDusts.DIAMOND.ordinal()));
|
||||
OreDictionary.registerOre("dustIron", new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()));
|
||||
OreDictionary.registerOre("dustGold", new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()));
|
||||
OreDictionary.registerOre("dustEmerald", new ItemStack(InitItems.itemDust, 1, TheDusts.EMERALD.ordinal()));
|
||||
OreDictionary.registerOre("dustLapis", new ItemStack(InitItems.itemDust, 1, TheDusts.LAPIS.ordinal()));
|
||||
OreDictionary.registerOre("dustCoal", new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()));
|
||||
OreDictionary.registerOre("dustQuartz", new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ.ordinal()));
|
||||
OreDictionary.registerOre("dustQuartzBlack", new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ_BLACK.ordinal()));
|
||||
OreDictionary.registerOre("oreQuartzBlack", new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()));
|
||||
OreDictionary.registerOre("itemQuartzBlack", new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
|
||||
}
|
||||
}
|
|
@ -9,6 +9,9 @@ import net.minecraft.world.World;
|
|||
|
||||
public class TileEntityInputter extends TileEntityInventoryBase{
|
||||
|
||||
public static final int PUT_FILTER_START = 1;
|
||||
public static final int PULL_FILTER_START = 7;
|
||||
|
||||
public int sideToPut = -1;
|
||||
public int slotToPut = -1;
|
||||
public int placeToPutSlotAmount;
|
||||
|
@ -19,8 +22,15 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
public int placeToPullSlotAmount;
|
||||
public TileEntity placeToPull;
|
||||
|
||||
public boolean isAdvanced;
|
||||
|
||||
public TileEntityInputter(){
|
||||
super(1, "tileEntityInputter");
|
||||
super(0, "");
|
||||
}
|
||||
|
||||
public TileEntityInputter(boolean isAdvanced){
|
||||
super(isAdvanced ? 13 : 1, isAdvanced ? "tilEntityInputterAdvanced" : "tileEntityInputter");
|
||||
this.isAdvanced = isAdvanced;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,12 +38,14 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
if(!worldObj.isRemote){
|
||||
this.initVars();
|
||||
|
||||
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
|
||||
if(!(this.sideToPull == this.sideToPut && this.slotToPull == this.slotToPut)){
|
||||
if(sideToPull != -1) this.pull();
|
||||
if(sideToPut != -1) this.put();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void pull(){
|
||||
if(this.placeToPullSlotAmount > 0){
|
||||
|
@ -50,7 +62,7 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
if(tempStack.getMaxStackSize() < this.getInventoryStackLimit()) maxSize = tempStack.getMaxStackSize();
|
||||
else maxSize = this.getInventoryStackLimit();
|
||||
}
|
||||
if(tempStack != null && (this.slots[0] == null || (tempStack.isItemEqual(this.slots[0]) && this.slots[0].stackSize < maxSize))){
|
||||
if(tempStack != null && (this.slots[0] == null || (tempStack.isItemEqual(this.slots[0]) && this.slots[0].stackSize < maxSize)) && this.checkFilters(tempStack, true)){
|
||||
if(theSided != null){
|
||||
for(int j = 0; j < 5; j++){
|
||||
if(theSided.canExtractItem(i, tempStack, j)){
|
||||
|
@ -108,7 +120,7 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
if(tempStack.getMaxStackSize() < theInventory.getInventoryStackLimit()) maxSize = tempStack.getMaxStackSize();
|
||||
else maxSize = theInventory.getInventoryStackLimit();
|
||||
}
|
||||
if(tempStack == null || (theInventory.isItemValidForSlot(i, this.slots[0]) && tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < maxSize)){
|
||||
if((tempStack == null || (theInventory.isItemValidForSlot(i, this.slots[0]) && tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < maxSize)) && this.checkFilters(this.slots[0], false)){
|
||||
if(theSided != null){
|
||||
for(int j = 0; j < 5; j++){
|
||||
if(theSided.canInsertItem(i, this.slots[0], j)){
|
||||
|
@ -152,6 +164,18 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
}
|
||||
}
|
||||
|
||||
public boolean checkFilters(ItemStack stack, boolean isPull){
|
||||
if(!this.isAdvanced) return true;
|
||||
|
||||
int slotStart = isPull ? PULL_FILTER_START : PUT_FILTER_START;
|
||||
int slotStop = slotStart+6;
|
||||
|
||||
for(int i = slotStart; i < slotStop; i++){
|
||||
if(this.slots[i] != null && this.slots[i].isItemEqual(stack)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void initVars(){
|
||||
this.placeToPull = getTileEntityFromSide(this.sideToPull, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
this.placeToPut = getTileEntityFromSide(this.sideToPut, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
|
@ -211,20 +235,26 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
compound.setInteger("SlotToPut", this.slotToPut);
|
||||
compound.setInteger("SideToPull", this.sideToPull);
|
||||
compound.setInteger("SlotToPull", this.slotToPull);
|
||||
compound.setBoolean("IsAdvanced", this.isAdvanced);
|
||||
compound.setString("Name", this.name);
|
||||
compound.setInteger("Slots", this.slots.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound){
|
||||
super.readFromNBT(compound);
|
||||
this.initializeSlots(compound.getInteger("Slots"));
|
||||
this.sideToPut = compound.getInteger("SideToPut");
|
||||
this.slotToPut = compound.getInteger("SlotToPut");
|
||||
this.sideToPull = compound.getInteger("SideToPull");
|
||||
this.slotToPull = compound.getInteger("SlotToPull");
|
||||
this.isAdvanced = compound.getBoolean("IsAdvanced");
|
||||
this.name = compound.getString("Name");
|
||||
super.readFromNBT(compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack){
|
||||
return true;
|
||||
return i == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -234,6 +264,6 @@ public class TileEntityInputter extends TileEntityInventoryBase{
|
|||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side){
|
||||
return true;
|
||||
return slot == 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,17 +4,46 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockUtil{
|
||||
|
||||
public static String createUnlocalizedName(Block block){
|
||||
return ModUtil.MOD_ID_LOWER + "." + ((IName)block).getName();
|
||||
return ModUtil.MOD_ID_LOWER + "." + ((INameableItem)block).getName();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addStandardInformation(Block block, List list){
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)block).getName() + ".desc"));
|
||||
addOredictName(block, list);
|
||||
}
|
||||
else list.add(ItemUtil.shiftForInfo());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addOredictName(Block block, List list){
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + ((INameableItem)block).getOredictName());
|
||||
}
|
||||
|
||||
public static void register(Block block, Class<? extends ItemBlock> itemBlock, Enum[] list){
|
||||
block.setCreativeTab(CreativeTab.instance);
|
||||
block.setBlockName(createUnlocalizedName(block));
|
||||
GameRegistry.registerBlock(block, itemBlock, ((INameableItem)block).getName());
|
||||
for(Enum current : list){
|
||||
OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(block, 1, current.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
public static void register(Block block, Class<? extends ItemBlock> itemBlock){
|
||||
block.setCreativeTab(CreativeTab.instance);
|
||||
block.setBlockName(createUnlocalizedName(block));
|
||||
GameRegistry.registerBlock(block, itemBlock, ((IName)block).getName());
|
||||
GameRegistry.registerBlock(block, itemBlock, ((INameableItem)block).getName());
|
||||
OreDictionary.registerOre(((INameableItem)block).getOredictName(), block);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package ellpeck.actuallyadditions.util;
|
||||
|
||||
public interface IName{
|
||||
public interface INameableItem{
|
||||
|
||||
String getName();
|
||||
|
||||
String getOredictName();
|
||||
|
||||
}
|
|
@ -3,13 +3,21 @@ package ellpeck.actuallyadditions.util;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemUtil{
|
||||
|
||||
public static String addStandardInformation(Item item){
|
||||
if(KeyUtil.isShiftPressed()) return StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((IName)item).getName() + ".desc");
|
||||
else return shiftForInfo();
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addStandardInformation(Item item, List list){
|
||||
if(KeyUtil.isShiftPressed()){
|
||||
list.add(StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + "." + ((INameableItem)item).getName() + ".desc"));
|
||||
addOredictName(item, list);
|
||||
}
|
||||
else list.add(shiftForInfo());
|
||||
}
|
||||
|
||||
public static void registerItems(Item[] items){
|
||||
|
@ -18,14 +26,29 @@ public class ItemUtil{
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addOredictName(Item item, List list){
|
||||
list.add(StringUtil.GRAY + StatCollector.translateToLocal("tooltip." + ModUtil.MOD_ID_LOWER + ".oredictName.desc") + ": " + ((INameableItem)item).getOredictName());
|
||||
}
|
||||
|
||||
public static void register(Item item){
|
||||
item.setCreativeTab(CreativeTab.instance);
|
||||
item.setUnlocalizedName(createUnlocalizedName(item));
|
||||
GameRegistry.registerItem(item, ((IName)item).getName());
|
||||
GameRegistry.registerItem(item, ((INameableItem)item).getName());
|
||||
OreDictionary.registerOre(((INameableItem)item).getOredictName(), item);
|
||||
}
|
||||
|
||||
public static void register(Item item, Enum[] list){
|
||||
item.setCreativeTab(CreativeTab.instance);
|
||||
item.setUnlocalizedName(createUnlocalizedName(item));
|
||||
GameRegistry.registerItem(item, ((INameableItem)item).getName());
|
||||
for(Enum current : list){
|
||||
OreDictionary.registerOre(((INameableItem)current).getOredictName(), new ItemStack(item, 1, current.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
public static String createUnlocalizedName(Item item){
|
||||
return ModUtil.MOD_ID_LOWER + "." + ((IName)item).getName();
|
||||
return ModUtil.MOD_ID_LOWER + "." + ((INameableItem)item).getName();
|
||||
}
|
||||
|
||||
public static String shiftForInfo(){
|
||||
|
|
|
@ -7,7 +7,7 @@ tile.actuallyadditions.blockMiscBlackQuartz.name=Block of Black Quartz
|
|||
tile.actuallyadditions.blockMiscBlackQuartzChiseled.name=Chiseled Block of Black Quartz
|
||||
tile.actuallyadditions.blockMiscBlackQuartzPillar.name=Pillar of Black Quartz
|
||||
tile.actuallyadditions.blockFeeder.name=Automatic Feeder
|
||||
tile.actuallyadditions.blockGiantChest.name=Giant Chest
|
||||
tile.actuallyadditions.blockGiantChest.name=Storage Crate
|
||||
tile.actuallyadditions.blockGrinder.name=Crusher
|
||||
tile.actuallyadditions.blockGrinderDouble.name=Double Crusher
|
||||
tile.actuallyadditions.blockFurnaceDouble.name=Double Furnace
|
||||
|
@ -17,6 +17,7 @@ tile.actuallyadditions.blockHeatCollector.name=Heat Collector
|
|||
tile.actuallyadditions.blockItemRepairer.name=Item Repairer
|
||||
|
||||
tile.actuallyadditions.blockInputter.name=ESD
|
||||
tile.actuallyadditions.blockInputterAdvanced.name=Advanced ESD
|
||||
tile.actuallyadditions.blockInputter.add.0.name=Ellpeck's Slot Device
|
||||
tile.actuallyadditions.blockInputter.add.1.name=Energetic Solo Dancer
|
||||
tile.actuallyadditions.blockInputter.add.2.name=Ethereal System Dude
|
||||
|
@ -30,6 +31,9 @@ tile.actuallyadditions.blockInputter.add.9.name=Express Sending Doughnut
|
|||
tile.actuallyadditions.blockInputter.add.10.name=Expelling Sugar Dagger
|
||||
tile.actuallyadditions.blockInputter.add.11.name=Extra-Long Solidifying Dissociation
|
||||
tile.actuallyadditions.blockInputter.add.12.name=Extravagant Supreme Dirt
|
||||
tile.actuallyadditions.blockInputter.add.13.name=Efficient Sucking Dilettant
|
||||
tile.actuallyadditions.blockInputter.add.14.name=Extreme Sand Digger
|
||||
tile.actuallyadditions.blockInputter.add.15.name=MISSINGNO
|
||||
|
||||
item.actuallyadditions.itemMiscMashedFood.name=Mashed Food
|
||||
item.actuallyadditions.itemFertilizer.name=Fertilizer
|
||||
|
@ -95,6 +99,7 @@ tooltip.actuallyadditions.shiftForInfo.desc=Press Shift for Info
|
|||
tooltip.actuallyadditions.hunger.desc=Fills
|
||||
tooltip.actuallyadditions.saturation.desc=Saturation
|
||||
tooltip.actuallyadditions.durability.desc=Durability
|
||||
tooltip.actuallyadditions.oredictName.desc=OreDictionary Name
|
||||
|
||||
tooltip.actuallyadditions.blockCompost.desc.1=Used to make Fertilizer with Mashed Food
|
||||
tooltip.actuallyadditions.blockCompost.desc.2=BETA INFO: Will visually contain Compost in the Future!
|
||||
|
@ -103,7 +108,7 @@ tooltip.actuallyadditions.blockMiscBlackQuartz.desc=Black, eerie Quartz! Nice fo
|
|||
tooltip.actuallyadditions.blockMiscBlackQuartzChiseled.desc=Black, eerie chiseled Quartz! Nice for decorating.
|
||||
tooltip.actuallyadditions.blockMiscBlackQuartzPillar.desc=Kind of a pillar. Not really, though. It's fake! Fake I say!
|
||||
tooltip.actuallyadditions.blockFeeder.desc=Feeds Animals on its own!
|
||||
tooltip.actuallyadditions.blockGiantChest.desc=GUI Scale on 'Auto'? That's a problem!
|
||||
tooltip.actuallyadditions.blockGiantChest.desc=Stores a whole lot of stuff. Bigger than a Double Chest!
|
||||
tooltip.actuallyadditions.blockGrinder.desc.1=Crushes Ores into Dusts!
|
||||
tooltip.actuallyadditions.blockGrinder.desc.2=You get two Dusts per Ore and Extras!
|
||||
tooltip.actuallyadditions.blockGrinder.desc.3=To crush two ores simultaneously,
|
||||
|
@ -114,9 +119,11 @@ tooltip.actuallyadditions.blockGrinderDouble.desc.3=Can crush two Ores simultane
|
|||
tooltip.actuallyadditions.blockFurnaceDouble.desc=Smelts two things simultaneously!
|
||||
tooltip.actuallyadditions.blockInputter.desc.1=Its real name is %sObfuscated%s!
|
||||
tooltip.actuallyadditions.blockInputter.desc.2=Acts like a more advanced Hopper
|
||||
tooltip.actuallyadditions.blockInputter.desc.3=Configurable:
|
||||
tooltip.actuallyadditions.blockInputter.desc.4=-Side to Output to and Input from
|
||||
tooltip.actuallyadditions.blockInputter.desc.5=-Slot in the other Inventory to Output to and Input from
|
||||
tooltip.actuallyadditions.blockInputter.desc.3=Turn me off with Redstone!
|
||||
tooltip.actuallyadditions.blockInputter.desc.4=Configurable:
|
||||
tooltip.actuallyadditions.blockInputter.desc.5=-Side to Output to and Input from
|
||||
tooltip.actuallyadditions.blockInputter.desc.6=-Slot in the other Inventory to Output to and Input from
|
||||
tooltip.actuallyadditions.blockInputterAdvanced.desc=Has an Input and Output Filter!
|
||||
tooltip.actuallyadditions.blockFishingNet.desc=Catches Fish automatically when placed above Water
|
||||
tooltip.actuallyadditions.blockFurnaceSolar.desc=Powers Furnaces and Crushers below it in Daylight
|
||||
tooltip.actuallyadditions.blockHeatCollector.desc.1=Powers Furnaces and Crushers above it
|
||||
|
|
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 657 B |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 374 B After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 412 B |