Class EffectModificationReplication

java.lang.Object
etithespirit.orimod.networking.potion.EffectModificationReplication

public class EffectModificationReplication extends Object
A class that replicates changes in effect duration over the network.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraftforge.network.simple.SimpleChannel
    The networking channel for this packet.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    registerPackets(net.minecraftforge.api.distmarker.Dist side)
    Register the packets for the given logical side.
    static void
    tellClientDurationModified(net.minecraft.server.level.ServerPlayer player, Class<? extends net.minecraft.world.effect.MobEffect> effect, int addedDuration)
    Reports that the duration of a status effect was modified to a client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final net.minecraftforge.network.simple.SimpleChannel INSTANCE
      The networking channel for this packet.
  • Constructor Details

    • EffectModificationReplication

      public EffectModificationReplication()
  • Method Details

    • registerPackets

      public static void registerPackets(net.minecraftforge.api.distmarker.Dist side)
      Register the packets for the given logical side.
      Parameters:
      side - The side that this packet exists on.
    • tellClientDurationModified

      @ServerUseOnly public static void tellClientDurationModified(net.minecraft.server.level.ServerPlayer player, Class<? extends net.minecraft.world.effect.MobEffect> effect, int addedDuration)
      Reports that the duration of a status effect was modified to a client.
      Parameters:
      player - The player to tell.
      effect - The effect that was changed.
      addedDuration - The change in duration.