big diff in the files
This commit is contained in:
@@ -19,7 +19,7 @@ public class ModInfo {
|
||||
public static final String MOD_CHANNEL = MOD_ID;
|
||||
public static final String MOD_VERSION = "1.3.21";
|
||||
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
||||
public static final String DEPENDENCIES = "required-after:forge@[14.22.1.2400,);" + "required-after:primal@[0.5,);";
|
||||
public static final String DEPENDENCIES = "required-after:forge@[14.22.1.2400,);" + "required-after:primal@[0.5.10,);";
|
||||
|
||||
/** Mod Structures **/
|
||||
public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy";
|
||||
|
||||
@@ -3,19 +3,13 @@ package nmd.primal.forgecraft.blocks.Anvil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalItems;
|
||||
import nmd.primal.core.api.PrimalMaterials;
|
||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||
import nmd.primal.forgecraft.CommonUtils;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -13,12 +12,11 @@ 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.PrimalSounds;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.items.tools.WorkBlade;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 7/2/17.
|
||||
@@ -49,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, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1.0F);
|
||||
world.playSound(null, pos, PrimalAPI.Sounds.SOUND_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);
|
||||
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.items.tools.WorkMallet;
|
||||
|
||||
@@ -4,10 +4,8 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
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;
|
||||
@@ -30,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),
|
||||
@@ -41,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),
|
||||
@@ -57,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
|
||||
});
|
||||
|
||||
@@ -66,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),
|
||||
@@ -83,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",
|
||||
@@ -117,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 ",
|
||||
@@ -161,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",
|
||||
@@ -169,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);
|
||||
|
||||
|
||||
@@ -207,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",
|
||||
@@ -233,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",
|
||||
@@ -258,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",
|
||||
@@ -283,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",
|
||||
@@ -879,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();
|
||||
|
||||
@@ -942,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"
|
||||
);
|
||||
|
||||
@@ -954,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"
|
||||
);
|
||||
|
||||
@@ -966,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"
|
||||
);
|
||||
|
||||
@@ -1073,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"
|
||||
);
|
||||
|
||||
|
||||
@@ -4,20 +4,17 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalMaterials;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.items.*;
|
||||
import nmd.primal.forgecraft.items.armor.CustomLeggings;
|
||||
import nmd.primal.forgecraft.items.casting.CastingPart;
|
||||
import nmd.primal.forgecraft.items.parts.BronzeToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
@@ -167,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", 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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
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);
|
||||
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);
|
||||
|
||||
cleanironlongsword = new CustomSword("cleanironlongsword", PrimalMaterials.TOOL_CLEAN_IRON, 7D, -2.5D);
|
||||
steellongsword = new CustomSword("steellongsword", PrimalMaterials.TOOL_BASIC_STEEL,8D, -2.25D);
|
||||
cleanironlongsword = new CustomSword("cleanironlongsword", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 7D, -2.5D);
|
||||
steellongsword = new CustomSword("steellongsword", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL,8D, -2.25D);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
wroughtironshield = new CustomShield("wroughtironshield", PrimalMaterials.TOOL_WROUGHT_IRON);
|
||||
wroughtironshield = new CustomShield("wroughtironshield", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
|
||||
/**********
|
||||
INGOTS AND CHUNKS
|
||||
**********/
|
||||
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);
|
||||
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);
|
||||
|
||||
//forgingmanual = new ItemForgingManual();
|
||||
//test = new ItemTest("ironsword");
|
||||
@@ -261,7 +258,7 @@ public class ModItems {
|
||||
/**********
|
||||
ARMOR
|
||||
**********/
|
||||
//testleggings=new CustomLeggings(PrimalMaterials.ARMOR_ADAMANT, 3, EntityEquipmentSlot.LEGS, "testleggings");
|
||||
//testleggings=new CustomLeggings(PrimalAPI.ToolMaterials.ARMOR_ADAMANT, 3, EntityEquipmentSlot.LEGS, "testleggings");
|
||||
//registerItem(312, "diamond_leggings", (new ItemArmor(ItemArmor.ArmorMaterial.DIAMOND, 3, EntityEquipmentSlot.LEGS)).setUnlocalizedName("leggingsDiamond"));
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -22,7 +22,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -3,20 +3,19 @@ package nmd.primal.forgecraft.items.weapons;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Enchantments;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemArrow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.items.BaseItem;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.BloomeryBase;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.Breaker;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.CastingBlock;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.items.casting.CastingPart;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
import nmd.primal.forgecraft.tiles.TileCastingBlock;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.CastingForm;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.tiles.TileCastingBlock;
|
||||
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.Forge;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
||||
import nmd.primal.forgecraft.tiles.TileForge;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -9,10 +9,9 @@ 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.TileForge;
|
||||
import nmd.primal.forgecraft.tiles.TilePistonBellows;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -45,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);
|
||||
}
|
||||
@@ -55,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);
|
||||
}
|
||||
@@ -66,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);
|
||||
}
|
||||
@@ -77,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,9 +10,7 @@ import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
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;
|
||||
@@ -37,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);
|
||||
}
|
||||
@@ -59,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);
|
||||
}
|
||||
@@ -176,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);
|
||||
}
|
||||
@@ -198,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);
|
||||
}
|
||||
@@ -241,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,18 +4,14 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
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.FireHelper;
|
||||
import nmd.primal.core.common.helper.NBTHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.Forge;
|
||||
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
||||
@@ -23,7 +19,6 @@ import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
|
||||
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/30/16.
|
||||
@@ -46,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));
|
||||
@@ -66,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);
|
||||
}
|
||||
@@ -123,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);
|
||||
}
|
||||
@@ -146,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);
|
||||
}
|
||||
@@ -309,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);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package nmd.primal.forgecraft.util;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -8,15 +7,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
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;
|
||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||
|
||||
import static nmd.primal.core.common.helper.CommonUtils.randomChanceReturn;
|
||||
import static nmd.primal.core.common.helper.CommonUtils.randomCheck;
|
||||
|
||||
//import nmd.primal.forgecraft.CommonUtils;
|
||||
|
||||
@@ -50,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;
|
||||
}
|
||||
@@ -58,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;
|
||||
}
|
||||
@@ -66,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;
|
||||
}
|
||||
@@ -74,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;
|
||||
}
|
||||
@@ -82,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