Interface IPlatformHelper
- All Known Implementing Classes:
ForgePlatformHelper
public interface IPlatformHelper
-
Method Summary
Modifier and TypeMethodDescriptionbooleanfireMobBlockBreakEvent(net.minecraft.world.level.Level level, @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Mob mob) Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.booleanfirePlayerBlockBreakEvent(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.Each loader have a specific implementation of an artifact specialize dependency (Curios on forge, Trinkets on fabric)default StringbooleaninEarthBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) booleaninIceBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) booleanintHotBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) booleanbooleanbooleanisModLoaded(String modId) <A extends com.mojang.brigadier.arguments.ArgumentType<?>,T extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<A>>
voidregisterArgumentType(net.minecraft.resources.ResourceLocation id, Class<? extends A> clazz, net.minecraft.commands.synchronization.ArgumentTypeInfo<A, T> serializer)
-
Method Details
-
getConfigDirectory
Path getConfigDirectory() -
getPlatformName
String getPlatformName() -
isModLoaded
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment() -
isDedicatedServer
boolean isDedicatedServer() -
getEnvironmentName
-
intHotBiomes
boolean intHotBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) -
inEarthBiomes
boolean inEarthBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) -
inIceBiomes
boolean inIceBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome) -
registerArgumentType
<A extends com.mojang.brigadier.arguments.ArgumentType<?>,T extends net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<A>> void registerArgumentType(net.minecraft.resources.ResourceLocation id, Class<? extends A> clazz, net.minecraft.commands.synchronization.ArgumentTypeInfo<A, T> serializer) -
firePlayerBlockBreakEvent
boolean firePlayerBlockBreakEvent(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.- Returns:
- true if the event is canceled, false otherwise
-
fireMobBlockBreakEvent
boolean fireMobBlockBreakEvent(net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Mob mob) Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.- Returns:
- true if the event is canceled, false otherwise
-
getArtifactIntegration
ArtifactIntegration getArtifactIntegration()Each loader have a specific implementation of an artifact specialize dependency (Curios on forge, Trinkets on fabric)- Returns:
- CuriosIntegration on forge or TrinketsIntegration on fabric.
-