Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • 1.12.2 Giving a Player a Potion Effect at Spawn
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
guyWITH2forks

1.12.2 Giving a Player a Potion Effect at Spawn

By guyWITH2forks, May 2, 2018 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

guyWITH2forks    0

guyWITH2forks

guyWITH2forks    0

  • Tree Puncher
  • guyWITH2forks
  • Members
  • 0
  • 20 posts
Posted May 2, 2018

Hey guys, I need some help with a portion of my mod.

I am trying to build a sort of moon dimension that mimics being in space. What I wasn't to do to simulate not being able to breath in space is to have the player automatically poisoned if when they spawn into the world. My custom armor (Space suits) will then negate this effect for a duration. How do I go about adding in the poison effect at spawn to my custom Dimension/Biome?

Any help would be appreciated, and if you have examples, the more the merrier.

Cheers

  • Quote

Share this post


Link to post
Share on other sites

NextInima    0

NextInima

NextInima    0

  • Tree Puncher
  • NextInima
  • Forge Modder
  • 0
  • 48 posts
Posted May 2, 2018 (edited)

i would start with 

 

Quote

PlayerEvent.PlayerChangedDimensionEvent if you want to check if he went to your dim.
  

 

 

Quote

Or just create a TickHandler on the server which checks the biome of each player.

 

player.world.getBiome(new BlockPos(playerpos)).equals(YOURBIOM));

          

 player.world.getBiome(new BlockPos(playerpos)).getBiomeName();

 

 

 

Edited May 2, 2018 by NextInima
  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Lea9ue
      [1.14-newer] how to keep value when closing minecraft

      By Lea9ue · Posted just now

      Capabilities. 
    • matt1999rd
      [1.14-newer] how to keep value when closing minecraft

      By matt1999rd · Posted 2 minutes ago

      hello, In my mod I want to keep the value of a variable when closing minecraft and I don't know how to do it . It is three integer from a BlockPos...  
    • matt1999rd
      [1.14-newer] deprecated method onBlockActivated

      By matt1999rd · Posted 4 minutes ago

      okay so how can I replace it if I cannot use blockState ? I saw on other post that people in 1.14 are using onBlockActivated too and nothing is suggest to replace it in the Block class unfortunately...
    • DragonITA
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA · Posted 5 minutes ago

      i try with delete the entier Config Folder but it still dont work and the Folder come back.
    • plugsmustard
      on/off button for custom furnace

      By plugsmustard · Posted 6 minutes ago

      what exactly is wrong with them. i was told to return a new packet?
  • Topics

    • JetCobblestone
      1
      [1.14] moving item assignment to a separate function

      By JetCobblestone
      Started 9 minutes ago

    • matt1999rd
      1
      [1.14-newer] how to keep value when closing minecraft

      By matt1999rd
      Started 2 minutes ago

    • matt1999rd
      9
      [1.14-newer] deprecated method onBlockActivated

      By matt1999rd
      Started November 1

    • DragonITA
      1
      [1.14.4] Why minecraft with mod dont want start?

      By DragonITA
      Started 1 hour ago

    • plugsmustard
      43
      on/off button for custom furnace

      By plugsmustard
      Started Wednesday at 03:11 PM

  • Who's Online (See full list)

    • matt1999rd
    • JetCobblestone
    • Lea9ue
    • plugsmustard
    • LexManos
    • FaxeeK
    • Vorquel
    • DragonITA
    • xVoidZx
    • Silverpool64
    • Hendoor64
    • Atila1091
    • maycool12
    • vaartis
    • Draco18s
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • 1.12.2 Giving a Player a Potion Effect at Spawn
  • Theme
  • Contact Us
  • Discord

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