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 702 additions and 661 deletions

View File

@@ -11,107 +11,70 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
repositories {
maven {
name = "jei"
url "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "mobius"
url "http://mobiusstrip.eu/maven"
}
maven {
name = "primal"
url "https://maven.nmd.so"
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'java'
compileJava {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
group = "${mod_group}"
version = "${mod_version}"
archivesBaseName = "${mod_name}"
idea { module { inheritOutputDirs = true } }
minecraft {
version = "${mc_version}" + "-" + "${forge_version}"
runDir = "run"
mappings = "${mcp_mappings}"
// JEI
//useDepAts = true
// Replace
replace "@VERSION@", project.mod_version
}
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/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 "mezz.jei:jei_${mc_version}:${jei_version}:api"
//compile against the JEI API
deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev"
deobfCompile "nmd.primal.core:PrimalCore:${mc_version}-${primal_version}:dev"
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
}
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", "${mod_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'
}
}
}
// end //

View File

@@ -5,12 +5,12 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft
mod_version=1.2.74
forge_version=13.20.1.2388
mcp_mappings=snapshot_20170610
mc_version=1.11.2
mod_version=1.3.23
forge_version=14.21.1.2400
mcp_mappings=snapshot_20170624
mc_version=1.12
primal_version=0.4+
jei_version=4.3+
primal_version=0.5+
jei_version=4.7+
waila_version=1.7.0-B3
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_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.2.74";
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2388,);" + "required-after:primal@[0.4,);";
public static final String MOD_VERSION = "1.3.23";
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.5,);";
/** Mod Structures **/
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.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.tiles.TileAnvil;
/**
@@ -42,7 +36,7 @@ public class AnvilStone extends AnvilBase {
for (int i = 0; i < 25; i++) {
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 (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) {
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
@@ -52,7 +46,7 @@ public class AnvilStone extends AnvilBase {
return true;
}
}
}
}*/
doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
return true;
}

View File

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

View File

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

View File

@@ -15,7 +15,7 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
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.SideOnly;
import nmd.primal.core.common.items.tools.WorkMallet;
@@ -599,25 +599,36 @@ public class ModBlocks {
}
private static void registerBlock(Block block) {
GameRegistry.register(block);
private static void registerBlock(Block block)
{
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
ItemBlock item = new ItemBlock(block);
item.setRegistryName(block.getRegistryName());
GameRegistry.register(item);
ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
}
private static void registerBlockSubType(Block block, ItemBlock itemBlock, String registryName){
GameRegistry.register(block);
ItemBlock item = itemBlock;
private static void registerBlockSubType(Block block, ItemBlock item, String registryName)
{
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
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"));
}
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);
}

View File

