Package at.petrak.hexcasting.common.impl
Class HexAPIImpl
java.lang.Object
at.petrak.hexcasting.common.impl.HexAPIImpl
- All Implemented Interfaces:
HexAPI
-
Nested Class Summary
Nested classes/interfaces inherited from interface at.petrak.hexcasting.api.HexAPI
HexAPI.EntityVelocityGetter<T extends net.minecraft.world.entity.Entity> -
Field Summary
Fields inherited from interface at.petrak.hexcasting.api.HexAPI
DUMMY_ARMOR_MATERIAL, INSTANCE, LOGGER, MARKED_MOVED_USERDATA, MOD_ID, OP_COUNT_USERDATA, RAVENMIND_USERDATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConsumer<net.minecraft.world.entity.Mob>The default behavior when an entity gets brainswept.@Nullable ADMediaHolderfindMediaHolder(net.minecraft.world.item.ItemStack stack) <T extends net.minecraft.world.entity.Mob>
Consumer<T>getBrainsweepBehavior(net.minecraft.world.entity.EntityType<T> mobType) If something special's been returned withHexAPI.registerCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T>, java.util.function.Consumer<T>), return that, otherwise return the default behaviorgetColorizer(net.minecraft.world.entity.player.Player player) net.minecraft.world.phys.Vec3getEntityVelocitySpecial(net.minecraft.world.entity.Entity entity) If the entity has had a special getter registered withHexAPI.registerSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T>, at.petrak.hexcasting.api.HexAPI.EntityVelocityGetter<T>)then return that, otherwise return its normal delta movement@Nullable SentinelgetSentinel(net.minecraft.server.level.ServerPlayer player) <T extends net.minecraft.world.entity.Mob>
voidregisterCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T> key, Consumer<T> hook) Register an entity type to have a custom behavior when getting brainswept.<T extends net.minecraft.world.entity.Entity>
voidregisterSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T> key, HexAPI.EntityVelocityGetter<T> getter) Register an entity with the given ID to have its velocity as perceived by OpEntityVelocity be different than it's "normal" velocitynet.minecraft.world.item.ArmorMaterialMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface at.petrak.hexcasting.api.HexAPI
brainsweep, getActionI18n, getActionI18nKey, getRawHookI18n, getRawHookI18nKey, getSpecialHandlerI18n, getSpecialHandlerI18nKey, isBrainswept
-
Constructor Details
-
HexAPIImpl
public HexAPIImpl()
-
-
Method Details
-
registerSpecialVelocityGetter
public <T extends net.minecraft.world.entity.Entity> void registerSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T> key, HexAPI.EntityVelocityGetter<T> getter) Description copied from interface:HexAPIRegister an entity with the given ID to have its velocity as perceived by OpEntityVelocity be different than it's "normal" velocity- Specified by:
registerSpecialVelocityGetterin interfaceHexAPI
-
getEntityVelocitySpecial
public net.minecraft.world.phys.Vec3 getEntityVelocitySpecial(net.minecraft.world.entity.Entity entity) Description copied from interface:HexAPIIf the entity has had a special getter registered withHexAPI.registerSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T>, at.petrak.hexcasting.api.HexAPI.EntityVelocityGetter<T>)then return that, otherwise return its normal delta movement- Specified by:
getEntityVelocitySpecialin interfaceHexAPI
-
registerCustomBrainsweepingBehavior
public <T extends net.minecraft.world.entity.Mob> void registerCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T> key, Consumer<T> hook) Description copied from interface:HexAPIRegister an entity type to have a custom behavior when getting brainswept.This knocks out the normal behavior; if you want that behavior you should call
- Specified by:
registerCustomBrainsweepingBehaviorin interfaceHexAPI
-
getBrainsweepBehavior
public <T extends net.minecraft.world.entity.Mob> Consumer<T> getBrainsweepBehavior(net.minecraft.world.entity.EntityType<T> mobType) Description copied from interface:HexAPIIf something special's been returned withHexAPI.registerCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T>, java.util.function.Consumer<T>), return that, otherwise return the default behavior- Specified by:
getBrainsweepBehaviorin interfaceHexAPI
-
defaultBrainsweepingBehavior
Description copied from interface:HexAPIThe default behavior when an entity gets brainswept.Something registered with
HexAPI.registerCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T>, java.util.function.Consumer<T>)doesn't call this automatically; you can use this to add things on top of the default behavior- Specified by:
defaultBrainsweepingBehaviorin interfaceHexAPI
-
getSentinel
- Specified by:
getSentinelin interfaceHexAPI
-
findMediaHolder
- Specified by:
findMediaHolderin interfaceHexAPI
-
getColorizer
- Specified by:
getColorizerin interfaceHexAPI
-
robesMaterial
public net.minecraft.world.item.ArmorMaterial robesMaterial()- Specified by:
robesMaterialin interfaceHexAPI
-