Interface HexAPI

All Known Implementing Classes:
HexAPIImpl

public interface HexAPI
  • Field Details

    • MOD_ID

      static final String MOD_ID
      See Also:
    • LOGGER

      static final org.apache.logging.log4j.Logger LOGGER
    • INSTANCE

      static final Supplier<HexAPI> INSTANCE
    • DUMMY_ARMOR_MATERIAL

      static final net.minecraft.world.item.ArmorMaterial DUMMY_ARMOR_MATERIAL
    • RAVENMIND_USERDATA

      static final String RAVENMIND_USERDATA
      Location in the userdata of the ravenmind
    • OP_COUNT_USERDATA

      static final String OP_COUNT_USERDATA
      Location in the userdata of the number of ops executed
    • MARKED_MOVED_USERDATA

      static final String MARKED_MOVED_USERDATA
  • Method Details

    • getActionI18nKey

      default String getActionI18nKey(net.minecraft.resources.ResourceKey<ActionRegistryEntry> action)
      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

      default String getRawHookI18nKey(net.minecraft.resources.ResourceLocation name)
      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 with registerSpecialVelocityGetter(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

      default Consumer<net.minecraft.world.entity.Mob> 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 with registerCustomBrainsweepingBehavior(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

      @Nullable default @Nullable Sentinel getSentinel(net.minecraft.server.level.ServerPlayer player)
    • findMediaHolder

      @Nullable default @Nullable ADMediaHolder findMediaHolder(net.minecraft.world.item.ItemStack stack)
    • getColorizer

      default FrozenPigment getColorizer(net.minecraft.world.entity.player.Player player)
    • robesMaterial

      default net.minecraft.world.item.ArmorMaterial robesMaterial()
    • instance

      static HexAPI instance()
    • modLoc

      static net.minecraft.resources.ResourceLocation modLoc(String s)