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.

fitty_spenc

Members
  • Joined

  • Last visited

Everything posted by fitty_spenc

  1. Yup it sure does, but if it works it don't need fixing
  2. Got it to work, I needed to have it happen on both the server and client side so I removed the if(!world.isRemote) that surrounds the entire thing and adjusted my counter because the function gets called twice for every individual click. ItemMagicStick.java
  3. I am creating a mod that destroys blocks between two points, but when I use it in game, the blocks that get destroyed aren't actually disappearing until I log out and back in again. I am pretty new to modding but I believe it is caused by some disconnect between server and client. Anyone know how to fix this? I attached the whole file but here is the snippet where I am doing the destruction: int sX = 1, sY = 1, sZ = 1; if (((int)(posA[1].getX()) - (int)(posA[0].getX())) > 0) sX = -1; if (((int)(posA[1].getY()) - (int)(posA[0].getY())) > 0) sY = -1; if (((int)(posA[1].getZ()) - (int)(posA[0].getZ())) > 0) sZ = -1; for (int i = 0; i <= Math.abs((int)(posA[1].getX()) - (int)(posA[0].getX())); i++ ){ for (int j = 0; j <= Math.abs((int)(posA[1].getY()) - (int)(posA[0].getY())); j++ ){ for (int k = 0; k <= Math.abs((int)(posA[1].getZ()) - (int)(posA[0].getZ())); k++ ){ //somehow need to refresh client from server side for each block being destroyed worldIn.destroyBlock(new BlockPos(i * sX + posA[1].getX(), j * sY + posA[1].getY(), k * sZ + posA[1].getZ()), true); worldIn.scheduleBlockUpdate(new BlockPos(i * sX + posA[1].getX(), j * sY + posA[1].getY(), k * sZ + posA[1].getZ()), Blocks.AIR, Blocks.AIR.tickRate(worldIn), 0); player.sendMessage(new TextComponentString("rm block " + (i * sX + posA[1].getX()) + " " + (j * sY + posA[1].getY()) + " " + (k * sZ + posA[1].getZ()))); } } } ItemMagicStick.java

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.