Pouches are prettier. Also, new TE plans.
This commit is contained in:
parent
da73d6ddbc
commit
54af6388ae
6 changed files with 20 additions and 9 deletions
|
|
@ -5,6 +5,8 @@ import com.oitsjustjose.criss_cross.event.PouchCleanEvent;
|
||||||
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
import com.oitsjustjose.criss_cross.gui.GUIHandler;
|
||||||
import com.oitsjustjose.criss_cross.lib.Lib;
|
import com.oitsjustjose.criss_cross.lib.Lib;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
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;
|
||||||
|
|
@ -33,7 +35,7 @@ public class ItemPouch extends Item
|
||||||
return (!stack.hasTagCompound() ? false : (!stack.getTagCompound().hasKey("display", 10) ? false : stack.getTagCompound().getCompoundTag("display").hasKey("color", 3)));
|
return (!stack.hasTagCompound() ? false : (!stack.getTagCompound().hasKey("display", 10) ? false : stack.getTagCompound().getCompoundTag("display").hasKey("color", 3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColor(ItemStack stack, int color)
|
public void setColor(ItemStack stack, int color)
|
||||||
{
|
{
|
||||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||||
|
|
||||||
|
|
@ -80,21 +82,29 @@ public class ItemPouch extends Item
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int renderPass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int i = this.getColor(stack);
|
if (pass == 0)
|
||||||
|
{
|
||||||
|
int i = this.getColor(stack);
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i = 16777215;
|
i = 16777215;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 16777215;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
|
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
|
||||||
{
|
{
|
||||||
if (!world.isRemote)
|
if (!world.isRemote)
|
||||||
|
{
|
||||||
|
world.playSoundEffect(player.posX, player.posY, player.posZ, Block.soundTypeCloth.getPlaceSound(), 1.0F, 1.0F);
|
||||||
player.openGui(CrissCross.instance, GUIHandler.Pouch, world, player.inventory.currentItem, 0, 0);
|
player.openGui(CrissCross.instance, GUIHandler.Pouch, world, player.inventory.currentItem, 0, 0);
|
||||||
|
}
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public class LibBlocks
|
||||||
|
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
|
//TODO : weather controller
|
||||||
cropomator = new BlockCropomator();
|
cropomator = new BlockCropomator();
|
||||||
electroextractor = new BlockElectroextractor();
|
electroextractor = new BlockElectroextractor();
|
||||||
woodchipper = new BlockWoodchipper();
|
woodchipper = new BlockWoodchipper();
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ public class LibItems
|
||||||
|
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
|
|
||||||
mkI = EnumHelper.addToolMaterial("mkI", 7, 6244, 8.0F, 1.0F, 10);
|
mkI = EnumHelper.addToolMaterial("mkI", 7, 6244, 8.0F, 1.0F, 10);
|
||||||
mkI.setRepairItem(new ItemStack(Blocks.emerald_block));
|
mkI.setRepairItem(new ItemStack(Blocks.emerald_block));
|
||||||
mkII = EnumHelper.addToolMaterial("mkII", 10, 1, 12.0F, 1.0F, 10);
|
mkII = EnumHelper.addToolMaterial("mkII", 10, 1, 12.0F, 1.0F, 10);
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class TileScribe extends TileEntityLockable implements ITickable, ISidedI
|
||||||
|
|
||||||
if (this.writingTime == proTicks)
|
if (this.writingTime == proTicks)
|
||||||
{
|
{
|
||||||
this.worldObj.playSoundEffect(this.pos.getX(), this.pos.getY(), this.pos.getZ(), "portal.portal", 0.5F, 1.0F);
|
this.worldObj.playSoundEffect(this.pos.getX(), this.pos.getY(), this.pos.getZ(), "random.levelup", 0.5F, 1.0F);
|
||||||
this.writingTime = 0;
|
this.writingTime = 0;
|
||||||
this.processItem();
|
this.processItem();
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"parent": "builtin/generated",
|
"parent": "builtin/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "crisscross:items/pouch"
|
"layer0": "crisscross:items/pouch",
|
||||||
|
"layer1": "crisscross:items/pouch_overlay"
|
||||||
},
|
},
|
||||||
"display": {
|
"display": {
|
||||||
"thirdperson": {
|
"thirdperson": {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
Loading…
Reference in a new issue