Interface IPlatformHelper

All Known Implementing Classes:
ForgePlatformHelper

public interface IPlatformHelper
  • Method Details

    • getLogFormat

      default String getLogFormat()
      Fabric doesn't have a MC formatting sanitizer.
    • getPlatformName

      String getPlatformName()
    • isModLoaded

      boolean isModLoaded(String modId)
    • isDevelopmentEnvironment

      boolean isDevelopmentEnvironment()
    • isDataGen

      boolean isDataGen()
    • getMods

      List<Mod> getMods()
    • getMod

      Optional<Mod> getMod(String modid)
    • createItemStack

      IItemStack createItemStack(net.minecraft.world.item.ItemStack stack)
    • createItemStackMutable

      IItemStack createItemStackMutable(net.minecraft.world.item.ItemStack stack)
    • createFluidStack

      IFluidStack createFluidStack(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag)
    • createFluidStackMutable

      IFluidStack createFluidStackMutable(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag)
    • createFluidStack

      <T> IFluidStack createFluidStack(T stack)
    • createFluidStackMutable

      <T> IFluidStack createFluidStackMutable(T stack)
    • getBucketContent

      net.minecraft.world.level.material.Fluid getBucketContent(net.minecraft.world.item.BucketItem item)
    • getGameDirectory

      Path getGameDirectory()
    • findClassesWithAnnotation

      <T extends Annotation> Stream<? extends Class<?>> findClassesWithAnnotation(Class<T> annotationClass, Consumer<Mod> classProviderConsumer, Predicate<com.mojang.datafixers.util.Either<T,Map<String,Object>>> annotationFilter)
      Finds classes with the given annotation and applies a filter.
      Parameters:
      annotationClass - The annotation class to look for.
      classProviderConsumer - Consumer to collect the given mod that added the class if available.
      annotationFilter - A filter to apply to the search.
      Returns:
      A stream of classes with the annotation
    • findMappedMethodName

      String findMappedMethodName(Class<?> clazz, String methodName, Class<?> returnType, Class<?>... parameterTypes)
    • findMappedFieldName

      String findMappedFieldName(Class<?> clazz, String fieldName, Class<?> fieldType)
    • registerCustomTradeConverters

      default void registerCustomTradeConverters(Map<Class<? extends net.minecraft.world.entity.npc.VillagerTrades.ItemListing>,Function<net.minecraft.world.entity.npc.VillagerTrades.ItemListing,CTTradeObject>> classFunctionMap)
    • getLootModifiersMap

      Map<net.minecraft.resources.ResourceLocation,ILootModifier> getLootModifiersMap()
    • getPlayerInventory

      IInventoryWrapper getPlayerInventory(net.minecraft.world.entity.player.Player player)
    • canItemStacksStack

      default boolean canItemStacksStack(net.minecraft.world.item.ItemStack first, net.minecraft.world.item.ItemStack second)
    • doCraftingTableRecipesConflict

      boolean doCraftingTableRecipesConflict(IRecipeManager<?> manager, net.minecraft.world.item.crafting.Recipe<?> first, net.minecraft.world.item.crafting.Recipe<?> second)
    • getFluidsForDump

      Set<net.minecraft.network.chat.MutableComponent> getFluidsForDump(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
    • getCustomData

      net.minecraft.nbt.CompoundTag getCustomData(net.minecraft.world.entity.Entity entity)
    • getPersistentData

      net.minecraft.nbt.CompoundTag getPersistentData(net.minecraft.server.level.ServerPlayer player)
    • addFoodPropertiesEffect

      default void addFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect, float probability)
    • removeFoodPropertiesEffect

      default void removeFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect)
    • removeFoodPropertiesEffect

      default void removeFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffect effect)
    • invalidateIngredients

      default void invalidateIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients)
    • fakePlayers

      Stream<com.mojang.authlib.GameProfile> fakePlayers()
    • isFakePlayer

      boolean isFakePlayer(net.minecraft.world.entity.player.Player player)
    • getBasicTradePrice

      default net.minecraft.world.item.ItemStack getBasicTradePrice(IBasicItemListing internal)
    • getBasicTradePrice2

      default net.minecraft.world.item.ItemStack getBasicTradePrice2(IBasicItemListing internal)
    • getBasicTradeForSale

      default net.minecraft.world.item.ItemStack getBasicTradeForSale(IBasicItemListing internal)
    • getBasicTradeMaxTrades

      default int getBasicTradeMaxTrades(IBasicItemListing internal)
    • getBasicTradeXp

      default int getBasicTradeXp(IBasicItemListing internal)
    • getBasicTradePriceMult

      default float getBasicTradePriceMult(IBasicItemListing internal)