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.

Leaderboard

Popular Content

Showing content with the highest reputation on 02/09/21 in Posts

  1. I believe you are missing the rotate/mirror functions. I believe that these are called when the structure is generated and is being rotated. I got these from the StairsBlock.java class. public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } public BlockState mirror(BlockState state, Mirror mirrorIn) { Direction direction = state.get(FACING); StairsShape stairsshape = state.get(SHAPE); switch(mirrorIn) { case LEFT_RIGHT: if (direction.getAxis() == Direction.Axis.Z) { switch(stairsshape) { case INNER_LEFT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.INNER_RIGHT); case INNER_RIGHT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.INNER_LEFT); case OUTER_LEFT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.OUTER_RIGHT); case OUTER_RIGHT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.OUTER_LEFT); default: return state.rotate(Rotation.CLOCKWISE_180); } } break; case FRONT_BACK: if (direction.getAxis() == Direction.Axis.X) { switch(stairsshape) { case INNER_LEFT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.INNER_LEFT); case INNER_RIGHT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.INNER_RIGHT); case OUTER_LEFT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.OUTER_RIGHT); case OUTER_RIGHT: return state.rotate(Rotation.CLOCKWISE_180).with(SHAPE, StairsShape.OUTER_LEFT); case STRAIGHT: return state.rotate(Rotation.CLOCKWISE_180); } } } return super.mirror(state, mirrorIn); } You will obviously need to change up the mirror function with the shapes you have defined instead. I believe that the rotate function would probably work as is. I would recommend looking into the StairsBlock.java class if it is still having issues.
  2. You should never create a new instance of a world, the vanilla code handles that for you. In this case, you have access to the world via ItemUseContext.getWorld().
  3. Have a look in Minecraft's NetherFossilStructure for placement in the nether, this will give you an idea of how to check for correct positions. I did a similar thing in my mod here for a Nether Well to be generated: https://github.com/Phrille/Vanilla-Boom/blob/master/src/main/java/phrille/vanillaboom/world/structures/NetherWellStructure.java Now keep in mind that my code does not do any placement checks other than the first check to see if I start the gen on a block. For instance no checks are done to check if the is enough air to fit the structure in and so on.

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.