Package com.petrolpark.event
Class CommonEvents
java.lang.Object
com.petrolpark.event.CommonEvents
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidfailToBreed(net.neoforged.neoforge.event.entity.living.BabyEntitySpawnEvent event) static final voidonBabyEntitySpawn(net.neoforged.neoforge.event.entity.living.BabyEntitySpawnEvent event) Prevent a Mob from breeding if it is infertile due to an Effect.static voidonEntityDeath(net.neoforged.neoforge.event.entity.living.LivingDeathEvent event) Gets rid of shader effects on Player death.static voidonMobEffectExpired(net.neoforged.neoforge.event.entity.living.MobEffectEvent.Expired event) Gets rid of shader effects on effect expirationstatic voidonMobEffectRemoved(net.neoforged.neoforge.event.entity.living.MobEffectEvent.Remove event) Gets rid of shader effects on effect removal.static voidonPlayerLoggedIn(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event) static voidonPlayerLogOut(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingOut event) Cleans residual shader effects on disconnectionstatic voidonPotionBrewed(net.neoforged.neoforge.event.brewing.PotionBrewEvent.Post event) Preserve Contaminants of Potions, and start decaying newly brewed Potions.static voidregisterCommands(net.neoforged.neoforge.event.RegisterCommandsEvent event)
-
Field Details
-
PLAYER_JOINS_FUNCTION_TAG
public static final net.minecraft.resources.ResourceLocation PLAYER_JOINS_FUNCTION_TAG
-
-
Constructor Details
-
CommonEvents
public CommonEvents()
-
-
Method Details
-
registerCommands
public static void registerCommands(net.neoforged.neoforge.event.RegisterCommandsEvent event) -
onPlayerLoggedIn
public static void onPlayerLoggedIn(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event) -
onPotionBrewed
public static void onPotionBrewed(net.neoforged.neoforge.event.brewing.PotionBrewEvent.Post event) Preserve Contaminants of Potions, and start decaying newly brewed Potions.- Parameters:
event-
-
onPlayerLogOut
public static void onPlayerLogOut(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingOut event) Cleans residual shader effects on disconnection- Parameters:
event-
-
onMobEffectRemoved
public static void onMobEffectRemoved(net.neoforged.neoforge.event.entity.living.MobEffectEvent.Remove event) Gets rid of shader effects on effect removal.- Parameters:
event-
-
onMobEffectExpired
public static void onMobEffectExpired(net.neoforged.neoforge.event.entity.living.MobEffectEvent.Expired event) Gets rid of shader effects on effect expiration- Parameters:
event-
-
onEntityDeath
public static void onEntityDeath(net.neoforged.neoforge.event.entity.living.LivingDeathEvent event) Gets rid of shader effects on Player death.- Parameters:
event-
-
onBabyEntitySpawn
public static final void onBabyEntitySpawn(net.neoforged.neoforge.event.entity.living.BabyEntitySpawnEvent event) Prevent a Mob from breeding if it is infertile due to an Effect.- Parameters:
event-
-
failToBreed
public static final void failToBreed(net.neoforged.neoforge.event.entity.living.BabyEntitySpawnEvent event)
-