
svk2140
Members-
Posts
29 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
svk2140's Achievements

Tree Puncher (2/8)
0
Reputation
-
Yes exactly.
-
The arrow flies, falls into the unit, normally stuck, but bounces back and hanging in the air in a few seconds. How to Fix? Code vanilla, almost nothing has changed, what to do?
-
Thank you so much!!! I killed 2 days on this problem!
-
What is wrong? Have you fixed these issues? The first one is most likely your problem. that the first? P.S. "Google Translate"
-
just in case ... Right now I try 16
-
Oh, wrong: D Where comments I hidden code I have delivered the packages to save the settings on the server that are in gui.
-
Inside the chest is more than 45 slots. 4x9 player's inventory and 6x3 inventory chest ... Are you saying you are storing the players inventory in your chest? What? I add slots players, and they are stored in the player's inventory? this.addSlotToContainer(new Slot(inventoryPlayer, 9+j+i*9, 8+18*j, 166+i*18)); And I add slots chest in the chest this.addSlotToContainer(new Slot(chest, i, 8, 12 + 18*i)); I wrote an example that keeps the chest more than 45 slots
-
http://pastebin.com/3i4W1v2R
-
Inside the chest is more than 45 slots. 4x9 player's inventory and 6x3 inventory chest ... And two of those have Slot #0. Slot #0 (player's inventory) and Slot #0 (chest inventory). for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventoryPlayer, 9+j+i*9, 8+18*j, 166+i*18)); // "9+j+i*9" why is there a +9 here? } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 224)); // "8 + i * 18" why is there a +9 here? } I corrected, but still crash package com.svk.generateChests.GUI.container; import java.util.ArrayList; import java.util.Random; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.svk.generateChests.Tile.TileGenerateChest; import com.svk.generateChests.base.BaseClassMod; import com.svk.generateChests.base.CommonProxy; import com.svk.generateChests.packets.PacketsID; import com.svk.generateChests.util.UtilPackerDataSet; public class ContainerEditGenerateChest extends Container { private TileGenerateChest table; private EntityPlayer player; public ContainerEditGenerateChest(InventoryPlayer inventoryPlayer, TileGenerateChest table) { this.table = table; table.openInventory(); player = inventoryPlayer.player; this.addPlayersSlots(inventoryPlayer); this.addChestSlots(table); } public void addPlayersSlots(InventoryPlayer inventoryPlayer) { for(int i = 0; i < 9; i++) { addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 224)); } for(int i = 0;i < 3; i++) { for(int j = 0; j < 9;j++) { addSlotToContainer(new Slot(inventoryPlayer, 9+j+i*9, 8+18*j, 166+i*18)); } } } public void addChestSlots(TileGenerateChest table) { for(int i = 0; i < 8; i++) { addSlotToContainer(new Slot(table, i, 8, 12 + 18*i)); addSlotToContainer(new Slot(table, i + 8, 53, 12 + 18*i)); } } @Override public void onContainerClosed(EntityPlayer p_75134_1_) { table.closeInventory(); } public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; } @Override public boolean canInteractWith(EntityPlayer p_75145_1_) { return true; } }
-
Does it matter? if(world.isRemote) { return false; } else { player.openGui(BaseClassMod.instance, GuiID.guiGenerateChest, world, x, y, z); return true; }
-
Inside the chest is more than 45 slots. 4x9 player's inventory and 6x3 inventory chest ...
-
Sorry, I forgot
-
How to make more than 45 slots in the gui? crash package com.svk.generateChests.Tile; import java.util.ArrayList; import com.svk.generateChests.base.CommonProxy; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; public class TileGenerateChest extends TileEntity implements IInventory { public ItemStack[] slots = new ItemStack[60]; public int[] procentSlot = null; public boolean setGen = false; public String customName = null; public TileGenerateChest(){} public void updateEntity() { super.updateEntity(); } public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList nbttaglist = nbt.getTagList("Items", 10); this.slots = new ItemStack[this.getSizeInventory()]; if (nbt.hasKey("CustomName", ) { this.customName = nbt.getString("CustomName"); } for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); int j = nbttagcompound1.getByte("Slot") & 255; if (j >= 0 && j < this.slots.length) { this.slots[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); } } this.procentSlot = nbt.getIntArray("procentSlots"); this.setGen = nbt.getBoolean("setGen"); } public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.slots.length; ++i) { if (this.slots[i] != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte)i); this.slots[i].writeToNBT(nbttagcompound1); nbttaglist.appendTag(nbttagcompound1); } } nbt.setTag("Items", nbttaglist); if (this.hasCustomInventoryName()) { nbt.setString("CustomName", this.customName); } nbt.setIntArray("procentSlots", this.procentSlot); nbt.setBoolean("setGen",this.setGen); } public int getSizeInventory() { return 60; } @Override public ItemStack getStackInSlot(int i) { return this.slots[i]; } public ItemStack decrStackSize(int i, int j) { if(this.slots[i] != null) { ItemStack itemstack; if(this.slots[i].stackSize < j) { itemstack = this.slots[i]; this.slots[i] = null; return itemstack; } else { itemstack = this.slots[i].splitStack(j); if(this.slots[i].stackSize == 0) { this.slots[i] = null; } return itemstack; } } return null; } public ItemStack getStackInSlotOnClosing(int i) { if(this.slots[i] != null) { ItemStack itemstack = this.slots[i]; this.slots[i] = null; return itemstack; } return null; } @Override public void setInventorySlotContents(int i, ItemStack itemstack) { this.slots[i] = itemstack; if(itemstack != null && itemstack.stackSize > this.getInventoryStackLimit()) { itemstack.stackSize = this.getInventoryStackLimit(); } } public void setInventoryName(String string) { } public String getInventoryName() { return "CustomName"; } @Override public boolean hasCustomInventoryName() { return true; } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer p_70300_1_) { return false; } @Override public void openInventory() { } @Override public void closeInventory() { } @Override public boolean isItemValidForSlot(int slot, ItemStack itemStack) { if(slots[slot] != null) { return true; } else { return false; } } } package com.svk.generateChests.GUI.container; import java.util.ArrayList; import java.util.Random; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import com.svk.generateChests.Tile.TileGenerateChest; import com.svk.generateChests.base.BaseClassMod; import com.svk.generateChests.base.CommonProxy; import com.svk.generateChests.packets.PacketsID; import com.svk.generateChests.util.UtilPackerDataSet; public class ContainerEditGenerateChest extends Container { public ContainerEditGenerateChest(InventoryPlayer inventoryPlayer, TileGenerateChest tileChest) { tileChest.openInventory(); this.addCustomSlots(tileChest); this.addPlayerSlots(inventoryPlayer); } public void addCustomSlots(TileGenerateChest chest) { for(int i = 0; i < 8; i++) { this.addSlotToContainer(new Slot(chest, i, 8, 12 + 18*i)); this.addSlotToContainer(new Slot(chest, i + 8, 53, 12 + 18*i)); } } public void addPlayerSlots(InventoryPlayer inventoryPlayer) { for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventoryPlayer, 9+j+i*9, 8+18*j, 166+i*18)); } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 224)); } } public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { return null; } @Override public boolean canInteractWith(EntityPlayer p_75145_1_) { return true; } }
-
In the resource packs, mcpatcher (Apparently optifine?) Have this feature. When you put a block, he is given Randomnaya texture from a predefined list. How to implement this? Metadata is possible through, but Metadata is a maximum of 16? Then the textures do not have more than 16? But in mcpatcher you can do... help me please.