Class VersionHelper

java.lang.Object
com.stereowalker.unionlib.util.VersionHelper

public class VersionHelper extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
     
    static class 
     
    static class 
    Used to abstract data used in items.
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.block.state.BlockBehaviour.Properties
     
    static net.minecraft.world.level.block.state.BlockBehaviour.Properties
    blockPropertyWithId(net.minecraft.resources.ResourceLocation id)
     
    static net.minecraft.world.level.block.state.BlockBehaviour.Properties
    copyBlockPropertyWithId(net.minecraft.world.level.block.state.BlockBehaviour block, String id)
     
    static net.minecraft.world.level.block.state.BlockBehaviour.Properties
    copyBlockPropertyWithId(net.minecraft.world.level.block.state.BlockBehaviour block, net.minecraft.resources.ResourceLocation id)
     
    static <E extends net.minecraft.world.entity.LivingEntity>
    net.minecraft.world.entity.ai.behavior.BehaviorControl<E>
    createEraseMemoryIf(Predicate<E> shouldEraseMemory, net.minecraft.world.entity.ai.memory.MemoryModuleType<?> erasingMemory)
     
    static net.minecraft.world.item.Item
    createGenericArmor(ArmorMatReference ref, ArmorMatReference.ArmorSegment segment, net.minecraft.world.item.Item.Properties properites)
     
    static net.minecraft.world.entity.ai.behavior.OneShot<net.minecraft.world.entity.Mob>
    createMeleeAttack(int cooldownBetweenAttacks)
     
    static net.minecraft.world.entity.ai.behavior.BehaviorControl<net.minecraft.world.entity.Mob>
     
    static <E extends net.minecraft.world.entity.Mob>
    net.minecraft.world.entity.ai.behavior.BehaviorControl<E>
    createStartAttacking(Function<E,Optional<? extends net.minecraft.world.entity.LivingEntity>> targetFinder)
     
    static <E extends net.minecraft.world.entity.Mob>
    net.minecraft.world.entity.ai.behavior.BehaviorControl<E>
    createStopAttackingIfTargetInvalid(BiConsumer<E,net.minecraft.world.entity.LivingEntity> onStopAttacking)
     
    static net.minecraft.world.level.Level
    entityLevel(net.minecraft.world.entity.Entity entity)
     
    static boolean
    isEquippableInSlot(net.minecraft.world.item.Item item, net.minecraft.world.entity.EquipmentSlot slot)
     
    static boolean
    isEquippableInSlot(net.minecraft.world.item.ItemStack item, net.minecraft.world.entity.EquipmentSlot slot)
     
    static net.minecraft.world.item.Item.Properties
     
    static net.minecraft.world.item.Item.Properties
    itemPropertyWithId(net.minecraft.resources.ResourceLocation id)
     
    static net.minecraft.core.BlockPos
    posFromDouble(double x, double y, double z)
     
    static net.minecraft.network.chat.Component
    readComponent(net.minecraft.network.FriendlyByteBuf packetBuffer)
     
    static void
    setupForEntityInInventory(org.joml.Quaternionf quaternion)
     
    static net.minecraft.resources.ResourceLocation
    toLoc(String location)
     
    static net.minecraft.resources.ResourceLocation
    toLoc(String namespace, String path)
     
    static net.minecraft.world.item.ItemStack
    transmuteCopy(net.minecraft.world.item.ItemStack original, net.minecraft.world.item.Item toTransmute, int count)
     
    static void
    writeComponent(net.minecraft.network.FriendlyByteBuf packetBuffer, net.minecraft.network.chat.Component component)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VersionHelper

      public VersionHelper()
  • Method Details

    • posFromDouble

      public static net.minecraft.core.BlockPos posFromDouble(double x, double y, double z)
    • isEquippableInSlot

      public static boolean isEquippableInSlot(net.minecraft.world.item.Item item, net.minecraft.world.entity.EquipmentSlot slot)
    • isEquippableInSlot

      public static boolean isEquippableInSlot(net.minecraft.world.item.ItemStack item, net.minecraft.world.entity.EquipmentSlot slot)
    • entityLevel

      public static net.minecraft.world.level.Level entityLevel(net.minecraft.world.entity.Entity entity)
    • createStopAttackingIfTargetInvalid

      public static <E extends net.minecraft.world.entity.Mob> net.minecraft.world.entity.ai.behavior.BehaviorControl<E> createStopAttackingIfTargetInvalid(BiConsumer<E,net.minecraft.world.entity.LivingEntity> onStopAttacking)
    • createSetWalkTargetFromAttackTargetIfTargetOutOfReach

      public static net.minecraft.world.entity.ai.behavior.BehaviorControl<net.minecraft.world.entity.Mob> createSetWalkTargetFromAttackTargetIfTargetOutOfReach(float speedModifier)
    • createMeleeAttack

      public static net.minecraft.world.entity.ai.behavior.OneShot<net.minecraft.world.entity.Mob> createMeleeAttack(int cooldownBetweenAttacks)
    • createEraseMemoryIf

      public static <E extends net.minecraft.world.entity.LivingEntity> net.minecraft.world.entity.ai.behavior.BehaviorControl<E> createEraseMemoryIf(Predicate<E> shouldEraseMemory, net.minecraft.world.entity.ai.memory.MemoryModuleType<?> erasingMemory)
    • createStartAttacking

      public static <E extends net.minecraft.world.entity.Mob> net.minecraft.world.entity.ai.behavior.BehaviorControl<E> createStartAttacking(Function<E,Optional<? extends net.minecraft.world.entity.LivingEntity>> targetFinder)
    • toLoc

      public static net.minecraft.resources.ResourceLocation toLoc(String namespace, String path)
    • toLoc

      public static net.minecraft.resources.ResourceLocation toLoc(String location)
    • writeComponent

      public static void writeComponent(net.minecraft.network.FriendlyByteBuf packetBuffer, net.minecraft.network.chat.Component component)
    • readComponent

      public static net.minecraft.network.chat.Component readComponent(net.minecraft.network.FriendlyByteBuf packetBuffer)
    • setupForEntityInInventory

      public static void setupForEntityInInventory(org.joml.Quaternionf quaternion)
    • transmuteCopy

      public static net.minecraft.world.item.ItemStack transmuteCopy(net.minecraft.world.item.ItemStack original, net.minecraft.world.item.Item toTransmute, int count)
    • createGenericArmor

      public static net.minecraft.world.item.Item createGenericArmor(ArmorMatReference ref, ArmorMatReference.ArmorSegment segment, net.minecraft.world.item.Item.Properties properites)
    • itemPropertyWithId

      public static net.minecraft.world.item.Item.Properties itemPropertyWithId(String id)
    • itemPropertyWithId

      public static net.minecraft.world.item.Item.Properties itemPropertyWithId(net.minecraft.resources.ResourceLocation id)
    • blockPropertyWithId

      public static net.minecraft.world.level.block.state.BlockBehaviour.Properties blockPropertyWithId(String id)
    • blockPropertyWithId

      public static net.minecraft.world.level.block.state.BlockBehaviour.Properties blockPropertyWithId(net.minecraft.resources.ResourceLocation id)
    • copyBlockPropertyWithId

      public static net.minecraft.world.level.block.state.BlockBehaviour.Properties copyBlockPropertyWithId(net.minecraft.world.level.block.state.BlockBehaviour block, String id)
    • copyBlockPropertyWithId

      public static net.minecraft.world.level.block.state.BlockBehaviour.Properties copyBlockPropertyWithId(net.minecraft.world.level.block.state.BlockBehaviour block, net.minecraft.resources.ResourceLocation id)