Class ForgePlatformHelper
java.lang.Object
com.blamejared.crafttweaker.platform.ForgePlatformHelper
- All Implemented Interfaces:
IPlatformHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect, float probability) 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) net.minecraft.world.item.ItemStackgetBasicTradeForSale(IBasicItemListing internal) intgetBasicTradeMaxTrades(IBasicItemListing internal) net.minecraft.world.item.ItemStackgetBasicTradePrice(IBasicItemListing internal) net.minecraft.world.item.ItemStackgetBasicTradePrice2(IBasicItemListing internal) floatgetBasicTradePriceMult(IBasicItemListing internal) 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) Fabric 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) voidinvalidateIngredients(List<net.minecraft.world.item.crafting.Ingredient> ingredients) booleanisCustomIngredient(net.minecraft.world.item.crafting.Ingredient ingredient) booleanbooleanbooleanisFakePlayer(net.minecraft.world.entity.player.Player player) booleanisModLoaded(String modId) voidregisterCustomTradeConverters(Map<Class<? extends net.minecraft.world.entity.npc.VillagerTrades.ItemListing>, Function<net.minecraft.world.entity.npc.VillagerTrades.ItemListing, CTTradeObject>> classFunctionMap) voidremoveFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffect effect) voidremoveFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.platform.services.IPlatformHelper
getCustomIngredientItems
-
Field Details
-
modList
-
modFinder
-
-
Constructor Details
-
ForgePlatformHelper
public ForgePlatformHelper()
-
-
Method Details
-
getLogFormat
Description copied from interface:IPlatformHelperFabric doesn't have a MC formatting sanitizer.- Specified by:
getLogFormatin interfaceIPlatformHelper
-
getPlatformName
- Specified by:
getPlatformNamein interfaceIPlatformHelper
-
isModLoaded
- Specified by:
isModLoadedin interfaceIPlatformHelper
-
isDevelopmentEnvironment
public boolean isDevelopmentEnvironment()- Specified by:
isDevelopmentEnvironmentin interfaceIPlatformHelper
-
isDataGen
public boolean isDataGen()- Specified by:
isDataGenin interfaceIPlatformHelper
-
getMods
- Specified by:
getModsin interfaceIPlatformHelper
-
getMod
- Specified by:
getModin interfaceIPlatformHelper
-
createItemStack
- Specified by:
createItemStackin interfaceIPlatformHelper
-
createItemStackMutable
- Specified by:
createItemStackMutablein interfaceIPlatformHelper
-
createFluidStack
public IFluidStack createFluidStack(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag) - Specified by:
createFluidStackin interfaceIPlatformHelper
-
createFluidStackMutable
public IFluidStack createFluidStackMutable(net.minecraft.world.level.material.Fluid fluid, long amount, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag) - Specified by:
createFluidStackMutablein interfaceIPlatformHelper
-
createFluidStack
- Specified by:
createFluidStackin interfaceIPlatformHelper
-
createFluidStackMutable
- Specified by:
createFluidStackMutablein interfaceIPlatformHelper
-
getBucketContent
public net.minecraft.world.level.material.Fluid getBucketContent(net.minecraft.world.item.BucketItem item) - Specified by:
getBucketContentin interfaceIPlatformHelper
-
getGameDirectory
- Specified by:
getGameDirectoryin interfaceIPlatformHelper
-
findClassesWithAnnotation
public <T extends Annotation> Stream<? extends Class<?>> findClassesWithAnnotation(Class<T> annotationClass, Consumer<Mod> classProviderConsumer, Predicate<com.mojang.datafixers.util.Either<T, Map<String, Object>>> annotationFilter) Description copied from interface:IPlatformHelperFinds classes with the given annotation and applies a filter.- Specified by:
findClassesWithAnnotationin interfaceIPlatformHelper- 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
public String findMappedMethodName(Class<?> clazz, String methodName, Class<?> returnType, Class<?>... parameterTypes) - Specified by:
findMappedMethodNamein interfaceIPlatformHelper
-
findMappedFieldName
- Specified by:
findMappedFieldNamein interfaceIPlatformHelper
-
registerCustomTradeConverters
public void registerCustomTradeConverters(Map<Class<? extends net.minecraft.world.entity.npc.VillagerTrades.ItemListing>, Function<net.minecraft.world.entity.npc.VillagerTrades.ItemListing, CTTradeObject>> classFunctionMap) - Specified by:
registerCustomTradeConvertersin interfaceIPlatformHelper
-
getLootModifiersMap
- Specified by:
getLootModifiersMapin interfaceIPlatformHelper
-
getPlayerInventory
- Specified by:
getPlayerInventoryin interfaceIPlatformHelper
-
canItemStacksStack
public boolean canItemStacksStack(net.minecraft.world.item.ItemStack first, net.minecraft.world.item.ItemStack second) - Specified by:
canItemStacksStackin interfaceIPlatformHelper
-
doCraftingTableRecipesConflict
public boolean doCraftingTableRecipesConflict(IRecipeManager<?> manager, net.minecraft.world.item.crafting.Recipe<?> first, net.minecraft.world.item.crafting.Recipe<?> second) - Specified by:
doCraftingTableRecipesConflictin interfaceIPlatformHelper
-
getFluidsForDump
public 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) - Specified by:
getFluidsForDumpin interfaceIPlatformHelper
-
getCustomData
public net.minecraft.nbt.CompoundTag getCustomData(net.minecraft.world.entity.Entity entity) - Specified by:
getCustomDatain interfaceIPlatformHelper
-
getPersistentData
public net.minecraft.nbt.CompoundTag getPersistentData(net.minecraft.server.level.ServerPlayer player) - Specified by:
getPersistentDatain interfaceIPlatformHelper
-
addFoodPropertiesEffect
public void addFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect, float probability) - Specified by:
addFoodPropertiesEffectin interfaceIPlatformHelper
-
removeFoodPropertiesEffect
public void removeFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffectInstance effect) - Specified by:
removeFoodPropertiesEffectin interfaceIPlatformHelper
-
removeFoodPropertiesEffect
public void removeFoodPropertiesEffect(net.minecraft.world.food.FoodProperties internal, net.minecraft.world.effect.MobEffect effect) - Specified by:
removeFoodPropertiesEffectin interfaceIPlatformHelper
-
isCustomIngredient
public boolean isCustomIngredient(net.minecraft.world.item.crafting.Ingredient ingredient) - Specified by:
isCustomIngredientin interfaceIPlatformHelper
-
invalidateIngredients
- Specified by:
invalidateIngredientsin interfaceIPlatformHelper
-
fakePlayers
- Specified by:
fakePlayersin interfaceIPlatformHelper
-
isFakePlayer
public boolean isFakePlayer(net.minecraft.world.entity.player.Player player) - Specified by:
isFakePlayerin interfaceIPlatformHelper
-
getBasicTradePrice
- Specified by:
getBasicTradePricein interfaceIPlatformHelper
-
getBasicTradePrice2
- Specified by:
getBasicTradePrice2in interfaceIPlatformHelper
-
getBasicTradeForSale
- Specified by:
getBasicTradeForSalein interfaceIPlatformHelper
-
getBasicTradeMaxTrades
- Specified by:
getBasicTradeMaxTradesin interfaceIPlatformHelper
-
getBasicTradeXp
- Specified by:
getBasicTradeXpin interfaceIPlatformHelper
-
getBasicTradePriceMult
- Specified by:
getBasicTradePriceMultin interfaceIPlatformHelper
-