preparing for release

This commit is contained in:
Mohammad-Ali Minaie
2017-04-22 20:29:16 -04:00
parent 6b37415e8d
commit d7e858ab42
48 changed files with 307 additions and 369 deletions

View File

@@ -1,20 +1,15 @@
package nmd.primal.forgecraft;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
import java.util.List;
/**
* Created by mminaie on 3/15/17.
*/

View File

@@ -7,7 +7,10 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.items.tools.*;
import nmd.primal.forgecraft.items.tools.CustomAxe;
import nmd.primal.forgecraft.items.tools.CustomHoe;
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
import nmd.primal.forgecraft.items.tools.CustomShovel;
/**
* Created by mminaie on 3/15/17.
@@ -20,7 +23,7 @@ public class CommonEvents implements ToolNBT{
if(!event.player.getEntityWorld().isRemote) {
if (event.crafting.getItem() == ModItems.ironpickaxe) {
if (event.crafting.getItem() instanceof CustomPickaxe) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
@@ -35,7 +38,7 @@ public class CommonEvents implements ToolNBT{
}
}
}
if (event.crafting.getItem() == ModItems.ironaxe) {
if (event.crafting.getItem() instanceof CustomAxe) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
@@ -50,7 +53,7 @@ public class CommonEvents implements ToolNBT{
}
}
}
if (event.crafting.getItem() == ModItems.ironshovel) {
if (event.crafting.getItem() instanceof CustomShovel) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
@@ -68,7 +71,7 @@ public class CommonEvents implements ToolNBT{
}
}
}
if (event.crafting.getItem() == ModItems.ironhoe) {
if (event.crafting.getItem() instanceof CustomHoe) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
@@ -86,7 +89,7 @@ public class CommonEvents implements ToolNBT{
}
}
}
if (event.crafting.getItem() == ModItems.ironaxehead) {
if (event.crafting.getItem() instanceof ToolPart) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
@@ -99,15 +102,6 @@ public class CommonEvents implements ToolNBT{
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
}
}
}
if (event.crafting.getItem() == ModItems.pickaxehead) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
if (a.getItem() instanceof CustomPickaxe) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);
@@ -115,15 +109,6 @@ public class CommonEvents implements ToolNBT{
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
}
}
}
if (event.crafting.getItem() == ModItems.ironshovelhead) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
if (a.getItem() instanceof CustomShovel) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);
@@ -131,15 +116,6 @@ public class CommonEvents implements ToolNBT{
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
event.crafting.setItemDamage(tempDamage);
}
}
}
}
if (event.crafting.getItem() == ModItems.ironhoehead) {
NBTTagCompound tempTag = new NBTTagCompound();
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
if (a.getItem() instanceof CustomHoe) {
tempTag = a.getSubCompound("tags").copy();
event.crafting.getTagCompound().setTag("tags", tempTag);

View File

@@ -2,7 +2,6 @@ package nmd.primal.forgecraft;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -10,7 +9,6 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;

View File

@@ -9,14 +9,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.init.ModEvents;
import nmd.primal.forgecraft.compat.ModDictionary;
import nmd.primal.forgecraft.gui.GuiHandler;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModCrafting;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModTiles;
import nmd.primal.forgecraft.init.*;
import nmd.primal.forgecraft.proxy.CommonProxy;
//import nmd.primal.forgecraft.common.init.*;

View File

@@ -4,7 +4,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
//import nmd.primal.forgecraft.Item.ModItems;

View File

@@ -11,7 +11,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -24,13 +23,13 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModMaterials;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.items.ForgeHammer;
import nmd.primal.forgecraft.items.parts.ToolPart;
@@ -110,7 +109,7 @@ public class Anvil extends CustomContainerFacing {
if(this.getRegistryName().toString().equals("stoneanvil")){
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()) != ModMaterials.TOOL_WROUGHT_IRON ) {
if(((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON ) {
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(PrimalItems.ROCK_STONE, 3));
CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.ironball, 1));

View File

@@ -9,7 +9,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
/**
* Created by mminaie on 2/6/17.

View File

@@ -10,10 +10,8 @@ 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.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;

View File

@@ -1,7 +1,5 @@
package nmd.primal.forgecraft.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
@@ -11,10 +9,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
@@ -28,14 +23,6 @@ import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.init.ModMaterials;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.items.ForgeHammer;
import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.tiles.TileAnvil;
import nmd.primal.forgecraft.tiles.TileBreaker;
import java.util.concurrent.ThreadLocalRandom;

View File

@@ -106,6 +106,18 @@ public class Crucible extends Block {
if(name.equals("tile.rawcleanironcrucible")){
string = this.getUnlocalizedName();
}
if(name.equals("tile.coolsteelcrucible")){
string = this.getUnlocalizedName();
}
if(name.equals("tile.rawsteelcrucible")){
string = this.getUnlocalizedName();
}
if(name.equals("tile.coolwootzcrucible")){
string = this.getUnlocalizedName();
}
if(name.equals("tile.rawwootzcrucible")){
string = this.getUnlocalizedName();
}
return string;
}
@@ -119,6 +131,14 @@ public class Crucible extends Block {
return Item.getItemFromBlock(ModBlocks.ironcleanball);
} else if (name.equals("tile.rawcleanironcrucible")){
return PrimalItems.IRON_DUST;
} else if (name.equals("tile.coolsteelcrucible")){
return Item.getItemFromBlock(ModBlocks.steelball);
} else if (name.equals("tile.rawsteelcrucible")){
return Item.getItemFromBlock(ModBlocks.ironcleanball);
} else if (name.equals("tile.coolwootzcrucible")){
return Item.getItemFromBlock(ModBlocks.wootzball);
} else if (name.equals("tile.rawcleanironcrucible")){
return PrimalItems.GOLDEN_STICK;
}
else return Items.AIR;
}

View File

@@ -7,7 +7,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.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
@@ -19,14 +18,10 @@ 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.ModBlocks;
import nmd.primal.forgecraft.tiles.TileBaseCrucible;
import org.apache.commons.lang3.StringUtils;
import java.util.Random;
import static nmd.primal.forgecraft.CommonUtils.spawnItemEntityFromWorld;
/**
* Created by mminaie on 2/4/17.
*/

