18 Commits

Author SHA1 Message Date
Mohammad-Ali Minaie
f708ac25f5 version bump 2017-09-16 10:47:08 -04:00
Mohammad-Ali Minaie
01834a6d77 fixed the API occorunces 2017-09-16 10:45:49 -04:00
Mohammad-Ali Minaie
b3d329c273 switch 12.1 to 12 2017-09-15 16:35:52 -04:00
Mohammad-Ali Minaie
9038bfc5ea fixed forge version 2017-09-15 16:31:45 -04:00
Mohammad-Ali Minaie
6d3533e588 big diff in the files 2017-09-15 16:15:23 -04:00
Mohammad-Ali Minaie
6f955f14f0 updating with new primal version 2017-09-15 16:12:49 -04:00
b374045de2 Merge branch 'primal-update' of nmd/ForgeCraft into master-1.12 2017-09-15 10:27:26 +00:00
b29071c6b4 Primal Blocks/Items refactor 2017-09-14 21:18:48 -07:00
b07102edd5 Update PrimalCore API changes 2017-09-14 18:15:47 -07:00
Mohammad-Ali Minaie
f0377332d8 fixed heating of damaged tools 2017-09-04 21:30:58 -04:00
Mohammad-Ali Minaie
622a3f4b17 fixing bugs 2017-09-04 13:24:17 -04:00
Mohammad-Ali Minaie
6fd05cffd5 updating lang file 2017-09-03 22:29:58 -04:00
srw
33c0582287 update to 1.12.1 2017-08-30 19:04:06 -07:00
Mohammad-Ali Minaie
6f084a9fa2 updating the .12 branch 2017-07-28 00:03:09 -04:00
Mohammad-Ali Minaie
49007061d0 1.12 update 2017-06-26 00:19:38 -04:00
Mohammad-Ali Minaie
b8b80fb547 Merge branch 'master' into master-1.12 2017-06-25 22:50:14 -04:00
Mohammad-Ali Minaie
3a40744de2 tryd to update gotta wait 2017-06-25 22:47:48 -04:00
Mohammad-Ali Minaie
3e1afd631b init to 1.12 2017-06-25 22:34:06 -04:00
35 changed files with 657 additions and 653 deletions

View File

@@ -11,107 +11,70 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
} }
} }
repositories { repositories {
maven { maven {
name = "jei" name = "jei"
url "http://dvs1.progwml6.com/files/maven" url "http://dvs1.progwml6.com/files/maven"
} }
maven { maven {
name = "mobius" name = "mobius"
url "http://mobiusstrip.eu/maven" url "http://mobiusstrip.eu/maven"
} }
maven { maven {
name = "primal" name = "primal"
url "https://maven.nmd.so" url "https://maven.nmd.so"
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'java' apply plugin: 'java'
compileJava { compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
} }
group = "${mod_group}" group = "${mod_group}"
version = "${mod_version}" version = "${mod_version}"
archivesBaseName = "${mod_name}" archivesBaseName = "${mod_name}"
idea { module { inheritOutputDirs = true } } idea { module { inheritOutputDirs = true } }
minecraft { minecraft {
version = "${mc_version}" + "-" + "${forge_version}" version = "${mc_version}" + "-" + "${forge_version}"
runDir = "run" runDir = "run"
mappings = "${mcp_mappings}"
mappings = "${mcp_mappings}" // JEI
//useDepAts = true
// JEI // Replace
//useDepAts = true replace "@VERSION@", project.mod_version
// Replace
replace "@VERSION@", project.mod_version
} }
dependencies { dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples //compile against the JEI API
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/ddependency_management.html
// JEI
// https://github.com/mezz/JustEnoughItems
// http://minecraft.curseforge.com/projects/just-enough-items-jei/files
// <MINECRAFT-VERSION> and <JEI-VERSION> can be found on CurseForge, check the file name of the version you want.
//
// compile against the JEI API
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
//runtime "mezz.jei:jei_${mc_version}:${jei_version}" //runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev" deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
//runtime "nmd.primal.core:PrimalCore:${primal_version}" //runtime "nmd.primal.core:PrimalCore:${primal_version}"
} }
processResources { processResources {
// this will ensure that this task is redone when the versions change. // this will ensure that this task is redone when the versions change.
inputs.property "version", "${mod_version}" inputs.property "version", "${mod_version}"
inputs.property "mcversion", "${mc_version}" inputs.property "mcversion", "${mc_version}"
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':"${mod_version}", 'mcversion':"${mc_version}"
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':"${mod_version}", 'mcversion':"${mc_version}"
}
// copy everything else, thats not the mcmod.info // end //
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
// end //

View File

@@ -5,12 +5,12 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft mod_name=ForgeCraft
mod_version=1.2.74 mod_version=1.3.23
forge_version=13.20.1.2388 forge_version=14.21.1.2400
mcp_mappings=snapshot_20170610 mcp_mappings=snapshot_20170624
mc_version=1.11.2 mc_version=1.12
primal_version=0.4+ primal_version=0.5+
jei_version=4.3+ jei_version=4.7+
waila_version=1.7.0-B3 waila_version=1.7.0-B3
apple_version=2.1+ apple_version=2.1+

View File

@@ -17,9 +17,9 @@ public class ModInfo {
public static final String MOD_CONFIG = "primal/" + MOD_ID; public static final String MOD_CONFIG = "primal/" + MOD_ID;
//public static final String MOD_PREFIX = MOD_ID + ":"; //public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID; public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.2.74"; public static final String MOD_VERSION = "1.3.23";
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)"; public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2388,);" + "required-after:primal@[0.4,);"; public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5,);";
/** Mod Structures **/ /** Mod Structures **/
public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy"; public static final String SERVER_PROXY = "nmd.primal.forgecraft.proxy.ServerProxy";

View File

@@ -3,19 +3,13 @@ package nmd.primal.forgecraft.blocks.Anvil;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.core.common.items.tools.WorkMallet; import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.tiles.TileAnvil; import nmd.primal.forgecraft.tiles.TileAnvil;
/** /**
@@ -42,7 +36,7 @@ public class AnvilStone extends AnvilBase {
for (int i = 0; i < 25; i++) { for (int i = 0; i < 25; i++) {
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString(); tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
} }
for (int i = 0; i < 25; i++) { /*for (int i = 0; i < 25; i++) {
if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) { if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) {
if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) { if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) {
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2); world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
@@ -52,7 +46,7 @@ public class AnvilStone extends AnvilBase {
return true; return true;
} }
} }
} }*/
doAnvilRecipe(pItem, tempArray, world, tile, pos, player); doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
return true; return true;
} }

View File

