diff --git a/kfc/gradle.properties b/kfc/gradle.properties index a2e803dd..f303921c 100644 --- a/kfc/gradle.properties +++ b/kfc/gradle.properties @@ -5,12 +5,12 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.3.23 -forge_version=14.21.1.2400 -mcp_mappings=snapshot_20170624 -mc_version=1.12 +mod_version=1.4.04 +forge_version=14.23.1.2581 +mcp_mappings=snapshot_20171003 +mc_version=1.12.2 -primal_version=0.5+ -jei_version=4.7+ +primal_version=0.6+ +jei_version=4.8+ waila_version=1.7.0-B3 apple_version=2.1+ \ No newline at end of file diff --git a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java index e8d116f0..43ea6c4d 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -17,9 +17,9 @@ public class ModInfo { public static final String MOD_CONFIG = "primal/" + MOD_ID; //public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_CHANNEL = MOD_ID; - public static final String MOD_VERSION = "1.3.23"; + public static final String MOD_VERSION = "1.4.04"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)"; - public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5,);"; + public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6,);"; /** Mod Structures **/ public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy"; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java index a2affcdc..eecfcfa0 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilIron.java @@ -8,7 +8,7 @@ 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.common.items.tools.WorkMallet; +import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.tiles.TileAnvil; import nmd.primal.forgecraft.util.AnvilHandler; @@ -33,7 +33,7 @@ public class AnvilIron extends AnvilBase implements AnvilHandler { ItemStack pItem = player.inventory.getCurrentItem(); TileAnvil tile = (TileAnvil) world.getTileEntity(pos); if (tile != null) { - if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) { + if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) { String[] tempArray = new String[25]; for (int i = 0; i < 25; i++) { tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString(); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java index 3891e53a..954ddc53 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Anvil/AnvilStone.java @@ -8,7 +8,7 @@ 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.common.items.tools.WorkMallet; +import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.tiles.TileAnvil; @@ -31,7 +31,7 @@ public class AnvilStone extends AnvilBase { ItemStack pItem = player.inventory.getCurrentItem(); TileAnvil tile = (TileAnvil) world.getTileEntity(pos); if (tile != null) { - if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) { + if ((pItem.getItem() instanceof Gallagher) || (pItem.getItem() == ModItems.forgehammer)) { String[] tempArray = new String[25]; for (int i = 0; i < 25; i++) { tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString(); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java index 007c58ac..a1f3bb18 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/BloomeryBase.java @@ -22,9 +22,9 @@ 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.common.crafting.FireSource; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.PlayerHelper; +import nmd.primal.core.common.recipes.FireSource; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.crafting.BloomeryCrafting; import nmd.primal.forgecraft.tiles.TileBloomery; @@ -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; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java index 0476f293..22127ef7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Breaker.java @@ -18,8 +18,8 @@ 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.common.items.tools.WorkMallet; +import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.tiles.TileBreaker; import nmd.primal.forgecraft.util.BreakerHandler; @@ -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(); @@ -73,7 +73,7 @@ public class Breaker extends CustomContainerFacing implements BreakerHandler { } } - if(pItem.getItem() instanceof WorkMallet){ + if(pItem.getItem() instanceof Gallagher){ tile.setSlotStack(0, player.inventory.getCurrentItem()); player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); return true; @@ -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 diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java index c255c9a8..e154ef0f 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Crucibles/Crucible.java @@ -17,7 +17,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.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.IRON_DUST; }else if (name.equals("tile.emptycruciblecracked")){ return Items.CLAY_BALL; } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java index 838724c3..e3aa58e7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/Forge.java @@ -24,9 +24,9 @@ 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.common.crafting.FireSource; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.PlayerHelper; +import nmd.primal.core.common.recipes.FireSource; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.items.parts.ToolPart; import nmd.primal.forgecraft.tiles.TileForge; @@ -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; diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java index 89c8aadc..969113ca 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/IngotBall.java @@ -15,7 +15,7 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import nmd.primal.core.api.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); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java index 12245816..a18ad0b9 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java @@ -15,7 +15,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalStates; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.tiles.TileBloomery; @@ -30,7 +30,7 @@ import java.util.concurrent.ThreadLocalRandom; */ public class PistonBellows extends CustomContainerFacing { - //public static final PropertyBool PrimalStates.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); @@ -40,7 +40,7 @@ public class PistonBellows extends CustomContainerFacing { public PistonBellows(Material material, String registryName) { super(material, registryName); setCreativeTab(ModInfo.TAB_FORGECRAFT); - setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false))); + setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false))); setHardness(3.0f); } @@ -56,7 +56,7 @@ public class PistonBellows extends CustomContainerFacing { TilePistonBellows tile = (TilePistonBellows) worldIn.getTileEntity(pos); if (tile != null) { - worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2); + worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2); } } @@ -65,8 +65,8 @@ public class PistonBellows extends CustomContainerFacing { public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { if(!world.isRemote){ //System.out.println(state.getValue(PistonBellows.FACING)); - if(state.getValue(PrimalStates.ACTIVE) == false) { - world.setBlockState(pos, state.withProperty(PrimalStates.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); @@ -77,7 +77,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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); @@ -89,7 +89,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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)); @@ -105,7 +105,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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); @@ -117,7 +117,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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)); @@ -133,7 +133,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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); @@ -145,7 +145,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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)); @@ -161,7 +161,7 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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); @@ -173,7 +173,7 @@ public class PistonBellows extends CustomContainerFacing { } if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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)); @@ -243,35 +243,35 @@ public class PistonBellows extends CustomContainerFacing { public int getMetaFromState(IBlockState state) { int i = 0; - if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(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; } @@ -325,12 +325,12 @@ public class PistonBellows extends CustomContainerFacing { 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}); } //return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty }); @@ -362,18 +362,18 @@ public class PistonBellows extends CustomContainerFacing { public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { - if(state.getValue(PrimalStates.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(PrimalStates.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(PrimalStates.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); } } @@ -384,13 +384,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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(PrimalStates.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); } } @@ -401,13 +401,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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(PrimalStates.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); } } @@ -418,13 +418,13 @@ public class PistonBellows extends CustomContainerFacing { BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); if (world.getBlockState(tempPos).getBlock() instanceof Forge) { TileForge tile = (TileForge) world.getTileEntity(tempPos); - if ((world.getBlockState(tempPos).getValue(PrimalStates.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(PrimalStates.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); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java b/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java index a92d07fa..538d3e3a 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/blocks/YewStave.java @@ -12,7 +12,7 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import nmd.primal.core.api.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; @@ -47,7 +47,7 @@ public class YewStave extends BlockCustomBase { if(pItem.getItem() instanceof WorkBlade){ if(world.getBlockState(pos.up()).getBlock() instanceof YewStave ) { //world.playSound(player, player.posX, player.posY, player.posZ, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1F); - world.playSound(null, pos, 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); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java index a803ac57..db2b10d7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModBlocks.java @@ -18,7 +18,7 @@ import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.common.items.tools.WorkMallet; +import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.forgecraft.blocks.Anvil.AnvilBase; import nmd.primal.forgecraft.blocks.Anvil.AnvilIron; import nmd.primal.forgecraft.blocks.Anvil.AnvilStone; @@ -194,7 +194,7 @@ public class ModBlocks { Item pItem = player.getHeldItem(hand).getItem(); BlockPos belowPos = pos.down(); //System.out.println("Activating"); - if (pItem instanceof WorkMallet && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) { + if (pItem instanceof Gallagher && world.getBlockState(belowPos).getBlock().equals(Blocks.STONE)) { player.swingArm(hand); world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); world.setBlockState(belowPos, ModBlocks.stoneanvil.getDefaultState().withProperty(AnvilStone.FACING, player.getHorizontalFacing()), 2); @@ -210,7 +210,7 @@ public class ModBlocks { //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1)); return true; }*/ - if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) { + if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) { if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) { TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos); @@ -263,7 +263,7 @@ public class ModBlocks { //System.out.println("Activating"); return true; } - if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) { + if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) { if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) { TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos); @@ -315,7 +315,7 @@ public class ModBlocks { //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1)); return true; } - if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) { + if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) { if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) { TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos); @@ -367,7 +367,7 @@ public class ModBlocks { //CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1)); return true; } - if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) { + if (pItem instanceof Gallagher || pItem.equals(ModItems.forgehammer)) { if(world.getBlockState(belowPos).getBlock() instanceof AnvilBase) { TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index 91efd49b..e32eb292 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -5,9 +5,9 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; -import nmd.primal.core.api.PrimalItems; -import nmd.primal.core.common.crafting.RecipeHandler; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.CommonUtils; +import nmd.primal.core.common.recipes.RecipeHandler; import nmd.primal.forgecraft.crafting.AnvilCrafting; import nmd.primal.forgecraft.crafting.BloomeryCrafting; import nmd.primal.forgecraft.crafting.CastingformCrafting; @@ -28,7 +28,7 @@ public class ModCrafting { /***CASTING BLOCK***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingblock), - " B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalItems.ADOBEBRICK_DRY); + " B ", "BXB", " B ", 'X', Blocks.STONE_SLAB, 'B', PrimalAPI.Items.ADOBE_BRICK_DRY); /***CASTING FORM***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1), @@ -39,12 +39,12 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.castingmud, 4), true, new Object[]{" C ", "CSC", " C ", ('S'), Blocks.SAND, - ('C'), PrimalItems.MUD_CLUMP + ('C'), PrimalAPI.Items.MUD_CLUMP }); /***YEW STAVE***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2), true, new Object[]{"C", "C", - ('C'), PrimalItems.LOGS_SPLIT_YEW + ('C'), PrimalAPI.Items.LOGS_SPLIT_YEW }); /***Unstrung Longbow***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1), @@ -55,7 +55,7 @@ public class ModCrafting { /***Longbow***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.longbow, 1), true, new Object[]{"C ","CA","C ", - ('C'), PrimalItems.SILK_CORDAGE, + ('C'), PrimalAPI.Items.SILK_CORDAGE, ('A'), ModItems.unstrunglongbow }); @@ -64,16 +64,16 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick), "X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_adobe), - "X X", "XYX", "X X", 'X', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE); + "X X", "XYX", "X X", 'X', PrimalAPI.Items.ADOBE_BRICK_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.ADOBE_BRICK_DRY); /***Block Breaker***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.blockbreaker), - "L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalItems.SILK_CORDAGE_COILED); + "L ", "BSB", "BBB", 'L', Blocks.LEVER, 'B', new ItemStack(Blocks.PLANKS, 1, OreDictionary.WILDCARD_VALUE), 'S', PrimalAPI.Items.SILK_CORDAGE_COILED); /*** Soft Crucible ***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible), @@ -81,7 +81,7 @@ public class ModCrafting { /*** Soft Crucible ***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible), - "X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP); + "X X", "X X", "XXX", 'X', PrimalAPI.Items.MUD_CLUMP); /***Wooden PistonBellows***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX", @@ -115,13 +115,13 @@ public class ModCrafting { RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible), "XL","Y ", ('X'), "dustIron", - ('L'), PrimalItems.CARBONATE_SLACK, + ('L'), PrimalAPI.Items.CARBONATE_SLACK, ('Y'), ModBlocks.emptycrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible), "XC","Y ", ('X'), new ItemStack(ModBlocks.ironcleanball, 1), - ('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH), + ('C'), new ItemStack(PrimalAPI.Items.CHARCOAL_HIGH), ('Y'), ModBlocks.emptycrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), "XCX"," X "," Y ", @@ -159,7 +159,7 @@ public class ModCrafting { ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond), "D","Y", - ('D'), PrimalItems.DIAMOND_KNAPP, + ('D'), PrimalAPI.Items.DIAMOND_KNAPP, ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis), "L","Y", @@ -167,7 +167,7 @@ public class ModCrafting { ('Y'), ModBlocks.rawbronzecrucible); RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald), "E","Y", - ('E'), PrimalItems.EMERALD_KNAPP, + ('E'), PrimalAPI.Items.EMERALD_KNAPP, ('Y'), ModBlocks.rawbronzecrucible); @@ -205,22 +205,22 @@ public class ModCrafting { /***Pickaxe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S", @@ -231,22 +231,22 @@ public class ModCrafting { /***Axe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO wootz placeholder RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S", @@ -256,22 +256,22 @@ public class ModCrafting { /***Shovel Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO placed holder for wootz RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S", @@ -281,22 +281,22 @@ public class ModCrafting { /***Hoe Crafting***/ RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", ('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), - ('S'), PrimalItems.LACQUER_STICK, + ('S'), PrimalAPI.Items.LACQUER_STICK, ('C'), "cordageGeneral"); //TODO PLACE HOLDER FOR WOOTZ STEEL RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S", @@ -877,8 +877,8 @@ public class ModCrafting { String diamond = Items.DIAMOND.getRegistryName().toString(); String emerald = Items.EMERALD.getRegistryName().toString(); - String emeraldShard = PrimalItems.EMERALD_KNAPP.getRegistryName().toString(); - String diamondShard = PrimalItems.DIAMOND_KNAPP.getRegistryName().toString(); + String emeraldShard = PrimalAPI.Items.EMERALD_KNAPP.getRegistryName().toString(); + String diamondShard = PrimalAPI.Items.DIAMOND_KNAPP.getRegistryName().toString(); String redstone = Items.REDSTONE.getRegistryName().toString(); String lapis = Items.DYE.getRegistryName().toString(); @@ -940,7 +940,7 @@ public class ModCrafting { empty,hotChunk,hotChunk,empty,empty, empty,hotChunk,hotChunk,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalItems.IRON_PLATE, 1), + new ItemStack(PrimalAPI.Items.IRON_PLATE, 1), "null" ); @@ -952,7 +952,7 @@ public class ModCrafting { hotChunk,empty,hotChunk,empty,hotChunk, hotChunk,hotChunk,hotChunk,hotChunk,hotChunk, hotChunk,empty,hotChunk,empty,hotChunk, }, - new ItemStack(PrimalItems.IRON_PLATE, 1), + new ItemStack(PrimalAPI.Items.IRON_PLATE, 1), "null" ); @@ -964,7 +964,7 @@ public class ModCrafting { empty,empty,diamond,empty,empty, empty,empty,empty,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalItems.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)), + new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)), "null" ); @@ -1071,7 +1071,7 @@ public class ModCrafting { empty,empty,emerald,empty,empty, empty,empty,empty,empty,empty, empty,empty,empty,empty,empty }, - new ItemStack(PrimalItems.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)), + new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)), "null" ); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java index 963c2060..19c70dc0 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/init/ModItems.java @@ -12,7 +12,7 @@ import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.PrimalMaterials; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.items.*; import nmd.primal.forgecraft.items.casting.CastingPart; @@ -164,87 +164,87 @@ public class ModItems { /********** TOOL PARTS **********/ - bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", 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); + 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); - 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); + 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); - 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); + 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); - 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); + 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); - 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); + 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); /********** 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"); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java b/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java index b6f9c93d..1dc11528 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/ItemStoneTongs.java @@ -15,7 +15,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.api.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: diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java index dadd7298..4c29efc7 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeAxe.java @@ -233,15 +233,15 @@ public class BronzeAxe extends ItemAxe implements ToolNBT { } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { Material material = state.getMaterial(); //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){ - return super.getStrVsBlock(stack, state); + return super.getDestroySpeed(stack, state); } else { - return this.efficiencyOnProperMaterial + 1; + return this.efficiency + 1; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java index 2a541911..6f3e6d42 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzePickaxe.java @@ -249,15 +249,15 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{ } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { Material material = state.getMaterial(); //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){ - return super.getStrVsBlock(stack, state); + return super.getDestroySpeed(stack, state); } else { - return this.efficiencyOnProperMaterial + 1; + return this.efficiency + 1; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java index e8ba4b33..3cbdda23 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/BronzeShovel.java @@ -233,14 +233,14 @@ Item drop; } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { for (String type : getToolClasses(stack)) { if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; + return efficiency; } - return this.efficiencyOnProperMaterial + 1; + return this.efficiency + 1; } @SideOnly(Side.CLIENT) diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java index 5336269d..eca3b6dd 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomAxe.java @@ -376,15 +376,15 @@ public class CustomAxe extends ItemAxe implements ToolNBT { } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { Material material = state.getMaterial(); //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; if(material != Material.WOOD && material != Material.PLANTS && material != Material.VINE){ - return super.getStrVsBlock(stack, state); + return super.getDestroySpeed(stack, state); } else { - return this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1); + return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java index a3d76572..069cf354 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomPickaxe.java @@ -395,15 +395,15 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{ } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { Material material = state.getMaterial(); //return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial; if(material != Material.IRON && material != Material.ANVIL && material != Material.ROCK){ - return super.getStrVsBlock(stack, state); + return super.getDestroySpeed(stack, state); } else { - return this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1); + return this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1); } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java index 38148424..5f1b0d01 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/tools/CustomShovel.java @@ -374,14 +374,14 @@ public class CustomShovel extends ItemSpade implements ToolNBT { } @Override - public float getStrVsBlock(ItemStack stack, IBlockState state) + public float getDestroySpeed(ItemStack stack, IBlockState state) { for (String type : getToolClasses(stack)) { if (state.getBlock().isToolEffective(type, state)) - return efficiencyOnProperMaterial; + return efficiency; } - return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiencyOnProperMaterial * ( (this.getRedstoneLevel(stack) * 2 ) + 1)) : 1.0F; + return this.EFFECTIVE_ON.contains(state.getBlock()) ? (this.efficiency * ( (this.getRedstoneLevel(stack) * 2 ) + 1)) : 1.0F; } @SideOnly(Side.CLIENT) diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java index 5bd83f1a..1e7132bb 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Longbow.java @@ -140,7 +140,7 @@ public class Longbow extends BaseItem { { ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW)); EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer); - entityarrow.setAim(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F); + entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 1.0F); if (f >= 1.0F) { diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Musket.java b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Musket.java index 803df52d..489395ef 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Musket.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/weapons/Musket.java @@ -10,7 +10,7 @@ import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import nmd.primal.core.common.entities.projectiles.EntityMuckBall; +import nmd.primal.core.common.entities.projectiles.EntityMuck; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.items.BaseItem; @@ -51,8 +51,8 @@ public class Musket extends BaseItem{ //if(player.getItemInUseCount() > 5) { world.playSound( null, player.posX, player.posY, player.posZ, ModSounds.MUSKET_SHOT, SoundCategory.BLOCKS, 0.5F, 0.3F / (itemRand.nextFloat() * 0.4F + 0.8F)); - EntityMuckBall entity = new EntityMuckBall(world, player); - entity.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0.0F, 7.0F, 0.5F); + EntityMuck entity = new EntityMuck(world, player); + entity.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, 7.0F, 0.5F); world.spawnEntity(entity); if (!stack.hasTagCompound()) { stack.setTagCompound(new NBTTagCompound()); @@ -60,9 +60,6 @@ public class Musket extends BaseItem{ stack.getTagCompound().setBoolean("use", false); //} - - - } /* public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving) diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java index 177c7bcf..ed4e8ca5 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TileAnvilRender.java @@ -13,7 +13,7 @@ import net.minecraft.item.EnumDyeColor; import net.minecraft.item.Item; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import nmd.primal.core.api.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 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 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 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 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 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(); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java index 612fe3f5..c5605c6a 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/renders/blocks/TilePistonBellowsRender.java @@ -9,7 +9,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; -import nmd.primal.core.api.PrimalStates; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.forgecraft.blocks.PistonBellows; import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.tiles.TilePistonBellows; @@ -44,7 +44,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer 0) { this.setHeat(h - 25); } if(h < 10 ){ - world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); } } if(stack.isEmpty()){ - world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ if(this.getHeat() > 1610){ this.setHeat(1600); } @@ -197,18 +196,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable { this.setHeat(1200); } } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){ if(this.getHeat() > 2110){ this.setHeat(2100); } } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){ if(this.getHeat() > 3510){ this.setHeat(3500); } } } - if(state.getValue(PrimalStates.ACTIVE) == false){ + if(state.getValue(PrimalAPI.States.ACTIVE) == false){ if(h > 50){ this.setHeat(h - 50); } @@ -240,9 +239,9 @@ public class TileBloomery extends TileBaseSlot implements ITickable { return true; } } - if(stack.getItem() == PrimalItems.CHARCOAL_GOOD - || stack.getItem() == PrimalItems.CHARCOAL_HIGH - || stack.getItem() == PrimalItems.CHARCOAL_FAIR){ + if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD + || stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH + || stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ return true; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java index fbe10d82..3eed29bf 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TileForge.java @@ -10,8 +10,7 @@ import net.minecraft.util.ITickable; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalItems; -import nmd.primal.core.api.PrimalStates; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.forgecraft.blocks.Forge; @@ -42,16 +41,16 @@ 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)); + RecipeHelper.fuelManager(world, this, this.getSlotStack(0)); if(CommonUtils.randomCheck(1000)) { makeSmoke(world, pos); } } if (this.iteration == 200) { - RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + RecipeHelper.fuelManager(world, this, this.getSlotStack(0)); if(CommonUtils.randomCheck(1000)) { makeSmoke(world, pos); } @@ -62,11 +61,11 @@ 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); } - RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); + RecipeHelper.fuelManager(world, this, this.getSlotStack(0)); if(CommonUtils.randomCheck(1000)) { makeSmoke(world, pos); } @@ -119,20 +118,20 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ } private void heatManager(Integer h, IBlockState state, ItemStack stack, World world, BlockPos pos){ - if(state.getValue(PrimalStates.ACTIVE) == true){ + if(state.getValue(PrimalAPI.States.ACTIVE) == true){ if(!stack.isEmpty()) { if(h > 0) { this.setHeat(h - 25); } if(h < 10 ){ - world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); } } if(stack.isEmpty() || RecipeHelper.getBurnTime(stack) <=0){ System.out.println(stack); - world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, false), 2); + world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2); } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_FAIR){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ if(this.getHeat() > 1610){ this.setHeat(1600); } @@ -142,18 +141,18 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ this.setHeat(1200); } } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_GOOD){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_GOOD){ if(this.getHeat() > 2110){ this.setHeat(2100); } } - if(this.getSlotStack(0).getItem() == PrimalItems.CHARCOAL_HIGH){ + if(this.getSlotStack(0).getItem() == PrimalAPI.Items.CHARCOAL_HIGH){ if(this.getHeat() > 3510){ this.setHeat(3500); } } } - if(state.getValue(PrimalStates.ACTIVE) == false){ + if(state.getValue(PrimalAPI.States.ACTIVE) == false){ if(h > 50){ this.setHeat(h - 50); } @@ -305,9 +304,9 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{ return true; } } - if(stack.getItem() == PrimalItems.CHARCOAL_GOOD - || stack.getItem() == PrimalItems.CHARCOAL_HIGH - || stack.getItem() == PrimalItems.CHARCOAL_FAIR){ + if(stack.getItem() == PrimalAPI.Items.CHARCOAL_GOOD + || stack.getItem() == PrimalAPI.Items.CHARCOAL_HIGH + || stack.getItem() == PrimalAPI.Items.CHARCOAL_FAIR){ return true; } } diff --git a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java index 103d17f7..81c9327d 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/tiles/TilePistonBellows.java @@ -4,7 +4,7 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ITickable; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalStates; +import nmd.primal.core.api.PrimalAPI; /** @@ -20,7 +20,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{ if (!world.isRemote) { World world = this.getWorld(); IBlockState state = world.getBlockState(this.pos); - if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) { + if (world.getBlockState(this.getPos()).getValue(PrimalAPI.States.ACTIVE)) { iteration++; if(iteration <= 15){ animateIteration++; @@ -36,7 +36,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{ if(iteration > 31){ iteration = 0; animateIteration = 0; - world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 3); + world.setBlockState(this.getPos(), state.withProperty(PrimalAPI.States.ACTIVE, false), 3); } //System.out.println("Iterating"); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java index edea9f0a..45cf4623 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java @@ -11,8 +11,8 @@ 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.common.items.tools.WorkMallet; +import nmd.primal.core.api.PrimalAPI; +import nmd.primal.core.common.items.tools.Gallagher; import nmd.primal.forgecraft.CommonUtils; import nmd.primal.forgecraft.blocks.IngotBall; import nmd.primal.forgecraft.crafting.AnvilCrafting; @@ -59,7 +59,7 @@ public interface AnvilHandler { default boolean doAnvilRecipe(ItemStack pItem, String[] tempArray, World world, TileAnvil tile, BlockPos pos, EntityPlayer player) { AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray); if (recipe != null) { - if (pItem.getItem() instanceof WorkMallet) { + if (pItem.getItem() instanceof Gallagher) { pItem.damageItem(15, player); } if (pItem.getItem() instanceof ForgeHammer) { @@ -174,7 +174,7 @@ public interface AnvilHandler { *****************************************************************************/ default boolean doAnvilInventoryManager(ItemStack pItem, World world, TileAnvil tile, BlockPos pos, float hitx, float hity, float hitz, IBlockState state, EntityPlayer player) { - if ( (!(pItem.getItem() instanceof WorkMallet)) || (!(pItem.getItem() instanceof ForgeHammer)) ) { + if ( (!(pItem.getItem() instanceof Gallagher)) || (!(pItem.getItem() instanceof ForgeHammer)) ) { if(Block.getBlockFromItem(pItem.getItem()) instanceof IngotBall) { return false; } @@ -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); diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java index 5715fc5d..c58af641 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/BreakerHandler.java @@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import nmd.primal.core.api.PrimalItems; +import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.forgecraft.blocks.CustomContainerFacing; @@ -47,7 +47,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreIron")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.IRON_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -55,7 +55,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreCopper")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.COPPER_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -63,7 +63,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreTin")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.TIN_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -71,7 +71,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreZinc")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.ZINC_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } @@ -79,7 +79,7 @@ public interface BreakerHandler { if (RecipeHelper.isOreName(smashStack, "oreGold")) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) { world.setBlockToAir(pos.offset(face)); - PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2))); + PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.GOLD_DUST, randomChanceReturn(9, 1, 2))); tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1); return true; } diff --git a/kfc/src/main/resources/mcmod.info b/kfc/src/main/resources/mcmod.info index 9223c423..f2520af6 100644 --- a/kfc/src/main/resources/mcmod.info +++ b/kfc/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "forgecraft", "name": "Kitsu's Forgecraft", "description": "Forged with sweat and blood", - "version": "1.3.23", + "version": "1.4.04", "mcversion": "1.12.0", "url": "", "updateUrl": "",