Pouches are prettier. Also, new TE plans.

This commit is contained in:
oitsjustjose 2015-12-15 18:09:29 -06:00
commit 54af6388ae
6 changed files with 20 additions and 9 deletions

View file

@ -5,6 +5,8 @@ import com.oitsjustjose.criss_cross.event.PouchCleanEvent;
import com.oitsjustjose.criss_cross.gui.GUIHandler;
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.item.Item;
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)));
}
public void setColor(ItemStack stack, int color)
public void setColor(ItemStack stack, int color)
{
NBTTagCompound nbttagcompound = stack.getTagCompound();
@ -80,21 +82,29 @@ public class ItemPouch extends Item
@Override
@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)
i = 16777215;
if (i < 0)
i = 16777215;
return i;
return i;
}
else
return 16777215;
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
{
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);
}
return itemstack;
}
}

View file

@ -23,6 +23,7 @@ public class LibBlocks
public static void init()
{
//TODO : weather controller
cropomator = new BlockCropomator();
electroextractor = new BlockElectroextractor();
woodchipper = new BlockWoodchipper();

View file

@ -27,7 +27,6 @@ public class LibItems
public static void init()
{
mkI = EnumHelper.addToolMaterial("mkI", 7, 6244, 8.0F, 1.0F, 10);
mkI.setRepairItem(new ItemStack(Blocks.emerald_block));
mkII = EnumHelper.addToolMaterial("mkII", 10, 1, 12.0F, 1.0F, 10);

View file

@ -76,7 +76,7 @@ public class TileScribe extends TileEntityLockable implements ITickable, ISidedI
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.processItem();
flag1 = true;

View file

@ -1,7 +1,8 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "crisscross:items/pouch"
"layer0": "crisscross:items/pouch",
"layer1": "crisscross:items/pouch_overlay"
},
"display": {
"thirdperson": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB