Class FabricPlatformHelper

java.lang.Object
com.binaris.wizardry.platform.FabricPlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class FabricPlatformHelper extends Object implements IPlatformHelper
  • Constructor Details

    • FabricPlatformHelper

      public FabricPlatformHelper()
  • Method Details

    • getConfigDirectory

      public Path getConfigDirectory()
      Specified by:
      getConfigDirectory in interface IPlatformHelper
    • getPlatformName

      public String getPlatformName()
      Specified by:
      getPlatformName in interface IPlatformHelper
    • isModLoaded

      public boolean isModLoaded(String modId)
      Specified by:
      isModLoaded in interface IPlatformHelper
    • isDevelopmentEnvironment

      public boolean isDevelopmentEnvironment()
      Specified by:
      isDevelopmentEnvironment in interface IPlatformHelper
    • isDedicatedServer

      public boolean isDedicatedServer()
      Specified by:
      isDedicatedServer in interface IPlatformHelper
    • intHotBiomes

      public boolean intHotBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
      Specified by:
      intHotBiomes in interface IPlatformHelper
    • inEarthBiomes

      public boolean inEarthBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
      Specified by:
      inEarthBiomes in interface IPlatformHelper
    • inIceBiomes

      public boolean inIceBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
      Specified by:
      inIceBiomes in interface IPlatformHelper
    • registerArgumentType

      public <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)
      Specified by:
      registerArgumentType in interface IPlatformHelper
    • firePlayerBlockBreakEvent

      public boolean firePlayerBlockBreakEvent(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
      Description copied from interface: IPlatformHelper
      Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.
      Specified by:
      firePlayerBlockBreakEvent in interface IPlatformHelper
      Returns:
      true if the event is canceled, false otherwise
    • fireMobBlockBreakEvent

      public boolean fireMobBlockBreakEvent(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Mob mob)
      Description copied from interface: IPlatformHelper
      Each loader has its own way of firing events so we're getting all platform-specific logic out of the main codebase.
      Specified by:
      fireMobBlockBreakEvent in interface IPlatformHelper
      Returns:
      true if the event is canceled, false otherwise
    • getArtifactIntegration

      public ArtifactIntegration getArtifactIntegration()
      Description copied from interface: IPlatformHelper
      Each loader have a specific implementation of an artifact specialize dependency (Curios on forge, Trinkets on fabric)
      Specified by:
      getArtifactIntegration in interface IPlatformHelper
      Returns:
      CuriosIntegration on forge or TrinketsIntegration on fabric.