@@ -15,6 +15,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalStates;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.tiles.TileBloomery; import nmd.primal.forgecraft.tiles.TileBloomery;
@@ -24,14 +25,12 @@ import nmd.primal.forgecraft.tiles.TilePistonBellows;
import java.util.Random; import java.util.Random;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
import static nmd.primal.core.api.PrimalStates.ACTIVE;
/** /**
* Created by mminaie on 1/1/17. * Created by mminaie on 1/1/17.
*/ */
public class PistonBellows extends CustomContainerFacing { public class PistonBellows extends CustomContainerFacing {
//public static final PropertyBool ACTIVE = PropertyBool.create("active"); //public static final PropertyBool PrimalStates.ACTIVE = PropertyBool.create("active");
//protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D); //protected static final AxisAlignedBB 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 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); protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 12 / 16D, 1.0D);
@@ -41,7 +40,7 @@ public class PistonBellows extends CustomContainerFacing {
public PistonBellows(Material material, String registryName) { public PistonBellows(Material material, String registryName) {
super(material, registryName); super(material, registryName);
setCreativeTab(ModInfo.TAB_FORGECRAFT); setCreativeTab(ModInfo.TAB_FORGECRAFT);
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false))); setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)));
setHardness(3.0f); setHardness(3.0f);
} }
@@ -57,7 +56,7 @@ public class PistonBellows extends CustomContainerFacing {
TilePistonBellows tile = (TilePistonBellows) worldIn.getTileEntity(pos); TilePistonBellows tile = (TilePistonBellows) worldIn.getTileEntity(pos);
if (tile != null) { if (tile != null) {
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(ACTIVE, Boolean.valueOf(false)), 2); worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(false)), 2);
} }
} }
@@ -66,8 +65,8 @@ public class PistonBellows extends CustomContainerFacing {
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if(!world.isRemote){ if(!world.isRemote){
//System.out.println(state.getValue(PistonBellows.FACING)); //System.out.println(state.getValue(PistonBellows.FACING));
if(state.getValue(ACTIVE) == false) { if(state.getValue(PrimalStates.ACTIVE) == false) {
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2); world.setBlockState(pos, state.withProperty(PrimalStates.ACTIVE, true), 2);
//world.playSound(pos, ForgecraftSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f); //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((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); world.playSound(null, pos, ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 0.25F, 0.8F);
@@ -78,7 +77,7 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50); tile.setHeat(tile.getHeat() + 50);
@@ -90,7 +89,7 @@ public class PistonBellows extends CustomContainerFacing {
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) { && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.EAST)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
@@ -106,7 +105,7 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50); tile.setHeat(tile.getHeat() + 50);
@@ -118,7 +117,7 @@ public class PistonBellows extends CustomContainerFacing {
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) { && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.WEST)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
@@ -134,7 +133,7 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50); tile.setHeat(tile.getHeat() + 50);
@@ -146,7 +145,7 @@ public class PistonBellows extends CustomContainerFacing {
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) { && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.SOUTH)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
@@ -162,7 +161,7 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
tile.setHeat(tile.getHeat() + 50); tile.setHeat(tile.getHeat() + 50);
@@ -174,7 +173,7 @@ public class PistonBellows extends CustomContainerFacing {
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true)
&& (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) { && (world.getBlockState(tempPos).getValue(FACING) == EnumFacing.NORTH)) {
if (tile != null) { if (tile != null) {
//System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING)); //System.out.println(world.getBlockState(tempPos).getValue(Forge.FACING));
@@ -244,35 +243,35 @@ public class PistonBellows extends CustomContainerFacing {
public int getMetaFromState(IBlockState state) { public int getMetaFromState(IBlockState state) {
int i = 0; int i = 0;
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == false){ if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == false){
i = 0; i = 0;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == false){ if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == false){
i = 1; i = 1;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == false){ if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == false){
i = 2; i = 2;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == false){ if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == false){
i = 3; i = 3;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(ACTIVE) == true){ if( (state.getValue(FACING) == EnumFacing.EAST) && state.getValue(PrimalStates.ACTIVE) == true){
i = 4; i = 4;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(ACTIVE) == true){ if( (state.getValue(FACING) == EnumFacing.WEST) && state.getValue(PrimalStates.ACTIVE) == true){
i = 5; i = 5;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(ACTIVE) == true){ if( (state.getValue(FACING) == EnumFacing.SOUTH) && state.getValue(PrimalStates.ACTIVE) == true){
i = 6; i = 6;
return i; return i;
} }
if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(ACTIVE) == true){ if( (state.getValue(FACING) == EnumFacing.NORTH) && state.getValue(PrimalStates.ACTIVE) == true){
i = 7; i = 7;
return i; return i;
} }
@@ -326,12 +325,12 @@ public class PistonBellows extends CustomContainerFacing {
active = false; active = false;
} }
return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(ACTIVE, Boolean.valueOf(active)); return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(PrimalStates.ACTIVE, Boolean.valueOf(active));
} }
@Override @Override
protected BlockStateContainer createBlockState() { protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] {FACING, ACTIVE}); return new BlockStateContainer(this, new IProperty[] {FACING, PrimalStates.ACTIVE});
} }
//return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty }); //return new ExtendedBlockState(this, new IProperty[] { BotaniaStateProps.CARDINALS, Properties.StaticProperty }, new IUnlistedProperty[] { Properties.AnimationProperty });
@@ -363,18 +362,18 @@ public class PistonBellows extends CustomContainerFacing {
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand)
{ {
if(state.getValue(ACTIVE) == Boolean.TRUE) { if(state.getValue(PrimalStates.ACTIVE) == Boolean.TRUE) {
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) { if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.EAST)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.EAST)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
@@ -385,13 +384,13 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ());
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.WEST)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.WEST)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
@@ -402,13 +401,13 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1);
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.SOUTH)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.SOUTH)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
@@ -419,13 +418,13 @@ public class PistonBellows extends CustomContainerFacing {
BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1);
if (world.getBlockState(tempPos).getBlock() instanceof Forge) { if (world.getBlockState(tempPos).getBlock() instanceof Forge) {
TileForge tile = (TileForge) world.getTileEntity(tempPos); TileForge tile = (TileForge) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Forge.FACING) == EnumFacing.NORTH)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }
if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) { if (world.getBlockState(tempPos).getBlock() instanceof BloomeryBase) {
TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos); TileBloomery tile = (TileBloomery) world.getTileEntity(tempPos);
if ((world.getBlockState(tempPos).getValue(ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) { if ((world.getBlockState(tempPos).getValue(PrimalStates.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(BloomeryBase.FACING) == EnumFacing.NORTH)) {
makeEmbers(world, tempPos, world.rand); makeEmbers(world, tempPos, world.rand);
} }
} }

View File

@@ -4,7 +4,6 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
@@ -14,11 +13,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import nmd.primal.core.api.PrimalSounds; import nmd.primal.core.api.PrimalSounds;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.items.tools.WorkBlade; import nmd.primal.core.common.items.tools.WorkBlade;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModSounds;
/** /**
* Created by mminaie on 7/2/17. * Created by mminaie on 7/2/17.

View File

@@ -15,7 +15,7 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.items.tools.WorkMallet; import nmd.primal.core.common.items.tools.WorkMallet;
@@ -599,25 +599,36 @@ public class ModBlocks {
} }
private static void registerBlock(Block block) { private static void registerBlock(Block block)
GameRegistry.register(block); {
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
ItemBlock item = new ItemBlock(block); ItemBlock item = new ItemBlock(block);
item.setRegistryName(block.getRegistryName()); item.setRegistryName(block.getRegistryName());
GameRegistry.register(item);
ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
} }
private static void registerBlockSubType(Block block, ItemBlock itemBlock, String registryName){ private static void registerBlockSubType(Block block, ItemBlock item, String registryName)
GameRegistry.register(block); {
ItemBlock item = itemBlock; ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
item.setRegistryName(registryName); item.setRegistryName(registryName);
GameRegistry.register(item);
ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
} }
private static void registerRender(Block block) { private static void registerRender(Block block)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
} }
private static void registerRenderCustom(ItemBlock item, Integer meta, ModelResourceLocation model){ private static void registerRenderCustom(ItemBlock item, Integer meta, ModelResourceLocation model)
{
ModelLoader.setCustomModelResourceLocation(item, meta, model); ModelLoader.setCustomModelResourceLocation(item, meta, model);
} }

View File

@@ -4,10 +4,9 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.crafting.RecipeHandler;
import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.crafting.AnvilCrafting; import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.crafting.BloomeryCrafting; import nmd.primal.forgecraft.crafting.BloomeryCrafting;
@@ -25,176 +24,178 @@ public class ModCrafting {
Random rand = new Random(); Random rand = new Random();
//RecipeHandler.addShapedOreRecipe();
/***CASTING BLOCK***/ /***CASTING BLOCK***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.castingblock), 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', PrimalItems.ADOBEBRICK_DRY);
/***CASTING FORM***/ /***CASTING FORM***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.castingform, 1),
true, new Object[]{" S ", "S S", " S ", true, new Object[]{" S ", "S S", " S ",
('S'), "logSplit" ('S'), "logSplit"
})); });
/***CASTING MUD***/ /***CASTING MUD***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.castingmud, 4), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
true, new Object[]{" C ", "CSC", " C ", true, new Object[]{" C ", "CSC", " C ",
('S'), Blocks.SAND, ('S'), Blocks.SAND,
('C'), PrimalItems.MUD_CLUMP ('C'), PrimalItems.MUD_CLUMP
})); });
/***YEW STAVE***/ /***YEW STAVE***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
true, new Object[]{"C", "C", true, new Object[]{"C", "C",
('C'), PrimalItems.LOGS_SPLIT_YEW ('C'), PrimalItems.LOGS_SPLIT_YEW
})); });
/***Unstrung Longbow***/ /***Unstrung Longbow***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1),
true, new Object[]{"C", "A", true, new Object[]{"C", "A",
('C'), "fatAnimal", ('C'), "fatAnimal",
('A'), ModItems.rawlongbow ('A'), ModItems.rawlongbow
})); });
/***Longbow***/ /***Longbow***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.longbow, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.longbow, 1),
true, new Object[]{"C ","CA","C ", true, new Object[]{"C ","CA","C ",
('C'), PrimalItems.SILK_CORDAGE, ('C'), PrimalItems.SILK_CORDAGE,
('A'), ModItems.unstrunglongbow ('A'), ModItems.unstrunglongbow
})); });
/***Forge***/ /***Forge***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.forge_brick), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.forge_brick),
"X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE); "X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.forge_adobe), 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', PrimalItems.ADOBEBRICK_DRY, 'Y', Blocks.FURNACE);
/***Bloomery***/ /***Bloomery***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery_brick), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_brick),
"X X", "X X", "XXX", 'X', Items.BRICK); "X X", "X X", "XXX", 'X', Items.BRICK);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery_adobe), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_adobe),
"X X", "X X", "XXX", 'X', PrimalItems.ADOBEBRICK_DRY); "X X", "X X", "XXX", 'X', PrimalItems.ADOBEBRICK_DRY);
/***Block Breaker***/ /***Block Breaker***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.blockbreaker), 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', PrimalItems.SILK_CORDAGE_COILED);
/*** Soft Crucible ***/ /*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', Items.CLAY_BALL); "X X", "X X", "XXX", 'X', Items.CLAY_BALL);
/*** Soft Crucible ***/ /*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP); "X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP);
/***Wooden PistonBellows***/ /***Wooden PistonBellows***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 0), 'Y', ModItems.bellowshandle);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsspruce), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 1), 'Y', ModItems.bellowshandle);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsbirch), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 2), 'Y', ModItems.bellowshandle);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsjungle), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 3), 'Y', ModItems.bellowshandle);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsacacia), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 4), 'Y', ModItems.bellowshandle);
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX", RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.pistonbellowsdarkoak), "XXX", "X Y", "XXX",
'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.bellowshandle); 'X', new ItemStack(Blocks.PLANKS, 1, 5), 'Y', ModItems.bellowshandle);
/***Bellows Handle***/ /***Bellows Handle***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.bellowshandle), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
"X X", "X X", " X ", 'X', Items.STICK); "X X", "X X", " X ", 'X', Items.STICK);
/***Tongs***/ /***Tongs***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonetongs, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.stonetongs, 1),
"X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK); "X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK);
/***RAW CRUCIBLES***/ /***RAW CRUCIBLES***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
"X","Y", "X","Y",
('X'), "oreIron", ('X'), "oreIron",
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
"XL","Y ", "XL","Y ",
('X'), "dustIron", ('X'), "dustIron",
('L'), PrimalItems.CARBONATE_SLACK, ('L'), PrimalItems.CARBONATE_SLACK,
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible),
"XC","Y ", "XC","Y ",
('X'), new ItemStack(ModBlocks.ironcleanball, 1), ('X'), new ItemStack(ModBlocks.ironcleanball, 1),
('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH), ('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XCX"," X "," Y ", "XCX"," X "," Y ",
('X'), "dustCopper", ('X'), "dustCopper",
('C'), "dustTin", ('C'), "dustTin",
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XXX"," X "," Y ", "XXX"," X "," Y ",
('X'), "nuggetBronze", ('X'), "nuggetBronze",
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y", "X","Y",
('X'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), ('X'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y", "X","Y",
('X'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), ('X'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y", "X","Y",
('X'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), ('X'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y", "X","Y",
('X'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), ('X'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y", "X","Y",
('X'), new ItemStack(ModItems.bronzegladius, 1, OreDictionary.WILDCARD_VALUE), ('X'), new ItemStack(ModItems.bronzegladius, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible)); ('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_redstone), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_redstone),
"R","Y", "R","Y",
('R'), Items.REDSTONE, ('R'), Items.REDSTONE,
('Y'), ModBlocks.rawbronzecrucible)); ('Y'), ModBlocks.rawbronzecrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond),
"D","Y", "D","Y",
('D'), PrimalItems.DIAMOND_KNAPP, ('D'), PrimalItems.DIAMOND_KNAPP,
('Y'), ModBlocks.rawbronzecrucible)); ('Y'), ModBlocks.rawbronzecrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis),
"L","Y", "L","Y",
('L'), new ItemStack(Items.DYE, 1, 4), ('L'), new ItemStack(Items.DYE, 1, 4),
('Y'), ModBlocks.rawbronzecrucible)); ('Y'), ModBlocks.rawbronzecrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald),
"E","Y", "E","Y",
('E'), PrimalItems.EMERALD_KNAPP, ('E'), PrimalItems.EMERALD_KNAPP,
('Y'), ModBlocks.rawbronzecrucible)); ('Y'), ModBlocks.rawbronzecrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokenbronzetool, 1), ('T'), new ItemStack(ModItems.brokenbronzetool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1) ('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
)); );
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokenwroughtirontool, 1), ('T'), new ItemStack(ModItems.brokenwroughtirontool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1) ('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
)); );
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokencleanirontool, 1), ('T'), new ItemStack(ModItems.brokencleanirontool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1) ('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
)); );
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawsteelcrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokensteeltool, 1), ('T'), new ItemStack(ModItems.brokensteeltool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1) ('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
)); );
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawwootzcrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawwootzcrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokenwootztool, 1), ('T'), new ItemStack(ModItems.brokenwootztool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1) ('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
)); );
/*************************************************************** /***************************************************************
@@ -202,163 +203,163 @@ public class ModCrafting {
***************************************************************/ ***************************************************************/
/***Pickaxe Crafting***/ /***Pickaxe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", 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), ('T'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", 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), ('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
('T'), ModItems.pickaxehead, ('T'), ModItems.pickaxehead,
('S'), Items.STICK)); ('S'), Items.STICK);
//TODO wootz placeholder //TODO wootz placeholder
/***Axe Crafting***/ /***Axe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
//TODO wootz placeholder //TODO wootz placeholder
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S",
('T'), ModItems.ironaxehead, ('T'), ModItems.ironaxehead,
('S'), Items.STICK)); ('S'), Items.STICK);
/***Shovel Crafting***/ /***Shovel Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
//TODO placed holder for wootz //TODO placed holder for wootz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S",
('T'), ModItems.ironshovelhead, ('T'), ModItems.ironshovelhead,
('S'), Items.STICK)); ('S'), Items.STICK);
/***Hoe Crafting***/ /***Hoe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE), "T", "C", "S",
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), ('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK, ('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral")); ('C'), "cordageGeneral");
//TODO PLACE HOLDER FOR WOOTZ STEEL //TODO PLACE HOLDER FOR WOOTZ STEEL
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S", RecipeHandler.addShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S",
('T'), ModItems.ironhoehead, ('T'), ModItems.ironhoehead,
('S'), Items.STICK)); ('S'), Items.STICK);
/*************************************************************** /***************************************************************
* TOOL DISASSEMBLY RECIPES * TOOL DISASSEMBLY RECIPES
***************************************************************/ ***************************************************************/
//GameRegistry.addShapedRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), //RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
// " ", " X ", " ", 'X', ModItems.ironaxe); // " ", " X ", " ", 'X', ModItems.ironaxe);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE), RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE))); true, "X", ('X'), new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE));
/***************************************************************/ /***************************************************************/
@@ -736,7 +737,7 @@ public class ModCrafting {
/***Makes a Hot Iron PickaxeHead***/ /***Makes a Hot Iron PickaxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.pickaxehead, ModItems.pickaxehead,
new ItemStack(ModItems.pickaxehead, 1 ), new ItemStack(ModItems.pickaxehead, 1),
800, 800,
160, 160,
400, 400,
@@ -747,7 +748,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron PickaxeHead***/ /***Makes a Hot Clean Iron PickaxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.cleanironpickaxehead, ModItems.cleanironpickaxehead,
new ItemStack(ModItems.cleanironpickaxehead, 1 ), new ItemStack(ModItems.cleanironpickaxehead, 1),
800, 800,
160, 160,
400, 400,
@@ -758,7 +759,7 @@ public class ModCrafting {
/***Makes a Hot Steel PickaxeHead***/ /***Makes a Hot Steel PickaxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.steelpickaxehead, ModItems.steelpickaxehead,
new ItemStack(ModItems.steelpickaxehead, 1 ), new ItemStack(ModItems.steelpickaxehead, 1),
1000, 1000,
160, 160,
400, 400,
@@ -771,7 +772,7 @@ public class ModCrafting {
/***Makes a Hot Iron AxeHead***/ /***Makes a Hot Iron AxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.ironaxehead, ModItems.ironaxehead,
new ItemStack(ModItems.ironaxehead, 1 ), new ItemStack(ModItems.ironaxehead, 1),
800, 800,
160, 160,
400, 400,
@@ -781,7 +782,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron AxeHead***/ /***Makes a Hot Clean Iron AxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.cleanironaxehead, ModItems.cleanironaxehead,
new ItemStack(ModItems.cleanironaxehead, 1 ), new ItemStack(ModItems.cleanironaxehead, 1),
800, 800,
160, 160,
400, 400,
@@ -791,7 +792,7 @@ public class ModCrafting {
/***Makes a Hot Steel AxeHead***/ /***Makes a Hot Steel AxeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.steelaxehead, ModItems.steelaxehead,
new ItemStack(ModItems.steelaxehead, 1 ), new ItemStack(ModItems.steelaxehead, 1),
800, 800,
160, 160,
400, 400,
@@ -803,7 +804,7 @@ public class ModCrafting {
/***Makes a Hot Iron ShovelHead***/ /***Makes a Hot Iron ShovelHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.ironshovelhead, ModItems.ironshovelhead,
new ItemStack(ModItems.ironshovelhead, 1 ), new ItemStack(ModItems.ironshovelhead, 1),
800, 800,
160, 160,
400, 400,
@@ -813,7 +814,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron ShovelHead***/ /***Makes a Hot Clean Iron ShovelHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.cleanironshovelhead, ModItems.cleanironshovelhead,
new ItemStack(ModItems.cleanironshovelhead, 1 ), new ItemStack(ModItems.cleanironshovelhead, 1),
800, 800,
160, 160,
400, 400,
@@ -823,7 +824,7 @@ public class ModCrafting {
/***Makes a Hot Steel ShovelHead***/ /***Makes a Hot Steel ShovelHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.steelshovelhead, ModItems.steelshovelhead,
new ItemStack(ModItems.steelshovelhead, 1 ), new ItemStack(ModItems.steelshovelhead, 1),
800, 800,
160, 160,
400, 400,
@@ -835,7 +836,7 @@ public class ModCrafting {
/***Makes a Hot Iron HoeHead***/ /***Makes a Hot Iron HoeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.ironhoehead, ModItems.ironhoehead,
new ItemStack(ModItems.ironhoehead, 1 ), new ItemStack(ModItems.ironhoehead, 1),
800, 800,
160, 160,
400, 400,
@@ -845,7 +846,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron HoeHead***/ /***Makes a Hot Clean Iron HoeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.cleanironhoehead, ModItems.cleanironhoehead,
new ItemStack(ModItems.cleanironhoehead, 1 ), new ItemStack(ModItems.cleanironhoehead, 1),
800, 800,
160, 160,
400, 400,
@@ -855,7 +856,7 @@ public class ModCrafting {
/***Makes a Hot Steel HoeHead***/ /***Makes a Hot Steel HoeHead***/
ForgeCrafting.addRecipe( ForgeCrafting.addRecipe(
ModItems.steelhoehead, ModItems.steelhoehead,
new ItemStack(ModItems.steelhoehead, 1 ), new ItemStack(ModItems.steelhoehead, 1),
800, 800,
160, 160,
400, 400,

View File

@@ -4,19 +4,17 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalMaterials; import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.items.*; import nmd.primal.forgecraft.items.*;
import nmd.primal.forgecraft.items.armor.CustomLeggings;
import nmd.primal.forgecraft.items.casting.CastingPart; import nmd.primal.forgecraft.items.casting.CastingPart;
import nmd.primal.forgecraft.items.parts.BronzeToolPart; import nmd.primal.forgecraft.items.parts.BronzeToolPart;
import nmd.primal.forgecraft.items.parts.ToolPart; import nmd.primal.forgecraft.items.parts.ToolPart;
@@ -166,7 +164,6 @@ public class ModItems {
/********** /**********
TOOL PARTS TOOL PARTS
**********/ **********/
bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalMaterials.TOOL_BRONZE, 41); bronzepickaxehead = new BronzeToolPart("bronzepickaxehead", PrimalMaterials.TOOL_BRONZE, 41);
bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalMaterials.TOOL_BRONZE, 42); bronzeaxehead = new BronzeToolPart("bronzeaxehead", PrimalMaterials.TOOL_BRONZE, 42);
bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalMaterials.TOOL_BRONZE, 43); bronzeshovelhead = new BronzeToolPart("bronzeshovelhead", PrimalMaterials.TOOL_BRONZE, 43);
@@ -191,6 +188,7 @@ public class ModItems {
wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 36); wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 36);
wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL, 37); wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL, 37);
wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 38); wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL, 38);
/********** /**********
TOOLS TOOLS
**********/ **********/
@@ -265,120 +263,120 @@ public class ModItems {
} }
public static void register() { public static void register() {
GameRegistry.register(castingmud); ForgeRegistries.ITEMS.register(castingmud);
GameRegistry.register(bellowshandle); ForgeRegistries.ITEMS.register(bellowshandle);
GameRegistry.register(softcrucible); ForgeRegistries.ITEMS.register(softcrucible);
GameRegistry.register(stonetongs); ForgeRegistries.ITEMS.register(stonetongs);
GameRegistry.register(forgehammer); ForgeRegistries.ITEMS.register(forgehammer);
GameRegistry.register(ironingotballhot); ForgeRegistries.ITEMS.register(ironingotballhot);
GameRegistry.register(ironchunkhot); ForgeRegistries.ITEMS.register(ironchunkhot);
GameRegistry.register(ironcleaningotballhot); ForgeRegistries.ITEMS.register(ironcleaningotballhot);
GameRegistry.register(ironcleanchunkhot); ForgeRegistries.ITEMS.register(ironcleanchunkhot);
GameRegistry.register(steelingotballhot); ForgeRegistries.ITEMS.register(steelingotballhot);
GameRegistry.register(steelchunkhot); ForgeRegistries.ITEMS.register(steelchunkhot);
GameRegistry.register(wootzingotballhot); ForgeRegistries.ITEMS.register(wootzingotballhot);
GameRegistry.register(wootzchunkhot); ForgeRegistries.ITEMS.register(wootzchunkhot);
//GameRegistry.register(test); //ForgeRegistries.ITEMS.register(test);
/********** /**********
CASTING PARTS CASTING PARTS
**********/ **********/
GameRegistry.register(cast_axe); ForgeRegistries.ITEMS.register(cast_axe);
GameRegistry.register(cast_gladius); ForgeRegistries.ITEMS.register(cast_gladius);
GameRegistry.register(cast_hoe); ForgeRegistries.ITEMS.register(cast_hoe);
GameRegistry.register(cast_pickaxe); ForgeRegistries.ITEMS.register(cast_pickaxe);
GameRegistry.register(cast_shovel); ForgeRegistries.ITEMS.register(cast_shovel);
/********** /**********
TOOL PARTS TOOL PARTS
**********/ **********/
GameRegistry.register(bronzepickaxehead); ForgeRegistries.ITEMS.register(bronzepickaxehead);
GameRegistry.register(bronzeaxehead); ForgeRegistries.ITEMS.register(bronzeaxehead);
GameRegistry.register(bronzeshovelhead); ForgeRegistries.ITEMS.register(bronzeshovelhead);
GameRegistry.register(bronzehoehead); ForgeRegistries.ITEMS.register(bronzehoehead);
GameRegistry.register(pickaxehead); ForgeRegistries.ITEMS.register(pickaxehead);
GameRegistry.register(ironaxehead); ForgeRegistries.ITEMS.register(ironaxehead);
GameRegistry.register(ironshovelhead); ForgeRegistries.ITEMS.register(ironshovelhead);
GameRegistry.register(ironhoehead); ForgeRegistries.ITEMS.register(ironhoehead);
GameRegistry.register(cleanironpickaxehead); ForgeRegistries.ITEMS.register(cleanironpickaxehead);
GameRegistry.register(cleanironaxehead); ForgeRegistries.ITEMS.register(cleanironaxehead);
GameRegistry.register(cleanironshovelhead); ForgeRegistries.ITEMS.register(cleanironshovelhead);
GameRegistry.register(cleanironhoehead); ForgeRegistries.ITEMS.register(cleanironhoehead);
GameRegistry.register(steelpickaxehead); ForgeRegistries.ITEMS.register(steelpickaxehead);
GameRegistry.register(steelaxehead); ForgeRegistries.ITEMS.register(steelaxehead);
GameRegistry.register(steelshovelhead); ForgeRegistries.ITEMS.register(steelshovelhead);
GameRegistry.register(steelhoehead); ForgeRegistries.ITEMS.register(steelhoehead);
GameRegistry.register(wootzpickaxehead); ForgeRegistries.ITEMS.register(wootzpickaxehead);
GameRegistry.register(wootzaxehead); ForgeRegistries.ITEMS.register(wootzaxehead);
GameRegistry.register(wootzshovelhead); ForgeRegistries.ITEMS.register(wootzshovelhead);
GameRegistry.register(wootzhoehead); ForgeRegistries.ITEMS.register(wootzhoehead);
/********** /**********
TOOLS TOOLS
**********/ **********/
GameRegistry.register(bronzepickaxe); ForgeRegistries.ITEMS.register(bronzepickaxe);
GameRegistry.register(bronzeaxe); ForgeRegistries.ITEMS.register(bronzeaxe);
GameRegistry.register(bronzeshovel); ForgeRegistries.ITEMS.register(bronzeshovel);
GameRegistry.register(bronzehoe); ForgeRegistries.ITEMS.register(bronzehoe);
GameRegistry.register(ironpickaxe); ForgeRegistries.ITEMS.register(ironpickaxe);
GameRegistry.register(ironaxe); ForgeRegistries.ITEMS.register(ironaxe);
GameRegistry.register(ironshovel); ForgeRegistries.ITEMS.register(ironshovel);
GameRegistry.register(ironhoe); ForgeRegistries.ITEMS.register(ironhoe);
GameRegistry.register(cleanironpickaxe); ForgeRegistries.ITEMS.register(cleanironpickaxe);
GameRegistry.register(cleanironaxe); ForgeRegistries.ITEMS.register(cleanironaxe);
GameRegistry.register(cleanironshovel); ForgeRegistries.ITEMS.register(cleanironshovel);
GameRegistry.register(cleanironhoe); ForgeRegistries.ITEMS.register(cleanironhoe);
GameRegistry.register(steelpickaxe); ForgeRegistries.ITEMS.register(steelpickaxe);
GameRegistry.register(steelaxe); ForgeRegistries.ITEMS.register(steelaxe);
GameRegistry.register(steelshovel); ForgeRegistries.ITEMS.register(steelshovel);
GameRegistry.register(steelhoe); ForgeRegistries.ITEMS.register(steelhoe);
GameRegistry.register(wootzpickaxe); ForgeRegistries.ITEMS.register(wootzpickaxe);
GameRegistry.register(wootzaxe); ForgeRegistries.ITEMS.register(wootzaxe);
GameRegistry.register(wootzshovel); ForgeRegistries.ITEMS.register(wootzshovel);
GameRegistry.register(wootzhoe); ForgeRegistries.ITEMS.register(wootzhoe);
/********** /**********
WEAPONS WEAPONS
**********/ **********/
GameRegistry.register(wroughtirongladius); ForgeRegistries.ITEMS.register(wroughtirongladius);
GameRegistry.register(bronzegladius); ForgeRegistries.ITEMS.register(bronzegladius);
GameRegistry.register(cleanirongladius); ForgeRegistries.ITEMS.register(cleanirongladius);
GameRegistry.register(steelgladius); ForgeRegistries.ITEMS.register(steelgladius);
GameRegistry.register(cleanironlongsword); ForgeRegistries.ITEMS.register(cleanironlongsword);
GameRegistry.register(steellongsword); ForgeRegistries.ITEMS.register(steellongsword);
GameRegistry.register(wroughtironslayer); ForgeRegistries.ITEMS.register(wroughtironslayer);
GameRegistry.register(cleanironslayer); ForgeRegistries.ITEMS.register(cleanironslayer);
GameRegistry.register(steelslayer); ForgeRegistries.ITEMS.register(steelslayer);
GameRegistry.register(rawlongbow); ForgeRegistries.ITEMS.register(rawlongbow);
GameRegistry.register(unstrunglongbow); ForgeRegistries.ITEMS.register(unstrunglongbow);
GameRegistry.register(longbow); ForgeRegistries.ITEMS.register(longbow);
//GameRegistry.register(matchlockmusket); //ForgeRegistries.ITEMS.register(matchlockmusket);
GameRegistry.register(brokenbronzetool); ForgeRegistries.ITEMS.register(brokenbronzetool);
GameRegistry.register(brokenwroughtirontool); ForgeRegistries.ITEMS.register(brokenwroughtirontool);
GameRegistry.register(brokencleanirontool); ForgeRegistries.ITEMS.register(brokencleanirontool);
GameRegistry.register(brokensteeltool); ForgeRegistries.ITEMS.register(brokensteeltool);
GameRegistry.register(brokenwootztool); ForgeRegistries.ITEMS.register(brokenwootztool);
/********** /**********
ARMOR ARMOR
**********/ **********/
//GameRegistry.register(testleggings); //ForgeRegistries.ITEMS.register(testleggings);
//GameRegistry.register(forgingmanual); //ForgeRegistries.ITEMS.register(forgingmanual);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items; package nmd.primal.forgecraft.items;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@@ -27,6 +28,7 @@ import nmd.primal.forgecraft.tiles.TileBaseCrucible;
import nmd.primal.forgecraft.tiles.TileBloomery; import nmd.primal.forgecraft.tiles.TileBloomery;
import nmd.primal.forgecraft.tiles.TileForge; import nmd.primal.forgecraft.tiles.TileForge;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
/** /**
@@ -888,7 +890,7 @@ public class ItemStoneTongs extends Item {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn)
{ {
//tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags")); //tooltip.add(ChatFormatting.BLUE + "NBT: " + item.getSubCompound("tags"));
//tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type")); //tooltip.add(ChatFormatting.RED + "NBT: " + item.getTagCompound().getInteger("type"));

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items.parts; package nmd.primal.forgecraft.items.parts;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@@ -125,30 +126,23 @@ public class BronzeToolPart extends Item implements ToolNBT{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { if(item.hasTagCompound())
{
if(item.hasTagCompound()) { tooltip.add(ChatFormatting.GRAY + "Upgrades");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.GRAY + "Upgrades"); tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
if (getEmerald(item) == true) { }
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald"); if (getDiamondLevel(item) > 0) {
} tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
if (getDiamondLevel(item) > 0) { }
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item)); if (getRedstoneLevel(item) > 0) {
} tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item));
if (getRedstoneLevel(item) > 0) { }
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item)); if (getLapisLevel(item) > 0) {
} tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item));
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item));
}
} }
} }
} }
}
}

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items.parts; package nmd.primal.forgecraft.items.parts;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@@ -271,30 +272,23 @@ public class ToolPart extends Item implements ToolNBT{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { if(item.hasTagCompound())
{
if(item.hasTagCompound()) { tooltip.add(ChatFormatting.GRAY + "Upgrades");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.GRAY + "Upgrades"); tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
if (getEmerald(item) == true) { }
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald"); if (getDiamondLevel(item) > 0) {
} tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
if (getDiamondLevel(item) > 0) { }
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item)); if (getRedstoneLevel(item) > 0) {
} tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item));
if (getRedstoneLevel(item) > 0) { }
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item)); if (getLapisLevel(item) > 0) {
} tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item));
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item));
}
} }
} }
} }
}
}

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -136,28 +137,26 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(!item.isEmpty()) { if(!item.isEmpty())
if (player.getEntityWorld().isRemote) { {
if (item.hasTagCompound())
if (item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + "1" );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + "5" );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + "1" );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + "5" );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }
} }

View File

@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -138,27 +139,25 @@ public class BronzeHoe extends ItemHoe implements ToolNBT {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() ); if(item.hasTagCompound())
if(item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -136,27 +136,25 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() ); if(item.hasTagCompound())
if(item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }

View File

@@ -4,6 +4,7 @@ import com.google.common.collect.Sets;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -141,27 +142,25 @@ Item drop;
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() ); if(item.hasTagCompound())
if(item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + 1 );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + 5 );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -276,28 +276,26 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(!item.isEmpty()) { if(!item.isEmpty())
if (player.getEntityWorld().isRemote) { {
if (item.hasTagCompound())
if (item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }
} }

View File

@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -20,7 +21,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -273,30 +273,26 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { if(item.hasTagCompound())
{
if(item.hasTagCompound()) { tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) ); tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }
@Override @Override

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -276,27 +276,25 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { //tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() ); if(item.hasTagCompound())
if(item.hasTagCompound()) { {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) ); if (getEmerald(item) == true) {
if (getEmerald(item) == true) { tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }
@@ -371,7 +369,7 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
entityLiving.renderBrokenItemStack(stack); entityLiving.renderBrokenItemStack(stack);
stack.shrink(1); stack.shrink(1);
player.inventory.markDirty(); player.inventory.markDirty();
player.inventory.inventoryChanged = true; //player.inventory.inventoryChanged = true;
} }
} }

View File

@@ -4,6 +4,7 @@ import com.google.common.collect.Sets;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@@ -21,7 +22,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -276,30 +276,26 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean advanced) public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{ {
if(player.getEntityWorld().isRemote) { if(item.hasTagCompound())
{
if(item.hasTagCompound()) { tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) ); tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
} }
} }
@Override @Override

View File

@@ -3,20 +3,19 @@ package nmd.primal.forgecraft.items.weapons;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Enchantments; import net.minecraft.init.Enchantments;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents; import net.minecraft.item.EnumAction;
import net.minecraft.item.*; import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.item.ItemArrow;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList; import net.minecraft.stats.StatList;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems; import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.items.BaseItem; import nmd.primal.forgecraft.items.BaseItem;

View File

@@ -25,18 +25,13 @@ import org.lwjgl.opengl.GL11;
/** /**
* Created by mminaie on 3/5/17. * Created by mminaie on 3/5/17.
*/ */
public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil> public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
{ {
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileAnvil tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileAnvil tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof AnvilBase) { if (state.getBlock() instanceof AnvilBase) {

View File

@@ -21,8 +21,8 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileBloomery tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileBloomery tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof BloomeryBase) { if (state.getBlock() instanceof BloomeryBase) {

View File

@@ -21,8 +21,8 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileBreaker tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileBreaker tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof Breaker) { if (state.getBlock() instanceof Breaker) {

View File

@@ -19,13 +19,13 @@ import org.lwjgl.opengl.GL11;
/** /**
* Created by mminaie on 6/21/17. * Created by mminaie on 6/21/17.
*/ */
public class TileCastingBlockRender extends TileEntitySpecialRenderer <TileCastingBlock> { public class TileCastingBlockRender extends TileEntitySpecialRenderer <TileCastingBlock>
{
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileCastingBlock tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileCastingBlock tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof CastingBlock) { if (state.getBlock() instanceof CastingBlock) {

View File

@@ -19,13 +19,13 @@ import org.lwjgl.opengl.GL11;
/** /**
* Created by mminaie on 6/21/17. * Created by mminaie on 6/21/17.
*/ */
public class TileCastingformRender extends TileEntitySpecialRenderer <TileCastingForm> { public class TileCastingformRender extends TileEntitySpecialRenderer <TileCastingForm>
{
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileCastingForm tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileCastingForm tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof CastingForm) { if (state.getBlock() instanceof CastingForm) {

View File

@@ -24,8 +24,8 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TileForge tile, double x, double y, double z, float partialTicks, int destroyStage) { public void render(TileForge tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof Forge) { if (state.getBlock() instanceof Forge) {

View File

@@ -18,14 +18,13 @@ import org.lwjgl.opengl.GL11;
/** /**
* Created by mminaie on 1/7/17. * Created by mminaie on 1/7/17.
*/ */
public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePistonBellows> { public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePistonBellows>
{
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@Override @Override
public void renderTileEntityAt(TilePistonBellows tile, double x, double y, double z, float partialTicks, int destroyStage) public void render(TilePistonBellows tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{ {
BlockPos pos = tile.getPos(); BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos); IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof PistonBellows) { if (state.getBlock() instanceof PistonBellows) {

View File

@@ -1,13 +1,11 @@
package nmd.primal.forgecraft.renders.items; package nmd.primal.forgecraft.renders.items;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModel; import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.IModelCustomData;
import net.minecraftforge.common.model.IModelState; import net.minecraftforge.common.model.IModelState;
import java.util.Collection; import java.util.Collection;
@@ -15,8 +13,8 @@ import java.util.Collection;
/** /**
* Created by mminaie on 3/8/17. * Created by mminaie on 3/8/17.
*/ */
public class ModelPickaxe implements IModel, IModelCustomData { public class ModelPickaxe implements IModel
{
public static final IModel MODEL = new ModelPickaxe(); public static final IModel MODEL = new ModelPickaxe();
//private final ResourceLocation resourceHead; //private final ResourceLocation resourceHead;
//private final ResourceLocation resourceHandle; //private final ResourceLocation resourceHandle;
@@ -37,7 +35,7 @@ public class ModelPickaxe implements IModel, IModelCustomData {
} }
@Override @Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) { public IBakedModel bake(IModelState state, VertexFormat format, java.util.function.Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
return null; return null;
} }

View File

@@ -117,10 +117,15 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
private void slotZeroManager(World world){ private void slotZeroManager(World world){
if(this.getSlotStack(0) != ItemStack.EMPTY) { if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5); Integer decrInt = Math.round(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5);
if(decrInt == 0) { if(decrInt == 0) {
decrInt = 1; decrInt = 1;
} }
//System.out.println(GameRegistry.getFuelValue(this.getSlotStack(0)));
//System.out.println( "Burn Time: " + RecipeHelper.getBurnTime(this.getSlotStack(0)));
//System.out.println("Burn Time / 5 :" + RecipeHelper.getBurnTime(this.getSlotStack(0))/5);
//System.out.println("Burn Time rounded: " + Math.round(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5));
//System.out.println(decrInt);
Integer size = this.getSlotStack(0).getCount(); Integer size = this.getSlotStack(0).getCount();
Integer burnModifier = 0; Integer burnModifier = 0;
if(size / 16 <= 1){ if(size / 16 <= 1){

View File

@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable; import net.minecraft.util.ITickable;
@@ -14,8 +13,6 @@ import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalStates; import nmd.primal.core.api.PrimalStates;
import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.FireHelper;
import nmd.primal.core.common.helper.NBTHelper;
import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.Forge; import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.crafting.ForgeCrafting; import nmd.primal.forgecraft.crafting.ForgeCrafting;
@@ -23,7 +20,6 @@ import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.util.ToolNBT; import nmd.primal.forgecraft.util.ToolNBT;
import static nmd.primal.core.common.helper.FireHelper.makeSmoke; import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
/** /**
* Created by mminaie on 11/30/16. * Created by mminaie on 11/30/16.
@@ -47,6 +43,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
IBlockState aboveState = world.getBlockState(abovePos); IBlockState aboveState = world.getBlockState(abovePos);
Block block = world.getBlockState(abovePos).getBlock(); Block block = world.getBlockState(abovePos).getBlock();
if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) { if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
if (this.iteration == 100) { if (this.iteration == 100) {
RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) { if(CommonUtils.randomCheck(1000)) {
@@ -59,6 +56,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
makeSmoke(world, pos); makeSmoke(world, pos);
} }
} }
if (this.iteration == 300) { if (this.iteration == 300) {
this.iteration = 0; this.iteration = 0;
@@ -68,12 +66,11 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
this.markDirty(); this.markDirty();
world.notifyBlockUpdate(pos, state, state, 2); world.notifyBlockUpdate(pos, state, state, 2);
} }
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
RecipeHelper.fuelManger(world, this, this.getSlotStack(0)); RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) { if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos); makeSmoke(world, pos);
} }
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
} }
//slotZeroManager(world); //slotZeroManager(world);
@@ -179,7 +176,8 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
private void craftingManager() { private void craftingManager() {
for (int i = 2; i < this.getSlotListSize(); i++) { for (int i = 2; i < this.getSlotListSize(); i++) {
ItemStack stack = this.getSlotStack(i); ItemStack stack = this.getSlotStack(i).copy();
ForgeCrafting recipe = ForgeCrafting.getRecipe(stack.getItem()); ForgeCrafting recipe = ForgeCrafting.getRecipe(stack.getItem());
if (recipe != null) { if (recipe != null) {
NBTTagCompound stackCompound = null; NBTTagCompound stackCompound = null;
@@ -198,7 +196,6 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
outputStack.setItemDamage(stack.getItemDamage()); outputStack.setItemDamage(stack.getItemDamage());
if(outputStack.getItem() instanceof ToolPart) { if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound); outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true); outputStack.getSubCompound("tags").setBoolean("hot", true);
} }
this.setSlotStack(i, outputStack); this.setSlotStack(i, outputStack);
@@ -213,10 +210,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter3--; cookCounter3--;
} }
if (cookCounter3 >= recipe.getIdealTime()) { if (cookCounter3 >= recipe.getIdealTime()) {
ItemStack outputStack = recipe.getOutput();
if (NBTHelper.hasTag(stack, "tags")) { outputStack.setItemDamage(stack.getItemDamage());
NBTHelper.setBoolean(stack, "hot", true); if(outputStack.getItem() instanceof ToolPart) {
} else this.setSlotStack(i, recipe.getOutput()); outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter3 = 0; cookCounter3 = 0;
} }
@@ -229,12 +229,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter4--; cookCounter4--;
} }
if (cookCounter4 >= recipe.getIdealTime()) { if (cookCounter4 >= recipe.getIdealTime()) {
ItemStack outputStack = recipe.getOutput();
if (NBTHelper.hasTag(stack, "tags")) { outputStack.setItemDamage(stack.getItemDamage());
NBTHelper.setBoolean(stack, "hot", true); //System.out.println(stackCompound.getCompoundTag("tags"));
cookCounter4 = 0; if(outputStack.getItem() instanceof ToolPart) {
} else this.setSlotStack(i, recipe.getOutput()); outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter4 = 0; cookCounter4 = 0;
} }
} }
@@ -246,11 +248,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter5--; cookCounter5--;
} }
if (cookCounter5 >= recipe.getIdealTime()) { if (cookCounter5 >= recipe.getIdealTime()) {
ItemStack outputStack = recipe.getOutput();
if (NBTHelper.hasTag(stack, "tags")) { outputStack.setItemDamage(stack.getItemDamage());
NBTHelper.setBoolean(stack, "hot", true); if(outputStack.getItem() instanceof ToolPart) {
} else this.setSlotStack(i, recipe.getOutput()); outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter5 = 0; cookCounter5 = 0;
} }
} }
@@ -262,21 +266,16 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter6--; cookCounter6--;
} }
if (cookCounter6 >= recipe.getIdealTime()) { if (cookCounter6 >= recipe.getIdealTime()) {
ItemStack outputStack = recipe.getOutput();
if (NBTHelper.hasTag(stack, "tags")) { outputStack.setItemDamage(stack.getItemDamage());
NBTHelper.setBoolean(stack, "hot", true); if(outputStack.getItem() instanceof ToolPart) {
} else this.setSlotStack(i, recipe.getOutput()); outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter6 = 0; cookCounter6 = 0;
} }
} }
/*
System.out.println(state.getValue(IngotBall.ACTIVE) + " : " + recipe.getStartState());
System.out.println(cookCounter + " : " + recipe.getIdealTime());
System.out.println(this.heat + " : " + recipe.getHeatThreshold());
System.out.println("========");
*/
} }
} }
} }

View File

@@ -4,14 +4,12 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable; import net.minecraft.util.ITickable;
import net.minecraft.world.World; import net.minecraft.world.World;
import nmd.primal.core.api.PrimalStates;
import static nmd.primal.core.api.PrimalStates.ACTIVE;
/** /**
* Created by mminaie on 1/5/17. * Created by mminaie on 1/5/17.
*/ */
public class TilePistonBellows extends BaseTile implements ITickable{ public class TilePistonBellows extends BaseTile implements ITickable{
private int iteration = 0; private int iteration = 0;
@@ -22,7 +20,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{
if (!world.isRemote) { if (!world.isRemote) {
World world = this.getWorld(); World world = this.getWorld();
IBlockState state = world.getBlockState(this.pos); IBlockState state = world.getBlockState(this.pos);
if (world.getBlockState(this.getPos()).getValue(ACTIVE)) { if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
iteration++; iteration++;
if(iteration <= 15){ if(iteration <= 15){
animateIteration++; animateIteration++;
@@ -38,7 +36,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{
if(iteration > 31){ if(iteration > 31){
iteration = 0; iteration = 0;
animateIteration = 0; animateIteration = 0;
world.setBlockState(this.getPos(), state.withProperty(ACTIVE, false), 3); world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 3);
} }
//System.out.println("Iterating"); //System.out.println("Iterating");

View File

@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.util; package nmd.primal.forgecraft.util;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
@@ -8,7 +7,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.helper.RecipeHelper; import nmd.primal.core.common.helper.RecipeHelper;
@@ -16,7 +14,6 @@ import nmd.primal.forgecraft.blocks.CustomContainerFacing;
import nmd.primal.forgecraft.tiles.TileBreaker; import nmd.primal.forgecraft.tiles.TileBreaker;
import static nmd.primal.core.common.helper.CommonUtils.randomChanceReturn; import static nmd.primal.core.common.helper.CommonUtils.randomChanceReturn;
import static nmd.primal.core.common.helper.CommonUtils.randomCheck;
//import nmd.primal.forgecraft.CommonUtils; //import nmd.primal.forgecraft.CommonUtils;

View File

@@ -2,8 +2,8 @@
"modid": "forgecraft", "modid": "forgecraft",
"name": "Kitsu's Forgecraft", "name": "Kitsu's Forgecraft",
"description": "Forged with sweat and blood", "description": "Forged with sweat and blood",
"version": "1.2.74", "version": "1.3.23",
"mcversion": "1.11.2", "mcversion": "1.12.0",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",
"authorList": ["KitsuShadow"], "authorList": ["KitsuShadow"],

77
kfc/testbuild.txt Normal file
View File

@@ -0,0 +1,77 @@
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
version = "1.0"
group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "1.12-14.21.0.2368"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20170624"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}