diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java index 246aac9f..473d550c 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -19,7 +19,7 @@ public class ModInfo { public static final String MOD_CHANNEL = MOD_ID; public static final String MOD_VERSION = "1.3.22"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; - public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5.10,);"; + public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5,);"; /** Mod Structures **/ public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy"; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java index 691caf08..007c58ac 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java @@ -22,7 +22,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.core.common.crafting.FireSource; import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.forgecraft.ModInfo; @@ -44,7 +44,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public BloomeryBase(Material material, String registryName, Integer maxHeat) { super(material, registryName); setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false))); + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false))); setHardness(3.0f); setResistance(5.0f); this.maxHeat=maxHeat; @@ -75,7 +75,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr { this.updateTick(world, pos, state, random); if(!world.isRemote){ - if(state.getValue(PrimalAPI.States.ACTIVE) == true) { + if(state.getValue(PrimalStates.ACTIVE) == true) { FireHelper.makeSmoke(world, pos, 50); } } @@ -98,7 +98,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr if(pItem.isEmpty()) { if(!player.isSneaking()){ - if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true){ + if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true){ Integer bloomeryHeat = tile.getHeat(); String display = "\n" + "Current Temp: " + bloomeryHeat.toString() + @@ -128,7 +128,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr if(tile.getSlotStack(0) != ItemStack.EMPTY) { if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) { - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2); tile.setHeat(100); tile.markDirty(); tile.updateBlock(); @@ -194,7 +194,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) { int lightState =0; - if(state.getValue(PrimalAPI.States.ACTIVE) == true){ + if(state.getValue(PrimalStates.ACTIVE) == true){ lightState = 10; } return lightState; @@ -214,7 +214,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public boolean isFireSource(World world, BlockPos pos, EnumFacing side) { if(!world.isRemote){ - if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE)==true){ + if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE)==true){ return true; } } @@ -225,7 +225,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity ent) { if(ent instanceof EntityPlayer){ - if(state.getValue(PrimalAPI.States.ACTIVE) == true){ + if(state.getValue(PrimalStates.ACTIVE) == true){ ent.setFire(1); } } @@ -263,7 +263,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { if(!worldIn.isRemote) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); } } @@ -271,35 +271,35 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr public int getMetaFromState(IBlockState state) { int i = 0; - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 0; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 1; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 2; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 3; return i; } - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 4; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 5; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 6; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 7; return i; } @@ -350,12 +350,12 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr active = false; } - return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active)); + return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active)); } @Override protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE}); + return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE}); } @Override @@ -388,7 +388,7 @@ public class BloomeryBase extends CustomContainerFacing implements ITileEntityPr @SuppressWarnings("incomplete-switch") public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { - if(state.getValue(PrimalAPI.States.ACTIVE) == true) + if(state.getValue(PrimalStates.ACTIVE) == true) { double d0 = (double)pos.getX() + 0.5D; double d1 = (double)pos.getY() + 0.2D; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java index bc936857..0476f293 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java @@ -18,7 +18,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.core.common.items.tools.WorkMallet; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.tiles.TileBreaker; @@ -34,7 +34,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { public Breaker(Material material, String registryName, Float hardness) { super(material, registryName); setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, false)); + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false)); setHardness(hardness); } @@ -51,19 +51,19 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { TileBreaker tile = (TileBreaker) world.getTileEntity(pos); ItemStack pItem = player.inventory.getCurrentItem(); - if(state.getValue(PrimalAPI.States.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){ + if(state.getValue(PrimalStates.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){ doBreaking(world, state, pos, tile); - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, false)); + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, false)); tile.setCharge(0); return true; } if(!player.isSneaking() && pItem.isEmpty()) { - if (!state.getValue(PrimalAPI.States.ACTIVE)) { - world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2); + if (!state.getValue(PrimalStates.ACTIVE)) { + world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, true), 2); return true; } - if(state.getValue(PrimalAPI.States.ACTIVE)) { + if(state.getValue(PrimalStates.ACTIVE)) { if (tile.getCharge() < 181) { tile.setCharge(tile.getCharge() + 2.0f); tile.updateBlock(); @@ -122,7 +122,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { //if(!worldIn.isRemote) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, false), 2); + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, false), 2); //} } @@ -130,7 +130,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { public int getMetaFromState(IBlockState state) { int i = 0; - if(state.getValue(PrimalAPI.States.ACTIVE ) == false) { + if(state.getValue(PrimalStates.ACTIVE ) == false) { if (state.getValue(FACING) == EnumFacing.EAST) { i = 0; return i; @@ -149,7 +149,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { } } - if(state.getValue(PrimalAPI.States.ACTIVE)) { + if(state.getValue(PrimalStates.ACTIVE)) { if (state.getValue(FACING) == EnumFacing.EAST) { i = 4; return i; @@ -176,35 +176,35 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { IBlockState iblockstate = this.getDefaultState(); if (meta == 0){ - iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, false); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalStates.ACTIVE, false); } if (meta == 1) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, false); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, false); } if (meta == 2) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, false); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, false); } if (meta == 3) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, false); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false); } if (meta == 4){ - iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, true); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalStates.ACTIVE, true); } if (meta == 5) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, true); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, true); } if (meta == 6) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, true); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, true); } if (meta == 7) { - iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, true); + iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, true); } return iblockstate; } @Override protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {PrimalAPI.States.ACTIVE, FACING}); + return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE, FACING}); } @Override diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java index 5b0f5174..c255c9a8 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java @@ -17,7 +17,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.init.ModBlocks; @@ -134,7 +134,7 @@ public class Crucible extends Block { } else if (name.equals("tile.coolcleanironcrucible")){ return Item.getItemFromBlock(ModBlocks.ironcleanball); } else if (name.equals("tile.rawcleanironcrucible")){ - return PrimalAPI.Items.IRON_DUST; + return PrimalItems.IRON_DUST; } else if (name.equals("tile.coolsteelcrucible")){ return Item.getItemFromBlock(ModBlocks.steelball); } else if (name.equals("tile.rawsteelcrucible")){ @@ -142,7 +142,7 @@ public class Crucible extends Block { } else if (name.equals("tile.coolwootzcrucible")){ return Item.getItemFromBlock(ModBlocks.wootzball); } else if (name.equals("tile.rawcleanironcrucible")){ - return PrimalAPI.Items.GOLDEN_STICK; + return PrimalItems.GOLDEN_STICK; }else if (name.equals("tile.emptycruciblecracked")){ return Items.CLAY_BALL; } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java index 1fab857f..838724c3 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java @@ -24,7 +24,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.core.common.crafting.FireSource; import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.forgecraft.ModInfo; @@ -46,14 +46,14 @@ import static nmd.primal.core.common.helper.FireHelper.makeSmoke; public class Forge extends CustomContainerFacing implements ITileEntityProvider{ private int maxHeat; - //public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.ACTIVE"); + //public static final PropertyBool PrimalStates.ACTIVE = PropertyBool.create("PrimalStates.ACTIVE"); protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D); protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); public Forge(Material material, String name, Integer maxHeat) { super(material, name); setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false))); + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false))); setHardness(3.0f); setResistance(5.0f); this.maxHeat=maxHeat; @@ -114,7 +114,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ } if(pItem.isEmpty()) { if(!player.isSneaking()){ - if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true){ + if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true){ Integer tempInt = tile.getHeat(); String tempString = tempInt.toString(); ITextComponent itextcomponent = new TextComponentString(tempString); @@ -125,7 +125,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ } } if((FireSource.useSource(world, pos, player, pItem, hand, facing, hitX, hitY, hitZ))) { - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2); tile.setHeat(100); tile.markDirty(); tile.updateBlock(); @@ -233,7 +233,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ { //if (!world.isRemote){ if(ent instanceof EntityPlayer){ - if(state.getValue(PrimalAPI.States.ACTIVE) == true){ + if(state.getValue(PrimalStates.ACTIVE) == true){ ent.setFire(1); } } @@ -247,7 +247,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ @Override public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) { - if(state.getValue(PrimalAPI.States.ACTIVE) == true){ + if(state.getValue(PrimalStates.ACTIVE) == true){ return 15; } return 0; @@ -271,7 +271,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ if(!world.isRemote){ TileForge tile = (TileForge) world.getTileEntity(pos); if(tile.getSlotStack(0) != ItemStack.EMPTY){ - if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE)==true){ + if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE)==true){ return true; } } @@ -312,14 +312,14 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ /*@Override public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { IBlockState state = super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer); - return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)); + return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)); }*/ @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { if(!worldIn.isRemote) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); } } @@ -327,35 +327,35 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ public int getMetaFromState(IBlockState state) { int i = 0; - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 0; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 1; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 2; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 3; return i; } - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 4; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 5; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 6; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 7; return i; } @@ -406,12 +406,12 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ active = false; } - return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active)); + return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active)); } @Override protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE}); + return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE}); } @Override @@ -444,7 +444,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ { this.updateTick(world, pos, state, random); if(!world.isRemote){ - if(state.getValue(PrimalAPI.States.ACTIVE) == true) { + if(state.getValue(PrimalStates.ACTIVE) == true) { makeSmoke(world, pos); } } @@ -454,7 +454,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider{ @SuppressWarnings("incomplete-switch") public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { - if(state.getValue(PrimalAPI.States.ACTIVE) == true) + if(state.getValue(PrimalStates.ACTIVE) == true) { double d0 = (double)pos.getX() + 0.5D; double d1 = (double)pos.getY() + 0.96D; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java index 969113ca..89c8aadc 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java @@ -15,7 +15,7 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; @@ -51,7 +51,7 @@ public class IngotBall extends BlockCustomBase { public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { //System.out.println(stack.getItemDamage()); - worldIn.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + worldIn.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); //System.out.println(state.getValue(ACTIVE)); } @@ -59,10 +59,10 @@ public class IngotBall extends BlockCustomBase { { if(!world.isRemote){ - if(state.getValue(PrimalAPI.States.ACTIVE)){ + if(state.getValue(PrimalStates.ACTIVE)){ world.setBlockState(pos, Blocks.FLOWING_LAVA.getDefaultState().withProperty(BlockDynamicLiquid.LEVEL, 1), 3); } - if(!state.getValue(PrimalAPI.States.ACTIVE)){ + if(!state.getValue(PrimalStates.ACTIVE)){ //PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(this, 1)); } } @@ -72,11 +72,11 @@ public class IngotBall extends BlockCustomBase { public int getMetaFromState(IBlockState state) { int i = 0; - if( state.getValue(PrimalAPI.States.ACTIVE) == false) { + if( state.getValue(PrimalStates.ACTIVE) == false) { i = 0; return i; } - if( state.getValue(PrimalAPI.States.ACTIVE) == true) { + if( state.getValue(PrimalStates.ACTIVE) == true) { i = 1; return i; } @@ -89,17 +89,17 @@ public class IngotBall extends BlockCustomBase { IBlockState iblockstate = this.getDefaultState(); if (meta == 0){ - iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)); + iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)); } if (meta == 1) { - iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(true)); + iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(true)); } return iblockstate; } @Override protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {PrimalAPI.States.ACTIVE}); + return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE}); } @Override @@ -108,8 +108,8 @@ public class IngotBall extends BlockCustomBase { this.updateTick(world, pos, state, random); if(!world.isRemote){ if ( ThreadLocalRandom.current().nextInt(0,4) == 0) { - if(state.getValue(PrimalAPI.States.ACTIVE) == true) { - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + if(state.getValue(PrimalStates.ACTIVE) == true) { + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); world.playSound((EntityPlayer) null, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java index a18ad0b9..12245816 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java @@ -15,7 +15,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.tiles.TileBloomery; @@ -30,7 +30,7 @@ import java.util.concurrent.ThreadLocalRandom; */ public class PistonBellows extends CustomContainerFacing { - //public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("active"); + //public static final PropertyBool PrimalStates.ACTIVE = PropertyBool.create("active"); //protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D); protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 12 / 16D, 1.0D); protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 12 / 16D, 1.0D); @@ -40,7 +40,7 @@ public class PistonBellows extends CustomContainerFacing { public PistonBellows(Material material, String registryName) { super(material, registryName); setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false))); + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false))); setHardness(3.0f); } @@ -56,7 +56,7 @@ public class PistonBellows extends CustomContainerFacing { TilePistonBellows tile = (TilePistonBellows) worldIn.getTileEntity(pos); if (tile != null) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); } } @@ -65,8 +65,8 @@ public class PistonBellows extends CustomContainerFacing { public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if(!world.isRemote){ //System.out.println(state.getValue(PistonBellows.FACING)); - if(state.getValue(PrimalAPI.States.ACTIVE) == false) { - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2); + if(state.getValue(PrimalStates.ACTIVE) == false) { + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2); //world.playSound(pos, ForgecraftSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f); //world.playSound((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f, true); world.playSound(null, pos, ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 0.25F, 0.8F); @@ -77,7 +77,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); tile.setHeat(tile.getHeat() + 50); @@ -89,7 +89,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); @@ -105,7 +105,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); tile.setHeat(tile.getHeat() + 50); @@ -117,7 +117,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); @@ -133,7 +133,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); tile.setHeat(tile.getHeat() + 50); @@ -145,7 +145,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); @@ -161,7 +161,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); tile.setHeat(tile.getHeat() + 50); @@ -173,7 +173,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) { if (tile != null) { //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); @@ -243,35 +243,35 @@ public class PistonBellows extends CustomContainerFacing { public int getMetaFromState(IBlockState state) { int i = 0; - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 0; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){ i = 1; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 2; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){ i = 3; return i; } - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 4; return i; } - if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){ i = 5; return i; } - if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 6; return i; } - if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){ + if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){ i = 7; return i; } @@ -325,12 +325,12 @@ public class PistonBellows extends CustomContainerFacing { active = false; } - return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active)); + return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active)); } @Override protected BlockStateContainer createBlockState() { - return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE}); + return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE}); } //return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty }); @@ -362,18 +362,18 @@ public class PistonBellows extends CustomContainerFacing { public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { - if(state.getValue(PrimalAPI.States.ACTIVE) == Boolean.TRUE) { + if(state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) { if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) { BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { makeEmbers(world, tempPos, world.rand); } } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) { makeEmbers(world, tempPos, world.rand); } } @@ -384,13 +384,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { makeEmbers(world, tempPos, world.rand); } } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) { makeEmbers(world, tempPos, world.rand); } } @@ -401,13 +401,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { makeEmbers(world, tempPos, world.rand); } } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) { makeEmbers(world, tempPos, world.rand); } } @@ -418,13 +418,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { makeEmbers(world, tempPos, world.rand); } } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) { + if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) { makeEmbers(world, tempPos, world.rand); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java index 538d3e3a..a92d07fa 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java @@ -12,7 +12,7 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalSounds; import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.items.tools.WorkBlade; @@ -47,7 +47,7 @@ public class YewStave extends BlockCustomBase { if(pItem.getItem() instanceof WorkBlade){ if(world.getBlockState(pos.up()).getBlock() instanceof YewStave ) { //world.playSound(player, player.posX, player.posY, player.posZ, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1F); - world.playSound(null, pos, PrimalAPI.Sounds.SOUND_TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1.0F); + world.playSound(null, pos, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1.0F); if(CommonUtils.randomCheck(3) ) { PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(ModItems.rawlongbow, 1)); world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index d90965a9..91efd49b 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -5,7 +5,7 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; import nmd.primal.core.common.crafting.RecipeHandler; import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.forgecraft.crafting.AnvilCrafting; @@ -28,7 +28,7 @@ public class ModCrafting { /***CASTING BLOCK***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingblock), - " B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalAPI.Items.ADOBEBRICK_DRY); + " B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalItems.ADOBEBRICK_DRY); /***CASTING FORM***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1), @@ -39,12 +39,12 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.castingmud, 4), true, new Object[]{" C ", "CSC", " C ", ('S'), Blocks.SAND, - ('C'), PrimalAPI.Items.MUD_CLUMP + ('C'), PrimalItems.MUD_CLUMP }); /***YEW STAVE***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2), true, new Object[]{"C", "C", - ('C'), PrimalAPI.Items.LOGS_SPLIT_YEW + ('C'), PrimalItems.LOGS_SPLIT_YEW }); /***Unstrung Longbow***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1), @@ -55,7 +55,7 @@ public class ModCrafting { /***Longbow***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.longbow, 1), true, new Object[]{"C ","CA","C ", - ('C'), PrimalAPI.Items.SILK_CORDAGE, + ('C'), PrimalItems.SILK_CORDAGE, ('A'), ModItems.unstrunglongbow }); @@ -64,16 +64,16 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick), "X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_adobe), - "X X", "XYX", "X X", 'X', PrimalAPI.Items.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE); + "X X", "XYX", "X X", 'X', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE); /***Bloomery***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick), "X X", "X X", "XXX", 'X', Items.BRICK); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_adobe), - "X X", "X X", "XXX", 'X', PrimalAPI.Items.ADOBEBRICK_DRY); + "X X", "X X", "XXX", 'X', PrimalItems.ADOBEBRICK_DRY); /***Block Breaker***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.blockbreaker), - "L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalAPI.Items.SILK_CORDAGE_COILED); + "L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalItems.SILK_CORDAGE_COILED); /*** Soft Crucible ***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible), @@ -81,7 +81,7 @@ public class ModCrafting { /*** Soft Crucible ***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible), - "X X", "X X", "XXX", 'X', PrimalAPI.Items.MUD_CLUMP); + "X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP); /***Wooden PistonBellows***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX", @@ -115,13 +115,13 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible), "XL","Y ", ('X'), "dustIron", - ('L'), PrimalAPI.Items.CARBONATE_SLACK, + ('L'), PrimalItems.CARBONATE_SLACK, ('Y'), ModBlocks.emptycrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible), "XC","Y ", ('X'), new ItemStack(ModBlocks.ironcleanball, 1), - ('C'), new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH), + ('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH), ('Y'), ModBlocks.emptycrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), "XCX"," X "," Y ", @@ -159,7 +159,7 @@ public class ModCrafting { ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond), "D","Y", - ('D'), PrimalAPI.Items.DIAMOND_KNAPP, + ('D'), PrimalItems.DIAMOND_KNAPP, ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis), "L","Y", @@ -167,7 +167,7 @@ public class ModCrafting { ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald), "E","Y", - ('E'), PrimalAPI.Items.EMERALD_KNAPP, + ('E'), PrimalItems.EMERALD_KNAPP, ('Y'), ModBlocks.rawbronzecrucible); @@ -205,22 +205,22 @@ public class ModCrafting { /***Pickaxe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S", @@ -231,22 +231,22 @@ public class ModCrafting { /***Axe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO wootz placeholder RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S", @@ -256,22 +256,22 @@ public class ModCrafting { /***Shovel Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO placed holder for wootz RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S", @@ -281,22 +281,22 @@ public class ModCrafting { /***Hoe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalAPI.Items.LACQUER_STICK, + ('S'), PrimalItems.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO PLACE HOLDER FOR WOOTZ STEEL RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S", @@ -877,8 +877,8 @@ public class ModCrafting { String diamond = Items.DIAMOND.getRegistryName().toString(); String emerald = Items.EMERALD.getRegistryName().toString(); - String emeraldShard = PrimalAPI.Items.EMERALD_KNAPP.getRegistryName().toString(); - String diamondShard = PrimalAPI.Items.DIAMOND_KNAPP.getRegistryName().toString(); + String emeraldShard = PrimalItems.EMERALD_KNAPP.getRegistryName().toString(); + String diamondShard = PrimalItems.DIAMOND_KNAPP.getRegistryName().toString(); String redstone = Items.REDSTONE.getRegistryName().toString(); String lapis = Items.DYE.getRegistryName().toString(); @@ -940,7 +940,7 @@ public class ModCrafting { empty,hotChunk,hotChunk,empty,empty, empty,hotChunk,hotChunk,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalAPI.Items.IRON_PLATE, 1), + new ItemStack(PrimalItems.IRON_PLATE, 1), "null" ); @@ -952,7 +952,7 @@ public class ModCrafting { hotChunk,empty,hotChunk,empty,hotChunk, hotChunk,hotChunk,hotChunk,hotChunk,hotChunk, hotChunk,empty,hotChunk,empty,hotChunk, }, - new ItemStack(PrimalAPI.Items.IRON_PLATE, 1), + new ItemStack(PrimalItems.IRON_PLATE, 1), "null" ); @@ -964,7 +964,7 @@ public class ModCrafting { empty,empty,diamond,empty,empty, empty,empty,empty,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)), + new ItemStack(PrimalItems.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)), "null" ); @@ -1071,7 +1071,7 @@ public class ModCrafting { empty,empty,emerald,empty,empty, empty,empty,empty,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)), + new ItemStack(PrimalItems.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)), "null" ); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java index 0ce5f991..963c2060 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java @@ -12,7 +12,7 @@ import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalMaterials; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.items.*; import nmd.primal.forgecraft.items.casting.CastingPart; @@ -164,87 +164,87 @@ public class ModItems { /********** TOOL PARTS **********/ - bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, 41); - bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, 42); - bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalAPI.ToolMaterials.TOOL_BRONZE, 43); - bronzehoehead = new BronzeToolPart("bronzehoehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, 44); + bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalMaterials.TOOL_BRONZE, 41); + bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalMaterials.TOOL_BRONZE, 42); + bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalMaterials.TOOL_BRONZE, 43); + bronzehoehead = new BronzeToolPart("bronzehoehead", PrimalMaterials.TOOL_BRONZE, 44); - pickaxehead = new ToolPart("ironpickaxehead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 8); - ironaxehead = new ToolPart("ironaxehead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 9); - ironshovelhead = new ToolPart("ironshovelhead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 10); - ironhoehead = new ToolPart("ironhoehead", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 11); + pickaxehead = new ToolPart("ironpickaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 8); + ironaxehead = new ToolPart("ironaxehead", PrimalMaterials.TOOL_WROUGHT_IRON, 9); + ironshovelhead = new ToolPart("ironshovelhead", PrimalMaterials.TOOL_WROUGHT_IRON, 10); + ironhoehead = new ToolPart("ironhoehead", PrimalMaterials.TOOL_WROUGHT_IRON, 11); - cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 17); - cleanironaxehead = new ToolPart("cleanironaxehead", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 18); - cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 19); - cleanironhoehead = new ToolPart("cleanironhoehead", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 20); + cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 17); + cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON, 18); + cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON, 19); + cleanironhoehead = new ToolPart("cleanironhoehead", PrimalMaterials.TOOL_CLEAN_IRON, 20); - steelpickaxehead = new ToolPart("steelpickaxehead", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 26); - steelaxehead = new ToolPart("steelaxehead", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 27); - steelshovelhead = new ToolPart("steelshovelhead", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 28); - steelhoehead = new ToolPart("steelhoehead", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 29); + steelpickaxehead = new ToolPart("steelpickaxehead", PrimalMaterials.TOOL_BASIC_STEEL, 26); + steelaxehead = new ToolPart("steelaxehead", PrimalMaterials.TOOL_BASIC_STEEL, 27); + steelshovelhead = new ToolPart("steelshovelhead", PrimalMaterials.TOOL_BASIC_STEEL, 28); + steelhoehead = new ToolPart("steelhoehead", PrimalMaterials.TOOL_BASIC_STEEL, 29); - wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 35); - wootzaxehead = new ToolPart("wootzaxehead", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 36); - wootzshovelhead = new ToolPart("wootzshovelhead", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 37); - wootzhoehead = new ToolPart("wootzhoehead", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 38); + wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 35); + wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 36); + wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL, 37); + wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 38); /********** TOOLS **********/ - bronzepickaxe = new BronzePickaxe("bronzepickaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzepickaxehead); - bronzeaxe = new BronzeAxe("bronzeaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeaxehead); - bronzeshovel = new BronzeShovel("bronzeshovel", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeshovelhead); - bronzehoe = new BronzeHoe("bronzehoe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzehoehead); + bronzepickaxe = new BronzePickaxe("bronzepickaxe", PrimalMaterials.TOOL_BRONZE, bronzepickaxehead); + bronzeaxe = new BronzeAxe("bronzeaxe", PrimalMaterials.TOOL_BRONZE, bronzeaxehead); + bronzeshovel = new BronzeShovel("bronzeshovel", PrimalMaterials.TOOL_BRONZE, bronzeshovelhead); + bronzehoe = new BronzeHoe("bronzehoe", PrimalMaterials.TOOL_BRONZE, bronzehoehead); - ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, pickaxehead); - ironaxe = new CustomAxe("ironaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironaxehead); - ironshovel = new CustomShovel("ironshovel", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironshovelhead); - ironhoe = new CustomHoe("ironhoe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironhoehead); + ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON, pickaxehead); + ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON, ironaxehead); + ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON, ironshovelhead); + ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON, ironhoehead); - cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead); - cleanironaxe = new CustomAxe("cleanironaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironaxehead); - cleanironshovel = new CustomShovel("cleanironshovel", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironshovelhead); - cleanironhoe = new CustomHoe("cleanironhoe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironhoehead); + cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead); + cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironaxehead); + cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON, cleanironshovelhead); + cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON, cleanironhoehead); - steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelpickaxehead); - steelaxe = new CustomAxe("steelaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelaxehead); - steelshovel = new CustomShovel("steelshovel", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelshovelhead); - steelhoe = new CustomHoe("steelhoe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelhoehead); + steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelpickaxehead); + steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL, steelaxehead); + steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL, steelshovelhead); + steelhoe = new CustomHoe("steelhoe", PrimalMaterials.TOOL_BASIC_STEEL, steelhoehead); - wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzpickaxehead); - wootzaxe = new CustomAxe("wootzaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzaxehead); - wootzshovel = new CustomShovel("wootzshovel", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzshovelhead); - wootzhoe = new CustomHoe("wootzhoe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzhoehead); + wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzpickaxehead); + wootzaxe = new CustomAxe("wootzaxe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzaxehead); + wootzshovel = new CustomShovel("wootzshovel", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzshovelhead); + wootzhoe = new CustomHoe("wootzhoe", PrimalMaterials.TOOL_WOOTZ_STEEL, wootzhoehead); /********** WEAPONS **********/ - bronzegladius = new CustomSword("bronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE, 5D, 2D); - wroughtirongladius = new CustomSword("wroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D); - cleanirongladius = new CustomSword("cleanirongladius", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 5D, -1.85D); - steelgladius = new CustomSword("steelgladius", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL,6D, -1.85D); + bronzegladius = new CustomSword("bronzegladius", PrimalMaterials.TOOL_BRONZE, 5D, 2D); + wroughtirongladius = new CustomSword("wroughtirongladius", PrimalMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D); + cleanirongladius = new CustomSword("cleanirongladius", PrimalMaterials.TOOL_CLEAN_IRON, 5D, -1.85D); + steelgladius = new CustomSword("steelgladius", PrimalMaterials.TOOL_BASIC_STEEL,6D, -1.85D); - cleanironlongsword = new CustomSword("cleanironlongsword", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 7D, -2.5D); - steellongsword = new CustomSword("steellongsword", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL,8D, -2.25D); + cleanironlongsword = new CustomSword("cleanironlongsword", PrimalMaterials.TOOL_CLEAN_IRON, 7D, -2.5D); + steellongsword = new CustomSword("steellongsword", PrimalMaterials.TOOL_BASIC_STEEL,8D, -2.25D); - wroughtironslayer = new SlayerSword("wroughtironslayer", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 11.5D, -3.7D); - cleanironslayer = new SlayerSword("cleanironslayer", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 10D, -3.5D); - steelslayer = new SlayerSword("steelslayer", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL,11D, -3.3D); + wroughtironslayer = new SlayerSword("wroughtironslayer", PrimalMaterials.TOOL_WROUGHT_IRON, 11.5D, -3.7D); + cleanironslayer = new SlayerSword("cleanironslayer", PrimalMaterials.TOOL_CLEAN_IRON, 10D, -3.5D); + steelslayer = new SlayerSword("steelslayer", PrimalMaterials.TOOL_BASIC_STEEL,11D, -3.3D); - wroughtironshield = new CustomShield("wroughtironshield", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON); + wroughtironshield = new CustomShield("wroughtironshield", PrimalMaterials.TOOL_WROUGHT_IRON); /********** INGOTS AND CHUNKS **********/ - ironingotballhot = new BaseMultiItem("ironingothot", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 6); - ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 7); - ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 15); - ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 16); - steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 24); - steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 25); - wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 33); - wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 34); + ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON, 6); + ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON, 7); + ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON, 15); + ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON, 16); + steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL, 24); + steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL, 25); + wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 33); + wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL, 34); //forgingmanual = new ItemForgingManual(); //test = new ItemTest("ironsword"); @@ -258,7 +258,7 @@ public class ModItems { /********** ARMOR **********/ - //testleggings=new CustomLeggings(PrimalAPI.ToolMaterials.ARMOR_ADAMANT, 3, EntityEquipmentSlot.LEGS, "testleggings"); + //testleggings=new CustomLeggings(PrimalMaterials.ARMOR_ADAMANT, 3, EntityEquipmentSlot.LEGS, "testleggings"); //registerItem(312, "diamond_leggings", (new ItemArmor(ItemArmor.ArmorMaterial.DIAMOND, 3, EntityEquipmentSlot.LEGS)).setUnlocalizedName("leggingsDiamond")); } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java b/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java index 1dc11528..b6f9c93d 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java @@ -15,7 +15,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.blocks.BloomeryBase; import nmd.primal.forgecraft.blocks.Crucibles.Crucible; @@ -159,7 +159,7 @@ public class ItemStoneTongs extends Item { *****/ if (world.getBlockState(pos).getBlock() instanceof BloomeryBase == false) { if (world.getBlockState(pos).getBlock() instanceof IngotBall) { - if(world.getBlockState(pos).getValue(PrimalAPI.States.ACTIVE) == true) { + if(world.getBlockState(pos).getValue(PrimalStates.ACTIVE) == true) { if (world.getBlockState(pos).getBlock() == ModBlocks.ironball) { itemstack.getTagCompound().setInteger("type", 6); world.setBlockToAir(pos); @@ -408,11 +408,11 @@ public class ItemStoneTongs extends Item { itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 6: - world.setBlockState(tempPos, ModBlocks.ironball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.ironball.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 7: - world.setBlockState(tempPos, ModBlocks.ironchunk.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.ironchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 8: @@ -445,11 +445,11 @@ public class ItemStoneTongs extends Item { itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 15: - world.setBlockState(tempPos, ModBlocks.ironcleanball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.ironcleanball.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 16: - world.setBlockState(tempPos, ModBlocks.ironcleanchunk.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.ironcleanchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 17: @@ -482,11 +482,11 @@ public class ItemStoneTongs extends Item { itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 24: - world.setBlockState(tempPos, ModBlocks.steelball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.steelball.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 25: - world.setBlockState(tempPos, ModBlocks.steelchunk.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2); + world.setBlockState(tempPos, ModBlocks.steelchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2); itemstack.getTagCompound().setInteger("type", 0); return EnumActionResult.SUCCESS; case 29: diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java index ed4e8ca5..177c7bcf 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java @@ -13,7 +13,7 @@ import net.minecraft.item.EnumDyeColor; import net.minecraft.item.Item; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; import nmd.primal.forgecraft.blocks.Anvil.AnvilBase; import nmd.primal.forgecraft.blocks.Anvil.AnvilStone; import nmd.primal.forgecraft.blocks.IngotBall; @@ -89,8 +89,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer Item item = tile.getSlotStack(counter).getItem(); if (item.equals(Items.REDSTONE) || (item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || - item.equals(PrimalAPI.Items.EMERALD_KNAPP) || - item.equals(PrimalAPI.Items.DIAMOND_KNAPP) || + item.equals(PrimalItems.EMERALD_KNAPP) || + item.equals(PrimalItems.DIAMOND_KNAPP) || item.equals(Items.DIAMOND) || item.equals(Items.EMERALD) ) { @@ -185,8 +185,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer Item item = tile.getSlotStack(counter).getItem(); if (item.equals(Items.REDSTONE) || (item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || - item.equals(PrimalAPI.Items.EMERALD_KNAPP) || - item.equals(PrimalAPI.Items.DIAMOND_KNAPP) || + item.equals(PrimalItems.EMERALD_KNAPP) || + item.equals(PrimalItems.DIAMOND_KNAPP) || item.equals(Items.DIAMOND) || item.equals(Items.EMERALD) ) { @@ -278,8 +278,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer Item item = tile.getSlotStack(counter).getItem(); if (item.equals(Items.REDSTONE) || (item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || - item.equals(PrimalAPI.Items.EMERALD_KNAPP) || - item.equals(PrimalAPI.Items.DIAMOND_KNAPP) || + item.equals(PrimalItems.EMERALD_KNAPP) || + item.equals(PrimalItems.DIAMOND_KNAPP) || item.equals(Items.DIAMOND) || item.equals(Items.EMERALD) ) { @@ -368,8 +368,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer Item item = tile.getSlotStack(counter).getItem(); if (item.equals(Items.REDSTONE) || (item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || - item.equals(PrimalAPI.Items.EMERALD_KNAPP) || - item.equals(PrimalAPI.Items.DIAMOND_KNAPP) || + item.equals(PrimalItems.EMERALD_KNAPP) || + item.equals(PrimalItems.DIAMOND_KNAPP) || item.equals(Items.DIAMOND) || item.equals(Items.EMERALD) ) { @@ -461,8 +461,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer Item item = tile.getSlotStack(counter).getItem(); if(item.equals(Items.REDSTONE) || (item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) || - item.equals(PrimalAPI.Items.EMERALD_KNAPP) || - item.equals(PrimalAPI.Items.DIAMOND_KNAPP) + item.equals(PrimalItems.EMERALD_KNAPP) || + item.equals(PrimalItems.DIAMOND_KNAPP) ){ GL11.glPushMatrix(); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java index c5605c6a..612fe3f5 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java @@ -9,7 +9,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; import nmd.primal.forgecraft.blocks.PistonBellows; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.tiles.TilePistonBellows; @@ -44,7 +44,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer 0) { this.setHeat(h - 25); } if(h < 10 ){ - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); } } if(stack.isEmpty()){ - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){ if(this.getHeat() > 1610){ this.setHeat(1600); } @@ -196,18 +197,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable { this.setHeat(1200); } } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){ if(this.getHeat() > 2110){ this.setHeat(2100); } } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){ if(this.getHeat() > 3510){ this.setHeat(3500); } } } - if(state.getValue(PrimalAPI.States.ACTIVE) == false){ + if(state.getValue(PrimalStates.ACTIVE) == false){ if(h > 50){ this.setHeat(h - 50); } @@ -239,9 +240,9 @@ public class TileBloomery extends TileBaseSlot implements ITickable { return true; } } - if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD - || stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH - || stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ + if(stack.getItem() == PrimalItems.CHARCOAL_GOOD + || stack.getItem() == PrimalItems.CHARCOAL_HIGH + || stack.getItem() == PrimalItems.CHARCOAL_FAIR){ return true; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java index 7f3d15d9..fbe10d82 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java @@ -10,7 +10,8 @@ import net.minecraft.util.ITickable; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; +import nmd.primal.core.api.PrimalStates; import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.forgecraft.blocks.Forge; @@ -41,7 +42,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ BlockPos abovePos = new BlockPos(this.getPos().getX(), this.getPos().getY() + 1, this.getPos().getZ()); IBlockState aboveState = world.getBlockState(abovePos); Block block = world.getBlockState(abovePos).getBlock(); - if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) { + if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) { if (this.iteration == 100) { RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); @@ -61,7 +62,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ if (this.getSlotStack(0) == ItemStack.EMPTY) { - world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 2); + world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 2); this.markDirty(); world.notifyBlockUpdate(pos, state, state, 2); } @@ -118,20 +119,20 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ } private void heatManager(Integer h, IBlockState state, ItemStack stack, World world, BlockPos pos){ - if(state.getValue(PrimalAPI.States.ACTIVE) == true){ + if(state.getValue(PrimalStates.ACTIVE) == true){ if(!stack.isEmpty()) { if(h > 0) { this.setHeat(h - 25); } if(h < 10 ){ - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); } } if(stack.isEmpty() || RecipeHelper.getBurnTime(stack) <=0){ System.out.println(stack); - world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){ if(this.getHeat() > 1610){ this.setHeat(1600); } @@ -141,18 +142,18 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ this.setHeat(1200); } } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){ if(this.getHeat() > 2110){ this.setHeat(2100); } } - if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){ + if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){ if(this.getHeat() > 3510){ this.setHeat(3500); } } } - if(state.getValue(PrimalAPI.States.ACTIVE) == false){ + if(state.getValue(PrimalStates.ACTIVE) == false){ if(h > 50){ this.setHeat(h - 50); } @@ -304,9 +305,9 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ return true; } } - if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD - || stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH - || stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ + if(stack.getItem() == PrimalItems.CHARCOAL_GOOD + || stack.getItem() == PrimalItems.CHARCOAL_HIGH + || stack.getItem() == PrimalItems.CHARCOAL_FAIR){ return true; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java index e8fe6b63..103d17f7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java @@ -4,7 +4,8 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ITickable; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalStates; + /** * Created by mminaie on 1/5/17. @@ -19,7 +20,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{ if (!world.isRemote) { World world = this.getWorld(); IBlockState state = world.getBlockState(this.pos); - if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) { + if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) { iteration++; if(iteration <= 15){ animateIteration++; @@ -35,7 +36,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{ if(iteration > 31){ iteration = 0; animateIteration = 0; - world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 3); + world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 3); } //System.out.println("Iterating"); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java index 4475aa1d..edea9f0a 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java @@ -11,7 +11,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; import nmd.primal.core.common.items.tools.WorkMallet; import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.blocks.IngotBall; @@ -606,7 +606,7 @@ public interface AnvilHandler { tile.setSlotStack(counter, ItemStack.EMPTY); return true; } - if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) { + if (tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP)) { CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter)); tile.setSlotStack(counter, ItemStack.EMPTY); return true; @@ -616,7 +616,7 @@ public interface AnvilHandler { tile.setSlotStack(counter, ItemStack.EMPTY); return true; } - if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) { + if (tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP)) { CommonUtils.spawnItemEntityFromWorld(world, pos, tile.getSlotStack(counter)); tile.setSlotStack(counter, ItemStack.EMPTY); return true; @@ -687,7 +687,7 @@ public interface AnvilHandler { } } - if (pItem.getItem().equals(PrimalAPI.Items.EMERALD_KNAPP)) { + if (pItem.getItem().equals(PrimalItems.EMERALD_KNAPP)) { if (tile.getSlotStack(counter).isEmpty()) { tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1)); pItem.shrink(1); @@ -695,7 +695,7 @@ public interface AnvilHandler { } } - if (pItem.getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) { + if (pItem.getItem().equals(PrimalItems.DIAMOND_KNAPP)) { if (tile.getSlotStack(counter).isEmpty()) { tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1)); pItem.shrink(1); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java index c58af641..5715fc5d 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.api.PrimalItems; import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.forgecraft.blocks.CustomContainerFacing; @@ -47,7 +47,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreIron")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.IRON_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -55,7 +55,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreCopper")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.COPPER_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -63,7 +63,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreTin")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.TIN_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -71,7 +71,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreZinc")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.ZINC_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -79,7 +79,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreGold")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.GOLD_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; }