Interface IPlatformHelper
- All Known Implementing Classes:
ForgePlatformHelper
public interface IPlatformHelper
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect, float probability) default booleancanItemStacksStack(net.minecraft.world.item.ItemStack first, net.minecraft.world.item.ItemStack second) createFluidStack(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable net.minecraft.nbt.CompoundTag tag) <T> IFluidStackcreateFluidStack(T stack) createFluidStackMutable(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable net.minecraft.nbt.CompoundTag tag) <T> IFluidStackcreateFluidStackMutable(T stack) createItemStack(net.minecraft.world.item.ItemStack stack) createItemStackMutable(net.minecraft.world.item.ItemStack stack) booleandoCraftingTableRecipesConflict(IRecipeManager<?> manager, net.minecraft.world.item.crafting.Recipe<?> first, net.minecraft.world.item.crafting.Recipe<?> second) Stream<com.mojang.authlib.GameProfile><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.findMappedFieldName(Class<?> clazz, String fieldName, Class<?> fieldType) findMappedMethodName(Class<?> clazz, String methodName, Class<?> returnType, Class<?>... parameterTypes) default net.minecraft.world.item.ItemStackgetBasicTradeForSale(IBasicItemListing internal) default intgetBasicTradeMaxTrades(IBasicItemListing internal) default net.minecraft.world.item.ItemStackgetBasicTradePrice(IBasicItemListing internal) default net.minecraft.world.item.ItemStackgetBasicTradePrice2(IBasicItemListing internal) default floatgetBasicTradePriceMult(IBasicItemListing internal) default intgetBasicTradeXp(IBasicItemListing internal) net.minecraft.world.level.material.FluidgetBucketContent(net.minecraft.world.item.BucketItem item) net.minecraft.nbt.CompoundTaggetCustomData(net.minecraft.world.entity.Entity entity) 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) default StringFabric doesn't have a MC formatting sanitizer.Map<net.minecraft.resources.ResourceLocation,ILootModifier> getMods()net.minecraft.nbt.CompoundTaggetPersistentData(net.minecraft.server.level.ServerPlayer player) getPlayerInventory(net.minecraft.world.entity.player.Player player) default voidinvalidateIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients) booleanbooleanbooleanisFakePlayer(net.minecraft.world.entity.player.Player player) booleanisModLoaded(String modId) default voidregisterCustomTradeConverters(Map<Class<? extends net.minecraft.world.entity.npc.VillagerTrades.ItemListing>, Function<net.minecraft.world.entity.npc.VillagerTrades.ItemListing, CTTradeObject>> classFunctionMap) default voidremoveFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffect effect) default voidremoveFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect)
-
Method Details
-
getLogFormat
Fabric doesn't have a MC formatting sanitizer. -
getPlatformName
String getPlatformName() -
isModLoaded
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment() -
isDataGen
boolean isDataGen() -
getMods
-
getMod
-
createItemStack
-
createItemStackMutable
-
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
-
createFluidStackMutable
-
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
-
findMappedFieldName
-
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
-
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
-
fakePlayers
Stream<com.mojang.authlib.GameProfile> fakePlayers() -
isFakePlayer
boolean isFakePlayer(net.minecraft.world.entity.player.Player player) -
getBasicTradePrice
-
getBasicTradePrice2
-
getBasicTradeForSale
-
getBasicTradeMaxTrades
-
getBasicTradeXp
-
getBasicTradePriceMult
-