Added, but it is still happening..
Any idea why? The actual code is below.. x, y, and z come from the constructor.
public boolean canInteractWith(EntityPlayer entityplayer)
{
if(entityplayer.worldObj.getBlockId(x, y, z) != StaffCraft.infusionTable.blockID)
{
return false;
} else
{
return entityplayer.getDistanceSq((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D) <= 64D;
}
}
The code is the exact same other than the IDs. Everywhere that uses the ID is correct (I will check again to be sure). It doesn't crash, I fixed that issue. It DOES open, and prints out "Opening Gui" where I told it to, but it closes right away.
Ah, so it seems somewhere along the way, the ID got changed to a 10, but I forgot to change it elsewhere. Crash is fixed, but now it won't open again, lol.
Hey guys,
I have a custom block with a custom gui, but whenever I right click the block, the gui appears and then quickly disappears. Why is this happening? Also, when I right click the block with an item in my hand, the item vanishes. All of my code is below.. Can someone help? I have been able to find that it is most likely something returning false, however I can't find anywhere that it doesn't return true.
BlockInfusionTable.java
GuiInfusionTable.java
TileEntityInfusionTable.java
ContainerInfusionTable.java
Hey guys,
So I have what is essentially a custom snowball. I would like it to create particles when it flies. I looked in the bow class, and it uses the function onUpdate() to create the particles if the arrow is a critical hit. However, when I try using this function in the snowball class, the snowball renders, the particles render properly, but the snowball never moves. Anyone know how to fix this?