diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2021-08-25 14:51:42 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2021-08-25 14:51:42 -0700 |
commit | fca13e61adcfbdbf38497c20a2e41ef120ef1d13 (patch) | |
tree | 2fcf430a4de62639338bf9b360853bb46c5b9d90 /src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java | |
download | Iceberg-fca13e61adcfbdbf38497c20a2e41ef120ef1d13.tar.gz Iceberg-fca13e61adcfbdbf38497c20a2e41ef120ef1d13.tar.bz2 Iceberg-fca13e61adcfbdbf38497c20a2e41ef120ef1d13.zip |
Initial commit.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java new file mode 100644 index 0000000..aa91fa5 --- /dev/null +++ b/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java @@ -0,0 +1,57 @@ +package com.anthonyhilyard.iceberg.events; + +import net.minecraft.entity.Entity; +import net.minecraft.fluid.Fluid; +import net.minecraftforge.event.entity.EntityEvent; + +public class EntityFluidEvent extends EntityEvent +{ + private final Fluid fluid; + + private EntityFluidEvent(Entity entity, Fluid fluid) + { + super(entity); + this.fluid = fluid; + } + + public Fluid getFluid() + { + return fluid; + } + + /** + * This event is fired when an entity enters a fluid to at least eye-level. + * If this is a player, they will see the "submerged in fluid" effect at this point. + * <br> + * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br> + * <br> + * This event does not have a result. {@link HasResult}<br> + * <br> + * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + */ + public static class Entered extends EntityFluidEvent + { + public Entered(Entity entity, Fluid fluid) + { + super(entity, fluid); + } + } + + /** + * This event is fired when an entity was previously submerged in a fluid to at least eye-level and no longer are. + * If this is a player, they will no longer see the "submerged in fluid" effect at this point. + * <br> + * This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br> + * <br> + * This event does not have a result. {@link HasResult}<br> + * <br> + * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + */ + public static class Exited extends EntityFluidEvent + { + public Exited(Entity entity, Fluid fluid) + { + super(entity, fluid); + } + } +} |