Primal Blocks/Items refactor
This commit is contained in:
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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(PrimalStates.ACTIVE, Boolean.valueOf(false)));
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == true) {
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(world.getBlockState(pos).getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE)==true){
|
||||
if(world.getBlockState(pos).getValue(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 0;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 1;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 2;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 3;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 5;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 6;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(active));
|
||||
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.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(PrimalStates.ACTIVE) == true)
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
{
|
||||
double d0 = (double)pos.getX() + 0.5D;
|
||||
double d1 = (double)pos.getY() + 0.2D;
|
||||
|
||||
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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(PrimalStates.ACTIVE, false));
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true && player.isSneaking() && pItem.isEmpty()){
|
||||
doBreaking(world, state, pos, tile);
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, false));
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, false));
|
||||
|
||||
tile.setCharge(0);
|
||||
return true;
|
||||
}
|
||||
if(!player.isSneaking() && pItem.isEmpty()) {
|
||||
if (!state.getValue(PrimalStates.ACTIVE)) {
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalStates.ACTIVE, true), 2);
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
if(state.getValue(PrimalStates.ACTIVE)) {
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, false), 2);
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE ) == false) {
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE)) {
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, false);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 1) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, false);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 2) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, false);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 3) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, false);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 4){
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalStates.ACTIVE, true);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 5) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalStates.ACTIVE, true);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 6) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalStates.ACTIVE, true);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 7) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, true);
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE, FACING});
|
||||
return new BlockStateContainer(this, new IProperty[] {PrimalAPI.States.ACTIVE, FACING});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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 PrimalItems.IRON_DUST;
|
||||
return PrimalAPI.Items.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 PrimalItems.GOLDEN_STICK;
|
||||
return PrimalAPI.Items.GOLDEN_STICK;
|
||||
}else if (name.equals("tile.emptycruciblecracked")){
|
||||
return Items.CLAY_BALL;
|
||||
}
|
||||
|
||||
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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 PrimalStates.ACTIVE = PropertyBool.create("PrimalStates.ACTIVE");
|
||||
//public static final PropertyBool PrimalAPI.States.ACTIVE = PropertyBool.create("PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(false)));
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(world.getBlockState(pos).getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE)==true){
|
||||
if(world.getBlockState(pos).getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(false));
|
||||
return state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 0;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 1;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 2;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 3;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 5;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 6;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(active));
|
||||
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.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(PrimalStates.ACTIVE) == true) {
|
||||
if(state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE) == true)
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
{
|
||||
double d0 = (double)pos.getX() + 0.5D;
|
||||
double d1 = (double)pos.getY() + 0.96D;
|
||||
|
||||
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
|
||||
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(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
worldIn.setBlockState(pos, state.withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE)){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
world.setBlockState(pos, Blocks.FLOWING_LAVA.getDefaultState().withProperty(BlockDynamicLiquid.LEVEL, 1), 3);
|
||||
}
|
||||
if(!state.getValue(PrimalStates.ACTIVE)){
|
||||
if(!state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE) == false) {
|
||||
if( state.getValue(PrimalAPI.States.ACTIVE) == false) {
|
||||
i = 0;
|
||||
return i;
|
||||
}
|
||||
if( state.getValue(PrimalStates.ACTIVE) == true) {
|
||||
if( state.getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, Boolean.valueOf(false));
|
||||
iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false));
|
||||
}
|
||||
if (meta == 1) {
|
||||
iblockstate = iblockstate.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(true));
|
||||
iblockstate = iblockstate.withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(true));
|
||||
}
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {PrimalStates.ACTIVE});
|
||||
return new BlockStateContainer(this, new IProperty[] {PrimalAPI.States.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(PrimalStates.ACTIVE) == true) {
|
||||
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true) {
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +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.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||
@@ -24,14 +25,12 @@ import nmd.primal.forgecraft.tiles.TilePistonBellows;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import static nmd.primal.core.api.PrimalStates.ACTIVE;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 1/1/17.
|
||||
*/
|
||||
public class PistonBellows extends CustomContainerFacing {
|
||||
|
||||
//public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
||||
//public static final PropertyBool PrimalAPI.States.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);
|
||||
@@ -41,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(ACTIVE, Boolean.valueOf(false)));
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)));
|
||||
setHardness(3.0f);
|
||||
}
|
||||
|
||||
@@ -57,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(ACTIVE, Boolean.valueOf(false)), 2);
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,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(ACTIVE) == false) {
|
||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == false) {
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.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);
|
||||
@@ -78,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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);
|
||||
@@ -90,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(ACTIVE) == true)
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) {
|
||||
if (tile != null) {
|
||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||
@@ -106,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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);
|
||||
@@ -118,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(ACTIVE) == true)
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) {
|
||||
if (tile != null) {
|
||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||
@@ -134,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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);
|
||||
@@ -146,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(ACTIVE) == true)
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) {
|
||||
if (tile != null) {
|
||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||
@@ -162,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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);
|
||||
@@ -174,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(ACTIVE) == true)
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true)
|
||||
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) {
|
||||
if (tile != null) {
|
||||
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
|
||||
@@ -244,35 +243,35 @@ public class PistonBellows extends CustomContainerFacing {
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
int i = 0;
|
||||
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 0;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 1;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 2;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == false){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
i = 3;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 5;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 6;
|
||||
return i;
|
||||
}
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == true){
|
||||
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
i = 7;
|
||||
return i;
|
||||
}
|
||||
@@ -326,12 +325,12 @@ public class PistonBellows extends CustomContainerFacing {
|
||||
active = false;
|
||||
}
|
||||
|
||||
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(ACTIVE, Boolean.valueOf(active));
|
||||
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(active));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE});
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE});
|
||||
}
|
||||
|
||||
//return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty });
|
||||
@@ -363,18 +362,18 @@ public class PistonBellows extends CustomContainerFacing {
|
||||
|
||||
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
|
||||
{
|
||||
if(state.getValue(ACTIVE) == Boolean.TRUE) {
|
||||
if(state.getValue(PrimalAPI.States.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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) {
|
||||
makeEmbers(world, tempPos, world.rand);
|
||||
}
|
||||
}
|
||||
@@ -385,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) {
|
||||
makeEmbers(world, tempPos, world.rand);
|
||||
}
|
||||
}
|
||||
@@ -402,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) {
|
||||
makeEmbers(world, tempPos, world.rand);
|
||||
}
|
||||
}
|
||||
@@ -419,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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.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(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) {
|
||||
if ((world.getBlockState(tempPos).getValue(PrimalAPI.States.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) {
|
||||
makeEmbers(world, tempPos, world.rand);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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', PrimalItems.ADOBEBRICK_DRY);
|
||||
" B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalAPI.Items.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'), PrimalItems.MUD_CLUMP
|
||||
('C'), PrimalAPI.Items.MUD_CLUMP
|
||||
});
|
||||
/***YEW STAVE***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
|
||||
true, new Object[]{"C", "C",
|
||||
('C'), PrimalItems.LOGS_SPLIT_YEW
|
||||
('C'), PrimalAPI.Items.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'), PrimalItems.SILK_CORDAGE,
|
||||
('C'), PrimalAPI.Items.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', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE);
|
||||
"X X", "XYX", "X X", 'X', PrimalAPI.Items.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', PrimalItems.ADOBEBRICK_DRY);
|
||||
"X X", "X X", "XXX", 'X', PrimalAPI.Items.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', PrimalItems.SILK_CORDAGE_COILED);
|
||||
"L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalAPI.Items.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', PrimalItems.MUD_CLUMP);
|
||||
"X X", "X X", "XXX", 'X', PrimalAPI.Items.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'), PrimalItems.CARBONATE_SLACK,
|
||||
('L'), PrimalAPI.Items.CARBONATE_SLACK,
|
||||
('Y'), ModBlocks.emptycrucible);
|
||||
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
|
||||
"XC","Y ",
|
||||
('X'), new ItemStack(ModBlocks.ironcleanball, 1),
|
||||
('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH),
|
||||
('C'), new ItemStack(PrimalAPI.Items.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'), PrimalItems.DIAMOND_KNAPP,
|
||||
('D'), PrimalAPI.Items.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'), PrimalItems.EMERALD_KNAPP,
|
||||
('E'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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'), PrimalItems.LACQUER_STICK,
|
||||
('S'), PrimalAPI.Items.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 = PrimalItems.EMERALD_KNAPP.getRegistryName().toString();
|
||||
String diamondShard = PrimalItems.DIAMOND_KNAPP.getRegistryName().toString();
|
||||
String emeraldShard = PrimalAPI.Items.EMERALD_KNAPP.getRegistryName().toString();
|
||||
String diamondShard = PrimalAPI.Items.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(PrimalItems.IRON_PLATE, 1),
|
||||
new ItemStack(PrimalAPI.Items.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(PrimalItems.IRON_PLATE, 1),
|
||||
new ItemStack(PrimalAPI.Items.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(PrimalItems.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)),
|
||||
new ItemStack(PrimalAPI.Items.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(PrimalItems.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)),
|
||||
new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)),
|
||||
"null"
|
||||
);
|
||||
|
||||
|
||||
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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(PrimalStates.ACTIVE) == true) {
|
||||
if(world.getBlockState(pos).getValue(PrimalAPI.States.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(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.ironball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
itemstack.getTagCompound().setInteger("type", 0);
|
||||
return EnumActionResult.SUCCESS;
|
||||
case 7:
|
||||
world.setBlockState(tempPos, ModBlocks.ironchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.ironchunk.getDefaultState().withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.ironcleanball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
itemstack.getTagCompound().setInteger("type", 0);
|
||||
return EnumActionResult.SUCCESS;
|
||||
case 16:
|
||||
world.setBlockState(tempPos, ModBlocks.ironcleanchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.ironcleanchunk.getDefaultState().withProperty(PrimalAPI.States.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(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.steelball.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
itemstack.getTagCompound().setInteger("type", 0);
|
||||
return EnumActionResult.SUCCESS;
|
||||
case 25:
|
||||
world.setBlockState(tempPos, ModBlocks.steelchunk.getDefaultState().withProperty(PrimalStates.ACTIVE, true), 2);
|
||||
world.setBlockState(tempPos, ModBlocks.steelchunk.getDefaultState().withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
itemstack.getTagCompound().setInteger("type", 0);
|
||||
return EnumActionResult.SUCCESS;
|
||||
case 29:
|
||||
|
||||
@@ -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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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<TileAnvil>
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
) {
|
||||
@@ -185,8 +185,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
) {
|
||||
@@ -278,8 +278,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
) {
|
||||
@@ -368,8 +368,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
) {
|
||||
@@ -461,8 +461,8 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if(item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP)
|
||||
item.equals(PrimalAPI.Items.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalAPI.Items.DIAMOND_KNAPP)
|
||||
){
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
@@ -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.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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<TilePisto
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||
|
||||
GL11.glRotated(0, 0.0F, 1.0F, 0.0F);
|
||||
if (state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||
if (state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(270, 0.0F, 1.0F, 0.0F);
|
||||
if (state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0.0F, 1.0F, 0.0F);
|
||||
if (state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,7 @@ 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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.BloomeryBase;
|
||||
@@ -36,7 +35,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
World world = this.getWorld();
|
||||
if(!world.isRemote){
|
||||
IBlockState state = world.getBlockState(this.pos);
|
||||
if(state.getValue(PrimalStates.ACTIVE) == true) {
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true) {
|
||||
if (this.getHeat() < 100) {
|
||||
this.setHeat(100);
|
||||
}
|
||||
@@ -58,7 +57,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
//IBlockState state = world.getBlockState(this.pos);
|
||||
BlockPos abovePos = new BlockPos(this.getPos().getX(), this.getPos().getY() + 1, this.getPos().getZ());
|
||||
if (this.getSlotStack(0) == ItemStack.EMPTY) {
|
||||
world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
this.markDirty();
|
||||
world.notifyBlockUpdate(pos, state, state, 2);
|
||||
}
|
||||
@@ -175,19 +174,19 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
}
|
||||
|
||||
private void heatManager(Integer h, IBlockState state, ItemStack stack, World world, BlockPos pos){
|
||||
if(state.getValue(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
if(!stack.isEmpty()) {
|
||||
if(h > 0) {
|
||||
this.setHeat(h - 25);
|
||||
}
|
||||
if(h < 10 ){
|
||||
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
}
|
||||
}
|
||||
if(stack.isEmpty()){
|
||||
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){
|
||||
if(this.getHeat() > 1610){
|
||||
this.setHeat(1600);
|
||||
}
|
||||
@@ -197,18 +196,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
this.setHeat(1200);
|
||||
}
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){
|
||||
if(this.getHeat() > 2110){
|
||||
this.setHeat(2100);
|
||||
}
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){
|
||||
if(this.getHeat() > 3510){
|
||||
this.setHeat(3500);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
if(h > 50){
|
||||
this.setHeat(h - 50);
|
||||
}
|
||||
@@ -240,9 +239,9 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(stack.getItem() == PrimalItems.CHARCOAL_GOOD
|
||||
|| stack.getItem() == PrimalItems.CHARCOAL_HIGH
|
||||
|| stack.getItem() == PrimalItems.CHARCOAL_FAIR){
|
||||
if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD
|
||||
|| stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH
|
||||
|| stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,7 @@ 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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalStates;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.Forge;
|
||||
@@ -42,7 +41,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(PrimalStates.ACTIVE)) {
|
||||
if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) {
|
||||
|
||||
if (this.iteration == 100) {
|
||||
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||
@@ -62,7 +61,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
||||
|
||||
|
||||
if (this.getSlotStack(0) == ItemStack.EMPTY) {
|
||||
world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
this.markDirty();
|
||||
world.notifyBlockUpdate(pos, state, state, 2);
|
||||
}
|
||||
@@ -119,20 +118,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(PrimalStates.ACTIVE) == true){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == true){
|
||||
if(!stack.isEmpty()) {
|
||||
if(h > 0) {
|
||||
this.setHeat(h - 25);
|
||||
}
|
||||
if(h < 10 ){
|
||||
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
}
|
||||
}
|
||||
if(stack.isEmpty() || RecipeHelper.getBurnTime(stack) <=0){
|
||||
System.out.println(stack);
|
||||
world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){
|
||||
if(this.getHeat() > 1610){
|
||||
this.setHeat(1600);
|
||||
}
|
||||
@@ -142,18 +141,18 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
||||
this.setHeat(1200);
|
||||
}
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){
|
||||
if(this.getHeat() > 2110){
|
||||
this.setHeat(2100);
|
||||
}
|
||||
}
|
||||
if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){
|
||||
if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){
|
||||
if(this.getHeat() > 3510){
|
||||
this.setHeat(3500);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state.getValue(PrimalStates.ACTIVE) == false){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) == false){
|
||||
if(h > 50){
|
||||
this.setHeat(h - 50);
|
||||
}
|
||||
@@ -305,9 +304,9 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(stack.getItem() == PrimalItems.CHARCOAL_GOOD
|
||||
|| stack.getItem() == PrimalItems.CHARCOAL_HIGH
|
||||
|| stack.getItem() == PrimalItems.CHARCOAL_FAIR){
|
||||
if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD
|
||||
|| stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH
|
||||
|| stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,14 +4,11 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import static nmd.primal.core.api.PrimalStates.ACTIVE;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 1/5/17.
|
||||
*/
|
||||
|
||||
|
||||
public class TilePistonBellows extends BaseTile implements ITickable{
|
||||
|
||||
private int iteration = 0;
|
||||
@@ -22,7 +19,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(ACTIVE)) {
|
||||
if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) {
|
||||
iteration++;
|
||||
if(iteration <= 15){
|
||||
animateIteration++;
|
||||
@@ -38,7 +35,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{
|
||||
if(iteration > 31){
|
||||
iteration = 0;
|
||||
animateIteration = 0;
|
||||
world.setBlockState(this.getPos(), state.withProperty(ACTIVE, false), 3);
|
||||
world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 3);
|
||||
}
|
||||
|
||||
//System.out.println("Iterating");
|
||||
|
||||
@@ -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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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(PrimalItems.DIAMOND_KNAPP)) {
|
||||
if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.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(PrimalItems.EMERALD_KNAPP)) {
|
||||
if (tile.getSlotStack(counter).getItem().equals(PrimalAPI.Items.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(PrimalItems.EMERALD_KNAPP)) {
|
||||
if (pItem.getItem().equals(PrimalAPI.Items.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(PrimalItems.DIAMOND_KNAPP)) {
|
||||
if (pItem.getItem().equals(PrimalAPI.Items.DIAMOND_KNAPP)) {
|
||||
if (tile.getSlotStack(counter).isEmpty()) {
|
||||
tile.setSlotStack(counter, new ItemStack(pItem.getItem(), 1));
|
||||
pItem.shrink(1);
|
||||
|
||||
@@ -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.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
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(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2)));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.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(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2)));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.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(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2)));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.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(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2)));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.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(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2)));
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.GOLD_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user