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.

vipuri

Members
  • Joined

  • Last visited

  1. Thank you very much! I removed the negation and it worked fine. Thanks for the advice about cleaning up my code as well. Cheers!
  2. I'm trying to make a simple block that just makes a pillar of itself when used. Everything is working when I run it, however problems arise when I save the world and reload it. All of the new blocks placed by the block disappear when the world is reloaded. I haven't been able to find much information on this and I'm relatively new to Minecraft modding and Java my background is in C/C++ for research and robotics. @Override public boolean onBlockActivated( World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (!world.isRemote){ return false; } Random rand = new Random(); IBlockState block = world.getBlockState(pos); for(int i = 0; i < 7; i++){ world.setBlockState(pos.add(0, i, 0), block); } for(int k = 0; k < 20; k++){ int x, z; x= rand.nextInt(16)-8; z= rand.nextInt(16)-8; EntityLightningBolt lightning = new EntityLightningBolt(world, pos.getX()+x, pos.getY(), pos.getZ()+z, false); world.addWeatherEffect(lightning); } return true; } I'm working by deconstructing examples but I seem to be missing something. Any advice is appreciated, thanks in advance.

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.