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.14.4] custom effect
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
plugsmustard

[1.14.4] custom effect

By plugsmustard, December 2 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 2

Hello,

 

looking for some info on making a custom effect that goes with my custom food. basically its the nausea effect with a different name, picture, and colour. 
i took a look at the vanilla code, but could use some example of a custom one if possible. or just where to start.

 

thanks in advance!

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2098

Draco18s

Draco18s    2098

  • Reality Controller
  • Draco18s
  • Members
  • 2098
  • 14043 posts
Posted December 2

I'm not sure how creating a new instance of Effect and registering it with the RegistryEvent<Effect>.register event isn't sufficient.

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 2
44 minutes ago, Draco18s said:

I'm not sure how creating a new instance of Effect and registering it with the RegistryEvent<Effect>.register event isn't sufficient.

point taken. 
ive got a new effect now, but it just shows the particles, the screen does not warp or anything. and also the dreaded pink and black square where the "active effects" are

  • Quote

Share this post


Link to post
Share on other sites

poopoodice    2

poopoodice

poopoodice    2

  • Creeper Killer
  • poopoodice
  • Members
  • 2
  • 144 posts
Posted December 2
3 hours ago, plugsmustard said:

point taken. 
ive got a new effect now, but it just shows the particles, the screen does not warp or anything. and also the dreaded pink and black square where the "active effects" are

black and pink colour means you don't have a texture for it.

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 3
17 minutes ago, poopoodice said:

black and pink colour means you don't have a texture for it.

i know that. its the actual warping of the screen im looking for rn. 

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2098

Draco18s

Draco18s    2098

  • Reality Controller
  • Draco18s
  • Members
  • 2098
  • 14043 posts
Posted December 3

The screen warp effect is almost certainly 100% tied into the game's main rendering system and hard coded to check for Nausea.

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 3
10 minutes ago, Draco18s said:

The screen warp effect is almost certainly 100% tied into the game's main rendering system and hard coded to check for Nausea.

what exactly does that mean?

can i use it in soemway, or replicate it?

  • Quote

Share this post


Link to post
Share on other sites

Esmerald1no    0

Esmerald1no

Esmerald1no    0

  • Tree Puncher
  • Esmerald1no
  • Members
  • 0
  • 8 posts
Posted December 3
2 hours ago, plugsmustard said:

what exactly does that mean?

can i use it in soemway, or replicate it?

I am not positive, as I have not checked the code itself. But it might be as simple as making your custom effect set the same flag that the nausea effect triggers.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6693

diesieben07

diesieben07    6693

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6693
  • 45758 posts
Posted December 3
1 hour ago, Esmerald1no said:

I am not positive, as I have not checked the code itself. But it might be as simple as making your custom effect set the same flag that the nausea effect triggers.

No. The rendering checks for Effects.NAUSEA and nothing else.

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 3
3 hours ago, diesieben07 said:

No. The rendering checks for Effects.NAUSEA and nothing else.

well thats shit. where is this rendereing code exactly?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6693

diesieben07

diesieben07    6693

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6693
  • 45758 posts
Posted December 3
48 minutes ago, plugsmustard said:

well thats shit. where is this rendereing code exactly?

Use your IDE and search for usages of Effects.NAUSEA, it's easy to find...

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 3
1 hour ago, diesieben07 said:

Use your IDE and search for usages of Effects.NAUSEA, it's easy to find...

did that. what about changing the colour of the screen? is that the same as the problems im facing with the portal warp?

  • Quote

Share this post


Link to post
Share on other sites

plugsmustard    2

plugsmustard

plugsmustard    2

  • Stone Miner
  • plugsmustard
  • Members
  • 2
  • 51 posts
Posted December 3 (edited)

how about some code? this is what i have so far. 

 

where i register effects

https://github.com/drmdgg/marijuanacraft1.14.4/blob/61ab35c1a10418fa2fdfe331cf07da1d6a5162a3/src/main/java/drmdgg/marijuanacraft/ModEventSubscriber.java#L36-L41

 

the effects

https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/potion

Edited December 3 by plugsmustard
  • 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 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      Listen to outgoing commands

      By diesieben07 · Posted 2 hours ago

      By "outgoing" I assume you want to do this on the client? In that case ClientChatEvent is what you want.
    • diesieben07
      [Forge 1.14.4] Loading saved world

      By diesieben07 · Posted 2 hours ago

      You still have not answered the first question. Where are you calling this method? Show the code.
    • diesieben07
      [1.12.2] NBT inconsistencies

      By diesieben07 · Posted 2 hours ago

      This implementation is completely broken: https://github.com/Beardlessbrady/Currency-Mod/blob/master-2-1.12/src/main/java/beardlessbrady/modcurrency/block/vending/ItemVendorHandler.java
    • diesieben07
      SOS i cant play any modpack in twitch

      By diesieben07 · Posted 3 hours ago

      Make your own thread.
    • RaphGamingz
      [1.14.4] Dimensions

      By RaphGamingz · Posted 4 hours ago

      @Krevik I did but is there a simple way to create a chunk generator?
  • Topics

    • BattleDash
      1
      Listen to outgoing commands

      By BattleDash
      Started 8 hours ago

    • geekles
      5
      [Forge 1.14.4] Loading saved world

      By geekles
      Started Friday at 02:37 AM

    • BeardlessBrady
      9
      [1.12.2] NBT inconsistencies

      By BeardlessBrady
      Started Saturday at 04:12 AM

    • Skore
      8
      SOS i cant play any modpack in twitch

      By Skore
      Started 9 hours ago

    • RaphGamingz
      5
      [1.14.4] Dimensions

      By RaphGamingz
      Started Friday at 07:45 AM

  • Who's Online (See full list)

    • Differentiation
    • diesieben07
    • Edivad99
    • ILIKEMC
    • Ugdhar
    • X Squishling X
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14.4] custom effect
  • Theme
  • Contact Us
  • Discord

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