Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ozBillo

Members
  • Joined

  • Last visited

  1. Hi Reika, Did you manage to sort out this problem? I'm having similar troubles. It's driving me a little batty!
  2. Awesome! I'm glad, and kinda surprised, that I could help
  3. 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.
  4. 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.
  5. Hi KeeganDeathman, Do you solve your problem? I'm having similar difficulties.
  6. That did the trick! Thank you, GotoLink.
  7. 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); }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.