Package at.petrak.hexcasting.api
Interface HexAPI
- All Known Implementing Classes:
HexAPIImpl
public interface HexAPI
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHexAPI.EntityVelocityGetter<T extends net.minecraft.world.entity.Entity> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.item.ArmorMaterialstatic final org.apache.logging.log4j.Loggerstatic final Stringstatic final Stringstatic final StringLocation in the userdata of the number of ops executedstatic final StringLocation in the userdata of the ravenmind -
Method Summary
Modifier and TypeMethodDescriptiondefault voidbrainsweep(net.minecraft.world.entity.Mob mob) Brainsweep (flay the mind of) the given mob.default Consumer<net.minecraft.world.entity.Mob>The default behavior when an entity gets brainswept.default @Nullable ADMediaHolderfindMediaHolder(net.minecraft.world.item.ItemStack stack) default net.minecraft.network.chat.ComponentgetActionI18n(net.minecraft.resources.ResourceKey<ActionRegistryEntry> key, boolean isGreat) default StringgetActionI18nKey(net.minecraft.resources.ResourceKey<ActionRegistryEntry> action) Return the localization key for the given action.default <T extends net.minecraft.world.entity.Mob>
Consumer<T>getBrainsweepBehavior(net.minecraft.world.entity.EntityType<T> mobType) If something special's been returned withregisterCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T>, java.util.function.Consumer<T>), return that, otherwise return the default behaviordefault FrozenPigmentgetColorizer(net.minecraft.world.entity.player.Player player) default net.minecraft.world.phys.Vec3getEntityVelocitySpecial(net.minecraft.world.entity.Entity entity) If the entity has had a special getter registered withregisterSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T>, at.petrak.hexcasting.api.HexAPI.EntityVelocityGetter<T>)then return that, otherwise return its normal delta movementdefault net.minecraft.network.chat.ComponentgetRawHookI18n(net.minecraft.resources.ResourceLocation name) default StringgetRawHookI18nKey(net.minecraft.resources.ResourceLocation name) Currently introspection/retrospection/consideration are hardcoded, but at least their names won't bedefault @Nullable SentinelgetSentinel(net.minecraft.server.level.ServerPlayer player) default net.minecraft.network.chat.ComponentgetSpecialHandlerI18n(net.minecraft.resources.ResourceKey<SpecialHandler.Factory<?>> key) default StringgetSpecialHandlerI18nKey(net.minecraft.resources.ResourceKey<SpecialHandler.Factory<?>> action) static HexAPIinstance()default booleanisBrainswept(net.minecraft.world.entity.Mob mob) static net.minecraft.resources.ResourceLocationdefault <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.default <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" velocitydefault net.minecraft.world.item.ArmorMaterial
-
Field Details
-
MOD_ID
- See Also:
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
INSTANCE
-
DUMMY_ARMOR_MATERIAL
static final net.minecraft.world.item.ArmorMaterial DUMMY_ARMOR_MATERIAL -
RAVENMIND_USERDATA
Location in the userdata of the ravenmind -
OP_COUNT_USERDATA
Location in the userdata of the number of ops executed -
MARKED_MOVED_USERDATA
-
-
Method Details
-
getActionI18nKey
Return the localization key for the given action.Note we're allowed to have action resource keys on the client, just no actual actions.
Special handlers should be calling
SpecialHandler.getName() -
getSpecialHandlerI18nKey
default String getSpecialHandlerI18nKey(net.minecraft.resources.ResourceKey<SpecialHandler.Factory<?>> action) -
getRawHookI18nKey
Currently introspection/retrospection/consideration are hardcoded, but at least their names won't be -
getActionI18n
default net.minecraft.network.chat.Component getActionI18n(net.minecraft.resources.ResourceKey<ActionRegistryEntry> key, boolean isGreat) -
getSpecialHandlerI18n
default net.minecraft.network.chat.Component getSpecialHandlerI18n(net.minecraft.resources.ResourceKey<SpecialHandler.Factory<?>> key) -
getRawHookI18n
default net.minecraft.network.chat.Component getRawHookI18n(net.minecraft.resources.ResourceLocation name) -
registerSpecialVelocityGetter
default <T extends net.minecraft.world.entity.Entity> void registerSpecialVelocityGetter(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" velocity -
getEntityVelocitySpecial
default net.minecraft.world.phys.Vec3 getEntityVelocitySpecial(net.minecraft.world.entity.Entity entity) If the entity has had a special getter registered withregisterSpecialVelocityGetter(net.minecraft.world.entity.EntityType<T>, at.petrak.hexcasting.api.HexAPI.EntityVelocityGetter<T>)then return that, otherwise return its normal delta movement -
registerCustomBrainsweepingBehavior
default <T extends net.minecraft.world.entity.Mob> void registerCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T> key, Consumer<T> hook) Register 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
-
defaultBrainsweepingBehavior
The default behavior when an entity gets brainswept.Something registered with
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 -
getBrainsweepBehavior
default <T extends net.minecraft.world.entity.Mob> Consumer<T> getBrainsweepBehavior(net.minecraft.world.entity.EntityType<T> mobType) If something special's been returned withregisterCustomBrainsweepingBehavior(net.minecraft.world.entity.EntityType<T>, java.util.function.Consumer<T>), return that, otherwise return the default behavior -
brainsweep
default void brainsweep(net.minecraft.world.entity.Mob mob) Brainsweep (flay the mind of) the given mob.This ignores the unbrainsweepable tag.
-
isBrainswept
default boolean isBrainswept(net.minecraft.world.entity.Mob mob) -
getSentinel
-
findMediaHolder
-
getColorizer
-
robesMaterial
default net.minecraft.world.item.ArmorMaterial robesMaterial() -
instance
-
modLoc
-