-
[SOLVED]Block not rendering correctly in inventory
Well if the entire block is one texture then both setOverride and clearOverride should be outside the loop. Good luck on your modding career!
-
[SOLVED]Block not rendering correctly in inventory
I think it's setNormal() that matters... Still, don't quote me on that; I copied this from a tutorial somewhere and... even BC3 uses this set of methods, so... Mazetar, you're on a replying spree! EDIT: well well well. Turns out I put the brace in the wrong place, the entire chunk is supposed to be inside the for loop... Case closed (:
-
[SOLVED]Block not rendering correctly in inventory
Help...! I've just made a model for my Tile Entity, and I'm rendering it using an ISBRH (ISimpleBlockRenderingHandler), along with setRenderBounds() and renderStandardBlock(). The block looks fine in-world, but (as from the title), I'm having problems with it in the inventory. The model is basically a copy of the vanilla Anvil model. However, seen here: It doesn't render the whole block... Here's the code: http://pastebin.com/prvwfMjS
-
Bug: Forge causing some items to not show up in frames
Random jutting in: Indeed, I'm on #601, but I have this problem too. However, I've noticed... If you turn your graphics to 'fast' instead of 'fancy', the items inside *will* render... Very odd.
-
Weird Behaviour with TileEntity Container (Items getting dropped when clicked)
Hello. I have this intriguing problem here: I have this TileEntity that functions somewhat like a chest, with 12x9 slots... Here's the problem: Based on , The blank spots are the places where, when an Item is present (regardless of stack size), when I click on it, it gets dropped. Left-click drops 1, right-click drops the whole stack. The slots with items inside behave normally... Here are the relevant code files: TileEntity: http://pastebin.com/pXHAuCW9 Container: http://pastebin.com/BBSy4nMh Gui: http://pastebin.com/tWqC8jWr Help? This was a direct result of porting the mod over to 1.5, I didn't have any problems with this in 1.4.7 and I suspect it's the new inventory features that's causing it... Any help is much appreciated, thanks!
-
Method that gets called when item is picked from creative inventory?
Heh... well it turns out (thanks to monoxide on IRC for pointing this out) that I can just add an ItemStack with NBT data already on it to the creative inventory... Thanks guys!
-
Method that gets called when item is picked from creative inventory?
Hello.... Quick and simple question here: Is there a method that I can @Override in Item that will get called when an item is taken from the creative inventory? I know about onCreated(), but it only gets called when the item is crafted, as opposed to say, 'cheated in'... I need that method to initialise some NBT data on my item, unless there is some other way to do it? Thanks.
-
Shift-Clicking not working (transferStackInSlot() not being called)!
Update: I've tried updating to forge #515... still nothing... Any help?
-
Shift-Clicking not working (transferStackInSlot() not being called)!
Help! I've got this large chest tile-entity. Right now I'm trying to make it work with shift-clicking, however it doesn't... It is a 12x9 inv, same as IronChest's diamond chest. Anyway, here's the problem: only items in certain slots can be shift-clicked *out* of the chest, while only certain other slots can be shift-clicked into the chest from the player... After debugging, I realised that for the problem slots, transferStackInSlot() isn't even being called... Strange. <script type="text/javascript" src="http://ideone.com/api/embed.js/link/OQhEPW"></script> Here are the images: Slots with blocks/items in them are the problem slots. And here is the code: package requimrar.Minecraft.RChem.Machines; import requimrar.Minecraft.RChem.RChem; 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; public class ContainerLabBench extends Container { protected TileLabBench ThisLabBench; public ContainerLabBench(TileLabBench te, InventoryPlayer playerinv) { this.ThisLabBench = te; int i = 0; for (int y = 0; y < 9; y++) { for (int x = 0; x < 12; x++) { addSlotToContainer(new Slot(te, i, x * 18 - 18, y * 18 - 37)); i++; } } for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) { addSlotToContainer(new Slot(playerinv, hotbarSlot, 9 + hotbarSlot * 18, 256 - 69)); } int leftCol = (238 - 162) / 2 + 1; for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) { for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) { addSlotToContainer(new Slot(playerinv, playerInvCol + playerInvRow * 9 + 9, 9 + playerInvCol * 18, 256 - (4 - playerInvRow) * 18 - 55)); } } } @Override public boolean canInteractWith(EntityPlayer player) { return ThisLabBench.isUseableByPlayer(player); } @Override public ItemStack transferStackInSlot(EntityPlayer p, int i) { ItemStack itemstack = null; Slot slot = (Slot)inventorySlots.get(i); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (i < 108) { if (!mergeItemStack(itemstack1, 108, this.inventorySlots.size(), true)) { return null; } } // else if (!mergeItemStack(itemstack1, 0, 108, false)) // { // return null; // } if (itemstack1.stackSize == 0) { slot.putStack(null); } else { slot.onSlotChanged(); } if(itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(p, itemstack1); } return itemstack; } } Thanks for your help!
IPS spam blocked by CleanTalk.