A different way of doing it is making one model for the entire thing that is two blocks high(or how ever high you want it) then having a block render that model.
So then you have a block rendering a model two blocks tall, to solve that have the block that is rendering the model place a block on top of its self when it is placed that is empty no texture or anything. Then just check using the onBlockDeystroyedByPlayer () to see if the top block is broken then delete the bottom block and to check when the bottom block is broken delete the top block.
That should give you a two high block with a model, if that made sense.
Also just give the bottom block the TileEntity not the top.
use player.getCurrentHeldItem().getItem() instanceof SoulCraft.creeperBow
instead of
player.inventory.getStackInSlot(player.inventory.currentItem).getItem() == SoulCraft.creeperBow
OK so in your writeToNBT() and readFromNBT() you aren't reading or writing the locations so that will not be saved if they are unloaded.
Secondly GUIs are client side only so you need a packet send a packet to the client saying what the locations are so you can show then on the GUI.
Also, I can't see the rest of your GUI class, but from what I can see you are doing the TileEntity stuff client side. If you could add the rest of your GuiBaseBuilder it would help.
You can just call GL11.glDisable(GL11.GL_LIGHTING) before your rendering then GL11.glEnable(GL11.GL_LIGHTING), that will remove the lighting for you block.
So to make your own custom main menu, just hook into the GuiOpenEvent that forge provides, and when the vanilla main menu is open set it to you main menu.
I don't know about the second thing you want to do, maybe use the PlayerInteractEvent and detect left clicks on blocks, and change the model. I don't know about that its just an educated guess.
Hi,
Can some one help me, I am looking for a way to cancel the entity death animation, when the entity turns red and falls over. I can't seem to find any event that will help me do so.
ok, I noticed that I was looking for wooden first just after I posted it, so I changed it to diamond but it still didn't work, I am trying a different way now.
I wondering if anyone can help me...
Here's my code
private Minecraft mc = Minecraft.getMinecraft();
private List<ItemStack> playerItems = new ArrayList<ItemStack>();
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onPlayerRender(RenderPlayerEvent.Specials.Post event) {
if (event.isCanceled())
return;
ItemStack stackToRender = getSelectItem(event.entityPlayer.inventory);
if (stackToRender != null && stackToRender != event.entityPlayer.getCurrentEquippedItem()) {
System.out.println(stackToRender.getDisplayName());
renderItemIn3D(stackToRender);
}
}
private ItemStack getSelectItem(InventoryPlayer inventory){
ItemStack selectedItem = null;
for(int i = 0; i < inventory.getSizeInventory(); i++){
ItemStack curStack = inventory.getStackInSlot(i);
if (curStack != null) {
if ((curStack.getItem() instanceof ItemSword) && !(playerItems.contains(curStack))) {
playerItems.add(curStack);
}
}
}
for(int j = 0; j < playerItems.size(); j++){
ItemStack currItem = playerItems.get(j);
if(currItem.getItem() == Items.wooden_sword){
selectedItem = currItem;
return selectedItem;
} else if(currItem.getItem() == Items.stone_sword){
selectedItem = currItem;
return selectedItem;
} else if(currItem.getItem() == Items.iron_sword){
selectedItem = currItem;
return selectedItem;
} else if(currItem.getItem() == Items.stone_sword){
selectedItem = currItem;
return selectedItem;
} else if(currItem.getItem() == Items.wooden_sword){
selectedItem = currItem;
return selectedItem;
}
}
return selectedItem;
}
I am trying to get it so I can render the best Sword on the players inventory, but it only renders a wooden sword even though I check for all the swords and It should render the diamond one if that is the best in the inventory, then gold, then iron etc. But it doesn't work so can some one point me in the right direction. (I have tried the if statements the other way round starting with the diamond sword btw)