Jump to content

Recommended Posts

Posted

Well, I've looked for 3 minutes in the code and found this:

 

mcServer.getConfigurationManager().transferPlayerToDimension(entityplayermp, dimensionid);

 

 

However, you'll need an instance of the Minecraft server (the mcServer object), an instance of the player from the server (the entityplayermp object) and your dimension ID (the dimensionid variable).

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 8/28/2012 at 11:32 AM, SanAndreasP said:

Well, I've looked for 3 minutes in the code and found this:

 

mcServer.getConfigurationManager().transferPlayerToDimension(entityplayermp, dimensionid);

 

 

However, you'll need an instance of the Minecraft server (the mcServer object), an instance of the player from the server (the entityplayermp object) and your dimension ID (the dimensionid variable).

thx sanandreap

i not understand how to use this code

 

ps.i use this code in gui for transfer player to dimension

Posted

If you use a GUI, then you should do it with a packet, means the GUI sends a packet to the server, the server recieves it and will then teleport the player.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • // ----------------- MY CRAFTING TABLE BLOCK CLASS ------------------------------ public class WhiteCraftingTableBlock extends Block { public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; private static final Component CONTAINER_TITLE = new TranslatableComponent("container.crafting"); public WhiteCraftingTableBlock(Properties p_49795_) { super(p_49795_); } @Override public InteractionResult use(BlockState p_52233_, Level p_52234_, BlockPos p_52235_, Player p_52236_, InteractionHand p_52237_, BlockHitResult p_52238_) { if (p_52234_.isClientSide) { return InteractionResult.SUCCESS; } else { p_52236_.openMenu(p_52233_.getMenuProvider(p_52234_, p_52235_)); p_52236_.awardStat(Stats.INTERACT_WITH_CRAFTING_TABLE); return InteractionResult.CONSUME; } } @Override public BlockState getStateForPlacement(BlockPlaceContext pContext) { return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite()); } @Override public BlockState rotate(BlockState pState, Rotation pRotation) { return pState.setValue(FACING, pRotation.rotate(pState.getValue(FACING))); } @Override public BlockState mirror(BlockState pState, Mirror pMirror) { return pState.rotate(pMirror.getRotation(pState.getValue(FACING))); } @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) { pBuilder.add(FACING); } @Override public MenuProvider getMenuProvider(BlockState p_52240_, Level p_52241_, BlockPos p_52242_) { return new SimpleMenuProvider((p_52229_, p_52230_, p_52231_) -> new CraftingMenu(p_52229_, p_52230_, ContainerLevelAccess.create(p_52241_, p_52242_)), CONTAINER_TITLE); } }
    • This is a warning and can be ignored - add the new crash or log
    • Also make a test without Repurposed Structures and/or IDAS (Integrated Dungeons and Structures)
    • Sorry for the late response, but the game opened and I made a world but it's stuck at 0% Here's the latest.log https://mclo.gs/peEb1R8 I disabled The Factory Must Grow and soulsweapons
×
×
  • Create New...

Important Information

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