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