Everything posted by ozBillo
-
Block collision bounds are "static" (Java term)
Hi Reika, Did you manage to sort out this problem? I'm having similar troubles. It's driving me a little batty!
-
when multiblock is complete, render model?
Awesome! I'm glad, and kinda surprised, that I could help
-
when multiblock is complete, render model?
At the start of my onBlockPlacedBy I had if (!world.isRemote){ onBlockPlacedBy When I removed that it worked. But, I'll probably sort out the packet handling stuff, anyway.
-
when multiblock is complete, render model?
Well, my guess is it's something to do with packets. None of my tileentity variables are being retained. I'm adding packet handling code now. I'll report back with how I go.
-
when multiblock is complete, render model?
Hi KeeganDeathman, Do you solve your problem? I'm having similar difficulties.
-
[Solved] Custom BlockFenceGate won't make open/close sounds
That did the trick! Thank you, GotoLink.
-
[Solved] Custom BlockFenceGate won't make open/close sounds
If the gate is closed and the player is holding a valid key, the gate opens. If the gate is open and the player is not holding a valid key, the gate closes. I use the playAuxSFXAtEntity method to play the appropriate sound on gate open and close. But, I'm not getting any sound from the gate. Other gates sound okay. Here is the relevant code. Have I missed something? public class MyGate extends BlockFenceGate { ... @Override public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if(!par1World.isRemote) { if (par5Entity instanceof EntityLivingBase) { EntityLivingBase entityLiving = (EntityLivingBase) par5Entity; if (entityLiving instanceof EntityPlayer) { EntityPlayer entityPlayer = (EntityPlayer) entityLiving; ... int i1 = par1World.getBlockMetadata(par2, par3, par4); boolean MyGateOpen = isFenceGateOpen(i1); if (!MyGateOpen && holdingValidKey) { MyGateOpen = true; par1World.setBlockMetadataWithNotify(par2, par3, par4, i1 | 4, 2); // open the gate par1World.playAuxSFXAtEntity(entityPlayer, 1003, par2, par3, par4, 0); } else if (MyGateOpen && !holdingValidKey) { MyGateOpen = false; par1World.setBlockMetadataWithNotify(par2, par3, par4, i1 & -5, 2); // close the gate par1World.playAuxSFXAtEntity(entityPlayer, 1003, par2, par3, par4, 0); }
IPS spam blocked by CleanTalk.