View File

@@ -11,10 +11,8 @@ 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.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
@@ -26,12 +24,9 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
//import nmd.primal.core.api.PrimalBlocks;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.PrimalCore;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.tiles.TileForge;
@@ -41,6 +36,8 @@ import java.util.concurrent.ThreadLocalRandom;
import static nmd.primal.core.common.helper.CommonUtils.makeSmoke;
//import nmd.primal.core.api.PrimalBlocks;
/**
* Created by kitsu on 11/26/2016.

View File

@@ -7,20 +7,13 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;

View File

@@ -17,7 +17,6 @@ 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.api.ForgecraftSounds;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.tiles.TileBloomery;

View File

@@ -1,8 +1,5 @@
package nmd.primal.forgecraft.compat;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import nmd.primal.forgecraft.init.ModBlocks;

View File

@@ -1,15 +1,9 @@
package nmd.primal.forgecraft.crafting;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
import static javax.swing.UIManager.put;
/**
* Created by mminaie on 3/5/17.

View File

@@ -1,7 +1,5 @@
package nmd.primal.forgecraft.crafting;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

View File

@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.enumhandler;
import net.minecraft.util.IStringSerializable;
import nmd.primal.forgecraft.util.IMetaLookup;
/**

View File

@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;

View File

@@ -12,20 +12,15 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
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.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.blocks.PrimalBlock;
import nmd.primal.core.common.items.tools.WorkMallet;
import nmd.primal.forgecraft.CommonUtils;
import nmd.primal.forgecraft.blocks.*;
import nmd.primal.forgecraft.items.ForgeHammer;
import nmd.primal.forgecraft.items.blocks.ItemBlockIngotBall;
import nmd.primal.forgecraft.tiles.TileAnvil;
/**
@@ -116,22 +111,22 @@ public class ModBlocks {
failedironcruciblehot = new CrucibleHot(Material.ROCK, "failedironcruciblehot");
rawcleanironcrucible = new Crucible(Material.ROCK, "rawcleanironcrucible");
hotcleanironcrucible = new Crucible(Material.ROCK, "hotcleanironcrucible");
hotcookedcleanironcrucible = new Crucible(Material.ROCK, "hotcookedcleanironcrucible");
hotcleanironcrucible = new CrucibleHot(Material.ROCK, "hotcleanironcrucible");
hotcookedcleanironcrucible = new CrucibleHot(Material.ROCK, "hotcookedcleanironcrucible");
coolcleanironcrucible = new Crucible(Material.ROCK, "coolcleanironcrucible");
failedcleanironcrucible = new Crucible(Material.ROCK, "failedcleanironcrucible");
failedcleanironcruciblehot = new Crucible(Material.ROCK, "failedcleanironcruciblehot");
rawsteelcrucible = new Crucible(Material.ROCK, "rawsteelcrucible");
hotsteelcrucible = new Crucible(Material.ROCK, "hotsteelcrucible");
hotcookedsteelcrucible = new Crucible(Material.ROCK, "hotcookedsteelcrucible");
hotsteelcrucible = new CrucibleHot(Material.ROCK, "hotsteelcrucible");
hotcookedsteelcrucible = new CrucibleHot(Material.ROCK, "hotcookedsteelcrucible");
coolsteelcrucible = new Crucible(Material.ROCK, "coolsteelcrucible");
failedsteelcrucible = new Crucible(Material.ROCK, "failedsteelcrucible");
failedsteelcruciblehot = new Crucible(Material.ROCK, "failedsteelcruciblehot");
rawwootzcrucible = new Crucible(Material.ROCK, "rawwootzcrucible");
hotwootzcrucible = new Crucible(Material.ROCK, "hotwootzcrucible");
hotcookedwootzcrucible = new Crucible(Material.ROCK, "hotcookedwootzcrucible");
hotwootzcrucible = new CrucibleHot(Material.ROCK, "hotwootzcrucible");
hotcookedwootzcrucible = new CrucibleHot(Material.ROCK, "hotcookedwootzcrucible");
coolwootzcrucible = new Crucible(Material.ROCK, "coolwootzcrucible");
failedwootzcrucible = new Crucible(Material.ROCK, "failedwootzcrucible");
failedwootzcruciblehot = new Crucible(Material.ROCK, "failedwootzcruciblehot");

View File

@@ -1,29 +1,18 @@
package nmd.primal.forgecraft.init;
import net.minecraft.block.properties.PropertyBool;
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.SoundEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import nmd.primal.core.api.PrimalBlocks;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalSounds;
import nmd.primal.core.common.crafting.ToolRecipe;
import nmd.primal.core.common.items.tools.PrimalTool;
import nmd.primal.forgecraft.blocks.Bloomery;
import nmd.primal.forgecraft.blocks.IngotBall;
import nmd.primal.forgecraft.crafting.AnvilCrafting;
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
/**
* Created by kitsu on 11/30/2016.
@@ -96,69 +85,82 @@ public class ModCrafting {
('Y'), ModBlocks.emptycrucible));
/***Pickaxe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironpickaxe), "T", "C", "S",
('T'), ModItems.pickaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.pickaxehead, 1, OreDictionary.WILDCARD_VALUE), //new ItemStack( 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironpickaxe), "T", "C", "S",
('T'), ModItems.cleanironpickaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.cleanironpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelpickaxe), "T", "C", "S",
('T'), ModItems.steelpickaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.steelpickaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_PICKAXE), "T", "S",
('T'), ModItems.pickaxehead,
('S'), Items.STICK));
//placeholder wootz
/***Axe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironaxe), "T", "C", "S",
('T'), ModItems.ironaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.ironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironaxe), "T", "C", "S",
('T'), ModItems.cleanironaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.cleanironaxehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelaxe), "T", "C", "S",
('T'), ModItems.steelaxehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.steelaxehead,1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//wootz placeholder
//TODO wootz placeholder
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_AXE), "T", "S",
('T'), ModItems.ironaxehead,
('S'), Items.STICK));
/***Shovel Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironshovel), "T", "C", "S",
('T'), ModItems.ironshovelhead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.ironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironshovel), "T", "C", "S",
('T'), ModItems.cleanironshovelhead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.cleanironshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelshovel), "T", "C", "S",
('T'), ModItems.steelshovelhead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.steelshovelhead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//placed holder for wootz
//TODO placed holder for wootz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_SHOVEL), "T", "S",
('T'), ModItems.ironshovelhead,
('S'), Items.STICK));
/***Hoe Crafting***/
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ironhoe), "T", "C", "S",
('T'), ModItems.ironhoehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.ironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cleanironhoe), "T", "C", "S",
('T'), ModItems.cleanironhoehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.cleanironhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.steelhoe), "T", "C", "S",
('T'), ModItems.steelhoehead,
('S'), "stickWood",
('T'), new ItemStack(ModItems.steelhoehead, 1, OreDictionary.WILDCARD_VALUE),
('S'), PrimalItems.LACQUER_STICK,
('C'), "cordageGeneral"));
//PLACE HOLDER FOR WOOTZ STEEL
//TODO PLACE HOLDER FOR WOOTZ STEEL
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_HOE), "T", "S",
('T'), ModItems.ironhoehead,
('S'), Items.STICK));
/***************************************************************

View File

@@ -3,9 +3,6 @@ package nmd.primal.forgecraft.init;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.PrimalCore;
import nmd.primal.core.common.init.ModConfig;
import nmd.primal.forgecraft.ClientEvents;
import nmd.primal.forgecraft.CommonEvents;
/**

View File

@@ -4,31 +4,23 @@ 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.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
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.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalMaterials;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.blocks.IngotBall;
import nmd.primal.forgecraft.enumhandler.EnumHandler;
import nmd.primal.forgecraft.items.*;
import nmd.primal.forgecraft.items.parts.ToolPart;
import nmd.primal.forgecraft.items.tools.*;
import nmd.primal.forgecraft.items.tools.CustomAxe;
import nmd.primal.forgecraft.items.tools.CustomHoe;
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
import nmd.primal.forgecraft.items.tools.CustomShovel;
import nmd.primal.forgecraft.items.weapons.CustomSword;
import nmd.primal.forgecraft.items.weapons.Musket;
import nmd.primal.forgecraft.util.ToolMaterials;
import nmd.primal.forgecraft.items.tools.BaseTool.ForgeToolMaterial;
/**
* Created by kitsu on 11/26/2016.
@@ -114,67 +106,67 @@ public class ModItems {
/**********
TOOL PARTS
**********/
pickaxehead = new ToolPart("ironpickaxehead", ModMaterials.TOOL_WROUGHT_IRON);
ironaxehead = new ToolPart("ironaxehead", ModMaterials.TOOL_WROUGHT_IRON);
ironshovelhead = new ToolPart("ironshovelhead", ModMaterials.TOOL_WROUGHT_IRON);
ironhoehead = new ToolPart("ironhoehead", ModMaterials.TOOL_WROUGHT_IRON);
pickaxehead = new ToolPart("ironpickaxehead", PrimalMaterials.TOOL_WROUGHT_IRON);
ironaxehead = new ToolPart("ironaxehead", PrimalMaterials.TOOL_WROUGHT_IRON);
ironshovelhead = new ToolPart("ironshovelhead", PrimalMaterials.TOOL_WROUGHT_IRON);
ironhoehead = new ToolPart("ironhoehead", PrimalMaterials.TOOL_WROUGHT_IRON);
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", ModMaterials.CLEAN_IRON);
cleanironaxehead = new ToolPart("cleanironaxehead", ModMaterials.CLEAN_IRON);
cleanironshovelhead = new ToolPart("cleanironshovelhead", ModMaterials.CLEAN_IRON);
cleanironhoehead = new ToolPart("cleanironhoehead", ModMaterials.CLEAN_IRON);
cleanironpickaxehead = new ToolPart("cleanironpickaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironaxehead = new ToolPart("cleanironaxehead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironshovelhead = new ToolPart("cleanironshovelhead", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironhoehead = new ToolPart("cleanironhoehead", PrimalMaterials.TOOL_CLEAN_IRON);
steelpickaxehead = new ToolPart("steelpickaxehead", ModMaterials.BASIC_STEEL);
steelaxehead = new ToolPart("steelaxehead", ModMaterials.BASIC_STEEL);
steelshovelhead = new ToolPart("steelshovelhead", ModMaterials.BASIC_STEEL);
steelhoehead = new ToolPart("steelhoehead", ModMaterials.BASIC_STEEL);
steelpickaxehead = new ToolPart("steelpickaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
steelaxehead = new ToolPart("steelaxehead", PrimalMaterials.TOOL_BASIC_STEEL);
steelshovelhead = new ToolPart("steelshovelhead", PrimalMaterials.TOOL_BASIC_STEEL);
steelhoehead = new ToolPart("steelhoehead", PrimalMaterials.TOOL_BASIC_STEEL);
wootzpickaxehead = new ToolPart("wootzpickaxehead", ModMaterials.WOOTZ_STEEL);
wootzaxehead = new ToolPart("wootzaxehead", ModMaterials.WOOTZ_STEEL);
wootzshovelhead = new ToolPart("wootzshovelhead", ModMaterials.WOOTZ_STEEL);
wootzhoehead = new ToolPart("wootzhoehead", ModMaterials.WOOTZ_STEEL);
wootzpickaxehead = new ToolPart("wootzpickaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzaxehead = new ToolPart("wootzaxehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzshovelhead = new ToolPart("wootzshovelhead", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzhoehead = new ToolPart("wootzhoehead", PrimalMaterials.TOOL_WOOTZ_STEEL);
/**********
TOOLS
**********/
ironpickaxe = new CustomPickaxe("ironpickaxe", ModMaterials.TOOL_WROUGHT_IRON);
ironaxe = new CustomAxe("ironaxe", ModMaterials.TOOL_WROUGHT_IRON);
ironshovel = new CustomShovel("ironshovel", ModMaterials.TOOL_WROUGHT_IRON);
ironhoe = new CustomHoe("ironhoe", ModMaterials.TOOL_WROUGHT_IRON);
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
ironaxe = new CustomAxe("ironaxe", PrimalMaterials.TOOL_WROUGHT_IRON);
ironshovel = new CustomShovel("ironshovel", PrimalMaterials.TOOL_WROUGHT_IRON);
ironhoe = new CustomHoe("ironhoe", PrimalMaterials.TOOL_WROUGHT_IRON);
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", ModMaterials.CLEAN_IRON);
cleanironaxe = new CustomAxe("cleanironaxe", ModMaterials.CLEAN_IRON);
cleanironshovel = new CustomShovel("cleanironshovel", ModMaterials.CLEAN_IRON);
cleanironhoe = new CustomHoe("cleanironhoe", ModMaterials.CLEAN_IRON);
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironaxe = new CustomAxe("cleanironaxe", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironshovel = new CustomShovel("cleanironshovel", PrimalMaterials.TOOL_CLEAN_IRON);
cleanironhoe = new CustomHoe("cleanironhoe", PrimalMaterials.TOOL_CLEAN_IRON);
steelpickaxe = new CustomPickaxe("steelpickaxe", ModMaterials.BASIC_STEEL);
steelaxe = new CustomAxe("steelaxe", ModMaterials.BASIC_STEEL);
steelshovel = new CustomShovel("steelshovel", ModMaterials.BASIC_STEEL);
steelhoe = new CustomHoe("steelhoe", ModMaterials.BASIC_STEEL);
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalMaterials.TOOL_BASIC_STEEL);
steelaxe = new CustomAxe("steelaxe", PrimalMaterials.TOOL_BASIC_STEEL);
steelshovel = new CustomShovel("steelshovel", PrimalMaterials.TOOL_BASIC_STEEL);
steelhoe = new CustomHoe("steelhoe", PrimalMaterials.TOOL_BASIC_STEEL);
wootzpickaxe = new CustomPickaxe("wootzpickaxe", ModMaterials.WOOTZ_STEEL);
wootzaxe = new CustomAxe("wootzaxe", ModMaterials.WOOTZ_STEEL);
wootzshovel = new CustomShovel("wootzshovel", ModMaterials.WOOTZ_STEEL);
wootzhoe = new CustomHoe("wootzhoe", ModMaterials.WOOTZ_STEEL);
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzaxe = new CustomAxe("wootzaxe", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzshovel = new CustomShovel("wootzshovel", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzhoe = new CustomHoe("wootzhoe", PrimalMaterials.TOOL_WOOTZ_STEEL);
/**********
WEAPONS
**********/
ironsword = new CustomSword("ironsword", ModMaterials.TOOL_WROUGHT_IRON);
cleanironsword = new CustomSword("ironsword", ModMaterials.CLEAN_IRON);
steelsword = new CustomSword("ironsword", ModMaterials.BASIC_STEEL);
wootzsword = new CustomSword("ironsword", ModMaterials.WOOTZ_STEEL);
ironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WROUGHT_IRON);
cleanironsword = new CustomSword("ironsword", PrimalMaterials.TOOL_CLEAN_IRON);
steelsword = new CustomSword("ironsword", PrimalMaterials.TOOL_BASIC_STEEL);
wootzsword = new CustomSword("ironsword", PrimalMaterials.TOOL_WOOTZ_STEEL);
/**********
INGOTS AND CHUNKS
**********/
ironingotballhot = new BaseMultiItem("ironingothot", ModMaterials.TOOL_WROUGHT_IRON);
ironchunkhot = new BaseMultiItem("ironchunkhot", ModMaterials.TOOL_WROUGHT_IRON);
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", ModMaterials.CLEAN_IRON);
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", ModMaterials.CLEAN_IRON);
steelingotballhot= new BaseMultiItem("steelingotballhot", ModMaterials.BASIC_STEEL);
steelchunkhot= new BaseMultiItem("steelchunkhot", ModMaterials.BASIC_STEEL);
wootzingotballhot= new BaseMultiItem("wootzingotballhot", ModMaterials.WOOTZ_STEEL);
wootzchunkhot= new BaseMultiItem("wootzchunkhot", ModMaterials.WOOTZ_STEEL);
ironingotballhot = new BaseMultiItem("ironingothot", PrimalMaterials.TOOL_WROUGHT_IRON);
ironchunkhot = new BaseMultiItem("ironchunkhot", PrimalMaterials.TOOL_WROUGHT_IRON);
ironcleaningotballhot= new BaseMultiItem("ironcleaningotballhot", PrimalMaterials.TOOL_CLEAN_IRON);
ironcleanchunkhot= new BaseMultiItem("ironcleanchunkhot", PrimalMaterials.TOOL_CLEAN_IRON);
steelingotballhot= new BaseMultiItem("steelingotballhot", PrimalMaterials.TOOL_BASIC_STEEL);
steelchunkhot= new BaseMultiItem("steelchunkhot", PrimalMaterials.TOOL_BASIC_STEEL);
wootzingotballhot= new BaseMultiItem("wootzingotballhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
wootzchunkhot= new BaseMultiItem("wootzchunkhot", PrimalMaterials.TOOL_WOOTZ_STEEL);
//forgingmanual = new ItemForgingManual();
//test = new ItemTest("ironsword");

View File

@@ -1,15 +0,0 @@
package nmd.primal.forgecraft.init;
import net.minecraft.item.Item;
import net.minecraftforge.common.util.EnumHelper;
/**
* Created by mminaie on 3/30/17.
*/
public class ModMaterials {
public static Item.ToolMaterial TOOL_WROUGHT_IRON = EnumHelper.addToolMaterial("wroughtiron", 2, 500, 4.0F, 1.0F, 0);
public static Item.ToolMaterial CLEAN_IRON = EnumHelper.addToolMaterial("cleaniron", 2, 700, 6.0F, 3.0F, 0);
public static Item.ToolMaterial BASIC_STEEL = EnumHelper.addToolMaterial("steelbasic", 3, 900, 8.0F, 5.0F, 0);
public static Item.ToolMaterial WOOTZ_STEEL = EnumHelper.addToolMaterial("wootzsteel", 3, 1100, 10.0F, 7.0F, 0);
}

View File

@@ -3,9 +3,7 @@ package nmd.primal.forgecraft.init;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.api.ForgecraftSounds;
/**
* Created by mminaie on 3/24/17.

View File

@@ -1,7 +1,6 @@
package nmd.primal.forgecraft.items;
import net.minecraft.item.Item;
import nmd.primal.forgecraft.items.BaseItem;
/**
* Created by mminaie on 2/19/17.

View File

@@ -8,8 +8,6 @@ import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
import nmd.primal.forgecraft.ForgeCraft;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.gui.GuiHandler;
import sun.applet.Main;
/**
* Created by mminaie on 2/4/17.

View File

@@ -1,6 +1,5 @@
package nmd.primal.forgecraft.items;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@@ -8,7 +7,9 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.*;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
@@ -318,7 +319,7 @@ public class ItemStoneTongs extends Item {
itemstack.getTagCompound().setInteger("type", 0);
return EnumActionResult.SUCCESS;
case 13:
world.setBlockState(tempPos, ModBlocks.hotcookedcleanironcrucible.getDefaultState(), 3);
world.setBlockState(tempPos, ModBlocks.hotcookedcleanironcrucible.getDefaultState(), 2);
TileBaseCrucible tileCrucible13 = (TileBaseCrucible) world.getTileEntity(tempPos);
tileCrucible13.countdown = itemstack.getTagCompound().getInteger("cooldown");
itemstack.getTagCompound().setInteger("cooldown", 0);
@@ -388,45 +389,56 @@ public class ItemStoneTongs extends Item {
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.emptycruciblehot))) {
itemstack.getTagCompound().setInteger("type", 1);
itemstack.getTagCompound().setInteger("cooldown", 0);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.emptycruciblecrackedhot))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 2);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotironcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 3);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotcookedironcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 4);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.failedironcruciblehot))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 5);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotcleanironcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 12);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotcookedcleanironcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 13);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.failedcleanironcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 14);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotsteelcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 21);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.hotcookedsteelcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 22);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;
} else if (tile.getSlotStack(1).getItem().equals(Item.getItemFromBlock(ModBlocks.failedsteelcrucible))) {
itemstack.getTagCompound().setInteger("cooldown", 0);
itemstack.getTagCompound().setInteger("type", 23);
tile.setSlotStack(1, ItemStack.EMPTY);
return EnumActionResult.SUCCESS;

View File

@@ -1,19 +1,5 @@
package nmd.primal.forgecraft.items;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.ItemFishingRod;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import javax.annotation.Nullable;
/**
* Created by kitsu on 11/26/2016.
*/

View File

@@ -5,8 +5,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;

View File

@@ -14,8 +14,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.ToolNBT;
import nmd.primal.forgecraft.enumhandler.EnumHandler;
import nmd.primal.forgecraft.items.tools.BaseTool;
import javax.annotation.Nullable;
import java.util.List;
@@ -197,6 +195,12 @@ public class ToolPart extends Item implements ToolNBT{
(getLapisLevel(item) == 2) ) {
return 0.0102F;
}
if ( (getEmerald(item) == false) &&
(getDiamondLevel(item) == 0) &&
(getRedstoneLevel(item) == 1) &&
(getLapisLevel(item) == 1) ) {
return 0.0011F;
}
}
}
if (getHot(item) == true) {

View File

@@ -5,10 +5,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import nmd.primal.forgecraft.enumhandler.EnumHandler;
import java.util.Set;

View File

@@ -14,7 +14,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.enumhandler.EnumHandler;
import java.util.Set;

View File

@@ -1,7 +1,6 @@
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.enchantment.Enchantment;
import net.minecraft.entity.Entity;

View File

@@ -1,24 +1,17 @@
package nmd.primal.forgecraft.items.tools;
import com.google.common.collect.Sets;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentDigging;
import net.minecraft.enchantment.EnchantmentUntouching;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -26,7 +19,6 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.ToolNBT;
import nmd.primal.forgecraft.enumhandler.EnumHandler;
import javax.annotation.Nullable;
import java.util.List;

View File

@@ -3,7 +3,6 @@ package nmd.primal.forgecraft.items.tools;
import com.google.common.collect.Sets;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;

View File

@@ -1,9 +1,11 @@
package nmd.primal.forgecraft.items.weapons;
import net.minecraft.block.BlockDispenser;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.*;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
import net.minecraft.item.ItemShield;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;

View File

@@ -6,7 +6,6 @@ import net.minecraft.item.ItemSword;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.ToolNBT;
/**
* Created by mminaie on 3/23/17.

View File

@@ -2,13 +2,10 @@ package nmd.primal.forgecraft.items.weapons;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.EnumAction;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;

View File

@@ -11,19 +11,14 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.init.Items;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems;
import nmd.primal.forgecraft.blocks.Anvil;
import nmd.primal.forgecraft.blocks.IngotBall;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.items.BaseMultiItem;
import nmd.primal.forgecraft.tiles.TileAnvil;
import nmd.primal.forgecraft.tiles.TileBloomery;
import org.lwjgl.opengl.GL11;
/**
@@ -49,8 +44,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
float prevLGTX = OpenGlHelper.lastBrightnessX;
float prevLGTY = OpenGlHelper.lastBrightnessY;
BlockPos pos = tile.getPos();
IBlockState state = this.getWorld().getBlockState(pos);
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
@@ -93,13 +91,13 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
for(int i=0; i < 5; i++){
for(int a=0; a<5; a++){
if(!tile.getSlotStack(counter).isEmpty()){
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
(tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) ||
tile.getSlotStack(counter).getItem().equals(Items.EMERALD)
Item item = tile.getSlotStack(counter).getItem();
if(item.equals(Items.REDSTONE) ||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
item.equals(PrimalItems.EMERALD_KNAPP) ||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
item.equals(Items.DIAMOND) ||
item.equals(Items.EMERALD)
){
GL11.glPushMatrix();
@@ -109,7 +107,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.pickaxehead)){
if(item.equals(ModItems.pickaxehead) ||
item.equals(ModItems.cleanironpickaxehead) ||
item.equals(ModItems.steelpickaxehead) ||
item.equals(ModItems.wootzpickaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -117,7 +119,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironaxehead)){
if(item.equals(ModItems.ironaxehead) ||
item.equals(ModItems.cleanironaxehead) ||
item.equals(ModItems.steelaxehead) ||
item.equals(ModItems.wootzaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -126,7 +132,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironshovelhead)){
if(item.equals(ModItems.ironshovelhead) ||
item.equals(ModItems.cleanironshovelhead) ||
item.equals(ModItems.steelshovelhead) ||
item.equals(ModItems.steelshovelhead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -135,7 +145,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironhoehead)){
if(item.equals(ModItems.ironhoehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -144,7 +154,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(Block.getBlockFromItem(tile.getSlotStack(counter).getItem()) instanceof IngotBall){
if(Block.getBlockFromItem(item) instanceof IngotBall){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -152,7 +162,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() instanceof BaseMultiItem){
if(item instanceof BaseMultiItem){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -171,13 +181,13 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
for(int i=0; i < 5; i++){
for(int a=0; a<5; a++){
if(!tile.getSlotStack(counter).isEmpty()){
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
(tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) ||
tile.getSlotStack(counter).getItem().equals(Items.EMERALD)
Item item = tile.getSlotStack(counter).getItem();
if(item.equals(Items.REDSTONE) ||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
item.equals(PrimalItems.EMERALD_KNAPP) ||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
item.equals(Items.DIAMOND) ||
item.equals(Items.EMERALD)
){
GL11.glPushMatrix();
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getReverseZ(i) );
@@ -186,7 +196,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.pickaxehead)){
if(item.equals(ModItems.pickaxehead) ||
item.equals(ModItems.cleanironpickaxehead) ||
item.equals(ModItems.steelpickaxehead) ||
item.equals(ModItems.wootzpickaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -194,7 +208,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironaxehead)){
if(item.equals(ModItems.ironaxehead) ||
item.equals(ModItems.cleanironaxehead) ||
item.equals(ModItems.steelaxehead) ||
item.equals(ModItems.wootzaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -203,7 +221,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironshovelhead)){
if(item.equals(ModItems.ironshovelhead) ||
item.equals(ModItems.cleanironshovelhead) ||
item.equals(ModItems.steelshovelhead) ||
item.equals(ModItems.steelshovelhead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -212,7 +234,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironhoehead)){
if(item.equals(ModItems.ironhoehead) ||
item.equals(ModItems.cleanironhoehead) ||
item.equals(ModItems.steelhoehead) ||
item.equals(ModItems.wootzhoehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -221,7 +247,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(Block.getBlockFromItem(tile.getSlotStack(counter).getItem()) instanceof IngotBall){
if(Block.getBlockFromItem(item) instanceof IngotBall){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -229,7 +255,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() instanceof BaseMultiItem){
if(item instanceof BaseMultiItem){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -248,13 +274,13 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
for(int a=0; a < 5; a++){
for(int i=0; i<5; i++){
if(!tile.getSlotStack(counter).isEmpty()){
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
(tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) ||
tile.getSlotStack(counter).getItem().equals(Items.EMERALD)
Item item = tile.getSlotStack(counter).getItem();
if(item.equals(Items.REDSTONE) ||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
item.equals(PrimalItems.EMERALD_KNAPP) ||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
item.equals(Items.DIAMOND) ||
item.equals(Items.EMERALD)
){
GL11.glPushMatrix();
GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getReverseZ(i) );
@@ -264,7 +290,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.pickaxehead)){
if(item.equals(ModItems.pickaxehead) ||
item.equals(ModItems.cleanironpickaxehead) ||
item.equals(ModItems.steelpickaxehead) ||
item.equals(ModItems.wootzpickaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -273,7 +303,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironaxehead)){
if(item.equals(ModItems.ironaxehead) ||
item.equals(ModItems.cleanironaxehead) ||
item.equals(ModItems.steelaxehead) ||
item.equals(ModItems.wootzaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -282,7 +316,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironshovelhead)){
if(item.equals(ModItems.ironshovelhead) ||
item.equals(ModItems.cleanironshovelhead) ||
item.equals(ModItems.steelshovelhead) ||
item.equals(ModItems.steelshovelhead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -291,7 +329,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironhoehead)){
if(item.equals(ModItems.ironhoehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -300,7 +338,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(Block.getBlockFromItem(tile.getSlotStack(counter).getItem()) instanceof IngotBall){
if(Block.getBlockFromItem(item) instanceof IngotBall){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -308,7 +346,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() instanceof BaseMultiItem){
if(item instanceof BaseMultiItem){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -326,14 +364,13 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
for(int a=0; a < 5; a++){
for(int i=0; i<5; i++){
if(!tile.getSlotStack(counter).isEmpty()){
//GL11.glTranslated( tile.getReverseX(a), 0.0D, tile.getNormalZ(i) );
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
(tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(Items.DIAMOND) ||
tile.getSlotStack(counter).getItem().equals(Items.EMERALD)
Item item = tile.getSlotStack(counter).getItem();
if(item.equals(Items.REDSTONE) ||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
item.equals(PrimalItems.EMERALD_KNAPP) ||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
item.equals(Items.DIAMOND) ||
item.equals(Items.EMERALD)
){
GL11.glPushMatrix();
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getNormalZ(i) );
@@ -344,7 +381,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.pickaxehead)){
if(item.equals(ModItems.pickaxehead) ||
item.equals(ModItems.cleanironpickaxehead) ||
item.equals(ModItems.steelpickaxehead) ||
item.equals(ModItems.wootzpickaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -353,7 +394,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironaxehead)){
if(item.equals(ModItems.ironaxehead) ||
item.equals(ModItems.cleanironaxehead) ||
item.equals(ModItems.steelaxehead) ||
item.equals(ModItems.wootzaxehead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -362,7 +407,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironshovelhead)){
if(item.equals(ModItems.ironshovelhead) ||
item.equals(ModItems.cleanironshovelhead) ||
item.equals(ModItems.steelshovelhead) ||
item.equals(ModItems.steelshovelhead)
){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -371,7 +420,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironhoehead)){
if(item.equals(ModItems.ironhoehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -380,7 +429,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(Block.getBlockFromItem(tile.getSlotStack(counter).getItem()) instanceof IngotBall){
if(Block.getBlockFromItem(item) instanceof IngotBall){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -388,7 +437,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() instanceof BaseMultiItem){
if(item instanceof BaseMultiItem){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -407,10 +456,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
}
private void doRendering(TileAnvil tile, Integer counter, Integer i, Integer a){
if(tile.getSlotStack(counter).getItem().equals(Items.REDSTONE) ||
(tile.getSlotStack(counter).getItem().equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.EMERALD_KNAPP) ||
tile.getSlotStack(counter).getItem().equals(PrimalItems.DIAMOND_KNAPP)
Item item = tile.getSlotStack(counter).getItem();
if(item.equals(Items.REDSTONE) ||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
item.equals(PrimalItems.EMERALD_KNAPP) ||
item.equals(PrimalItems.DIAMOND_KNAPP)
){
GL11.glPushMatrix();
@@ -420,7 +470,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.pickaxehead)){
if(item.equals(ModItems.pickaxehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -428,7 +478,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironaxehead)){
if(item.equals(ModItems.ironaxehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -437,7 +487,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironshovelhead)){
if(item.equals(ModItems.ironshovelhead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -446,7 +496,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem().equals(ModItems.ironhoehead)){
if(item.equals(ModItems.ironhoehead)){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -455,7 +505,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() == ModItems.ironingotballhot ){
if(item == ModItems.ironingotballhot ){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);
@@ -463,7 +513,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
if(tile.getSlotStack(counter).getItem() == ModItems.ironchunkhot){
if(item == ModItems.ironchunkhot){
GL11.glPushMatrix();
double scale = 1.0D;
GL11.glScaled(scale, scale, scale);

View File

@@ -7,16 +7,10 @@ import net.minecraft.client.renderer.RenderItem;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import nmd.primal.forgecraft.blocks.Breaker;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.tiles.TileBreaker;
import nmd.primal.forgecraft.tiles.TileForge;
import org.lwjgl.opengl.GL11;
/**

View File

@@ -2,7 +2,6 @@ package nmd.primal.forgecraft.tiles;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ITickable;
import net.minecraft.world.World;

View File

@@ -3,18 +3,18 @@ package nmd.primal.forgecraft.tiles;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.ParticleHelper;
import nmd.primal.forgecraft.blocks.Bloomery;
import nmd.primal.forgecraft.blocks.Crucible;
import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.crafting.BloomeryCrafting;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
@@ -117,6 +117,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
this.markDirty();
this.updateBlock();
}
CommonUtils.makeSmoke(world, pos);
}
}

View File

@@ -1,14 +1,8 @@
package nmd.primal.forgecraft.tiles;
import net.minecraft.block.state.IBlockState;
import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import java.util.List;
/**
* Created by mminaie on 4/9/17.

View File

@@ -1,22 +1,18 @@
package nmd.primal.forgecraft.tiles;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFurnace;
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.tileentity.TileEntityFurnace;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.blocks.IngotBall;
import nmd.primal.forgecraft.crafting.ForgeCrafting;
import org.omg.PortableInterceptor.ACTIVE;
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
@@ -52,17 +48,7 @@ public class TileForge extends TileBaseSlot implements ITickable {
this.markDirty();
world.notifyBlockUpdate(pos, state, state, 2);
}
if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(getVanillaItemBurnTime(this.getSlotStack(0)) / 20);
if(decrInt == 0) {
decrInt = 1;
}
if (world.rand.nextInt(decrInt) == 0) {
this.decrStackSize(0, 1);
this.markDirty();
this.updateBlock();
}
}
slotZeroManager(world);
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
}
@@ -70,6 +56,26 @@ public class TileForge extends TileBaseSlot implements ITickable {
}
}
private void slotZeroManager(World world){
if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(getVanillaItemBurnTime(this.getSlotStack(0)) / 20);
if(decrInt == 0) {
decrInt = 1;
}
if (world.rand.nextInt(decrInt) == 0) {
this.decrStackSize(0, 1);
this.markDirty();
this.updateBlock();
}
if (this.getSlotStack(0).getCount() == 1){
this.decrStackSize(0, 1);
this.markDirty();
this.updateBlock();
}
CommonUtils.makeSmoke(world, pos);
}
}
private void heatManager(Integer h, IBlockState state, ItemStack stack, World world, BlockPos pos){
if(state.getValue(Forge.ACTIVE) == true){
if(!stack.isEmpty()) {

View File

@@ -1,7 +1,5 @@
package nmd.primal.forgecraft.util;
import net.minecraft.item.ItemStack;
/**
* Created by mminaie on 3/29/17.
*/

View File

@@ -0,0 +1,8 @@
{
"parent": "forgecraft:item/pickaxehead",
"textures": {
"particle": "forgecraft:items/steel_ingot",
"texture": "blocks/planks_oak",
"texture1": "forgecraft:items/steel_ingot_redstone1_lapis1"
}
}

View File

@@ -11,6 +11,7 @@
{"predicate": {"type": 0.0002},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_14"},
{"predicate": {"type": 0.0003},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_15"},
{"predicate": {"type": 0.001},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_10"},
{"predicate": {"type": 0.0011},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_22"},
{"predicate": {"type": 0.0012},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_19"},
{"predicate": {"type": 0.002},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_11"},
{"predicate": {"type": 0.0021},"model": "forgecraft:item/pickaxehead/steel/steelpickaxehead_20"},