Перейти к содержимому


Фотография

Мод - комод, или "Что я сделал не так?"


  • Авторизуйтесь для ответа в теме
Сообщений в теме: 4

#1 den25

den25

    Странник

  • Пользователи
  • Сообщений: 9

Написал 17.12.2012 - 15:58

Снуча-бучес друзья, делал я мод DayZ, пришло время сундука:

Ну собственно недоумеваю от этой ошибки:
Изображение

Не могу найти причину, надеюсь на помощь Комьюнити =)

Код всего файла(строка 660 - это как 666, только 660):
package net[paste][/paste]minecraft[paste][/paste]src;import java[paste][/paste]util[paste][/paste]*;public class DayZ_AChest extends BlockContainer{    private Random random;    protected DayZ_AChest(int i)    {        super(i, Material[paste][/paste]wood);        random = new Random();        blockIndexInTexture = 26;        setTickRandomly(true);    }    /**     * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two     * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block[paste][/paste]     */    public boolean isOpaqueCube()    {        return false;    }    /**     * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)     */    public boolean renderAsNormalBlock()    {        return false;    }    /**     * The type of render function that is called for this block     */    public int getRenderType()    {        return 22;    }    /**     * Called whenever the block is added into the world[paste][/paste] Args: world, x, y, z     */    public void onBlockAdded(World world, int i, int j, int k)    {        super[paste][/paste]onBlockAdded(world, i, j, k);        unifyAdjacentChests(world, i, j, k);        int l = world[paste][/paste]getBlockId(i, j, k - 1);        int i1 = world[paste][/paste]getBlockId(i, j, k + 1);        int j1 = world[paste][/paste]getBlockId(i - 1, j, k);        int k1 = world[paste][/paste]getBlockId(i + 1, j, k);        if (l == blockID)        {            unifyAdjacentChests(world, i, j, k - 1);        }        if (i1 == blockID)        {            unifyAdjacentChests(world, i, j, k + 1);        }        if (j1 == blockID)        {            unifyAdjacentChests(world, i - 1, j, k);        }        if (k1 == blockID)        {            unifyAdjacentChests(world, i + 1, j, k);        }    }    /**     * Called when the block is placed in the world[paste][/paste]     */    public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)    {        int l = world[paste][/paste]getBlockId(i, j, k - 1);        int i1 = world[paste][/paste]getBlockId(i, j, k + 1);        int j1 = world[paste][/paste]getBlockId(i - 1, j, k);        int k1 = world[paste][/paste]getBlockId(i + 1, j, k);        byte byte0 = 0;        int l1 = MathHelper[paste][/paste]floor_double((double)((entityliving[paste][/paste]rotationYaw * 4F) / 360F) + 0[paste][/paste]5D) & 3;        if (l1 == 0)        {            byte0 = 2;        }        if (l1 == 1)        {            byte0 = 5;        }        if (l1 == 2)        {            byte0 = 3;        }        if (l1 == 3)        {            byte0 = 4;        }        if (l != blockID && i1 != blockID && j1 != blockID && k1 != blockID)        {            world[paste][/paste]setBlockMetadataWithNotify(i, j, k, byte0);        }        else        {            if ((l == blockID || i1 == blockID) && (byte0 == 4 || byte0 == 5))            {                if (l == blockID)                {                    world[paste][/paste]setBlockMetadataWithNotify(i, j, k - 1, byte0);                }                else                {                    world[paste][/paste]setBlockMetadataWithNotify(i, j, k + 1, byte0);                }                world[paste][/paste]setBlockMetadataWithNotify(i, j, k, byte0);            }            if ((j1 == blockID || k1 == blockID) && (byte0 == 2 || byte0 == 3))            {                if (j1 == blockID)                {                    world[paste][/paste]setBlockMetadataWithNotify(i - 1, j, k, byte0);                }                else                {                    world[paste][/paste]setBlockMetadataWithNotify(i + 1, j, k, byte0);                }                world[paste][/paste]setBlockMetadataWithNotify(i, j, k, byte0);            }        }    }    public void unifyAdjacentChests(World world, int i, int j, int k)    {        if (world[paste][/paste]isRemote)        {            return;        }        int l = world[paste][/paste]getBlockId(i, j, k - 1);        int i1 = world[paste][/paste]getBlockId(i, j, k + 1);        int j1 = world[paste][/paste]getBlockId(i - 1, j, k);        int k1 = world[paste][/paste]getBlockId(i + 1, j, k);        byte byte0 = 4;        if (l == blockID || i1 == blockID)        {            int l1 = world[paste][/paste]getBlockId(i - 1, j, l == blockID ? k - 1 : k + 1);            int j2 = world[paste][/paste]getBlockId(i + 1, j, l == blockID ? k - 1 : k + 1);            byte0 = 5;            int l2 = -1;            if (l == blockID)            {                l2 = world[paste][/paste]getBlockMetadata(i, j, k - 1);            }            else            {                l2 = world[paste][/paste]getBlockMetadata(i, j, k + 1);            }            if (l2 == 4)            {                byte0 = 4;            }            if ((Block[paste][/paste]opaqueCubeLookup[j1] || Block[paste][/paste]opaqueCubeLookup[l1]) && !Block[paste][/paste]opaqueCubeLookup[k1] && !Block[paste][/paste]opaqueCubeLookup[j2])            {                byte0 = 5;            }            if ((Block[paste][/paste]opaqueCubeLookup[k1] || Block[paste][/paste]opaqueCubeLookup[j2]) && !Block[paste][/paste]opaqueCubeLookup[j1] && !Block[paste][/paste]opaqueCubeLookup[l1])            {                byte0 = 4;            }        }        else if (j1 == blockID || k1 == blockID)        {            int i2 = world[paste][/paste]getBlockId(j1 == blockID ? i - 1 : i + 1, j, k - 1);            int k2 = world[paste][/paste]getBlockId(j1 == blockID ? i - 1 : i + 1, j, k + 1);            byte0 = 3;            int i3 = -1;            if (j1 == blockID)            {                i3 = world[paste][/paste]getBlockMetadata(i - 1, j, k);            }            else            {                i3 = world[paste][/paste]getBlockMetadata(i + 1, j, k);            }            if (i3 == 2)            {                byte0 = 2;            }            if ((Block[paste][/paste]opaqueCubeLookup[l] || Block[paste][/paste]opaqueCubeLookup[i2]) && !Block[paste][/paste]opaqueCubeLookup[i1] && !Block[paste][/paste]opaqueCubeLookup[k2])            {                byte0 = 3;            }            if ((Block[paste][/paste]opaqueCubeLookup[i1] || Block[paste][/paste]opaqueCubeLookup[k2]) && !Block[paste][/paste]opaqueCubeLookup[l] && !Block[paste][/paste]opaqueCubeLookup[i2])            {                byte0 = 2;            }        }        else        {            byte0 = 3;            if (Block[paste][/paste]opaqueCubeLookup[l] && !Block[paste][/paste]opaqueCubeLookup[i1])            {                byte0 = 3;            }            if (Block[paste][/paste]opaqueCubeLookup[i1] && !Block[paste][/paste]opaqueCubeLookup[l])            {                byte0 = 2;            }            if (Block[paste][/paste]opaqueCubeLookup[j1] && !Block[paste][/paste]opaqueCubeLookup[k1])            {                byte0 = 5;            }            if (Block[paste][/paste]opaqueCubeLookup[k1] && !Block[paste][/paste]opaqueCubeLookup[j1])            {                byte0 = 4;            }        }        world[paste][/paste]setBlockMetadataWithNotify(i, j, k, byte0);    }    /**     * Retrieves the block texture to use based on the display side[paste][/paste] Args: iBlockAccess, x, y, z, side     */    public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l)    {        if (l == 1)        {            return blockIndexInTexture - 1;        }        if (l == 0)        {            return blockIndexInTexture - 1;        }        int i1 = iblockaccess[paste][/paste]getBlockId(i, j, k - 1);        int j1 = iblockaccess[paste][/paste]getBlockId(i, j, k + 1);        int k1 = iblockaccess[paste][/paste]getBlockId(i - 1, j, k);        int l1 = iblockaccess[paste][/paste]getBlockId(i + 1, j, k);        if (i1 == blockID || j1 == blockID)        {            if (l == 2 || l == 3)            {                return blockIndexInTexture;            }            int i2 = 0;            if (i1 == blockID)            {                i2 = -1;            }            int k2 = iblockaccess[paste][/paste]getBlockId(i - 1, j, i1 == blockID ? k - 1 : k + 1);            int i3 = iblockaccess[paste][/paste]getBlockId(i + 1, j, i1 == blockID ? k - 1 : k + 1);            if (l == 4)            {                i2 = -1 - i2;            }            byte byte1 = 5;            if ((Block[paste][/paste]opaqueCubeLookup[k1] || Block[paste][/paste]opaqueCubeLookup[k2]) && !Block[paste][/paste]opaqueCubeLookup[l1] && !Block[paste][/paste]opaqueCubeLookup[i3])            {                byte1 = 5;            }            if ((Block[paste][/paste]opaqueCubeLookup[l1] || Block[paste][/paste]opaqueCubeLookup[i3]) && !Block[paste][/paste]opaqueCubeLookup[k1] && !Block[paste][/paste]opaqueCubeLookup[k2])            {                byte1 = 4;            }            return (l == byte1 ? blockIndexInTexture + 16 : blockIndexInTexture + 32) + i2;        }        if (k1 == blockID || l1 == blockID)        {            if (l == 4 || l == 5)            {                return blockIndexInTexture;            }            int j2 = 0;            if (k1 == blockID)            {                j2 = -1;            }            int l2 = iblockaccess[paste][/paste]getBlockId(k1 == blockID ? i - 1 : i + 1, j, k - 1);            int j3 = iblockaccess[paste][/paste]getBlockId(k1 == blockID ? i - 1 : i + 1, j, k + 1);            if (l == 3)            {                j2 = -1 - j2;            }            byte byte2 = 3;            if ((Block[paste][/paste]opaqueCubeLookup[i1] || Block[paste][/paste]opaqueCubeLookup[l2]) && !Block[paste][/paste]opaqueCubeLookup[j1] && !Block[paste][/paste]opaqueCubeLookup[j3])            {                byte2 = 3;            }            if ((Block[paste][/paste]opaqueCubeLookup[j1] || Block[paste][/paste]opaqueCubeLookup[j3]) && !Block[paste][/paste]opaqueCubeLookup[i1] && !Block[paste][/paste]opaqueCubeLookup[l2])            {                byte2 = 2;            }            return (l == byte2 ? blockIndexInTexture + 16 : blockIndexInTexture + 32) + j2;        }        byte byte0 = 3;        if (Block[paste][/paste]opaqueCubeLookup[i1] && !Block[paste][/paste]opaqueCubeLookup[j1])        {            byte0 = 3;        }        if (Block[paste][/paste]opaqueCubeLookup[j1] && !Block[paste][/paste]opaqueCubeLookup[i1])        {            byte0 = 2;        }        if (Block[paste][/paste]opaqueCubeLookup[k1] && !Block[paste][/paste]opaqueCubeLookup[l1])        {            byte0 = 5;        }        if (Block[paste][/paste]opaqueCubeLookup[l1] && !Block[paste][/paste]opaqueCubeLookup[k1])        {            byte0 = 4;        }        return l == byte0 ? blockIndexInTexture + 1 : blockIndexInTexture;    }    /**     * Returns the block texture based on the side being looked at[paste][/paste]  Args: side     */    public int getBlockTextureFromSide(int i)    {        if (i == 1)        {            return blockIndexInTexture - 1;        }        if (i == 0)        {            return blockIndexInTexture - 1;        }        if (i == 3)        {            return blockIndexInTexture + 1;        }        else        {            return blockIndexInTexture;        }    }    /**     * Checks to see if its valid to put this block at the specified coordinates[paste][/paste] Args: world, x, y, z     */    public boolean canPlaceBlockAt(World world, int i, int j, int k)    {        int l = 0;        if (world[paste][/paste]getBlockId(i - 1, j, k) == blockID)        {            l++;        }        if (world[paste][/paste]getBlockId(i + 1, j, k) == blockID)        {            l++;        }        if (world[paste][/paste]getBlockId(i, j, k - 1) == blockID)        {            l++;        }        if (world[paste][/paste]getBlockId(i, j, k + 1) == blockID)        {            l++;        }        if (l > 1)        {            return false;        }        if (isThereANeighborChest(world, i - 1, j, k))        {            return false;        }        if (isThereANeighborChest(world, i + 1, j, k))        {            return false;        }        if (isThereANeighborChest(world, i, j, k - 1))        {            return false;        }        else        {            return !isThereANeighborChest(world, i, j, k + 1);        }    }    private boolean isThereANeighborChest(World world, int i, int j, int k)    {        if (world[paste][/paste]getBlockId(i, j, k) != blockID)        {            return false;        }        if (world[paste][/paste]getBlockId(i - 1, j, k) == blockID)        {            return true;        }        if (world[paste][/paste]getBlockId(i + 1, j, k) == blockID)        {            return true;        }        return world[paste][/paste]getBlockId(i, j, k - 1) != blockID ? true : true;    }    /**     * Lets the block know when one of its neighbor changes[paste][/paste] Doesn't know which neighbor changed (coordinates passed are     * their own) Args: x, y, z, neighbor blockID     */    public void onNeighborBlockChange(World world, int i, int j, int k, int l)    {        super[paste][/paste]onNeighborBlockChange(world, i, j, k, l);        TileEntityChest tileentitychest = (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k);        if (tileentitychest != null)        {            tileentitychest[paste][/paste]updateContainingBlockInfo();        }    }    /**     * Called whenever the block is removed[paste][/paste]     */    public void onBlockRemoval(World world, int i, int j, int k)    {        TileEntityChest tileentitychest = (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k);        if (tileentitychest != null)        {            for (int l = 0; l < tileentitychest[paste][/paste]getSizeInventory(); l++)            {                ItemStack itemstack = tileentitychest[paste][/paste]getStackInSlot(l);                if (itemstack == null)                {                    continue;                }                float f = random[paste][/paste]nextFloat() * 0[paste][/paste]8F + 0[paste][/paste]1F;                float f1 = random[paste][/paste]nextFloat() * 0[paste][/paste]8F + 0[paste][/paste]1F;                float f2 = random[paste][/paste]nextFloat() * 0[paste][/paste]8F + 0[paste][/paste]1F;                while (itemstack[paste][/paste]stackSize > 0)                {                    int i1 = random[paste][/paste]nextInt(21) + 10;                    if (i1 > itemstack[paste][/paste]stackSize)                    {                        i1 = itemstack[paste][/paste]stackSize;                    }                    itemstack[paste][/paste]stackSize -= i1;                    EntityItem entityitem = new EntityItem(world, (float)i + f, (float)j + f1, (float)k + f2, new ItemStack(itemstack[paste][/paste]itemID, i1, itemstack[paste][/paste]getItemDamage()));                    float f3 = 0[paste][/paste]05F;                    entityitem[paste][/paste]motionX = (float)random[paste][/paste]nextGaussian() * f3;                    entityitem[paste][/paste]motionY = (float)random[paste][/paste]nextGaussian() * f3 + 0[paste][/paste]2F;                    entityitem[paste][/paste]motionZ = (float)random[paste][/paste]nextGaussian() * f3;                    if (itemstack[paste][/paste]hasTagCompound())                    {                        entityitem[paste][/paste]item[paste][/paste]setTagCompound((NBTTagCompound)itemstack[paste][/paste]getTagCompound()[paste][/paste]copy());                    }                    world[paste][/paste]spawnEntityInWorld(entityitem);                }            }        }        super[paste][/paste]onBlockRemoval(world, i, j, k);    }    /**     * Called upon block activation (left or right click on the block[paste][/paste])[paste][/paste] The three integers represent x,y,z of the     * block[paste][/paste]     */    public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)    {        Object obj = (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k);        if (obj == null)        {            return true;        }        if (world[paste][/paste]isBlockNormalCube(i, j + 1, k))        {            return true;        }        if (func_50075_j(world, i, j, k))        {            return true;        }        if (world[paste][/paste]getBlockId(i - 1, j, k) == blockID && (world[paste][/paste]isBlockNormalCube(i - 1, j + 1, k) || func_50075_j(world, i - 1, j, k)))        {            return true;        }        if (world[paste][/paste]getBlockId(i + 1, j, k) == blockID && (world[paste][/paste]isBlockNormalCube(i + 1, j + 1, k) || func_50075_j(world, i + 1, j, k)))        {            return true;        }        if (world[paste][/paste]getBlockId(i, j, k - 1) == blockID && (world[paste][/paste]isBlockNormalCube(i, j + 1, k - 1) || func_50075_j(world, i, j, k - 1)))        {            return true;        }        if (world[paste][/paste]getBlockId(i, j, k + 1) == blockID && (world[paste][/paste]isBlockNormalCube(i, j + 1, k + 1) || func_50075_j(world, i, j, k + 1)))        {            return true;        }        if (world[paste][/paste]getBlockId(i - 1, j, k) == blockID)        {            obj = new InventoryLargeChest("Large chest", (TileEntityChest)world[paste][/paste]getBlockTileEntity(i - 1, j, k), (IInventory)obj);        }        if (world[paste][/paste]getBlockId(i + 1, j, k) == blockID)        {            obj = new InventoryLargeChest("Large chest", (IInventory)obj, (TileEntityChest)world[paste][/paste]getBlockTileEntity(i + 1, j, k));        }        if (world[paste][/paste]getBlockId(i, j, k - 1) == blockID)        {            obj = new InventoryLargeChest("Large chest", (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k - 1), (IInventory)obj);        }        if (world[paste][/paste]getBlockId(i, j, k + 1) == blockID)        {            obj = new InventoryLargeChest("Large chest", (IInventory)obj, (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k + 1));        }        if (world[paste][/paste]isRemote)        {            return true;        }        else        {            entityplayer[paste][/paste]displayGUIChest((IInventory)obj);            return true;        }    }    /**     * Returns the TileEntity used by this block[paste][/paste]     */    public TileEntity getBlockEntity()    {        return new TileEntityChest();    }    private static boolean func_50075_j(World world, int i, int j, int k)    {        for (Iterator iterator = world[paste][/paste]getEntitiesWithinAABB(net[paste][/paste]minecraft[paste][/paste]src[paste][/paste]EntityOcelot[paste][/paste]class, AxisAlignedBB[paste][/paste]getBoundingBoxFromPool(i, j + 1, k, i + 1, j + 2, k + 1))[paste][/paste]iterator(); iterator[paste][/paste]hasNext();)        {            Entity entity = (Entity)iterator[paste][/paste]next();            EntityOcelot entityocelot = (EntityOcelot)entity;            if (entityocelot[paste][/paste]isSitting())            {                return true;            }        }        return false;    }    /**     * Ticks the block if it's been scheduled     */    public void updateTick(World world, int i, int j, int k, Random random1)    {        int l = world[paste][/paste]getBlockMetadata(i, j, k);        super[paste][/paste]onBlockRemoval(world, i, j, k);        world[paste][/paste]setBlockAndMetadata(i, j, k, blockID, l);        TileEntityChest tileentitychest = (TileEntityChest)world[paste][/paste]getBlockTileEntity(i, j, k);        if (tileentitychest != null)        {            int i1 = world[paste][/paste]getBlockId(i, j - 1, k);            for (int j1 = 0; j1 < 10; j1++)            {                ItemStack itemstack = pickCheckLootItem(random1, i1);                if (itemstack != null)                {                    tileentitychest[paste][/paste]setInventorySlotContents(random1[paste][/paste]nextInt(tileentitychest[paste][/paste]getSizeInventory()), itemstack);                }            }        }    }    /**     * How many world ticks before ticking     */    public int tickRate()    {        return 1;    }    private ItemStack pickCheckLootItem(Random random1, int i)    {        if (i == mod_dayz[paste][/paste]RChest[paste][/paste]blockID)        {            int j = random1[paste][/paste]nextInt(4);            if (j == 0 && random1[paste][/paste]nextInt(20) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]BloodPacket, 1);            }            if (j == 1 && random1[paste][/paste]nextInt(5) == 0)            {                int i2 = random1[paste][/paste]nextInt(4);                if (i2 == 0)                {                            }            if (j == 2 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Bandage, 1);            }            if (j == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Morfin, 1);            }            else            {                return null;            }        }        if (i == mod_dayz[paste][/paste]RChest1[paste][/paste]blockID)        {            int k = random1[paste][/paste]nextInt(5);            if (k == 0 && random1[paste][/paste]nextInt(30) == 0)            {                if (random1[paste][/paste]nextInt(2) == 0)                {                    return new ItemStack(mod_dayz[paste][/paste]Bin, 1);                }                else                {                    return new ItemStack(mod_dayz[paste][/paste]AK, 1);                }            }            if (k == 1 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Bandage, 1);            }            if (k == 2 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Morfin, 1);            }            if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]AKMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(1) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]DMR, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]DMRMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(1) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]FAL, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]FALMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]AKMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]PDW, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]PDWMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]G17, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]G17Mag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(1) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M249, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M249Mag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M4A1, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]STANAGMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(1) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M9SD, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M9SDMag, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]faers, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]cayotbackpack, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]patrolbackpack, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]flask, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]wflask, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]musor, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]viski, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Remington, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Slug, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Pellets, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M9, 1);            }                        if (k == 3 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]grenade, 1);            }                        else            {                return null;            }        }        if (i == mod_dayz[paste][/paste]RChest2[paste][/paste]blockID)        {            int l = random1[paste][/paste]nextInt(9);            if (l == 0 && random1[paste][/paste]nextInt(30) == 0)            {                int j2 = random1[paste][/paste]nextInt(3);                if (j2 == 0)                {                    return new ItemStack(mod_dayz[paste][/paste]Makarov, 1);                }                if (j2 == 1)                {                    return new ItemStack(mod_dayz[paste][/paste]kompas, 1);                }                else                {                    return new ItemStack(mod_dayz[paste][/paste]M1911, 1);                }            }            if (l == 1 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Bandage, 1);            }            if (l == 2 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]chasi, 1);            }            if (l == 3 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]MakarovMag, 1);            }            if (l == 6 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Bin ,1);            }            if (l == 7 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(Item[paste][/paste]map, 1);            }            if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]M1911Mag, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]RevovleMag, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Revovle, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]matches, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]noj, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]pepsi, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]cola, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]fonar, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]faers, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]topor, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]patrolbackpack, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]montirovka, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]beans, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]beans1, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(5) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]beans3, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]musor, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(3) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]viski, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Shotgun, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Slug, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(2) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]Wini, 1);            }                        if (l == 8 && random1[paste][/paste]nextInt(4) == 0)            {                return new ItemStack(mod_dayz[paste][/paste]WiniMag, 1);            }            else            {                return null;            }}}        }    /**     * Returns the quantity of items to drop on block destruction[paste][/paste]     */    public int quantityDropped(Random random1)    {        return 0;    }}

Заранее спасибо =)

#2 NitroBoy2

NitroBoy2

    Опечаленный гастами

  • Главные модераторы
  • Сообщений: 2671
  • Ник в Minecraft:
    NitroToxin2
  • Откуда: Екатеринбург -> Москва

Написал 18.12.2012 - 08:28

DayZ мод ведь уже есть... хотя у тебя есть оружие!Modloader?
Скрытый текст

#3 den25

den25

    Странник

  • Пользователи
  • Сообщений: 9

Написал 18.12.2012 - 17:23

Да, использовал бы Forge но большинство используют modloader. Я хочу делать свой мод совместимым с другими =)

#4 DraggonFantasy

DraggonFantasy

    Странник

  • Пользователи
  • Сообщений: 75

Написал 19.12.2012 - 01:28

Попробуй добавить return null; в самом конце метода (перед послдней фигурной скобкой )

#5 den25

den25

    Странник

  • Пользователи
  • Сообщений: 9

Написал 19.12.2012 - 08:00

Проблему решил ещё вчера, но почему-то спавнится только кровь...


Количество пользователей, читающих эту тему: 1

0 пользователей, 1 гостей, 0 анонимных