mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
no more template shifting
This commit is contained in:
parent
416e2e6278
commit
4628858d64
@ -95,6 +95,14 @@ public class AssemblerRecipes {
|
|||||||
|
|
||||||
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
|
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
|
||||||
|
|
||||||
|
ComparableStack comp = ItemAssemblyTemplate.readType(stack);
|
||||||
|
|
||||||
|
//NEW
|
||||||
|
if(comp != null) {
|
||||||
|
return comp.toStack();
|
||||||
|
}
|
||||||
|
|
||||||
|
//LEGACY
|
||||||
int i = stack.getItemDamage();
|
int i = stack.getItemDamage();
|
||||||
if(i >= 0 && i < recipeList.size()) {
|
if(i >= 0 && i < recipeList.size()) {
|
||||||
return recipeList.get(i).toStack();
|
return recipeList.get(i).toStack();
|
||||||
@ -108,8 +116,15 @@ public class AssemblerRecipes {
|
|||||||
|
|
||||||
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
|
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
|
||||||
|
|
||||||
int i = stack.getItemDamage();
|
//NEW
|
||||||
|
ComparableStack compStack = ItemAssemblyTemplate.readType(stack);
|
||||||
|
if(compStack != null) {
|
||||||
|
AStack[] ret = recipes.get(compStack);
|
||||||
|
return Arrays.asList(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
//LEGACY
|
||||||
|
int i = stack.getItemDamage();
|
||||||
if(i >= 0 && i < recipeList.size()) {
|
if(i >= 0 && i < recipeList.size()) {
|
||||||
ItemStack out = recipeList.get(i).toStack();
|
ItemStack out = recipeList.get(i).toStack();
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
|||||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -18,6 +17,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
@ -25,120 +25,163 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||||||
|
|
||||||
public class ItemAssemblyTemplate extends Item {
|
public class ItemAssemblyTemplate extends Item {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
protected IIcon hiddenIcon;
|
protected IIcon hiddenIcon;
|
||||||
|
|
||||||
public ItemAssemblyTemplate()
|
public ItemAssemblyTemplate() {
|
||||||
{
|
this.setHasSubtypes(true);
|
||||||
this.setHasSubtypes(true);
|
this.setMaxDamage(0);
|
||||||
this.setMaxDamage(0);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIconFromDamage(int meta) {
|
public IIcon getIconFromDamage(int meta) {
|
||||||
|
|
||||||
ComparableStack stack = AssemblerRecipes.recipeList.get(meta);
|
ComparableStack stack = AssemblerRecipes.recipeList.get(meta);
|
||||||
|
|
||||||
if(AssemblerRecipes.hidden.get(stack) != null)
|
if(AssemblerRecipes.hidden.get(stack) != null)
|
||||||
return this.hiddenIcon;
|
return this.hiddenIcon;
|
||||||
|
|
||||||
return this.itemIcon;
|
return this.itemIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerIcons(IIconRegister reg) {
|
|
||||||
super.registerIcons(reg);
|
|
||||||
this.hiddenIcon = reg.registerIcon(this.iconString + "_secret");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getItemStackDisplayName(ItemStack stack)
|
|
||||||
{
|
|
||||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
|
||||||
ItemStack out = stack.getItemDamage() < AssemblerRecipes.recipeList.size() ? AssemblerRecipes.recipeList.get(stack.getItemDamage()).toStack() : null;
|
|
||||||
String s1 = ("" + StatCollector.translateToLocal((out != null ? out.getUnlocalizedName() : "") + ".name")).trim();
|
|
||||||
|
|
||||||
if (s1 != null)
|
|
||||||
{
|
|
||||||
s = s + " " + s1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
public void registerIcons(IIconRegister reg) {
|
||||||
|
super.registerIcons(reg);
|
||||||
|
this.hiddenIcon = reg.registerIcon(this.iconString + "_secret");
|
||||||
|
}
|
||||||
|
|
||||||
int count = AssemblerRecipes.recipeList.size();
|
public static void writeType(ItemStack stack, ComparableStack comp) {
|
||||||
|
if(!stack.hasTagCompound())
|
||||||
|
stack.stackTagCompound = new NBTTagCompound();
|
||||||
|
|
||||||
for(int i = 0; i < count; i++) {
|
stack.stackTagCompound.setInteger("id", Item.getIdFromItem(comp.item));
|
||||||
list.add(new ItemStack(item, 1, i));
|
stack.stackTagCompound.setByte("count", (byte)comp.stacksize);
|
||||||
}
|
stack.stackTagCompound.setShort("meta", (short)comp.meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getProcessTime(ItemStack stack) {
|
public static ComparableStack readType(ItemStack stack) {
|
||||||
|
if(!stack.hasTagCompound())
|
||||||
|
return null;
|
||||||
|
|
||||||
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
if(!stack.stackTagCompound.hasKey("id"))
|
||||||
return 100;
|
return null;
|
||||||
|
|
||||||
int i = stack.getItemDamage();
|
int id = stack.stackTagCompound.getInteger("id");
|
||||||
|
int count = stack.stackTagCompound.getByte("count");
|
||||||
|
int meta = stack.stackTagCompound.getShort("meta");
|
||||||
|
|
||||||
if(i < 0 || i >= AssemblerRecipes.recipeList.size())
|
return new ComparableStack(Item.getItemById(id), count, meta);
|
||||||
return 100;
|
}
|
||||||
|
|
||||||
ComparableStack out = AssemblerRecipes.recipeList.get(i);
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
Integer time = AssemblerRecipes.time.get(out);
|
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||||
|
ItemStack out = stack.getItemDamage() < AssemblerRecipes.recipeList.size() ? AssemblerRecipes.recipeList.get(stack.getItemDamage()).toStack() : null;
|
||||||
|
String s1 = ("" + StatCollector.translateToLocal((out != null ? out.getUnlocalizedName() : "") + ".name")).trim();
|
||||||
|
|
||||||
if(time != null)
|
if(s1 != null) {
|
||||||
return time;
|
s = s + " " + s1;
|
||||||
else
|
}
|
||||||
return 100;
|
|
||||||
}
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||||
|
|
||||||
|
int count = AssemblerRecipes.recipeList.size();
|
||||||
|
|
||||||
|
for(int i = 0; i < count; i++) {
|
||||||
|
list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getProcessTime(ItemStack stack) {
|
||||||
|
|
||||||
|
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
||||||
|
return 100;
|
||||||
|
|
||||||
|
int i = stack.getItemDamage();
|
||||||
|
|
||||||
|
if(i < 0 || i >= AssemblerRecipes.recipeList.size())
|
||||||
|
return 100;
|
||||||
|
|
||||||
|
//NEW
|
||||||
|
ComparableStack out = readType(stack);
|
||||||
|
//LEGACY
|
||||||
|
if(out == null) out = AssemblerRecipes.recipeList.get(i);
|
||||||
|
Integer time = AssemblerRecipes.time.get(out);
|
||||||
|
|
||||||
|
if(time != null)
|
||||||
|
return time;
|
||||||
|
else
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||||
|
|
||||||
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int i = stack.getItemDamage();
|
int i = stack.getItemDamage();
|
||||||
|
|
||||||
if(i < 0 || i >= AssemblerRecipes.recipeList.size()) {
|
if(i < 0 || i >= AssemblerRecipes.recipeList.size()) {
|
||||||
list.add("I AM ERROR");
|
list.add("I AM ERROR");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComparableStack out = AssemblerRecipes.recipeList.get(i);
|
boolean nbtType = true;
|
||||||
|
|
||||||
HashSet<Item> folders = AssemblerRecipes.hidden.get(out);
|
//NEW
|
||||||
|
ComparableStack out = readType(stack);
|
||||||
|
//LEGACY
|
||||||
|
if(out == null) {
|
||||||
|
out = AssemblerRecipes.recipeList.get(i);
|
||||||
|
nbtType = false;
|
||||||
|
}
|
||||||
|
Integer time = AssemblerRecipes.time.get(out);
|
||||||
|
|
||||||
if(folders == null)
|
HashSet<Item> folders = AssemblerRecipes.hidden.get(out);
|
||||||
folders = new HashSet() {{ add(ModItems.template_folder); }};
|
|
||||||
|
|
||||||
String[] names = new String[folders.size()];
|
if(folders == null)
|
||||||
|
folders = new HashSet() {
|
||||||
|
{
|
||||||
|
add(ModItems.template_folder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
int a = 0;
|
String[] names = new String[folders.size()];
|
||||||
for(Item folder : folders) {
|
|
||||||
names[a] = I18nUtil.resolveKey(folder.getUnlocalizedName() + ".name");
|
int a = 0;
|
||||||
a++;
|
for(Item folder : folders) {
|
||||||
}
|
names[a] = I18nUtil.resolveKey(folder.getUnlocalizedName() + ".name");
|
||||||
|
a++;
|
||||||
|
}
|
||||||
|
|
||||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", String.join(" / ", names)));
|
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", String.join(" / ", names)));
|
||||||
|
|
||||||
|
if(nbtType) {
|
||||||
|
list.add(EnumChatFormatting.GREEN + "Persistent template");
|
||||||
|
} else {
|
||||||
|
list.add(EnumChatFormatting.RED + "Volatile template");
|
||||||
|
}
|
||||||
|
|
||||||
list.add("");
|
list.add("");
|
||||||
|
|
||||||
if(out == null) {
|
if(out == null) {
|
||||||
list.add("I AM ERROR");
|
list.add("I AM ERROR");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] in = AssemblerRecipes.recipes.get(out);
|
Object[] in = AssemblerRecipes.recipes.get(out);
|
||||||
|
|
||||||
if(in == null) {
|
if(in == null) {
|
||||||
list.add("I AM ERROR");
|
list.add("I AM ERROR");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack output = out.toStack();
|
ItemStack output = out.toStack();
|
||||||
|
|
||||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out"));
|
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out"));
|
||||||
list.add(output.stackSize + "x " + output.getDisplayName());
|
list.add(output.stackSize + "x " + output.getDisplayName());
|
||||||
@ -146,135 +189,98 @@ public class ItemAssemblyTemplate extends Item {
|
|||||||
|
|
||||||
for(Object o : in) {
|
for(Object o : in) {
|
||||||
|
|
||||||
if(o instanceof ComparableStack) {
|
if(o instanceof ComparableStack) {
|
||||||
ItemStack input = ((ComparableStack)o).toStack();
|
ItemStack input = ((ComparableStack) o).toStack();
|
||||||
list.add(input.stackSize + "x " + input.getDisplayName());
|
list.add(input.stackSize + "x " + input.getDisplayName());
|
||||||
|
|
||||||
} else if(o instanceof OreDictStack) {
|
} else if(o instanceof OreDictStack) {
|
||||||
OreDictStack input = (OreDictStack) o;
|
OreDictStack input = (OreDictStack) o;
|
||||||
ArrayList<ItemStack> ores = OreDictionary.getOres(input.name);
|
ArrayList<ItemStack> ores = OreDictionary.getOres(input.name);
|
||||||
|
|
||||||
if(ores.size() > 0) {
|
if(ores.size() > 0) {
|
||||||
ItemStack inStack = ores.get((int) (Math.abs(System.currentTimeMillis() / 1000) % ores.size()));
|
ItemStack inStack = ores.get((int) (Math.abs(System.currentTimeMillis() / 1000) % ores.size()));
|
||||||
list.add(input.stacksize + "x " + inStack.getDisplayName());
|
list.add(input.stacksize + "x " + inStack.getDisplayName());
|
||||||
} else {
|
} else {
|
||||||
list.add("I AM ERROR");
|
list.add("I AM ERROR");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
||||||
list.add(Math.floor((float)(getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
list.add(Math.floor((float) (getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Override
|
/*
|
||||||
@SideOnly(Side.CLIENT)
|
* @Override
|
||||||
public boolean requiresMultipleRenderPasses()
|
*
|
||||||
{
|
* @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses() {
|
||||||
return true;
|
* return true; }
|
||||||
}
|
*
|
||||||
|
* public int getRenderPasses(int metadata) { return 8; }
|
||||||
|
*
|
||||||
|
* IIcon[] overlays;
|
||||||
|
*
|
||||||
|
* @Override
|
||||||
|
*
|
||||||
|
* @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister
|
||||||
|
* p_94581_1_) { super.registerIcons(p_94581_1_);
|
||||||
|
*
|
||||||
|
* this.overlays = new IIcon[7];
|
||||||
|
*
|
||||||
|
* for(int i = 0; i < 7; i++) overlays[i] =
|
||||||
|
* p_94581_1_.registerIcon("hbm:assembly_template_" + i); }
|
||||||
|
*
|
||||||
|
* @Override
|
||||||
|
*
|
||||||
|
* @SideOnly(Side.CLIENT) public IIcon getIconFromDamageForRenderPass(int a,
|
||||||
|
* int b) { return b < 7 ? overlays[b] :
|
||||||
|
* super.getIconFromDamageForRenderPass(a, b); }
|
||||||
|
*
|
||||||
|
* @Override
|
||||||
|
*
|
||||||
|
* @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack,
|
||||||
|
* int layer) { if (layer == 7) { return 0xFFFFFF; } else if(layer < 7) {
|
||||||
|
* int j = colorFromSeed(getSeedFromMeta(stack.getItemDamage(), layer));
|
||||||
|
*
|
||||||
|
* if (j < 0) { j = 0xFFFFFF; }
|
||||||
|
*
|
||||||
|
* return j; }
|
||||||
|
*
|
||||||
|
* return 0; }
|
||||||
|
*
|
||||||
|
* private int getSeedFromMeta(int i, int count) { Random rand = new
|
||||||
|
* Random(i);
|
||||||
|
*
|
||||||
|
* int cap = 11;
|
||||||
|
*
|
||||||
|
* for(int j = 0; j < count - 1; j++) rand.nextInt(cap);
|
||||||
|
*
|
||||||
|
* return rand.nextInt(cap); }
|
||||||
|
*
|
||||||
|
* private int colorFromSeed(int i) { switch(i) { case 0: return 0x334077;
|
||||||
|
* case 1: return 0x6A298F; case 2: return 0xDF3795; case 3: return
|
||||||
|
* 0xFF0000; case 4: return 0x00FF00; case 5: return 0x0000FF; case 6:
|
||||||
|
* return 0xFFFF00; case 7: return 0x00FFFF; case 8: return 0x888888; case
|
||||||
|
* 9: return 0xFFFFFF; case 10: return 0x000000; default: return 0xFFFFFF; }
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
public int getRenderPasses(int metadata)
|
/*
|
||||||
{
|
* public Motif getColorMotifFromTemplate(EnumAssemblyTemplate temp) {
|
||||||
return 8;
|
*
|
||||||
}
|
* //using deprecated value operator, will remove soon if(temp.getValue() >
|
||||||
|
* 0) { Motif scheme = new Motif(temp.getValue, null);
|
||||||
IIcon[] overlays;
|
* scheme.setTextureSize(16, 16); //scheme.applyUniversalScheme();
|
||||||
|
* scheme.colorCount = 4; //universal scheme configuration for testing
|
||||||
@Override
|
* //todo: get textures properly baked, display color for shield
|
||||||
@SideOnly(Side.CLIENT)
|
* scheme.addColor(0x334077); scheme.addColor(0x6A298F);
|
||||||
public void registerIcons(IIconRegister p_94581_1_)
|
* scheme.addColor(0xDF3795); scheme.addColor(0x334077);
|
||||||
{
|
*
|
||||||
super.registerIcons(p_94581_1_);
|
* //different test config; prpl, lprpl, cyn, prpl
|
||||||
|
*
|
||||||
this.overlays = new IIcon[7];
|
* scheme.unify(); return scheme;
|
||||||
|
*
|
||||||
for(int i = 0; i < 7; i++)
|
* } else { //return null; return Motif.defaultInstance; } }
|
||||||
overlays[i] = p_94581_1_.registerIcon("hbm:assembly_template_" + i);
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIconFromDamageForRenderPass(int a, int b)
|
|
||||||
{
|
|
||||||
return b < 7 ? overlays[b] : super.getIconFromDamageForRenderPass(a, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public int getColorFromItemStack(ItemStack stack, int layer)
|
|
||||||
{
|
|
||||||
if (layer == 7)
|
|
||||||
{
|
|
||||||
return 0xFFFFFF;
|
|
||||||
}
|
|
||||||
else if(layer < 7)
|
|
||||||
{
|
|
||||||
int j = colorFromSeed(getSeedFromMeta(stack.getItemDamage(), layer));
|
|
||||||
|
|
||||||
if (j < 0)
|
|
||||||
{
|
|
||||||
j = 0xFFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
return j;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getSeedFromMeta(int i, int count) {
|
|
||||||
Random rand = new Random(i);
|
|
||||||
|
|
||||||
int cap = 11;
|
|
||||||
|
|
||||||
for(int j = 0; j < count - 1; j++)
|
|
||||||
rand.nextInt(cap);
|
|
||||||
|
|
||||||
return rand.nextInt(cap);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int colorFromSeed(int i) {
|
|
||||||
switch(i) {
|
|
||||||
case 0: return 0x334077;
|
|
||||||
case 1: return 0x6A298F;
|
|
||||||
case 2: return 0xDF3795;
|
|
||||||
case 3: return 0xFF0000;
|
|
||||||
case 4: return 0x00FF00;
|
|
||||||
case 5: return 0x0000FF;
|
|
||||||
case 6: return 0xFFFF00;
|
|
||||||
case 7: return 0x00FFFF;
|
|
||||||
case 8: return 0x888888;
|
|
||||||
case 9: return 0xFFFFFF;
|
|
||||||
case 10: return 0x000000;
|
|
||||||
default: return 0xFFFFFF;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*public Motif getColorMotifFromTemplate(EnumAssemblyTemplate temp) {
|
|
||||||
|
|
||||||
//using deprecated value operator, will remove soon
|
|
||||||
if(temp.getValue() > 0) {
|
|
||||||
Motif scheme = new Motif(temp.getValue, null);
|
|
||||||
scheme.setTextureSize(16, 16);
|
|
||||||
//scheme.applyUniversalScheme();
|
|
||||||
scheme.colorCount = 4;
|
|
||||||
//universal scheme configuration for testing
|
|
||||||
//todo: get textures properly baked, display color for shield
|
|
||||||
scheme.addColor(0x334077);
|
|
||||||
scheme.addColor(0x6A298F);
|
|
||||||
scheme.addColor(0xDF3795);
|
|
||||||
scheme.addColor(0x334077);
|
|
||||||
|
|
||||||
//different test config; prpl, lprpl, cyn, prpl
|
|
||||||
|
|
||||||
scheme.unify();
|
|
||||||
return scheme;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
//return null;
|
|
||||||
return Motif.defaultInstance;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.hbm.packet;
|
package com.hbm.packet;
|
||||||
|
|
||||||
|
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||||
|
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||||
import com.hbm.items.machine.ItemCassette;
|
import com.hbm.items.machine.ItemCassette;
|
||||||
@ -146,6 +148,15 @@ public class ItemFolderPacket implements IMessage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(output.getItem() == ModItems.assembly_template) {
|
||||||
|
ComparableStack out = AssemblerRecipes.recipeList.get(output.getItemDamage());
|
||||||
|
|
||||||
|
if(out != null) {
|
||||||
|
out.meta = 0;
|
||||||
|
ItemAssemblyTemplate.writeType(output, out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!player.inventory.addItemStackToInventory(output))
|
if(!player.inventory.addItemStackToInventory(output))
|
||||||
player.dropPlayerItemWithRandomChoice(output, true);
|
player.dropPlayerItemWithRandomChoice(output, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Loading…
x
Reference in New Issue
Block a user