Jump to content

Recommended Posts

Posted

Is there a Player method I could use to force players to spawn at a specific location in a dimension other than the Overworld?  I've tried using the following

 

public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player,
		EnumFacing side, float hitX, float hitY, float hitZ) {
	if (worldIn.isRemote) {
		return true;
	}
                else {
		player.setSpawnChunk(pos, true, player.worldObj.provider.getDimensionId());
	}
	return true;
}

 

It seems to only work in the Overworld though.

Posted

I've had problems with this in the past.  setspawn and get spawn seem to report the same position no matter what world you are in.  Change it in one, and it changes it in another. 

 

Probably something I did wrong and there is another way to get to the goal, but I finally implemented my own teleporter class that looks at a different place for spawnpoints per world and I made it so all teleports use my method instead.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

I think what I typed mislead what I meant.

 

Let me try an example. 

- normal dimensions -1,0,1

- Add other world groups every 5 starting up at 30, so 30,31,32 : 35,36,37, ect.  The first being the overworld.

 

When you get the world object reprsented by say dimension 35 and setspawn, it seems to be the spawn for every dimention.  If I search for getspawn from all the other dimensions (say 0, 30, 40, ect), they all report the spawnpoint just set for 35.

 

That is what I meant by what I said.  If that is the intended impact, so be it, but it seems weird.

 

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

I don't want to drift off his topic.  Only brought this up because it was relevant and I think this will work for him if used right (unlike what i'm doing).

 

I'm going off memory, but I think it is world.getspawn.  In 1.8 it returns a BlockPos.  Also from memory, it goes into its WorldInfo to get the position.  I've looked at a few times and been baffled as to why it doesn't work.  It seems like it should be per dimension, but iterating through the worlds after setting it, seems to impact every dimension at the same time. 

 

I'll post the exact code later in a seperate post and let this one continue for just Mr Tea Cup

 

 

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

oh, gotcha.  That matches its behavior

 

Is there a per dimension world-spawnpoint built in?

Long time Bukkit & Forge Programmer

Happy to try and help

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

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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