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.

NeusAap

Members
  • Joined

  • Last visited

  1. Hello, Today I made a method that uses 2 for loops to change the floor in front of you to 5x5 square filled with my own block (ModBlocks.houseFundaments). But whenever I rightclick with the item (which is the trigger event for my method), the world seems to jigger more than usual. Is this normal or am I doing something wrong? private EnumActionResult buildHouse(World w, EntityPlayer p, BlockPos pos, ItemStack s) { final int xRows = 5; final int zRows = 5; BlockPos negStartPos = new BlockPos(-1, 0, 0); BlockPos prevBlockPos = pos.add(negStartPos); for(int i=1; i<=xRows; i++){ BlockPos newBlockPos = new BlockPos(prevBlockPos.getX()+ 1, prevBlockPos.getY(), prevBlockPos.getZ()); w.setBlockState(newBlockPos, ModBlocks.houseFundaments.getDefaultState()); for (int j=1; j<=zRows; j++) { BlockPos zAddPos = new BlockPos(newBlockPos.getX(), newBlockPos.getY(), newBlockPos.getZ()+ 1); w.setBlockState(zAddPos, ModBlocks.houseFundaments.getDefaultState()); } prevBlockPos = newBlockPos; } //w.setBlockState(pos, ModBlocks.houseFundaments.getDefaultState()); return EnumActionResult.PASS; } P.S. Does any one know why this codes only places in a 5x2? I just don't understand. Thanks in advance, NeusAap

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.