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.

zedlander1000

Members
  • Joined

  • Last visited

Everything posted by zedlander1000

  1. Welp i got that situation sorted. thanks that worked. only problem now is that i need to update my if statement to check if the bed is missing soo.... i should be able to do that my self but i will report to this post if i have any more trouble.
  2. so like this: i found the declaration for this but why can it still not be resolved? so far this is what i believe you have done right? or i could be entirely misinterpreting you. removing the NetHandlerPlayServer makes setPlayerLocation an error saying it needs a different cast EDIT: ((EntityPlayerMP) user).playerNetServerHandler.setPlayerLocation(world.getSpawnPoint().getX(), world.getTopSolidOrLiquidBlock(world.getSpawnPoint()).getY(), world.getSpawnPoint().getZ(), user.getRotationYawHead(), user.getDefaultEyeHeight()); seems to have no errors. ima try this out and see if it works
  3. yes? well i am coding in 1.8 forge-1.8-11.14.3.1446 should i use teleporter.playerNetServerHandler.setPlayerLocation (player.posX, player.posY, player.posZ, player.rotationYaw, player.rotationPitch); like... what is the difference from what i am doing to teleport the user? ? EDIT: i get this and i checked it's declaration but it doesnt seem to be declared anywhere.
  4. ISSUE FIXED So i am making an Item in tribute to the Terrarian Magic Mirror that teleports you to either your spawn point or your bed depending if you have slept in the bed else if your bed is missing/obstructed, or just for reasons you cannot spawn at your bed, just spawn at the world's spawn location. I got it working for a while but it would only spawn me to the spawn chunks but now since i have added if(!world.isRemote), it doesnt want to teleport at all. NEW ISSUE Hello i got my old issue fixed but to bring up a new issue now. The inverse is happening now to where if i havnt slept in a bed at all, the item flat out doesnt work but if i sleep in a bed then destroy it, it shall teleport me to spawn like it should. Basically: if i start a new world, use the item, i get an error and it doesnt teleport me to my original spawn. If i sleep, it will teleport me to my bed. If i destroy the bed, It teleports me to spawn. issue to fix is the item not working if you have not used a bed at all. I updated the code down below for eyes to view. UPDATED CODE: ERROR: I get this with the new stated issue above. My System.out statement doesn't seem to output so i am quite worried where the code is actually messing up. Possible solution would be to use a try catch statement for null pointers in my if statement checking for bed spawn point for null. will that work? Any other suggestions? OLD OUTPUT with an output of: World: net.minecraft.world.WorldServer@74fababf WorldtoString: net.minecraft.world.WorldServer@74fababf EntityPlayer: EntityPlayerMP['Player61'/164, l='New World', x=-133.69, y=66.00, z=-52.32] Player: EntityPlayerMP['Player61'/164, l='New World', x=-133.69, y=66.00, z=-52.32] Bed Location: null Spawn Location: BlockPos{x=-124, y=64, z=-45} Spawn top point: 64

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.