@@ -4,10 +4,9 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.crafting.RecipeHandler;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
@@ -25,176 +24,178 @@ public class ModCrafting {
Random rand = new Random();
//RecipeHandler.addShapedOreRecipe();
/***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);
/***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 ",
('S'), "logSplit"
}));
});
/***CASTING MUD***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.castingmud, 4),
true, new Object[]{" C ", "CSC", " C ",
('S'), Blocks.SAND,
('C'), PrimalItems.MUD_CLUMP
}));
});
/***YEW STAVE***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.yewstave, 2),
true, new Object[]{"C", "C",
('C'), PrimalItems.LOGS_SPLIT_YEW
}));
});
/***Unstrung Longbow***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.unstrunglongbow, 1),
true, new Object[]{"C", "A",
('C'), "fatAnimal",
('A'), ModItems.rawlongbow
}));
});
/***Longbow***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.longbow, 1),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.longbow, 1),
true, new Object[]{"C ","CA","C ",
('C'), PrimalItems.SILK_CORDAGE,
('A'), ModItems.unstrunglongbow
}));
});
/***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);
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);
/***Bloomery***/
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.bloomery_brick),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.bloomery_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);
/***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);
/*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', Items.CLAY_BALL);
/*** Soft Crucible ***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.softcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.softcrucible),
"X X", "X X", "XXX", 'X', PrimalItems.MUD_CLUMP);
/***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);
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);
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);
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);
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);
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);
/***Bellows Handle***/
GameRegistry.addShapedRecipe(new ItemStack(ModItems.bellowshandle),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
"X X", "X X", " X ", 'X', Items.STICK);
/***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);
/***RAW CRUCIBLES***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawironcrucible),
"X","Y",
('X'), "oreIron",
('Y'), ModBlocks.emptycrucible));
('Y'), ModBlocks.emptycrucible);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
"XL","Y ",
('X'), "dustIron",
('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 ",
('X'), new ItemStack(ModBlocks.ironcleanball, 1),
('C'), new ItemStack(PrimalItems.CHARCOAL_HIGH),
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XCX"," X "," Y ",
('X'), "dustCopper",
('C'), "dustTin",
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"XXX"," X "," Y ",
('X'), "nuggetBronze",
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('X'), new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
('Y'), ModBlocks.emptycrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
('Y'), ModBlocks.emptycrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible),
"X","Y",
('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'), Items.REDSTONE,
('Y'), ModBlocks.rawbronzecrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond),
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_diamond),
"D","Y",
('D'), PrimalItems.DIAMOND_KNAPP,
('Y'), ModBlocks.rawbronzecrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis),
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_lapis),
"L","Y",
('L'), new ItemStack(Items.DYE, 1, 4),
('Y'), ModBlocks.rawbronzecrucible));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald),
('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible_emerald),
"E","Y",
('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'), new ItemStack(ModItems.brokenbronzetool, 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'), new ItemStack(ModItems.brokenwroughtirontool, 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'), new ItemStack(ModItems.brokencleanirontool, 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'), new ItemStack(ModItems.brokensteeltool, 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'), new ItemStack(ModItems.brokenwootztool, 1),
('Y'), new ItemStack(ModBlocks.emptycrucible, 1)
));
);
/***************************************************************
@@ -202,163 +203,163 @@ public class ModCrafting {
***************************************************************/
/***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),
('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),
('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),
('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),
('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,
('S'), Items.STICK));
('S'), Items.STICK);
//TODO wootz placeholder
/***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),
('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),
('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),
('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),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
('C'), "cordageGeneral");
//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,
('S'), Items.STICK));
('S'), Items.STICK);
/***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),
('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),
('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),
('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),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
('C'), "cordageGeneral");
//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,
('S'), Items.STICK));
('S'), Items.STICK);
/***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),
('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),
('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),
('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),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
('C'), "cordageGeneral");
//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,
('S'), Items.STICK));
('S'), Items.STICK);
/***************************************************************
* 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);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzeaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzepickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzepickaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzeshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzeshovel, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bronzehoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.bronzehoe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironpickaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironshovel, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.ironhoe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironpickaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironshovel, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.cleanironhoe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelpickaxe, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelshovel, 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));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
true, "X", ('X'), new ItemStack(ModItems.steelhoe, 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));
/***************************************************************/
@@ -736,7 +737,7 @@ public class ModCrafting {
/***Makes a Hot Iron PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.pickaxehead,
new ItemStack(ModItems.pickaxehead, 1 ),
new ItemStack(ModItems.pickaxehead, 1),
800,
160,
400,
@@ -747,7 +748,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironpickaxehead,
new ItemStack(ModItems.cleanironpickaxehead, 1 ),
new ItemStack(ModItems.cleanironpickaxehead, 1),
800,
160,
400,
@@ -758,7 +759,7 @@ public class ModCrafting {
/***Makes a Hot Steel PickaxeHead***/
ForgeCrafting.addRecipe(
ModItems.steelpickaxehead,
new ItemStack(ModItems.steelpickaxehead, 1 ),
new ItemStack(ModItems.steelpickaxehead, 1),
1000,
160,
400,
@@ -771,7 +772,7 @@ public class ModCrafting {
/***Makes a Hot Iron AxeHead***/
ForgeCrafting.addRecipe(
ModItems.ironaxehead,
new ItemStack(ModItems.ironaxehead, 1 ),
new ItemStack(ModItems.ironaxehead, 1),
800,
160,
400,
@@ -781,7 +782,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron AxeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironaxehead,
new ItemStack(ModItems.cleanironaxehead, 1 ),
new ItemStack(ModItems.cleanironaxehead, 1),
800,
160,
400,
@@ -791,7 +792,7 @@ public class ModCrafting {
/***Makes a Hot Steel AxeHead***/
ForgeCrafting.addRecipe(
ModItems.steelaxehead,
new ItemStack(ModItems.steelaxehead, 1 ),
new ItemStack(ModItems.steelaxehead, 1),
800,
160,
400,
@@ -803,7 +804,7 @@ public class ModCrafting {
/***Makes a Hot Iron ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.ironshovelhead,
new ItemStack(ModItems.ironshovelhead, 1 ),
new ItemStack(ModItems.ironshovelhead, 1),
800,
160,
400,
@@ -813,7 +814,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironshovelhead,
new ItemStack(ModItems.cleanironshovelhead, 1 ),
new ItemStack(ModItems.cleanironshovelhead, 1),
800,
160,
400,
@@ -823,7 +824,7 @@ public class ModCrafting {
/***Makes a Hot Steel ShovelHead***/
ForgeCrafting.addRecipe(
ModItems.steelshovelhead,
new ItemStack(ModItems.steelshovelhead, 1 ),
new ItemStack(ModItems.steelshovelhead, 1),
800,
160,
400,
@@ -835,7 +836,7 @@ public class ModCrafting {
/***Makes a Hot Iron HoeHead***/
ForgeCrafting.addRecipe(
ModItems.ironhoehead,
new ItemStack(ModItems.ironhoehead, 1 ),
new ItemStack(ModItems.ironhoehead, 1),
800,
160,
400,
@@ -845,7 +846,7 @@ public class ModCrafting {
/***Makes a Hot Clean Iron HoeHead***/
ForgeCrafting.addRecipe(
ModItems.cleanironhoehead,
new ItemStack(ModItems.cleanironhoehead, 1 ),
new ItemStack(ModItems.cleanironhoehead, 1),
800,
160,
400,
@@ -855,7 +856,7 @@ public class ModCrafting {
/***Makes a Hot Steel HoeHead***/
ForgeCrafting.addRecipe(
ModItems.steelhoehead,
new ItemStack(ModItems.steelhoehead, 1 ),
new ItemStack(ModItems.steelhoehead, 1),
800,
160,
400,

View File

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

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items;
import net.minecraft.block.material.Material;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
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.TileForge;
import javax.annotation.Nullable;
import java.util.List;
/**
@@ -888,7 +890,7 @@ public class ItemStoneTongs extends Item {
@Override
@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.RED + "NBT: " + item.getTagCompound().getInteger("type"));

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items.parts;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -125,12 +126,10 @@ public class BronzeToolPart extends Item implements ToolNBT{
@Override
@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.hasTagCompound())
{
if(player.getEntityWorld().isRemote) {
if(item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -146,9 +145,4 @@ public class BronzeToolPart extends Item implements ToolNBT{
}
}
}
}
}

View File

@@ -1,6 +1,7 @@
package nmd.primal.forgecraft.items.parts;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -271,12 +272,10 @@ public class ToolPart extends Item implements ToolNBT{
@Override
@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.hasTagCompound())
{
if(player.getEntityWorld().isRemote) {
if(item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades");
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -292,9 +291,4 @@ public class ToolPart extends Item implements ToolNBT{
}
}
}
}
}

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -136,13 +137,12 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
@Override
@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.hasTagCompound())
{
if(!item.isEmpty()) {
if (player.getEntityWorld().isRemote) {
if (item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -160,7 +160,6 @@ public class BronzeAxe extends ItemAxe implements ToolNBT {
}
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)

View File

@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -138,12 +139,11 @@ public class BronzeHoe extends ItemHoe implements ToolNBT {
@Override
@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() );
if(item.hasTagCompound()) {
if(item.hasTagCompound())
{
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -160,7 +160,6 @@ public class BronzeHoe extends ItemHoe implements ToolNBT {
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -136,12 +136,11 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
@Override
@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() );
if(item.hasTagCompound()) {
if(item.hasTagCompound())
{
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -158,7 +157,6 @@ public class BronzePickaxe extends ItemPickaxe implements ToolNBT{
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)

View File

@@ -4,6 +4,7 @@ import com.google.common.collect.Sets;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -141,12 +142,11 @@ Item drop;
@Override
@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() );
if(item.hasTagCompound()) {
if(item.hasTagCompound())
{
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (1 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -163,7 +163,6 @@ Item drop;
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)

View File

@@ -3,6 +3,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -276,13 +276,12 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
@Override
@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.hasTagCompound())
{
if(!item.isEmpty()) {
if (player.getEntityWorld().isRemote) {
if (item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -300,7 +299,6 @@ public class CustomAxe extends ItemAxe implements ToolNBT {
}
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)

View File

@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.items.tools;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -20,7 +21,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -273,12 +273,10 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
@Override
@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.hasTagCompound())
{
if(player.getEntityWorld().isRemote) {
if(item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -294,8 +292,6 @@ public class CustomHoe extends ItemHoe implements ToolNBT {
}
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 net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -19,7 +20,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -276,12 +276,11 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
@Override
@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() );
if(item.hasTagCompound()) {
if(item.hasTagCompound())
{
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
@@ -298,7 +297,6 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
@@ -371,7 +369,7 @@ public class CustomPickaxe extends ItemPickaxe implements ToolNBT{
entityLiving.renderBrokenItemStack(stack);
stack.shrink(1);
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 net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -21,7 +22,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.util.ToolNBT;
import javax.annotation.Nullable;
@@ -276,11 +276,10 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
@Override
@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.hasTagCompound())
{
if(player.getEntityWorld().isRemote) {
if(item.hasTagCompound()) {
tooltip.add(ChatFormatting.GRAY + "Upgrades Left: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
@@ -299,9 +298,6 @@ public class CustomShovel extends ItemSpade implements ToolNBT {
}
}
}
@Override
public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer player)
{

View File

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

View File

@@ -25,18 +25,13 @@ import org.lwjgl.opengl.GL11;
/**
* Created by mminaie on 3/5/17.
*/
public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
{
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof AnvilBase) {

View File

@@ -21,8 +21,8 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof BloomeryBase) {

View File

@@ -21,8 +21,8 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof Breaker) {

View File

@@ -19,13 +19,13 @@ import org.lwjgl.opengl.GL11;
/**
* 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();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof CastingBlock) {

View File

@@ -19,13 +19,13 @@ import org.lwjgl.opengl.GL11;
/**
* 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();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof CastingForm) {

View File

@@ -24,8 +24,8 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof Forge) {

View File

@@ -18,14 +18,13 @@ import org.lwjgl.opengl.GL11;
/**
* 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();
@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();
IBlockState state = this.getWorld().getBlockState(pos);
if (state.getBlock() instanceof PistonBellows) {

View File

@@ -1,13 +1,11 @@
package nmd.primal.forgecraft.renders.items;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.IModelCustomData;
import net.minecraftforge.common.model.IModelState;
import java.util.Collection;
@@ -15,8 +13,8 @@ import java.util.Collection;
/**
* 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();
//private final ResourceLocation resourceHead;
//private final ResourceLocation resourceHandle;
@@ -37,7 +35,7 @@ public class ModelPickaxe implements IModel, IModelCustomData {
}
@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;
}

View File

@@ -41,6 +41,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
this.setHeat(100);
}
this.iteration++;
if (this.iteration == 100) {
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 200) {
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 300) {
this.iteration = 0;
//IBlockState state = world.getBlockState(this.pos);
@@ -51,9 +63,11 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
world.notifyBlockUpdate(pos, state, state, 2);
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
slotZeroManager(world);
slotOneManager();
}
}
@@ -103,10 +117,15 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
private void slotZeroManager(World world){
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) {
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 burnModifier = 0;
if(size / 16 <= 1){

View File

@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable;
@@ -14,15 +13,13 @@ import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalStates;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.FireHelper;
import nmd.primal.core.common.helper.NBTHelper;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.util.ToolNBT;
import static nmd.primal.core.common.helper.FireHelper.makeSmoke;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
/**
* Created by mminaie on 11/30/16.
@@ -46,6 +43,20 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
IBlockState aboveState = world.getBlockState(abovePos);
Block block = world.getBlockState(abovePos).getBlock();
if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
if (this.iteration == 100) {
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 200) {
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 300) {
this.iteration = 0;
@@ -55,11 +66,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
this.markDirty();
world.notifyBlockUpdate(pos, state, state, 2);
}
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
makeSmoke(world, pos);
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
}
slotZeroManager(world);
//slotZeroManager(world);
craftingManager();
}
}
@@ -162,10 +176,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
private void craftingManager() {
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());
if (recipe != null) {
NBTTagCompound stackCompound = null;
if(stack.hasTagCompound()){
stackCompound=stack.getTagCompound().copy();
}
if(i == 2){
if (this.getHeat() >= recipe.getHeatThreshold()) {
cookCounter2++;
@@ -174,11 +192,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter2--;
}
if (cookCounter2 >= recipe.getIdealTime()) {
if (NBTHelper.hasTag(stack, "tags")) {
NBTHelper.setBoolean(stack, "hot", true);
} else this.setSlotStack(i, recipe.getOutput());
ItemStack outputStack = recipe.getOutput();
outputStack.setItemDamage(stack.getItemDamage());
if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter2 = 0;
}
}
@@ -190,10 +210,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter3--;
}
if (cookCounter3 >= recipe.getIdealTime()) {
if (NBTHelper.hasTag(stack, "tags")) {
NBTHelper.setBoolean(stack, "hot", true);
} else this.setSlotStack(i, recipe.getOutput());
ItemStack outputStack = recipe.getOutput();
outputStack.setItemDamage(stack.getItemDamage());
if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter3 = 0;
}
@@ -206,12 +229,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter4--;
}
if (cookCounter4 >= recipe.getIdealTime()) {
if (NBTHelper.hasTag(stack, "tags")) {
NBTHelper.setBoolean(stack, "hot", true);
cookCounter4 = 0;
} else this.setSlotStack(i, recipe.getOutput());
ItemStack outputStack = recipe.getOutput();
outputStack.setItemDamage(stack.getItemDamage());
//System.out.println(stackCompound.getCompoundTag("tags"));
if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter4 = 0;
}
}
@@ -223,11 +248,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter5--;
}
if (cookCounter5 >= recipe.getIdealTime()) {
if (NBTHelper.hasTag(stack, "tags")) {
NBTHelper.setBoolean(stack, "hot", true);
} else this.setSlotStack(i, recipe.getOutput());
ItemStack outputStack = recipe.getOutput();
outputStack.setItemDamage(stack.getItemDamage());
if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
cookCounter5 = 0;
}
}
@@ -239,21 +266,16 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
cookCounter6--;
}
if (cookCounter6 >= recipe.getIdealTime()) {
if (NBTHelper.hasTag(stack, "tags")) {
NBTHelper.setBoolean(stack, "hot", true);
} else this.setSlotStack(i, recipe.getOutput());
ItemStack outputStack = recipe.getOutput();
outputStack.setItemDamage(stack.getItemDamage());
if(outputStack.getItem() instanceof ToolPart) {
outputStack.setTagCompound(stackCompound);
outputStack.getSubCompound("tags").setBoolean("hot", true);
}
this.setSlotStack(i, outputStack);
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.util.ITickable;
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.
*/
public class TilePistonBellows extends BaseTile implements ITickable{
private int iteration = 0;
@@ -22,7 +20,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{
if (!world.isRemote) {
World world = this.getWorld();
IBlockState state = world.getBlockState(this.pos);
if (world.getBlockState(this.getPos()).getValue(ACTIVE)) {
if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
iteration++;
if(iteration <= 15){
animateIteration++;
@@ -38,7 +36,7 @@ public class TilePistonBellows extends BaseTile implements ITickable{
if(iteration > 31){
iteration = 0;
animateIteration = 0;
world.setBlockState(this.getPos(), state.withProperty(ACTIVE, false), 3);
world.setBlockState(this.getPos(), state.withProperty(PrimalStates.ACTIVE, false), 3);
}
//System.out.println("Iterating");

View File

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

View File

@@ -2,8 +2,8 @@
"modid": "forgecraft",
"name": "Kitsu's Forgecraft",
"description": "Forged with sweat and blood",
"version": "1.2.74",
"mcversion": "1.11.2",
"version": "1.3.23",
"mcversion": "1.12.0",
"url": "",
"updateUrl": "",
"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'
}
}