Skip to content

Add on Effects

Eleksploded edited this page Aug 6, 2019 · 8 revisions

Add-on Effects Tutorial

  1. Setup Mod Environment and add LavaDynamics. (If you don't know how, look up a tutorial online)
  2. Create a class that implements IPostGenEffect from com.eleksploded.lavadynamics.postgen.IPostGenEffect
  3. Return the name of your effect in the getName() method. Best to use all lowercase.
  4. Write your effect in void execute(Chunk chunk, int top)
    • chunk is the chunk the volcano is in.
    • top is the y-level of the top of the volcano
  5. Register an instance of your class by using PostGenEffectRegistry.registerEffect(<youreffectclassinstance>) in FMLPostInitializationEvent
  6. (Pre-5.6.3) Be sure to add your Lowercase effect name to the LavaDynamics config (Post-5.6.3, this is no longer necessary)
  7. Profit.

Other Notes

  • You can get the world from the volcano chunk using chunk.getWorld()
  • PostGenEffectUtils has some methods to help you out (Versions are noted after method)
    • getVolcanoTop Gives the top of the volcano in a BlockPos (5.6.7)
Clone this wiki locally