Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • naelsun

naelsun

Members
 View Profile  See their activity
  • Content Count

    12
  • Joined

    August 25, 2020
  • Last visited

    September 15, 2020

Community Reputation

1 Neutral

About naelsun

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. naelsun

    [1.16.2] How do I check if a player has a spawnpoint in another dimension?

    naelsun replied to naelsun's topic in Modder Support

    Thank you!
    • August 27, 2020
    • 3 replies
  2. naelsun started following [1.16.2] Triggering event if a specific food item is eaten, [1.16.2] How do I check if a player has a spawnpoint in another dimension? and [1.16.2] How do I teleport a player to their spawnpoint August 26, 2020
  3. naelsun

    [1.16.2] How do I check if a player has a spawnpoint in another dimension?

    naelsun posted a topic in Modder Support

    I wanted to check if a player is in the overworld, in the nether or in the end, and if his spawnpoint is in another dimension, cause an explosion, is it possible?
    • August 26, 2020
    • 3 replies
  4. naelsun

    [1.16.2] How do I teleport a player to their spawnpoint

    naelsun replied to naelsun's topic in Modder Support

    Well i agree that solving is the best part, i think it's just that i tried to do too much too fast, i just woke up now and i have been now looking at libraries trying to understand what's left to do for the last hour, also i have to thank you for not just giving me the solution, i just didn't realise because i misread, i really want to learn, i guess i'll just have to brainstorm a lot, so thank you again, i'll give you an update if i can find anything (i'm a bit late now but as you saw, yes, yes it does)
    • August 26, 2020
    • 8 replies
      • 1
      • Like
  5. naelsun

    [1.16.2] How do I teleport a player to their spawnpoint

    naelsun replied to naelsun's topic in Modder Support

    I’m really sorry, i should have reaserched more before trying to make a mod, every answer i get there is something i don’t understand, like what do you mean by moving the player? Sorry for bothering so much
    • August 25, 2020
    • 8 replies
  6. naelsun

    [1.16.2] How do I teleport a player to their spawnpoint

    naelsun replied to naelsun's topic in Modder Support

    Thank you so much for all your help, but i still couldn't make it work, is it because im using the LivingEntity parameter instead of the Player one? @SubscribeEvent public static void onFoodEaten(LivingEntityUseItemEvent.Finish event) { if (event.getItem().getItem() == RegistryHandler.GOLDEN_CHORUS_FRUIT.get()) { if (!event.getEntityLiving().getEntityWorld().isRemote) { ServerPlayerEntity player = (ServerPlayerEntity) event.getEntityLiving(); ServerWorld respawnWorld = player.server.getWorld(player.func_241141_L_()); BlockPos spawn = player.func_241140_K_(); float spawnAngle = player.func_242109_L(); boolean forcedSpawn = false; boolean preserveAnchorCharges = true; Optional<Vector3d> maybeSpawn = PlayerEntity.func_242374_a(respawnWorld, spawn, spawnAngle, forcedSpawn, preserveAnchorCharges); } } }
    • August 25, 2020
    • 8 replies
  7. naelsun

    [1.16.2] How do I teleport a player to their spawnpoint

    naelsun replied to naelsun's topic in Modder Support

    BlockPos bed = PlayerEntity.func_242374_a(); double px = bed.getX(); double py = bed.getY(); double pz = bed.getZ(); Minecraft.getInstance().player.sendChatMessage( "/tp " + px + " " + py + " " + pz ); Well this definetly seems too complex to me, that is what i have after some head scratching and i doubt i'm even close to it, since the func is asking for 5 arguments that i have no clue what might be, and even though i think i understand how the PlayerEvent.Clone event works i have no idea how to implement it. So what i'm asking is: am i close to getting it? Thank you again for helping btw!
    • August 25, 2020
    • 8 replies
  8. naelsun naelsun changed their profile photo August 25, 2020
  9. naelsun

    [1.16.2] How do I teleport a player to their spawnpoint

    naelsun posted a topic in Modder Support

    I wanted to teleport a player to their spawnpoint (bed, respawn anchor or if those two are unavailable the world spawn), but i can't find anything, could you help please?
    • August 25, 2020
    • 8 replies
  10. naelsun

    [1.16.2] Triggering event if a specific food item is eaten

    naelsun replied to naelsun's topic in Modder Support

    Oh I get it now, thank you so much for everything!
    • August 25, 2020
    • 9 replies
  11. naelsun

    [1.16.2] Triggering event if a specific food item is eaten

    naelsun replied to naelsun's topic in Modder Support

    I'll try to figure it out then, thank you for your help!
    • August 25, 2020
    • 9 replies
  12. naelsun

    [1.16.2] Triggering event if a specific food item is eaten

    naelsun replied to naelsun's topic in Modder Support

    Thank you for the help, but i'm not really understanding what you mean, i'll understand if you don't want to but could you explain please?
    • August 25, 2020
    • 9 replies
  13. naelsun

    [1.16.2] Triggering event if a specific food item is eaten

    naelsun replied to naelsun's topic in Modder Support

    Yes it is my custom food item, i am using LivingEntityUseItem event, but the only way i found to check is checking the item held by the player, i'll post what i wrote @SubscribeEvent public static void onFoodEaten(LivingEntityUseItemEvent.Finish event) { LivingEntity player = event.getEntityLiving(); if (player.getHeldItemMainhand().getItem() == RegistryHandler.GOLDEN_CHORUS_FRUIT.get()) { World world = player.getEntityWorld(); } } This works, but onlt if the player is holding more than one of the food presented, is there another way to check if the player is eating a specific item?
    • August 25, 2020
    • 9 replies
  14. naelsun

    [1.16.2] Triggering event if a specific food item is eaten

    naelsun posted a topic in Modder Support

    I have very little knowledge on modding so sorry if this is obvious and I just don't know how, but I want an event to be triggered when a specific item is eaten, is it possible? If so how? Thank you in advance!
    • August 25, 2020
    • 9 replies
  • All Activity
  • Home
  • naelsun
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community