mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-26 13:09:22 +01:00
Changed the way block naming is handled code-wise.
Didn't change anything to the game.
This commit is contained in:
parent
5993bb6e0f
commit
a5dfbc426c
104 changed files with 1199 additions and 1388 deletions
|
@ -18,7 +18,7 @@ import net.minecraft.stats.Achievement;
|
|||
|
||||
public enum TheAchievements{
|
||||
|
||||
OPEN_BOOKLET("openBooklet", 0, 0, new ItemStack(InitItems.itemLexicon), null, InitAchievements.MISC_ACH),
|
||||
OPEN_BOOKLET("openBooklet", 0, 0, new ItemStack(InitItems.itemBooklet), null, InitAchievements.MISC_ACH),
|
||||
NAME_SMILEY_CLOUD("nameSmileyCloud", 2, 0, new ItemStack(InitBlocks.blockSmileyCloud), OPEN_BOOKLET.ach, InitAchievements.MISC_ACH),
|
||||
CRAFT_PHANTOMFACE("craftPhantomface", -2, 0, new ItemStack(InitBlocks.blockPhantomface), OPEN_BOOKLET.ach),
|
||||
OPEN_TREASURE_CHEST("openTreasureChest", 0, -2, new ItemStack(InitBlocks.blockTreasureChest), OPEN_BOOKLET.ach, InitAchievements.MISC_ACH);
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.items.IReconstructorLens;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityAtomicReconstructor;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
|
@ -22,7 +22,6 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
|
@ -30,15 +29,15 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAtomicReconstructor extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockAtomicReconstructor extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockAtomicReconstructor(){
|
||||
super(Material.rock);
|
||||
public BlockAtomicReconstructor(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(10F);
|
||||
this.setResistance(80F);
|
||||
|
@ -114,19 +113,9 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IAct
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockAtomicReconstructor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* This file ("BlockFlower.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* This file ("BlockBlackLotus.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
|
@ -12,18 +12,15 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBushBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockBlackLotus extends BlockBush implements IActAddItemOrBlock{
|
||||
public class BlockBlackLotus extends BlockBushBase{
|
||||
|
||||
public BlockBlackLotus(){
|
||||
this.setStepSound(soundTypeGrass);
|
||||
public BlockBlackLotus(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -35,16 +32,6 @@ public class BlockBlackLotus extends BlockBush implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockBlackLotus";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBookletStand;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -29,10 +29,10 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBookletStand extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockBookletStand extends BlockContainerBase{
|
||||
|
||||
public BlockBookletStand(){
|
||||
super(Material.wood);
|
||||
public BlockBookletStand(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(4.0F);
|
||||
|
@ -103,11 +103,6 @@ public class BlockBookletStand extends BlockContainerBase implements IActAddItem
|
|||
this.blockIcon = Blocks.planks.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockBookStand";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBreaker;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
|
@ -30,7 +30,7 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockBreaker extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
@ -39,8 +39,8 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
|
|||
|
||||
private boolean isPlacer;
|
||||
|
||||
public BlockBreaker(boolean isPlacer){
|
||||
super(Material.rock);
|
||||
public BlockBreaker(boolean isPlacer, String name){
|
||||
super(Material.rock, name);
|
||||
this.isPlacer = isPlacer;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
|
@ -99,14 +99,9 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isPlacer ? "blockPlacer" : "blockBreaker";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityCanolaPress;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,13 +27,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCanolaPress extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockCanolaPress extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockCanolaPress(){
|
||||
super(Material.rock);
|
||||
public BlockCanolaPress(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -66,13 +66,8 @@ public class BlockCanolaPress extends BlockContainerBase implements IActAddItemO
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockCanolaPress";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityCoalGenerator;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -30,15 +30,15 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockCoalGenerator extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockCoalGenerator extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockCoalGenerator(){
|
||||
super(Material.rock);
|
||||
public BlockCoalGenerator(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -84,14 +84,9 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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
|
||||
public String getName(){
|
||||
return "blockCoalGenerator";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityCoffeeMachine;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -30,10 +30,10 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCoffeeMachine extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockCoffeeMachine extends BlockContainerBase{
|
||||
|
||||
public BlockCoffeeMachine(){
|
||||
super(Material.rock);
|
||||
public BlockCoffeeMachine(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -111,11 +111,6 @@ public class BlockCoffeeMachine extends BlockContainerBase implements IActAddIte
|
|||
super.breakBlock(world, x, y, z, block, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockCoffeeMachine";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -33,26 +33,21 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
||||
public class BlockColoredLamp extends BlockBase{
|
||||
|
||||
public static TheColoredLampColors[] allLampTypes = TheColoredLampColors.values();
|
||||
public boolean isOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockColoredLamp(boolean isOn){
|
||||
super(Material.redstoneLight);
|
||||
public BlockColoredLamp(boolean isOn, String name){
|
||||
super(Material.redstoneLight, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(3.0F);
|
||||
this.isOn = isOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isOn ? "blockColoredLampOn" : "blockColoredLamp";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
|
@ -131,7 +126,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[allLampTypes.length];
|
||||
for(int i = 0; i < allLampTypes.length; i++){
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+((IActAddItemOrBlock)InitBlocks.blockColoredLamp).getName()+allLampTypes[i].name+(isOn ? "On" : ""));
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allLampTypes[i].name+(isOn ? "On" : ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +135,11 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
return this.isOn ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
||||
public TheItemBlock(Block block){
|
||||
|
@ -160,16 +160,5 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,12 +12,12 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
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.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -33,10 +33,10 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockCompost extends BlockContainerBase{
|
||||
|
||||
public BlockCompost(){
|
||||
super(Material.wood);
|
||||
public BlockCompost(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(5.0F);
|
||||
|
@ -137,11 +137,6 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo
|
|||
super.breakBlock(world, x, y, z, block, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockCompost";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.uncommon;
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheCrystals;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -29,12 +29,12 @@ import net.minecraft.world.IBlockAccess;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCrystal extends Block implements IActAddItemOrBlock{
|
||||
public class BlockCrystal extends BlockBase{
|
||||
|
||||
public static final TheCrystals[] allCrystals = TheCrystals.values();
|
||||
|
||||
public BlockCrystal(){
|
||||
super(Material.rock);
|
||||
public BlockCrystal(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setHarvestLevel("pickaxe", 1);
|
||||
|
@ -74,12 +74,7 @@ public class BlockCrystal extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockCrystal";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,6 +82,11 @@ public class BlockCrystal extends Block implements IActAddItemOrBlock{
|
|||
return stack.getItemDamage() >= allCrystals.length ? EnumRarity.common : allCrystals[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
||||
public TheItemBlock(Block block){
|
||||
|
@ -99,16 +99,5 @@ public class BlockCrystal extends Block implements IActAddItemOrBlock{
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return stack.getItemDamage() >= allCrystals.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allCrystals[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityDirectionalBreaker;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
|
@ -30,15 +30,15 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockDirectionalBreaker extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockDirectionalBreaker extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockDirectionalBreaker(){
|
||||
super(Material.rock);
|
||||
public BlockDirectionalBreaker(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -96,14 +96,9 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockDirectionalBreaker";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityDropper;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
|
@ -30,15 +30,15 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockDropper extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockDropper(){
|
||||
super(Material.rock);
|
||||
public BlockDropper(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -96,14 +96,9 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockDropper";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityEnergizer;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityEnervator;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -28,7 +28,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockEnergizer extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
@ -36,8 +36,8 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
|
|||
private IIcon sideIcon;
|
||||
private boolean isEnergizer;
|
||||
|
||||
public BlockEnergizer(boolean isEnergizer){
|
||||
super(Material.rock);
|
||||
public BlockEnergizer(boolean isEnergizer, String name){
|
||||
super(Material.rock, name);
|
||||
this.isEnergizer = isEnergizer;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(2.0F);
|
||||
|
@ -79,14 +79,9 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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.sideIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isEnergizer ? "blockEnergizer" : "blockEnervator";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.sideIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Side");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFeeder;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,13 +27,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFeeder extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockFeeder(){
|
||||
super(Material.rock);
|
||||
public BlockFeeder(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(6.0F);
|
||||
|
@ -66,13 +66,8 @@ public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBloc
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockFeeder";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFermentingBarrel;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,13 +27,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFermentingBarrel extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFermentingBarrel extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockFermentingBarrel(){
|
||||
super(Material.wood);
|
||||
public BlockFermentingBarrel(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(5.0F);
|
||||
|
@ -72,13 +72,8 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.iconTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockFermentingBarrel";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.iconTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFishingNet;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -24,10 +24,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFishingNet extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFishingNet extends BlockContainerBase{
|
||||
|
||||
public BlockFishingNet(){
|
||||
super(Material.wood);
|
||||
public BlockFishingNet(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(3.0F);
|
||||
|
@ -67,11 +67,6 @@ public class BlockFishingNet extends BlockContainerBase implements IActAddItemOr
|
|||
this.blockIcon = Blocks.planks.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockFishingNet";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFluidCollector;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
|
@ -30,7 +30,7 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFluidCollector extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFluidCollector extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
@ -39,8 +39,8 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
|
|||
|
||||
private boolean isPlacer;
|
||||
|
||||
public BlockFluidCollector(boolean isPlacer){
|
||||
super(Material.rock);
|
||||
public BlockFluidCollector(boolean isPlacer, String name){
|
||||
super(Material.rock, name);
|
||||
this.isPlacer = isPlacer;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
|
@ -99,14 +99,9 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isPlacer ? "blockFluidPlacer" : "blockFluidCollector";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFurnaceDouble;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -33,7 +33,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockFurnaceDouble extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFurnaceDouble extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
@ -42,8 +42,8 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
||||
public BlockFurnaceDouble(){
|
||||
super(Material.rock);
|
||||
public BlockFurnaceDouble(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -152,10 +152,10 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"On");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"On");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -163,11 +163,6 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
|
|||
return world.getBlockMetadata(x, y, z) > 3 ? 12 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockFurnaceDouble";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.uncommon;
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityFurnaceSolar;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -26,10 +26,10 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFurnaceSolar extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockFurnaceSolar extends BlockContainerBase{
|
||||
|
||||
public BlockFurnaceSolar(){
|
||||
super(Material.rock);
|
||||
public BlockFurnaceSolar(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -81,11 +81,6 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IActAddItem
|
|||
this.blockIcon = Blocks.daylight_detector.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockFurnaceSolar";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.uncommon;
|
||||
|
|
|
@ -12,22 +12,18 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockGeneric extends Block implements IActAddItemOrBlock{
|
||||
|
||||
public String name;
|
||||
public class BlockGeneric extends BlockBase{
|
||||
|
||||
public BlockGeneric(String name){
|
||||
super(Material.rock);
|
||||
this.name = name;
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -43,12 +39,7 @@ public class BlockGeneric extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGiantChest;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,15 +27,15 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockGiantChest extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockGiantChest extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockGiantChest(){
|
||||
super(Material.wood);
|
||||
public BlockGiantChest(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(15.0F);
|
||||
|
@ -68,14 +68,9 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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
|
||||
public String getName(){
|
||||
return "blockGiantChest";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGreenhouseGlass;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,10 +25,10 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockGreenhouseGlass extends BlockContainerBase{
|
||||
|
||||
public BlockGreenhouseGlass(){
|
||||
super(Material.rock);
|
||||
public BlockGreenhouseGlass(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -67,12 +67,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddI
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockGreenhouseGlass";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGrinder;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -31,7 +31,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockGrinder extends BlockContainerBase{
|
||||
|
||||
private final boolean isDouble;
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -41,8 +41,8 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockGrinder(boolean isDouble){
|
||||
super(Material.rock);
|
||||
public BlockGrinder(boolean isDouble, String name){
|
||||
super(Material.rock, name);
|
||||
this.isDouble = isDouble;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
|
@ -101,7 +101,7 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderTop");
|
||||
this.onIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderOn");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockGrinderBottom");
|
||||
|
@ -112,11 +112,6 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
|
|||
return world.getBlockMetadata(x, y, z) == 1 ? 12 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return isDouble ? "blockGrinderDouble" : "blockGrinder";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityHeatCollector;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,15 +25,15 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockHeatCollector extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockHeatCollector extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockHeatCollector(){
|
||||
super(Material.rock);
|
||||
public BlockHeatCollector(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(2.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -66,14 +66,9 @@ public class BlockHeatCollector extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Side");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockHeatCollector";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Side");
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,11 +13,11 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityInputter;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityInventoryBase;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
|
@ -31,14 +31,14 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockInputter extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockInputter extends BlockContainerBase{
|
||||
|
||||
public static final int NAME_FLAVOR_AMOUNTS = 15;
|
||||
|
||||
public boolean isAdvanced;
|
||||
|
||||
public BlockInputter(boolean isAdvanced){
|
||||
super(Material.rock);
|
||||
public BlockInputter(boolean isAdvanced, String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -73,12 +73,7 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isAdvanced ? "blockInputterAdvanced" : "blockInputter";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,6 +93,11 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
|
|||
super.breakBlock(world, x, y, z, block, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
||||
private long lastSysTime;
|
||||
|
@ -119,12 +119,6 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
|
|||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack){
|
||||
long sysTime = System.currentTimeMillis();
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityItemRepairer;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -28,15 +28,15 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockItemRepairer extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockItemRepairer extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockItemRepairer(){
|
||||
super(Material.rock);
|
||||
public BlockItemRepairer(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(20.0F);
|
||||
this.setResistance(15.0F);
|
||||
|
@ -76,9 +76,9 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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");
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,11 +86,6 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem
|
|||
return world.getBlockMetadata(x, y, z) == 1 ? 12 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockItemRepairer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -12,7 +12,7 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
import ellpeck.actuallyadditions.util.WorldUtil;
|
||||
|
@ -28,13 +28,13 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
|
||||
public class BlockLampPowerer extends BlockBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
||||
public BlockLampPowerer(){
|
||||
super(Material.rock);
|
||||
public BlockLampPowerer(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -79,13 +79,8 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockLampPowerer";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -25,10 +25,10 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockLaserRelay extends BlockContainerBase{
|
||||
|
||||
public BlockLaserRelay(){
|
||||
super(Material.rock);
|
||||
public BlockLaserRelay(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -92,11 +92,6 @@ public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOr
|
|||
this.blockIcon = Blocks.stone.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockLaserRelay";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityLavaFactoryController;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -26,13 +26,13 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockLavaFactoryController extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockLavaFactoryController extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
||||
public BlockLavaFactoryController(){
|
||||
super(Material.rock);
|
||||
public BlockLavaFactoryController(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(4.5F);
|
||||
this.setResistance(20.0F);
|
||||
|
@ -72,13 +72,8 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockLavaFactoryController";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityLeafGenerator;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -26,15 +26,15 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockLeafGenerator extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockLeafGenerator extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockLeafGenerator(){
|
||||
super(Material.iron);
|
||||
public BlockLeafGenerator(String name){
|
||||
super(Material.iron, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(5.0F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -67,14 +67,9 @@ public class BlockLeafGenerator extends BlockContainerBase implements IActAddIte
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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
|
||||
public String getName(){
|
||||
return "blockLeafGenerator";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,10 +12,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -29,7 +29,7 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockMisc extends Block implements IActAddItemOrBlock{
|
||||
public class BlockMisc extends BlockBase{
|
||||
|
||||
public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values();
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -42,8 +42,8 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon ironCasingSeasonal;
|
||||
|
||||
public BlockMisc(){
|
||||
super(Material.rock);
|
||||
public BlockMisc(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setHarvestLevel("pickaxe", 1);
|
||||
|
@ -81,7 +81,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[allMiscBlocks.length];
|
||||
for(int i = 0; i < textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscBlocks[i].name);
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allMiscBlocks[i].name);
|
||||
}
|
||||
|
||||
this.casingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnowTop");
|
||||
|
@ -90,13 +90,13 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockMisc";
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return stack.getItemDamage() >= allMiscBlocks.length ? EnumRarity.common : allMiscBlocks[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return stack.getItemDamage() >= allMiscBlocks.length ? EnumRarity.common : allMiscBlocks[stack.getItemDamage()].rarity;
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
@ -111,16 +111,5 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return stack.getItemDamage() >= allMiscBlocks.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allMiscBlocks[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityOilGenerator;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -30,15 +30,15 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockOilGenerator extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockOilGenerator extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bottomIcon;
|
||||
|
||||
public BlockOilGenerator(){
|
||||
super(Material.rock);
|
||||
public BlockOilGenerator(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -84,14 +84,9 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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
|
||||
public String getName(){
|
||||
return "blockOilGenerator";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.proxy.ClientProxy;
|
||||
import ellpeck.actuallyadditions.tile.*;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -31,7 +31,7 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockPhantom extends BlockContainerBase{
|
||||
|
||||
public Type type;
|
||||
public int range;
|
||||
|
@ -39,8 +39,8 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconSeasonal;
|
||||
|
||||
public BlockPhantom(Type type){
|
||||
super(Material.rock);
|
||||
public BlockPhantom(Type type, String name){
|
||||
super(Material.rock, name);
|
||||
this.type = type;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(4.5F);
|
||||
|
@ -123,27 +123,11 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
|
||||
this.iconSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockPhantomfacePumpkin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
switch(this.type){
|
||||
case PLACER:
|
||||
return "blockPhantomPlacer";
|
||||
case BREAKER:
|
||||
return "blockPhantomBreaker";
|
||||
case LIQUIFACE:
|
||||
return "blockPhantomLiquiface";
|
||||
case ENERGYFACE:
|
||||
return "blockPhantomEnergyface";
|
||||
default:
|
||||
return "blockPhantomface";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityPhantomBooster;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -24,10 +24,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPhantomBooster extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockPhantomBooster extends BlockContainerBase{
|
||||
|
||||
public BlockPhantomBooster(){
|
||||
super(Material.rock);
|
||||
public BlockPhantomBooster(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -64,11 +64,6 @@ public class BlockPhantomBooster extends BlockContainerBase implements IActAddIt
|
|||
this.blockIcon = Blocks.lapis_block.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockPhantomBooster";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
|
|
|
@ -13,9 +13,9 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityRangedCollector;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -27,10 +27,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockRangedCollector extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockRangedCollector extends BlockContainerBase{
|
||||
|
||||
public BlockRangedCollector(){
|
||||
super(Material.rock);
|
||||
public BlockRangedCollector(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -63,12 +63,7 @@ public class BlockRangedCollector extends BlockContainerBase implements IActAddI
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockRangedCollector";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -28,17 +28,15 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockSlabs extends Block implements IActAddItemOrBlock{
|
||||
public class BlockSlabs extends BlockBase{
|
||||
|
||||
private String name;
|
||||
private Block fullBlock;
|
||||
|
||||
public BlockSlabs(String name, Block fullBlock){
|
||||
super(Material.rock);
|
||||
super(Material.rock, name);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.fullBlock = fullBlock;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,13 +92,13 @@ public class BlockSlabs extends Block implements IActAddItemOrBlock{
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
@ -127,16 +125,5 @@ public class BlockSlabs extends Block implements IActAddItemOrBlock{
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta){
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntitySmileyCloud;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -32,10 +32,10 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockSmileyCloud extends BlockContainerBase{
|
||||
|
||||
public BlockSmileyCloud(){
|
||||
super(Material.cloth);
|
||||
public BlockSmileyCloud(String name){
|
||||
super(Material.cloth, name);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(5.0F);
|
||||
this.setStepSound(soundTypeCloth);
|
||||
|
@ -129,11 +129,6 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO
|
|||
super.breakBlock(world, x, y, z, block, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockSmileyCloud";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
|
|
|
@ -13,11 +13,10 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBase;
|
||||
import ellpeck.actuallyadditions.recipe.TreasureChestHandler;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -35,7 +34,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
||||
public class BlockTreasureChest extends BlockBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
|
@ -44,8 +43,8 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
||||
public BlockTreasureChest(){
|
||||
super(Material.wood);
|
||||
public BlockTreasureChest(String name){
|
||||
super(Material.wood, name);
|
||||
this.setHarvestLevel("axe", 0);
|
||||
this.setHardness(300.0F);
|
||||
this.setResistance(50.0F);
|
||||
|
@ -139,15 +138,10 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockTreasureChest";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Bottom");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,12 +12,12 @@ package ellpeck.actuallyadditions.blocks;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockBushBase;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockPlant;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheWildPlants;
|
||||
import ellpeck.actuallyadditions.items.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -31,11 +31,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
||||
public class BlockWildPlant extends BlockBushBase{
|
||||
|
||||
public static final TheWildPlants[] allWildPlants = TheWildPlants.values();
|
||||
|
||||
public BlockWildPlant(){
|
||||
public BlockWildPlant(String name){
|
||||
super(name);
|
||||
this.setStepSound(soundTypeGrass);
|
||||
}
|
||||
|
||||
|
@ -82,13 +83,13 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockWild";
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return stack.getItemDamage() >= allWildPlants.length ? EnumRarity.common : allWildPlants[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return stack.getItemDamage() >= allWildPlants.length ? EnumRarity.common : allWildPlants[stack.getItemDamage()].rarity;
|
||||
public Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return TheItemBlock.class;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase{
|
||||
|
@ -109,16 +110,5 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
|
|||
public String getUnlocalizedName(ItemStack stack){
|
||||
return stack.getItemDamage() >= allWildPlants.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allWildPlants[stack.getItemDamage()].name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ package ellpeck.actuallyadditions.blocks;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockContainerBase;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityXPSolidifier;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -34,15 +34,15 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockXPSolidifier extends BlockContainerBase implements IActAddItemOrBlock{
|
||||
public class BlockXPSolidifier extends BlockContainerBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon topIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon frontIcon;
|
||||
|
||||
public BlockXPSolidifier(){
|
||||
super(Material.rock);
|
||||
public BlockXPSolidifier(String name){
|
||||
super(Material.rock, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(2.5F);
|
||||
this.setResistance(10.0F);
|
||||
|
@ -112,14 +112,9 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "blockXPSolidifier";
|
||||
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Top");
|
||||
this.frontIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Front");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockFluidFlowing;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockPlant;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockStair;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockWallAA;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||
import ellpeck.actuallyadditions.util.BlockUtil;
|
||||
import ellpeck.actuallyadditions.util.CompatUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -109,180 +112,70 @@ public class InitBlocks{
|
|||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Blocks...");
|
||||
|
||||
blockBookletStand = new BlockBookletStand();
|
||||
BlockUtil.register(blockBookletStand);
|
||||
|
||||
blockAtomicReconstructor = new BlockAtomicReconstructor();
|
||||
BlockUtil.register(blockAtomicReconstructor);
|
||||
|
||||
blockCrystal = new BlockCrystal();
|
||||
BlockUtil.register(blockCrystal, BlockCrystal.TheItemBlock.class);
|
||||
|
||||
blockBlackLotus = new BlockBlackLotus();
|
||||
BlockUtil.register(blockBlackLotus);
|
||||
|
||||
blockLaserRelay = new BlockLaserRelay();
|
||||
BlockUtil.register(blockLaserRelay);
|
||||
|
||||
blockRangedCollector = new BlockRangedCollector();
|
||||
BlockUtil.register(blockRangedCollector);
|
||||
|
||||
blockDirectionalBreaker = new BlockDirectionalBreaker();
|
||||
BlockUtil.register(blockDirectionalBreaker);
|
||||
|
||||
blockLeafGenerator = new BlockLeafGenerator();
|
||||
BlockUtil.register(blockLeafGenerator);
|
||||
|
||||
blockSmileyCloud = new BlockSmileyCloud();
|
||||
BlockUtil.register(blockSmileyCloud);
|
||||
|
||||
blockXPSolidifier = new BlockXPSolidifier();
|
||||
BlockUtil.register(blockXPSolidifier);
|
||||
|
||||
blockBookletStand = new BlockBookletStand("blockBookStand");
|
||||
blockAtomicReconstructor = new BlockAtomicReconstructor("blockAtomicReconstructor");
|
||||
blockCrystal = new BlockCrystal("blockCrystal");
|
||||
blockBlackLotus = new BlockBlackLotus("blockBlackLotus");
|
||||
blockLaserRelay = new BlockLaserRelay("blockLaserRelay");
|
||||
blockRangedCollector = new BlockRangedCollector("blockRangedCollector");
|
||||
blockDirectionalBreaker = new BlockDirectionalBreaker("blockDirectionalBreaker");
|
||||
blockLeafGenerator = new BlockLeafGenerator("blockLeafGenerator");
|
||||
blockSmileyCloud = new BlockSmileyCloud("blockSmileyCloud");
|
||||
blockXPSolidifier = new BlockXPSolidifier("blockXPSolidifier");
|
||||
blockTestifiBucksGreenWall = new BlockGeneric("blockTestifiBucksGreenWall");
|
||||
BlockUtil.register(blockTestifiBucksGreenWall);
|
||||
blockTestifiBucksWhiteWall = new BlockGeneric("blockTestifiBucksWhiteWall");
|
||||
BlockUtil.register(blockTestifiBucksWhiteWall);
|
||||
blockTestifiBucksGreenStairs = new BlockStair(blockTestifiBucksGreenWall, "blockTestifiBucksGreenStairs");
|
||||
BlockUtil.register(blockTestifiBucksGreenStairs);
|
||||
blockTestifiBucksWhiteStairs = new BlockStair(blockTestifiBucksWhiteWall, "blockTestifiBucksWhiteStairs");
|
||||
BlockUtil.register(blockTestifiBucksWhiteStairs);
|
||||
blockTestifiBucksGreenSlab = new BlockSlabs("blockTestifiBucksGreenSlab", blockTestifiBucksGreenWall);
|
||||
BlockUtil.register(blockTestifiBucksGreenSlab, BlockSlabs.TheItemBlock.class);
|
||||
blockTestifiBucksWhiteSlab = new BlockSlabs("blockTestifiBucksWhiteSlab", blockTestifiBucksWhiteWall);
|
||||
BlockUtil.register(blockTestifiBucksWhiteSlab, BlockSlabs.TheItemBlock.class);
|
||||
blockTestifiBucksGreenFence = new BlockWallAA("blockTestifiBucksGreenFence", blockTestifiBucksGreenWall);
|
||||
BlockUtil.register(blockTestifiBucksGreenFence);
|
||||
blockTestifiBucksWhiteFence = new BlockWallAA("blockTestifiBucksWhiteFence", blockTestifiBucksWhiteWall);
|
||||
BlockUtil.register(blockTestifiBucksWhiteFence);
|
||||
|
||||
blockColoredLamp = new BlockColoredLamp(false);
|
||||
BlockUtil.register(blockColoredLamp, BlockColoredLamp.TheItemBlock.class);
|
||||
blockColoredLampOn = new BlockColoredLamp(true);
|
||||
BlockUtil.register(blockColoredLampOn, BlockColoredLamp.TheItemBlock.class);
|
||||
blockLampPowerer = new BlockLampPowerer();
|
||||
BlockUtil.register(blockLampPowerer);
|
||||
|
||||
blockTreasureChest = new BlockTreasureChest();
|
||||
BlockUtil.register(blockTreasureChest);
|
||||
|
||||
blockEnergizer = new BlockEnergizer(true);
|
||||
BlockUtil.register(blockEnergizer);
|
||||
|
||||
blockEnervator = new BlockEnergizer(false);
|
||||
BlockUtil.register(blockEnervator);
|
||||
|
||||
blockLavaFactoryController = new BlockLavaFactoryController();
|
||||
BlockUtil.register(blockLavaFactoryController);
|
||||
|
||||
blockCanolaPress = new BlockCanolaPress();
|
||||
BlockUtil.register(blockCanolaPress);
|
||||
|
||||
blockPhantomface = new BlockPhantom(BlockPhantom.Type.FACE);
|
||||
BlockUtil.register(blockPhantomface);
|
||||
|
||||
blockPhantomPlacer = new BlockPhantom(BlockPhantom.Type.PLACER);
|
||||
BlockUtil.register(blockPhantomPlacer);
|
||||
|
||||
blockPhantomLiquiface = new BlockPhantom(BlockPhantom.Type.LIQUIFACE);
|
||||
BlockUtil.register(blockPhantomLiquiface);
|
||||
|
||||
blockPhantomEnergyface = new BlockPhantom(BlockPhantom.Type.ENERGYFACE);
|
||||
BlockUtil.register(blockPhantomEnergyface);
|
||||
|
||||
blockPhantomBreaker = new BlockPhantom(BlockPhantom.Type.BREAKER);
|
||||
BlockUtil.register(blockPhantomBreaker);
|
||||
|
||||
blockCoalGenerator = new BlockCoalGenerator();
|
||||
BlockUtil.register(blockCoalGenerator);
|
||||
|
||||
blockOilGenerator = new BlockOilGenerator();
|
||||
BlockUtil.register(blockOilGenerator);
|
||||
|
||||
blockFermentingBarrel = new BlockFermentingBarrel();
|
||||
BlockUtil.register(blockFermentingBarrel);
|
||||
|
||||
blockColoredLamp = new BlockColoredLamp(false, "blockColoredLamp");
|
||||
blockColoredLampOn = new BlockColoredLamp(true, "blockColoredLampOn");
|
||||
blockLampPowerer = new BlockLampPowerer("blockLampPowerer");
|
||||
blockTreasureChest = new BlockTreasureChest("blockTreasureChest");
|
||||
blockEnergizer = new BlockEnergizer(true, "blockEnergizer");
|
||||
blockEnervator = new BlockEnergizer(false, "blockEnervator");
|
||||
blockLavaFactoryController = new BlockLavaFactoryController("blockLavaFactoryController");
|
||||
blockCanolaPress = new BlockCanolaPress("blockCanolaPress");
|
||||
blockPhantomface = new BlockPhantom(BlockPhantom.Type.FACE, "blockPhantomface");
|
||||
blockPhantomPlacer = new BlockPhantom(BlockPhantom.Type.PLACER, "blockPhantomPlacer");
|
||||
blockPhantomLiquiface = new BlockPhantom(BlockPhantom.Type.LIQUIFACE, "blockPhantomLiquiface");
|
||||
blockPhantomEnergyface = new BlockPhantom(BlockPhantom.Type.ENERGYFACE, "blockPhantomEnergyface");
|
||||
blockPhantomBreaker = new BlockPhantom(BlockPhantom.Type.BREAKER, "blockPhantomBreaker");
|
||||
blockCoalGenerator = new BlockCoalGenerator("blockCoalGenerator");
|
||||
blockOilGenerator = new BlockOilGenerator("blockOilGenerator");
|
||||
blockFermentingBarrel = new BlockFermentingBarrel("blockFermentingBarrel");
|
||||
blockRice = new BlockPlant("blockRice", 6, 1, 2);
|
||||
BlockUtil.register(blockRice);
|
||||
CompatUtil.registerMFRPlant(blockRice);
|
||||
|
||||
blockCanola = new BlockPlant("blockCanola", 4, 3, 3);
|
||||
BlockUtil.register(blockCanola);
|
||||
CompatUtil.registerMFRPlant(blockCanola);
|
||||
|
||||
blockFlax = new BlockPlant("blockFlax", 6, 2, 4);
|
||||
BlockUtil.register(blockFlax);
|
||||
CompatUtil.registerMFRPlant(blockFlax);
|
||||
|
||||
blockCoffee = new BlockPlant("blockCoffee", 6, 2, 2);
|
||||
BlockUtil.register(blockCoffee);
|
||||
CompatUtil.registerMFRPlant(blockCoffee);
|
||||
|
||||
blockCompost = new BlockCompost();
|
||||
BlockUtil.register(blockCompost);
|
||||
|
||||
blockMisc = new BlockMisc();
|
||||
BlockUtil.register(blockMisc, BlockMisc.TheItemBlock.class);
|
||||
|
||||
blockFeeder = new BlockFeeder();
|
||||
BlockUtil.register(blockFeeder);
|
||||
|
||||
blockGiantChest = new BlockGiantChest();
|
||||
BlockUtil.register(blockGiantChest);
|
||||
|
||||
blockGrinder = new BlockGrinder(false);
|
||||
BlockUtil.register(blockGrinder);
|
||||
|
||||
blockGrinderDouble = new BlockGrinder(true);
|
||||
BlockUtil.register(blockGrinderDouble);
|
||||
|
||||
blockFurnaceDouble = new BlockFurnaceDouble();
|
||||
BlockUtil.register(blockFurnaceDouble);
|
||||
|
||||
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);
|
||||
|
||||
blockFurnaceSolar = new BlockFurnaceSolar();
|
||||
BlockUtil.register(blockFurnaceSolar);
|
||||
|
||||
blockHeatCollector = new BlockHeatCollector();
|
||||
BlockUtil.register(blockHeatCollector);
|
||||
|
||||
blockItemRepairer = new BlockItemRepairer();
|
||||
BlockUtil.register(blockItemRepairer);
|
||||
|
||||
blockGreenhouseGlass = new BlockGreenhouseGlass();
|
||||
BlockUtil.register(blockGreenhouseGlass);
|
||||
|
||||
blockBreaker = new BlockBreaker(false);
|
||||
BlockUtil.register(blockBreaker);
|
||||
|
||||
blockPlacer = new BlockBreaker(true);
|
||||
BlockUtil.register(blockPlacer);
|
||||
|
||||
blockDropper = new BlockDropper();
|
||||
BlockUtil.register(blockDropper);
|
||||
|
||||
blockFluidPlacer = new BlockFluidCollector(true);
|
||||
BlockUtil.register(blockFluidPlacer);
|
||||
|
||||
blockFluidCollector = new BlockFluidCollector(false);
|
||||
BlockUtil.register(blockFluidCollector);
|
||||
|
||||
blockCoffeeMachine = new BlockCoffeeMachine();
|
||||
BlockUtil.register(blockCoffeeMachine);
|
||||
|
||||
blockPhantomBooster = new BlockPhantomBooster();
|
||||
BlockUtil.register(blockPhantomBooster);
|
||||
|
||||
blockWildPlant = new BlockWildPlant();
|
||||
BlockUtil.register(blockWildPlant, BlockWildPlant.TheItemBlock.class);
|
||||
blockCompost = new BlockCompost("blockCompost");
|
||||
blockMisc = new BlockMisc("blockMisc");
|
||||
blockFeeder = new BlockFeeder("blockFeeder");
|
||||
blockGiantChest = new BlockGiantChest("blockGiantChest");
|
||||
blockGrinder = new BlockGrinder(false, "blockGrinder");
|
||||
blockGrinderDouble = new BlockGrinder(true, "blockGrinderDouble");
|
||||
blockFurnaceDouble = new BlockFurnaceDouble("blockFurnaceDouble");
|
||||
blockInputter = new BlockInputter(false, "blockInputter");
|
||||
blockInputterAdvanced = new BlockInputter(true, "blockInputterAdvanced");
|
||||
blockFishingNet = new BlockFishingNet("blockFishingNet");
|
||||
blockFurnaceSolar = new BlockFurnaceSolar("blockFurnaceSolar");
|
||||
blockHeatCollector = new BlockHeatCollector("blockHeatCollector");
|
||||
blockItemRepairer = new BlockItemRepairer("blockItemRepairer");
|
||||
blockGreenhouseGlass = new BlockGreenhouseGlass("blockGreenhouseGlass");
|
||||
blockBreaker = new BlockBreaker(false, "blockBreaker");
|
||||
blockPlacer = new BlockBreaker(true, "blockPlacer");
|
||||
blockDropper = new BlockDropper("blockDropper");
|
||||
blockFluidPlacer = new BlockFluidCollector(true, "blockFluidPlacer");
|
||||
blockFluidCollector = new BlockFluidCollector(false, "blockFluidCollector");
|
||||
blockCoffeeMachine = new BlockCoffeeMachine("blockCoffeeMachine");
|
||||
blockPhantomBooster = new BlockPhantomBooster("blockPhantomBooster");
|
||||
blockWildPlant = new BlockWildPlant("blockWild");
|
||||
|
||||
registerFluids();
|
||||
}
|
||||
|
@ -302,7 +195,6 @@ public class InitBlocks{
|
|||
//Canola Block
|
||||
if(fluidCanolaOil.getBlock() == null || ConfigBoolValues.PREVENT_CANOLA_BLOCK_OVERRIDE.isEnabled()){
|
||||
blockCanolaOil = new BlockFluidFlowing(fluidCanolaOil, Material.water, "blockCanolaOil");
|
||||
BlockUtil.register(blockCanolaOil);
|
||||
}
|
||||
else{
|
||||
errorAlreadyRegistered("Canola Oil Block");
|
||||
|
@ -323,7 +215,6 @@ public class InitBlocks{
|
|||
//Oil Block
|
||||
if(fluidOil.getBlock() == null || ConfigBoolValues.PREVENT_OIL_BLOCK_OVERRIDE.isEnabled()){
|
||||
blockOil = new BlockFluidFlowing(fluidOil, Material.water, "blockOil");
|
||||
BlockUtil.register(blockOil);
|
||||
}
|
||||
else{
|
||||
errorAlreadyRegistered("Oil Block");
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* This file ("BlockBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockBase extends Block{
|
||||
|
||||
private String name;
|
||||
|
||||
public BlockBase(Material material, String name){
|
||||
super(material);
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* This file ("BlockBushBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockBushBase extends BlockBush{
|
||||
|
||||
private String name;
|
||||
|
||||
public BlockBushBase(String name){
|
||||
this.setStepSound(soundTypeGrass);
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
}
|
|
@ -8,10 +8,13 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityInventoryBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
|
@ -19,6 +22,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -26,8 +30,37 @@ import net.minecraft.world.World;
|
|||
|
||||
public abstract class BlockContainerBase extends BlockContainer{
|
||||
|
||||
public BlockContainerBase(Material mat){
|
||||
super(mat);
|
||||
private String name;
|
||||
|
||||
public BlockContainerBase(Material material, String name){
|
||||
super(material);
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
|
||||
public void dropInventory(World world, int x, int y, int z){
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -24,12 +25,13 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemOrBlock{
|
||||
public class BlockFluidFlowing extends BlockFluidClassic{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon stillIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon flowingIcon;
|
||||
|
||||
private String name;
|
||||
|
||||
public BlockFluidFlowing(Fluid fluid, Material material, String unlocalizedName){
|
||||
|
@ -37,6 +39,28 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO
|
|||
this.name = unlocalizedName;
|
||||
this.setRenderPass(1);
|
||||
displacements.put(this, false);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,17 +82,11 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.stillIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Still");
|
||||
this.flowingIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Flowing");
|
||||
this.stillIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Still");
|
||||
this.flowingIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Flowing");
|
||||
this.definedFluid.setIcons(this.stillIcon, this.flowingIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.epic;
|
||||
}
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -26,7 +27,7 @@ import net.minecraftforge.common.EnumPlantType;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
|
||||
public class BlockPlant extends BlockCrops {
|
||||
|
||||
public Item seedItem;
|
||||
public Item returnItem;
|
||||
|
@ -43,6 +44,32 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
|
|||
this.stages = stages;
|
||||
this.minDropAmount = minDropAmount;
|
||||
this.addDropAmount = addDropAmount;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,20 +111,10 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
|
|||
public void registerBlockIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[this.stages];
|
||||
for(int i = 0; i < this.textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Stage"+(i+1));
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Stage"+(i+1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta){
|
||||
return this.returnMeta;
|
|
@ -8,15 +8,18 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockStair extends BlockStairs implements IActAddItemOrBlock{
|
||||
public class BlockStair extends BlockStairs{
|
||||
|
||||
private String name;
|
||||
|
||||
|
@ -24,14 +27,30 @@ public class BlockStair extends BlockStairs implements IActAddItemOrBlock{
|
|||
super(block, 0);
|
||||
this.name = name;
|
||||
this.setLightOpacity(0);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
|
@ -8,11 +8,13 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks;
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -23,7 +25,7 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockWallAA extends BlockWall implements IActAddItemOrBlock{
|
||||
public class BlockWallAA extends BlockWall {
|
||||
|
||||
private String name;
|
||||
private Block baseBlock;
|
||||
|
@ -32,6 +34,32 @@ public class BlockWallAA extends BlockWall implements IActAddItemOrBlock{
|
|||
super(base);
|
||||
this.baseBlock = base;
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setBlockName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerBlock(this, this.getItemBlock(), this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,14 +79,4 @@ public class BlockWallAA extends BlockWall implements IActAddItemOrBlock{
|
|||
public int damageDropped(int meta){
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.common;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* This file ("ItemBlockBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.blocks.base;
|
||||
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockBase extends ItemBlock{
|
||||
|
||||
public ItemBlockBase(Block block){
|
||||
super(block);
|
||||
this.setHasSubtypes(false);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
if(this.field_150939_a instanceof BlockBase){
|
||||
return ((BlockBase)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockContainerBase){
|
||||
return ((BlockContainerBase)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockFluidFlowing){
|
||||
return ((BlockFluidFlowing)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockPlant){
|
||||
return ((BlockPlant)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockStair){
|
||||
return ((BlockStair)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockWallAA){
|
||||
return ((BlockWallAA)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else if(this.field_150939_a instanceof BlockBushBase){
|
||||
return ((BlockBushBase)this.field_150939_a).getRarity(stack);
|
||||
}
|
||||
else{
|
||||
return Util.FALLBACK_RARITY;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -538,7 +538,7 @@ public class BookletUtils{
|
|||
|
||||
if(this.assignedEntry != null){
|
||||
GL11.glPushMatrix();
|
||||
BookletPage.renderItem(booklet, this.assignedChapter != null && this.assignedChapter.displayStack != null ? this.assignedChapter.displayStack : new ItemStack(InitItems.itemLexicon), this.xPosition+2, this.yPosition+1, 0.725F);
|
||||
BookletPage.renderItem(booklet, this.assignedChapter != null && this.assignedChapter.displayStack != null ? this.assignedChapter.displayStack : new ItemStack(InitItems.itemBooklet), this.xPosition+2, this.yPosition+1, 0.725F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ public class InitBooklet{
|
|||
|
||||
private static void initChapters(){
|
||||
//Getting Started
|
||||
chapterIntro = new BookletChapter("intro", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
|
||||
new BookletChapter("bookTutorial", entryGettingStarted, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
|
||||
chapterIntro = new BookletChapter("intro", entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
|
||||
new BookletChapter("bookTutorial", entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
|
||||
new BookletChapter("crystals", entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PagePicture(3, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(4), new PageCrafting(5, BlockCrafting.recipeAtomicReconstructor).setNoText(), new PageCrafting(6, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(7, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(8, ReconstructorRecipeHandler.mainPageRecipes).setNoText()).setSpecial();
|
||||
new BookletChapter("coalGen", entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE));
|
||||
new BookletChapter("craftingIngs", entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
|
||||
|
|
|
@ -85,7 +85,7 @@ public class BlockCrafting{
|
|||
public static void init(){
|
||||
|
||||
//Book Stand
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBookletStand), new ItemStack(InitItems.itemLexicon), "plankWood"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBookletStand), new ItemStack(InitItems.itemBooklet), "plankWood"));
|
||||
recipeBookStand = Util.GetRecipes.lastIRecipe();
|
||||
|
||||
//White Ethetic Blocks
|
||||
|
|
|
@ -93,7 +93,7 @@ public class ItemCrafting{
|
|||
recipeBlackDye = Util.GetRecipes.lastIRecipe();
|
||||
|
||||
//Booklet
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper)));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper)));
|
||||
recipeBook = Util.GetRecipes.lastIRecipe();
|
||||
|
||||
//Clearing NBT Storage
|
||||
|
|
|
@ -39,7 +39,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
|
||||
@Override
|
||||
public Item getTabIconItem(){
|
||||
return InitItems.itemLexicon;
|
||||
return InitItems.itemBooklet;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,7 +47,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
public void displayAllReleventItems(List list){
|
||||
this.list = list;
|
||||
|
||||
add(InitItems.itemLexicon);
|
||||
add(InitItems.itemBooklet);
|
||||
add(InitBlocks.blockSmileyCloud);
|
||||
add(InitBlocks.blockBookletStand);
|
||||
|
||||
|
|
|
@ -17,14 +17,17 @@ import ellpeck.actuallyadditions.achievement.TheAchievements;
|
|||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||
import ellpeck.actuallyadditions.items.InitItems;
|
||||
import ellpeck.actuallyadditions.misc.WorldData;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.playerdata.PersistentServerData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class PlayerObtainEvents{
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -32,15 +35,21 @@ public class PlayerObtainEvents{
|
|||
checkAchievements(event.crafting, event.player, InitAchievements.CRAFTING_ACH);
|
||||
|
||||
if(ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()){
|
||||
if(!event.player.worldObj.isRemote && event.crafting.getItem() != InitItems.itemLexicon && (event.crafting.getItem() instanceof IActAddItemOrBlock || Block.getBlockFromItem(event.crafting.getItem()) instanceof IActAddItemOrBlock)){
|
||||
NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player);
|
||||
if(compound != null && !compound.getBoolean("BookGottenAlready")){
|
||||
compound.setBoolean("BookGottenAlready", true);
|
||||
WorldData.makeDirty();
|
||||
if(!event.player.worldObj.isRemote && event.crafting.getItem() != InitItems.itemBooklet){
|
||||
|
||||
EntityItem entityItem = new EntityItem(event.player.worldObj, event.player.posX, event.player.posY, event.player.posZ, new ItemStack(InitItems.itemLexicon));
|
||||
entityItem.delayBeforeCanPickup = 0;
|
||||
event.player.worldObj.spawnEntityInWorld(entityItem);
|
||||
String itemName = Item.itemRegistry.getNameForObject(event.crafting.getItem());
|
||||
String blockName = Block.blockRegistry.getNameForObject(Block.getBlockFromItem(event.crafting.getItem()));
|
||||
|
||||
if((itemName != null && itemName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER)) || (blockName != null && blockName.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER))){
|
||||
NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player);
|
||||
if(compound != null && !compound.getBoolean("BookGottenAlready")){
|
||||
compound.setBoolean("BookGottenAlready", true);
|
||||
WorldData.makeDirty();
|
||||
|
||||
EntityItem entityItem = new EntityItem(event.player.worldObj, event.player.posX, event.player.posY, event.player.posZ, new ItemStack(InitItems.itemBooklet));
|
||||
entityItem.delayBeforeCanPickup = 0;
|
||||
event.player.worldObj.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
|||
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
|
||||
import ellpeck.actuallyadditions.crafting.ToolCrafting;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.items.tools.ItemAllToolAA;
|
||||
import ellpeck.actuallyadditions.items.base.ItemAllToolAA;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
|
@ -61,7 +61,6 @@ public class InitForeignPaxels{
|
|||
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
|
||||
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
|
||||
soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.rare, SO_COLORS[i]);
|
||||
ItemUtil.register(soPaxels[i]);
|
||||
|
||||
if(ConfigCrafting.PAXELS.isEnabled()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
|
@ -90,7 +89,6 @@ public class InitForeignPaxels{
|
|||
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
|
||||
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
|
||||
mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare, MT_COLORS[i]);
|
||||
ItemUtil.register(mtPaxels[i]);
|
||||
|
||||
if(ConfigCrafting.PAXELS.isEnabled()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
|
@ -119,7 +117,6 @@ public class InitForeignPaxels{
|
|||
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
|
||||
Item.ToolMaterial material = ((ItemTool)axe).func_150913_i();
|
||||
tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare, TF_COLORS[i]);
|
||||
ItemUtil.register(tfPaxels[i]);
|
||||
|
||||
if(ConfigCrafting.PAXELS.isEnabled()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
|
|
|
@ -11,14 +11,13 @@
|
|||
package ellpeck.actuallyadditions.items;
|
||||
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.items.base.*;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.items.tools.*;
|
||||
import ellpeck.actuallyadditions.material.InitArmorMaterials;
|
||||
import ellpeck.actuallyadditions.material.InitToolMaterials;
|
||||
import ellpeck.actuallyadditions.recipe.ReconstructorRecipeHandler;
|
||||
import ellpeck.actuallyadditions.util.CompatUtil;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -28,7 +27,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
|
|||
|
||||
public class InitItems{
|
||||
|
||||
public static Item itemLexicon;
|
||||
public static Item itemBooklet;
|
||||
|
||||
public static Item itemFertilizer;
|
||||
public static Item itemMisc;
|
||||
|
@ -138,69 +137,35 @@ public class InitItems{
|
|||
ModUtil.LOGGER.info("Initializing Items...");
|
||||
|
||||
itemColorLens = new ItemLens("itemColorLens", ReconstructorRecipeHandler.LensType.COLOR);
|
||||
ItemUtil.register(itemColorLens);
|
||||
|
||||
itemExplosionLens = new ItemLens("itemExplosionLens", ReconstructorRecipeHandler.LensType.DETONATION);
|
||||
ItemUtil.register(itemExplosionLens);
|
||||
|
||||
itemDamageLens = new ItemLens("itemDamageLens", ReconstructorRecipeHandler.LensType.JUST_DAMAGE);
|
||||
ItemUtil.register(itemDamageLens);
|
||||
|
||||
itemCrystal = new ItemCrystal();
|
||||
ItemUtil.register(itemCrystal);
|
||||
|
||||
itemLaserWrench = new ItemLaserWrench();
|
||||
ItemUtil.register(itemLaserWrench);
|
||||
|
||||
itemChestToCrateUpgrade = new ItemChestToCrateUpgrade();
|
||||
ItemUtil.register(itemChestToCrateUpgrade);
|
||||
|
||||
itemLexicon = new ItemBooklet();
|
||||
ItemUtil.register(itemLexicon);
|
||||
|
||||
itemGrowthRing = new ItemGrowthRing();
|
||||
ItemUtil.register(itemGrowthRing);
|
||||
|
||||
itemMagnetRing = new ItemMagnetRing();
|
||||
ItemUtil.register(itemMagnetRing);
|
||||
|
||||
itemWaterRemovalRing = new ItemWaterRemovalRing();
|
||||
ItemUtil.register(itemWaterRemovalRing);
|
||||
|
||||
itemCrystal = new ItemCrystal("itemCrystal");
|
||||
itemLaserWrench = new ItemLaserWrench("itemLaserWrench");
|
||||
itemChestToCrateUpgrade = new ItemChestToCrateUpgrade("itemChestToCrateUpgrade");
|
||||
itemBooklet = new ItemBooklet("itemBooklet");
|
||||
itemGrowthRing = new ItemGrowthRing("itemGrowthRing");
|
||||
itemMagnetRing = new ItemMagnetRing("itemSuctionRing");
|
||||
itemWaterRemovalRing = new ItemWaterRemovalRing("itemWaterRemovalRing");
|
||||
itemHelmEmerald = new ItemArmorAA("itemHelmEmerald", InitArmorMaterials.armorMaterialEmerald, 0, "gemEmerald", "armorEmerald");
|
||||
itemChestEmerald = new ItemArmorAA("itemChestEmerald", InitArmorMaterials.armorMaterialEmerald, 1, "gemEmerald", "armorEmerald");
|
||||
itemPantsEmerald = new ItemArmorAA("itemPantsEmerald", InitArmorMaterials.armorMaterialEmerald, 2, "gemEmerald", "armorEmerald");
|
||||
itemBootsEmerald = new ItemArmorAA("itemBootsEmerald", InitArmorMaterials.armorMaterialEmerald, 3, "gemEmerald", "armorEmerald");
|
||||
ItemUtil.registerItems(new Item[]{itemHelmEmerald, itemChestEmerald, itemPantsEmerald, itemBootsEmerald});
|
||||
|
||||
itemHelmObsidian = new ItemArmorAA("itemHelmObsidian", InitArmorMaterials.armorMaterialObsidian, 0, "obsidian", "armorObsidian");
|
||||
itemChestObsidian = new ItemArmorAA("itemChestObsidian", InitArmorMaterials.armorMaterialObsidian, 1, "obsidian", "armorObsidian");
|
||||
itemPantsObsidian = new ItemArmorAA("itemPantsObsidian", InitArmorMaterials.armorMaterialObsidian, 2, "obsidian", "armorObsidian");
|
||||
itemBootsObsidian = new ItemArmorAA("itemBootsObsidian", InitArmorMaterials.armorMaterialObsidian, 3, "obsidian", "armorObsidian");
|
||||
ItemUtil.registerItems(new Item[]{itemHelmObsidian, itemChestObsidian, itemPantsObsidian, itemBootsObsidian});
|
||||
|
||||
itemHelmQuartz = new ItemArmorAA("itemHelmQuartz", InitArmorMaterials.armorMaterialQuartz, 0, "gemQuartzBlack", "armorQuartz");
|
||||
itemChestQuartz = new ItemArmorAA("itemChestQuartz", InitArmorMaterials.armorMaterialQuartz, 1, "gemQuartzBlack", "armorQuartz");
|
||||
itemPantsQuartz = new ItemArmorAA("itemPantsQuartz", InitArmorMaterials.armorMaterialQuartz, 2, "gemQuartzBlack", "armorQuartz");
|
||||
itemBootsQuartz = new ItemArmorAA("itemBootsQuartz", InitArmorMaterials.armorMaterialQuartz, 3, "gemQuartzBlack", "armorQuartz");
|
||||
ItemUtil.registerItems(new Item[]{itemHelmQuartz, itemChestQuartz, itemPantsQuartz, itemBootsQuartz});
|
||||
|
||||
itemTeleStaff = new ItemTeleStaff();
|
||||
ItemUtil.register(itemTeleStaff);
|
||||
|
||||
itemWingsOfTheBats = new ItemWingsOfTheBats();
|
||||
ItemUtil.register(itemWingsOfTheBats);
|
||||
|
||||
itemDrill = new ItemDrill();
|
||||
ItemUtil.register(itemDrill);
|
||||
|
||||
itemTeleStaff = new ItemTeleStaff("itemTeleStaff");
|
||||
itemWingsOfTheBats = new ItemWingsOfTheBats("itemWingsOfTheBats");
|
||||
itemDrill = new ItemDrill("itemDrill");
|
||||
itemBattery = new ItemBattery("itemBattery", 1000000, 5000);
|
||||
itemBatteryDouble = new ItemBattery("itemBatteryDouble", 2000000, 10000);
|
||||
itemBatteryTriple = new ItemBattery("itemBatteryTriple", 3000000, 15000);
|
||||
itemBatteryQuadruple = new ItemBattery("itemBatteryQuadruple", 4000000, 20000);
|
||||
itemBatteryQuintuple = new ItemBattery("itemBatteryQuintuple", 5000000, 25000);
|
||||
ItemUtil.registerItems(new Item[]{itemBattery, itemBatteryDouble, itemBatteryTriple, itemBatteryQuadruple, itemBatteryQuintuple});
|
||||
|
||||
itemDrillUpgradeSpeed = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED, "itemDrillUpgradeSpeed");
|
||||
itemDrillUpgradeSpeedII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_II, "itemDrillUpgradeSpeedII");
|
||||
itemDrillUpgradeSpeedIII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_III, "itemDrillUpgradeSpeedIII");
|
||||
|
@ -210,104 +175,50 @@ public class InitItems{
|
|||
itemDrillUpgradeThreeByThree = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.THREE_BY_THREE, "itemDrillUpgradeThreeByThree");
|
||||
itemDrillUpgradeFiveByFive = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE, "itemDrillUpgradeFiveByFive");
|
||||
itemDrillUpgradeBlockPlacing = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.PLACER, "itemDrillUpgradeBlockPlacing");
|
||||
ItemUtil.registerItems(new Item[]{itemDrillUpgradeSpeed, itemDrillUpgradeSpeedII, itemDrillUpgradeSpeedIII, itemDrillUpgradeSilkTouch, itemDrillUpgradeFortune, itemDrillUpgradeFortuneII, itemDrillUpgradeThreeByThree, itemDrillUpgradeFiveByFive, itemDrillUpgradeBlockPlacing});
|
||||
|
||||
itemBucketOil = new ItemBucketAA(InitBlocks.blockOil, "itemBucketOil");
|
||||
ItemUtil.register(itemBucketOil);
|
||||
FluidContainerRegistry.registerFluidContainer(InitBlocks.fluidOil, new ItemStack(itemBucketOil), FluidContainerRegistry.EMPTY_BUCKET);
|
||||
|
||||
itemBucketCanolaOil = new ItemBucketAA(InitBlocks.blockCanolaOil, "itemBucketCanolaOil");
|
||||
ItemUtil.register(itemBucketCanolaOil);
|
||||
FluidContainerRegistry.registerFluidContainer(InitBlocks.fluidCanolaOil, new ItemStack(itemBucketCanolaOil), FluidContainerRegistry.EMPTY_BUCKET);
|
||||
|
||||
itemFertilizer = new ItemFertilizer();
|
||||
ItemUtil.register(itemFertilizer);
|
||||
|
||||
itemCoffee = new ItemCoffee();
|
||||
ItemUtil.register(itemCoffee);
|
||||
|
||||
itemPhantomConnector = new ItemPhantomConnector();
|
||||
ItemUtil.register(itemPhantomConnector);
|
||||
|
||||
itemResonantRice = new ItemResonantRice();
|
||||
ItemUtil.register(itemResonantRice);
|
||||
|
||||
itemMisc = new ItemMisc();
|
||||
ItemUtil.register(itemMisc);
|
||||
|
||||
itemFoods = new ItemFoods();
|
||||
ItemUtil.register(itemFoods);
|
||||
|
||||
itemJams = new ItemJams();
|
||||
ItemUtil.register(itemJams);
|
||||
|
||||
itemKnife = new ItemKnife();
|
||||
ItemUtil.register(itemKnife);
|
||||
|
||||
itemCrafterOnAStick = new ItemCrafterOnAStick();
|
||||
ItemUtil.register(itemCrafterOnAStick);
|
||||
|
||||
itemDust = new ItemDust();
|
||||
ItemUtil.register(itemDust);
|
||||
|
||||
itemSpecialDrop = new ItemSpecialDrop();
|
||||
ItemUtil.register(itemSpecialDrop);
|
||||
|
||||
itemLeafBlower = new ItemLeafBlower(false);
|
||||
ItemUtil.register(itemLeafBlower);
|
||||
|
||||
itemLeafBlowerAdvanced = new ItemLeafBlower(true);
|
||||
ItemUtil.register(itemLeafBlowerAdvanced);
|
||||
|
||||
itemPotionRing = new ItemPotionRing(false);
|
||||
ItemUtil.register(itemPotionRing);
|
||||
|
||||
itemPotionRingAdvanced = new ItemPotionRing(true);
|
||||
ItemUtil.register(itemPotionRingAdvanced);
|
||||
|
||||
itemHairyBall = new ItemHairyBall();
|
||||
ItemUtil.register(itemHairyBall);
|
||||
|
||||
itemCoffeeBean = new ItemCoffeeBean();
|
||||
ItemUtil.register(itemCoffeeBean);
|
||||
|
||||
itemFertilizer = new ItemFertilizer("itemFertilizer");
|
||||
itemCoffee = new ItemCoffee("itemCoffee");
|
||||
itemPhantomConnector = new ItemPhantomConnector("itemPhantomConnector");
|
||||
itemResonantRice = new ItemResonantRice("itemResonantRice");
|
||||
itemMisc = new ItemMisc("itemMisc");
|
||||
itemFoods = new ItemFoods("itemFood");
|
||||
itemJams = new ItemJams("itemJam");
|
||||
itemKnife = new ItemKnife("itemKnife");
|
||||
itemCrafterOnAStick = new ItemCrafterOnAStick("itemCrafterOnAStick");
|
||||
itemDust = new ItemDust("itemDust");
|
||||
itemSpecialDrop = new ItemSpecialDrop("itemSpecial");
|
||||
itemLeafBlower = new ItemLeafBlower(false, "itemLeafBlower");
|
||||
itemLeafBlowerAdvanced = new ItemLeafBlower(true, "itemLeafBlowerAdvanced");
|
||||
itemPotionRing = new ItemPotionRing(false, "itemPotionRing");
|
||||
itemPotionRingAdvanced = new ItemPotionRing(true, "itemPotionRingAdvanced");
|
||||
itemHairyBall = new ItemHairyBall("itemHairyBall");
|
||||
itemCoffeeBean = new ItemCoffeeBean("itemCoffeeBeans");
|
||||
itemRiceSeed = new ItemSeed("itemRiceSeed", "seedRice", InitBlocks.blockRice, itemFoods, TheFoods.RICE.ordinal());
|
||||
ItemUtil.register(itemRiceSeed);
|
||||
CompatUtil.registerMFRSeed(itemRiceSeed);
|
||||
|
||||
itemCanolaSeed = new ItemSeed("itemCanolaSeed", "seedCanola", InitBlocks.blockCanola, itemMisc, TheMiscItems.CANOLA.ordinal());
|
||||
ItemUtil.register(itemCanolaSeed);
|
||||
CompatUtil.registerMFRSeed(itemCanolaSeed);
|
||||
|
||||
itemFlaxSeed = new ItemSeed("itemFlaxSeed", "seedFlax", InitBlocks.blockFlax, Items.string, 0);
|
||||
ItemUtil.register(itemFlaxSeed);
|
||||
CompatUtil.registerMFRSeed(itemFlaxSeed);
|
||||
|
||||
itemCoffeeSeed = new ItemSeed("itemCoffeeSeed", "seedCoffeeBeans", InitBlocks.blockCoffee, itemCoffeeBean, 0);
|
||||
ItemUtil.register(itemCoffeeSeed);
|
||||
CompatUtil.registerMFRSeed(itemCoffeeSeed);
|
||||
|
||||
itemPickaxeEmerald = new ItemPickaxeAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "itemPickaxeEmerald", EnumRarity.epic);
|
||||
itemAxeEmerald = new ItemAxeAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "itemAxeEmerald", EnumRarity.epic);
|
||||
itemShovelEmerald = new ItemShovelAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "itemShovelEmerald", EnumRarity.epic);
|
||||
itemSwordEmerald = new ItemSwordAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "itemSwordEmerald", EnumRarity.epic);
|
||||
itemHoeEmerald = new ItemHoeAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "itemHoeEmerald", EnumRarity.epic);
|
||||
ItemUtil.registerItems(new Item[]{itemPickaxeEmerald, itemAxeEmerald, itemShovelEmerald, itemSwordEmerald, itemHoeEmerald});
|
||||
|
||||
itemPickaxeObsidian = new ItemPickaxeAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "itemPickaxeObsidian", EnumRarity.uncommon);
|
||||
itemAxeObsidian = new ItemAxeAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "itemAxeObsidian", EnumRarity.uncommon);
|
||||
itemShovelObsidian = new ItemShovelAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "itemShovelObsidian", EnumRarity.uncommon);
|
||||
itemSwordObsidian = new ItemSwordAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "itemSwordObsidian", EnumRarity.uncommon);
|
||||
itemHoeObsidian = new ItemHoeAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "itemHoeObsidian", EnumRarity.uncommon);
|
||||
ItemUtil.registerItems(new Item[]{itemPickaxeObsidian, itemAxeObsidian, itemShovelObsidian, itemSwordObsidian, itemHoeObsidian});
|
||||
|
||||
itemPickaxeQuartz = new ItemPickaxeAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemPickaxeQuartz", EnumRarity.rare);
|
||||
itemAxeQuartz = new ItemAxeAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemAxeQuartz", EnumRarity.rare);
|
||||
itemShovelQuartz = new ItemShovelAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemShovelQuartz", EnumRarity.rare);
|
||||
itemSwordQuartz = new ItemSwordAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemSwordQuartz", EnumRarity.rare);
|
||||
itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemHoeQuartz", EnumRarity.rare);
|
||||
ItemUtil.registerItems(new Item[]{itemPickaxeQuartz, itemAxeQuartz, itemShovelQuartz, itemSwordQuartz, itemHoeQuartz});
|
||||
|
||||
woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon, 5192733);
|
||||
stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, "stone", "stonePaxel", EnumRarity.uncommon, 7040621);
|
||||
ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, "ingotIron", "ironPaxel", EnumRarity.rare, 10920613);
|
||||
|
@ -316,6 +227,5 @@ public class InitItems{
|
|||
emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "emeraldPaxel", EnumRarity.epic, 7723338);
|
||||
obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "obsidianPaxel", EnumRarity.epic, 4166);
|
||||
quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "quartzPaxel", EnumRarity.rare, 1710103);
|
||||
ItemUtil.registerItems(new Item[]{woodenPaxel, stonePaxel, ironPaxel, goldPaxel, diamondPaxel, emeraldPaxel, obsidianPaxel, quartzPaxel});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -20,12 +21,9 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class ItemBattery extends ItemEnergy{
|
||||
|
||||
private String name;
|
||||
|
||||
public ItemBattery(String name, int capacity, int transfer){
|
||||
super(capacity, transfer);
|
||||
super(capacity, transfer, name);
|
||||
this.setMaxStackSize(1);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +34,7 @@ public class ItemBattery extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,9 +42,4 @@ public class ItemBattery extends ItemEnergy{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* This file ("ItemBlockBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items;
|
||||
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockBase extends ItemBlock{
|
||||
|
||||
public ItemBlockBase(Block block){
|
||||
super(block);
|
||||
this.setHasSubtypes(false);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage){
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
|
||||
return rarity == null ? EnumRarity.common : rarity;
|
||||
}
|
||||
}
|
|
@ -15,22 +15,22 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import ellpeck.actuallyadditions.ActuallyAdditions;
|
||||
import ellpeck.actuallyadditions.achievement.TheAchievements;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBooklet extends Item implements IActAddItemOrBlock{
|
||||
public class ItemBooklet extends ItemBase{
|
||||
|
||||
public ItemBooklet(){
|
||||
public ItemBooklet(String name){
|
||||
super(name);
|
||||
this.setMaxStackSize(16);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class ItemBooklet extends Item implements IActAddItemOrBlock{
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
|
||||
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getName()+".desc"));
|
||||
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+"."+this.getBaseName()+".desc"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,7 +59,7 @@ public class ItemBooklet extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,9 +67,4 @@ public class ItemBooklet extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemBooklet";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,22 +13,25 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityGiantChest;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockChest;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{
|
||||
public class ItemChestToCrateUpgrade extends ItemBase{
|
||||
|
||||
public ItemChestToCrateUpgrade(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack heldStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){
|
||||
|
@ -84,7 +87,7 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,9 +96,4 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{
|
|||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemChestToCrateUpgrade";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,15 +13,18 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemFoodBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
@ -32,12 +35,12 @@ import net.minecraft.world.World;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCoffee extends ItemFood implements IActAddItemOrBlock{
|
||||
public class ItemCoffee extends ItemFoodBase{
|
||||
|
||||
public static ArrayList<Ingredient> ingredients = new ArrayList<Ingredient>();
|
||||
|
||||
public ItemCoffee(){
|
||||
super(8, 5.0F, false);
|
||||
public ItemCoffee(String name){
|
||||
super(8, 5.0F, false, name);
|
||||
this.setMaxDamage(3);
|
||||
this.setAlwaysEdible();
|
||||
this.setMaxStackSize(1);
|
||||
|
@ -224,12 +227,7 @@ public class ItemCoffee extends ItemFood implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemCoffee";
|
||||
itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
public static class Ingredient{
|
||||
|
|
|
@ -12,18 +12,17 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemFoodBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemCoffeeBean extends ItemFood implements IActAddItemOrBlock{
|
||||
public class ItemCoffeeBean extends ItemFoodBase{
|
||||
|
||||
public ItemCoffeeBean(){
|
||||
super(1, 1F, false);
|
||||
public ItemCoffeeBean(String name){
|
||||
super(1, 1F, false, name);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
|
@ -35,7 +34,7 @@ public class ItemCoffeeBean extends ItemFood implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,9 +42,4 @@ public class ItemCoffeeBean extends ItemFood implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemCoffeeBeans";
|
||||
}
|
||||
}
|
|
@ -14,19 +14,19 @@ 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.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{
|
||||
public class ItemCrafterOnAStick extends ItemBase{
|
||||
|
||||
public ItemCrafterOnAStick(){
|
||||
public ItemCrafterOnAStick(String name){
|
||||
super(name);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,9 +54,4 @@ public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemCrafterOnAStick";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.BlockCrystal;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,12 +25,13 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemCrystal extends Item implements IActAddItemOrBlock{
|
||||
public class ItemCrystal extends ItemBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] textures;
|
||||
|
||||
public ItemCrystal(){
|
||||
public ItemCrystal(String name){
|
||||
super(name);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
@ -69,12 +70,7 @@ public class ItemCrystal extends Item implements IActAddItemOrBlock{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[BlockCrystal.allCrystals.length];
|
||||
for(int i = 0; i < this.textures.length; i++){
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+BlockCrystal.allCrystals[i].name);
|
||||
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+BlockCrystal.allCrystals[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemCrystal";
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ import ellpeck.actuallyadditions.ActuallyAdditions;
|
|||
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.inventory.GuiHandler;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ItemUtil;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldUtil;
|
||||
|
@ -55,8 +56,8 @@ public class ItemDrill extends ItemEnergy{
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] allDemDamnIconsMaan;
|
||||
|
||||
public ItemDrill(){
|
||||
super(500000, 5000);
|
||||
public ItemDrill(String name){
|
||||
super(500000, 5000, name);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
@ -213,15 +214,10 @@ public class ItemDrill extends ItemEnergy{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.allDemDamnIconsMaan = new IIcon[16];
|
||||
for(int i = 0; i < this.allDemDamnIconsMaan.length; i++){
|
||||
this.allDemDamnIconsMaan[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+TheColoredLampColors.values()[i].name);
|
||||
this.allDemDamnIconsMaan[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+TheColoredLampColors.values()[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemDrill";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getAttributeModifiers(ItemStack stack){
|
||||
Multimap map = super.getAttributeModifiers(stack);
|
||||
|
|
|
@ -12,24 +12,22 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{
|
||||
public class ItemDrillUpgrade extends ItemBase{
|
||||
|
||||
public UpgradeType type;
|
||||
public String unlocalizedName;
|
||||
|
||||
public ItemDrillUpgrade(UpgradeType type, String unlocName){
|
||||
super(unlocName);
|
||||
this.type = type;
|
||||
this.unlocalizedName = unlocName;
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
@ -63,7 +61,7 @@ public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,11 +70,6 @@ public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{
|
|||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.unlocalizedName;
|
||||
}
|
||||
|
||||
public enum UpgradeType{
|
||||
SPEED,
|
||||
SPEED_II,
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheDusts;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,11 +25,12 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDust extends Item implements IActAddItemOrBlock{
|
||||
public class ItemDust extends ItemBase{
|
||||
|
||||
public static final TheDusts[] allDusts = TheDusts.values();
|
||||
|
||||
public ItemDust(){
|
||||
public ItemDust(String name){
|
||||
super(name);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
@ -65,12 +66,7 @@ public class ItemDust extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemDust";
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,18 +12,21 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemFertilizer extends Item implements IActAddItemOrBlock{
|
||||
public class ItemFertilizer extends ItemBase{
|
||||
|
||||
public ItemFertilizer(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){
|
||||
|
@ -44,7 +47,7 @@ public class ItemFertilizer extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,9 +55,4 @@ public class ItemFertilizer extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemFertilizer";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,28 +12,31 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemFoodBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheFoods;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
|
||||
public class ItemFoods extends ItemFoodBase{
|
||||
|
||||
public static final TheFoods[] allFoods = TheFoods.values();
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] textures;
|
||||
|
||||
public ItemFoods(){
|
||||
super(0, 0.0F, false);
|
||||
public ItemFoods(String name){
|
||||
super(0, 0.0F, false, name);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
TheFoods.setReturnItems();
|
||||
|
@ -109,12 +112,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[allFoods.length];
|
||||
for(int i = 0; i < textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allFoods[i].name);
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allFoods[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemFood";
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
|
@ -33,8 +34,8 @@ import java.util.ArrayList;
|
|||
|
||||
public class ItemGrowthRing extends ItemEnergy{
|
||||
|
||||
public ItemGrowthRing(){
|
||||
super(1000000, 5000);
|
||||
public ItemGrowthRing(String name){
|
||||
super(1000000, 5000, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -108,7 +109,7 @@ public class ItemGrowthRing extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -116,9 +117,4 @@ public class ItemGrowthRing extends ItemEnergy{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemGrowthRing";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,26 +12,29 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.recipe.HairyBallHandler;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemHairyBall extends Item implements IActAddItemOrBlock{
|
||||
public class ItemHairyBall extends ItemBase{
|
||||
|
||||
public ItemHairyBall(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){
|
||||
if(!world.isRemote){
|
||||
ItemStack returnItem = this.getRandomReturnItem(world);
|
||||
ItemStack returnItem = this.getRandomReturnItem();
|
||||
if(!player.inventory.addItemStackToInventory(returnItem)){
|
||||
EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem);
|
||||
entityItem.delayBeforeCanPickup = 0;
|
||||
|
@ -43,7 +46,7 @@ public class ItemHairyBall extends Item implements IActAddItemOrBlock{
|
|||
return stack;
|
||||
}
|
||||
|
||||
public ItemStack getRandomReturnItem(World world){
|
||||
public ItemStack getRandomReturnItem(){
|
||||
return ((HairyBallHandler.Return)WeightedRandom.getRandomItem(Util.RANDOM, HairyBallHandler.returns)).returnItem.copy();
|
||||
}
|
||||
|
||||
|
@ -55,7 +58,7 @@ public class ItemHairyBall extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,9 +66,4 @@ public class ItemHairyBall extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemHairyBall";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemFoodBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheJams;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -23,7 +23,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -31,14 +30,14 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemJams extends ItemFood implements IActAddItemOrBlock{
|
||||
public class ItemJams extends ItemFoodBase{
|
||||
|
||||
public static final TheJams[] allJams = TheJams.values();
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon overlayIcon;
|
||||
|
||||
public ItemJams(){
|
||||
super(0, 0.0F, false);
|
||||
public ItemJams(String name){
|
||||
super(0, 0.0F, false, name);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
@ -86,13 +85,8 @@ public class ItemJams extends ItemFood implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemJam";
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+"Overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,19 +13,19 @@ package ellpeck.actuallyadditions.items;
|
|||
import com.google.common.collect.Multimap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemKnife extends Item implements IActAddItemOrBlock{
|
||||
public class ItemKnife extends ItemBase{
|
||||
|
||||
public ItemKnife(){
|
||||
public ItemKnife(String name){
|
||||
super(name);
|
||||
this.setMaxDamage(100);
|
||||
this.setMaxStackSize(1);
|
||||
this.setContainerItem(this);
|
||||
|
@ -49,12 +49,7 @@ public class ItemKnife extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemKnife";
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -12,9 +12,9 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
|
||||
import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
|
@ -22,7 +22,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
|
@ -32,9 +31,10 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemLaserWrench extends Item implements IActAddItemOrBlock{
|
||||
public class ItemLaserWrench extends ItemBase{
|
||||
|
||||
public ItemLaserWrench(){
|
||||
public ItemLaserWrench(String name){
|
||||
super(name);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -111,9 +111,4 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemLaserWrench";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ package ellpeck.actuallyadditions.items;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -23,7 +23,6 @@ import net.minecraft.entity.item.EntityItem;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
@ -32,11 +31,12 @@ import net.minecraft.world.World;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
public class ItemLeafBlower extends Item implements IActAddItemOrBlock{
|
||||
public class ItemLeafBlower extends ItemBase{
|
||||
|
||||
private final boolean isAdvanced;
|
||||
|
||||
public ItemLeafBlower(boolean isAdvanced){
|
||||
public ItemLeafBlower(boolean isAdvanced, String name){
|
||||
super(name);
|
||||
this.isAdvanced = isAdvanced;
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class ItemLeafBlower extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,9 +136,4 @@ public class ItemLeafBlower extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isAdvanced ? "itemLeafBlowerAdvanced" : "itemLeafBlower";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,22 +12,20 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.recipe.ReconstructorRecipeHandler;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemLens extends Item implements IActAddItemOrBlock, IReconstructorLens{
|
||||
public class ItemLens extends ItemBase implements IReconstructorLens{
|
||||
|
||||
private String name;
|
||||
private ReconstructorRecipeHandler.LensType type;
|
||||
|
||||
public ItemLens(String name, ReconstructorRecipeHandler.LensType type){
|
||||
this.name = name;
|
||||
super(name);
|
||||
this.type = type;
|
||||
this.type.setLens(this);
|
||||
this.setMaxStackSize(1);
|
||||
|
@ -41,7 +39,7 @@ public class ItemLens extends Item implements IActAddItemOrBlock, IReconstructor
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,11 +48,6 @@ public class ItemLens extends Item implements IActAddItemOrBlock, IReconstructor
|
|||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReconstructorRecipeHandler.LensType getLensType(){
|
||||
return this.type;
|
||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -28,8 +29,8 @@ import java.util.ArrayList;
|
|||
|
||||
public class ItemMagnetRing extends ItemEnergy{
|
||||
|
||||
public ItemMagnetRing(){
|
||||
super(30000000, 5000);
|
||||
public ItemMagnetRing(String name){
|
||||
super(30000000, 5000, name);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -72,7 +73,7 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,9 +81,4 @@ public class ItemMagnetRing extends ItemEnergy{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemSuctionRing";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,13 +25,14 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMisc extends Item implements IActAddItemOrBlock{
|
||||
public class ItemMisc extends ItemBase{
|
||||
|
||||
public static final TheMiscItems[] allMiscItems = TheMiscItems.values();
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] textures;
|
||||
|
||||
public ItemMisc(){
|
||||
public ItemMisc(String name){
|
||||
super(name);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
@ -69,12 +70,7 @@ public class ItemMisc extends Item implements IActAddItemOrBlock{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[allMiscItems.length];
|
||||
for(int i = 0; i < textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscItems[i].name);
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allMiscItems[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemMisc";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.tile.IPhantomTile;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldPos;
|
||||
|
@ -21,7 +21,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -32,9 +31,10 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{
|
||||
public class ItemPhantomConnector extends ItemBase{
|
||||
|
||||
public ItemPhantomConnector(){
|
||||
public ItemPhantomConnector(String name){
|
||||
super(name);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,9 +150,4 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemPhantomConnector";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.ThePotionRings;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -29,13 +29,14 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPotionRing extends Item implements IActAddItemOrBlock{
|
||||
public class ItemPotionRing extends ItemBase{
|
||||
|
||||
public static final ThePotionRings[] allRings = ThePotionRings.values();
|
||||
|
||||
private boolean isAdvanced;
|
||||
|
||||
public ItemPotionRing(boolean isAdvanced){
|
||||
public ItemPotionRing(boolean isAdvanced, String name){
|
||||
super(name);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxStackSize(1);
|
||||
this.isAdvanced = isAdvanced;
|
||||
|
@ -108,12 +109,7 @@ public class ItemPotionRing extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.isAdvanced ? "itemPotionRingAdvanced" : "itemPotionRing";
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,17 +12,20 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemResonantRice extends Item implements IActAddItemOrBlock{
|
||||
public class ItemResonantRice extends ItemBase{
|
||||
|
||||
public ItemResonantRice(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){
|
||||
|
@ -41,7 +44,7 @@ public class ItemResonantRice extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,9 +52,4 @@ public class ItemResonantRice extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemResonantRice";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
|
||||
package ellpeck.actuallyadditions.items;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.blocks.BlockPlant;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.BlockPlant;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -25,7 +25,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{
|
||||
public class ItemSeed extends ItemSeeds{
|
||||
|
||||
public Block plant;
|
||||
public String name;
|
||||
|
@ -39,6 +39,17 @@ public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{
|
|||
((BlockPlant)this.plant).seedItem = this;
|
||||
((BlockPlant)this.plant).returnItem = returnItem;
|
||||
((BlockPlant)this.plant).returnMeta = returnMeta;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,7 +60,7 @@ public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,11 +69,6 @@ public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{
|
|||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getPlant(IBlockAccess world, int x, int y, int z){
|
||||
return this.plant;
|
||||
|
|
|
@ -12,8 +12,8 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -28,7 +28,7 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
|
||||
public class ItemSpecialDrop extends ItemBase{
|
||||
|
||||
public static final int SOLID_XP_AMOUNT = 8;
|
||||
|
||||
|
@ -36,7 +36,8 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] textures;
|
||||
|
||||
public ItemSpecialDrop(){
|
||||
public ItemSpecialDrop(String name){
|
||||
super(name);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
@ -95,12 +96,7 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
|
|||
public void registerIcons(IIconRegister iconReg){
|
||||
this.textures = new IIcon[allDrops.length];
|
||||
for(int i = 0; i < textures.length; i++){
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allDrops[i].name);
|
||||
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName()+allDrops[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemSpecial";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import ellpeck.actuallyadditions.util.WorldUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -29,8 +30,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
public class ItemTeleStaff extends ItemEnergy{
|
||||
|
||||
public ItemTeleStaff(){
|
||||
super(500000, 10000);
|
||||
public ItemTeleStaff(String name){
|
||||
super(500000, 10000, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,12 +83,7 @@ public class ItemTeleStaff extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemTeleStaff";
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.items.base.ItemEnergy;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -25,8 +26,8 @@ import net.minecraft.world.World;
|
|||
|
||||
public class ItemWaterRemovalRing extends ItemEnergy{
|
||||
|
||||
public ItemWaterRemovalRing(){
|
||||
super(1000000, 5000);
|
||||
public ItemWaterRemovalRing(String name){
|
||||
super(1000000, 5000, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +82,7 @@ public class ItemWaterRemovalRing extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,9 +90,4 @@ public class ItemWaterRemovalRing extends ItemEnergy{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemWaterRemovalRing";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,18 +12,17 @@ package ellpeck.actuallyadditions.items;
|
|||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.items.base.ItemBase;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{
|
||||
public class ItemWingsOfTheBats extends ItemBase{
|
||||
|
||||
/**
|
||||
* A List containing all of the Players that can currently fly
|
||||
|
@ -37,7 +36,8 @@ public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{
|
|||
*/
|
||||
public static ArrayList<String> wingedPlayers = new ArrayList<String>();
|
||||
|
||||
public ItemWingsOfTheBats(){
|
||||
public ItemWingsOfTheBats(String name){
|
||||
super(name);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -108,9 +108,4 @@ public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return "itemWingsOfTheBats";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -35,7 +36,7 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
|
||||
public class ItemAllToolAA extends ItemTool {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon overlayIcon;
|
||||
|
@ -54,6 +55,25 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
|
|||
this.color = color;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -135,11 +155,6 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){
|
||||
int[] idsStack = OreDictionary.getOreIDs(stack);
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -22,7 +23,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{
|
||||
public class ItemArmorAA extends ItemArmor{
|
||||
|
||||
private String repairItem;
|
||||
private String name;
|
||||
|
@ -37,6 +38,24 @@ public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{
|
|||
|
||||
//Fixes vanilla's weird durability handling
|
||||
this.setMaxDamage(material.getDurability(type)/10);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,11 +88,6 @@ public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
}
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -21,7 +22,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{
|
||||
public class ItemAxeAA extends ItemAxe {
|
||||
|
||||
private String name;
|
||||
private EnumRarity rarity;
|
||||
|
@ -29,9 +30,30 @@ public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{
|
|||
|
||||
public ItemAxeAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
|
||||
this.repairItem = repairItem;
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +75,7 @@ public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,9 +83,4 @@ public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file ("ItemBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
|
||||
public class ItemBase extends Item{
|
||||
|
||||
private String name;
|
||||
|
||||
public ItemBase(String name){
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
}
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -22,7 +23,7 @@ import net.minecraft.item.ItemBucket;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
|
||||
public class ItemBucketAA extends ItemBucket {
|
||||
|
||||
private String name;
|
||||
|
||||
|
@ -30,6 +31,24 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
|
|||
super(block);
|
||||
this.name = unlocName;
|
||||
this.setContainerItem(Items.bucket);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,7 +59,7 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,9 +67,4 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
}
|
|
@ -8,12 +8,14 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cofh.api.energy.ItemEnergyContainer;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -23,12 +25,33 @@ import net.minecraft.world.World;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ItemEnergy extends ItemEnergyContainer implements IActAddItemOrBlock{
|
||||
public abstract class ItemEnergy extends ItemEnergyContainer {
|
||||
|
||||
public ItemEnergy(int maxPower, int transfer){
|
||||
private String name;
|
||||
|
||||
public ItemEnergy(int maxPower, int transfer, String name){
|
||||
super(maxPower, transfer);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxStackSize(1);
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* This file ("ItemFoodBase.java") is part of the Actually Additions Mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.item.ItemFood;
|
||||
|
||||
|
||||
public class ItemFoodBase extends ItemFood{
|
||||
|
||||
private String name;
|
||||
|
||||
public ItemFoodBase(int heal, float saturation, boolean wolfFood, String name){
|
||||
super(heal, saturation, wolfFood);
|
||||
this.name = name;
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
}
|
|
@ -8,32 +8,53 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemHoeAA extends ItemHoe implements IActAddItemOrBlock{
|
||||
public class ItemHoeAA extends ItemHoe {
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private String repairItem;
|
||||
|
||||
public ItemHoeAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
public ItemHoeAA(Item.ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
|
||||
this.repairItem = repairItem;
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,7 +76,7 @@ public class ItemHoeAA extends ItemHoe implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,13 +84,4 @@ public class ItemHoeAA extends ItemHoe implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
private String getOredictName(){
|
||||
return this.oredictName;
|
||||
}
|
||||
}
|
|
@ -8,11 +8,12 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -21,7 +22,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{
|
||||
public class ItemPickaxeAA extends ItemPickaxe{
|
||||
|
||||
private String name;
|
||||
private EnumRarity rarity;
|
||||
|
@ -29,9 +30,30 @@ public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{
|
|||
|
||||
public ItemPickaxeAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
|
||||
this.repairItem = repairItem;
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +75,7 @@ public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,9 +83,4 @@ public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -8,32 +8,53 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemShovelAA extends ItemSpade implements IActAddItemOrBlock{
|
||||
public class ItemShovelAA extends ItemSpade {
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private String repairItem;
|
||||
|
||||
public ItemShovelAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
public ItemShovelAA(Item.ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
|
||||
this.repairItem = repairItem;
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,7 +76,7 @@ public class ItemShovelAA extends ItemSpade implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,13 +84,4 @@ public class ItemShovelAA extends ItemSpade implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
private String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
|
@ -8,11 +8,13 @@
|
|||
* © 2015 Ellpeck
|
||||
*/
|
||||
|
||||
package ellpeck.actuallyadditions.items.tools;
|
||||
package ellpeck.actuallyadditions.items.base;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
|
||||
import ellpeck.actuallyadditions.blocks.base.ItemBlockBase;
|
||||
import ellpeck.actuallyadditions.creative.CreativeTab;
|
||||
import ellpeck.actuallyadditions.util.ModUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -21,19 +23,42 @@ import net.minecraft.item.ItemSword;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemSwordAA extends ItemSword implements IActAddItemOrBlock{
|
||||
public class ItemSwordAA extends ItemSword {
|
||||
|
||||
private String name;
|
||||
private String oredictName;
|
||||
private EnumRarity rarity;
|
||||
private String repairItem;
|
||||
|
||||
public ItemSwordAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){
|
||||
super(toolMat);
|
||||
|
||||
this.repairItem = repairItem;
|
||||
this.name = unlocalizedName;
|
||||
this.rarity = rarity;
|
||||
this.repairItem = repairItem;
|
||||
this.oredictName = name;
|
||||
|
||||
this.setMaxDamage(this.getMaxDamage()*4);
|
||||
|
||||
this.register();
|
||||
}
|
||||
|
||||
private void register(){
|
||||
this.setUnlocalizedName(ModUtil.MOD_ID_LOWER+"."+this.getBaseName());
|
||||
GameRegistry.registerItem(this, this.getBaseName());
|
||||
if(this.shouldAddCreative()){
|
||||
this.setCreativeTab(CreativeTab.instance);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean shouldAddCreative(){
|
||||
return true;
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
return this.name;
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
return ItemBlockBase.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,7 +80,7 @@ public class ItemSwordAA extends ItemSword implements IActAddItemOrBlock{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getBaseName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,13 +88,4 @@ public class ItemSwordAA extends ItemSword implements IActAddItemOrBlock{
|
|||
public IIcon getIcon(ItemStack stack, int pass){
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
private String getOredictName(){
|
||||
return oredictName;
|
||||
}
|
||||
}
|
|
@ -44,12 +44,12 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip
|
|||
|
||||
@Override
|
||||
public void loadTransferRects(){
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(80, 40, 24, 22), this.getName()));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(80, 40, 24, 22), this.getBaseName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results){
|
||||
if(outputId.equals(this.getName()) && (getClass() == NEICrusherRecipe.class || getClass() == Double.class)){
|
||||
if(outputId.equals(this.getBaseName()) && (getClass() == NEICrusherRecipe.class || getClass() == Double.class)){
|
||||
for(CrusherRecipeRegistry.CrusherRecipe recipe : CrusherRecipeRegistry.recipes){
|
||||
arecipes.add(new CachedCrush(recipe.getRecipeInputs(), recipe.getRecipeOutputOnes(), recipe.getRecipeOutputTwos(), recipe.outputTwoChance, this));
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip
|
|||
|
||||
@Override
|
||||
public String getOverlayIdentifier(){
|
||||
return this.getName();
|
||||
return this.getBaseName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -121,13 +121,13 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip
|
|||
}
|
||||
}
|
||||
|
||||
protected String getName(){
|
||||
protected String getBaseName(){
|
||||
return "actuallyadditions."+(this instanceof Double ? "crushingDouble" : "crushing");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName(){
|
||||
return StringUtil.localize("container.nei."+this.getName()+".name");
|
||||
return StringUtil.localize("container.nei."+this.getBaseName()+".name");
|
||||
}
|
||||
|
||||
public static class Double extends NEICrusherRecipe{
|
||||
|
@ -139,8 +139,8 @@ public class NEICrusherRecipe extends TemplateRecipeHandler implements INEIRecip
|
|||
|
||||
@Override
|
||||
public void loadTransferRects(){
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(51, 40, 24, 22), this.getName()));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(101, 40, 24, 22), this.getName()));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(51, 40, 24, 22), this.getBaseName()));
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(101, 40, 24, 22), this.getBaseName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue