fixed crafttweaker breaking launch but messed up rendering

This commit is contained in:
Mohammad-Ali Minaie
2018-05-29 14:56:52 -04:00
parent 6d8e0c2187
commit 2b4b432db1
5 changed files with 78 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ dependencies {
// CraftTweaker // CraftTweaker
//compile "CraftTweaker2:CraftTweaker2-MC1120-Main:${craftweaker_version}" //compile "CraftTweaker2:CraftTweaker2-MC1120-Main:${craftweaker_version}"
compile "CraftTweaker2:CraftTweaker2-API:${craftweaker_version}" //compile "CraftTweaker2:CraftTweaker2-API:${craftweaker_version}"
} }
processResources { processResources {

View File

@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.crafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.NonNullList;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.*;

View File

@@ -6,6 +6,8 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.OreIngredient; import net.minecraftforge.oredict.OreIngredient;
import nmd.primal.core.api.PrimalAPI; import nmd.primal.core.api.PrimalAPI;
@@ -13,6 +15,7 @@ import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.recipes.RecipeHandler; import nmd.primal.core.common.recipes.RecipeHandler;
import nmd.primal.forgecraft.crafting.*; import nmd.primal.forgecraft.crafting.*;
import java.util.List;
import java.util.Random; import java.util.Random;
/** /**
@@ -90,6 +93,47 @@ public class ModCrafting{
//TODO BRONZE RECIPE //TODO BRONZE RECIPE
CrucibleCrafting.addRecipe(
new OreIngredient("dustCopper"),
new OreIngredient("dustCopper"),
new OreIngredient("dustCopper"),
new OreIngredient("dustTin"),
Ingredient.EMPTY,
new ItemStack(PrimalAPI.Items.CAULDRON_SLAG, 1),
new ItemStack(ModItems.bronzeingotball, 1),
100,
100,
1000);
CrucibleCrafting.addRecipe(
new OreIngredient("oreBronze"),
Ingredient.EMPTY,
Ingredient.EMPTY,
Ingredient.EMPTY,
Ingredient.EMPTY,
new ItemStack(PrimalAPI.Items.CAULDRON_SLAG, 1),
new ItemStack(ModItems.bronzeingotball, 1),
100,
100,
1000);
NBTTagCompound tag = new NBTTagCompound();
tag.setString("upgrades", "redstone");
ItemStack redBronze = new ItemStack(ModItems.bronzeingotball, 1);
redBronze.setTagCompound(tag.copy());
CrucibleCrafting.addRecipe(
new OreIngredient("ingotBronze"),
new OreIngredient("dustRedstone"),
Ingredient.EMPTY,
Ingredient.EMPTY,
Ingredient.EMPTY,
new ItemStack(PrimalAPI.Items.CAULDRON_SLAG, 1),
redBronze,
100,
100,
1000);
/* /*
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawcleanironcrucible),
"XL","Y ", "XL","Y ",
@@ -249,8 +293,6 @@ public class ModCrafting{
"E","Y", "E","Y",
('E'), PrimalAPI.Items.EMERALD_KNAPP, ('E'), PrimalAPI.Items.EMERALD_KNAPP,
('Y'), ModBlocks.rawbronzecrucible); ('Y'), ModBlocks.rawbronzecrucible);
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1), RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.rawbronzecrucible, 1),
"T", "Y", "T", "Y",
('T'), new ItemStack(ModItems.brokenbronzetool, 1), ('T'), new ItemStack(ModItems.brokenbronzetool, 1),

View File

@@ -1,6 +1,8 @@
package nmd.primal.forgecraft.items; package nmd.primal.forgecraft.items;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@@ -19,6 +21,7 @@ import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
import nmd.primal.forgecraft.items.parts.ToolPart; import nmd.primal.forgecraft.items.parts.ToolPart;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List;
/** /**
* Created by mminaie on 2/19/17. * Created by mminaie on 2/19/17.
@@ -87,9 +90,35 @@ public class BaseMultiItem extends BaseItem {
return 0.0f; return 0.0f;
} }
}); });
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
{
if(!item.isEmpty())
{
if (item.hasTagCompound())
{
tooltip.add(ChatFormatting.GRAY + "Upgrades: " + item.getTagCompound().getString("upgrades"));
/*
tooltip.add(ChatFormatting.GRAY + "Upgrades: " + (3 - getModifiers(item)) );
if (getEmerald(item) == true) {
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
}
if (getDiamondLevel(item) > 0) {
tooltip.add(ChatFormatting.AQUA + "Diamond Level: " + getDiamondLevel(item));
}
if (getRedstoneLevel(item) > 0) {
tooltip.add(ChatFormatting.RED + "Redstone Level: " + getRedstoneLevel(item) );
}
if (getLapisLevel(item) > 0) {
tooltip.add(ChatFormatting.BLUE + "Lapis Level: " + getLapisLevel(item) );
}
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
*/
}
}
} }
public Item.ToolMaterial getMaterial(Item item){ public Item.ToolMaterial getMaterial(Item item){

View File

@@ -21,7 +21,7 @@ public class ClientProxy implements CommonProxy {
@Override @Override
public void preInit(){ public void preInit(){
ModItems.registerCustomRenders(); //ModItems.registerCustomRenders();
} }
@Override @Override