Class ForgePlatformHelper

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

public class ForgePlatformHelper extends Object implements IPlatformHelper
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    fireMobBlockBreakEvent(net.minecraft.world.level.Level level, 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.
    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.
    Each loader have a specific implementation of an artifact specialize dependency (Curios on forge, Trinkets on fabric)
     
     
    boolean
    inEarthBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
     
    boolean
    inIceBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
     
    boolean
    intHotBiomes(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome)
     
    boolean
     
    boolean
     
    boolean
     
    <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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.binaris.wizardry.core.platform.services.IPlatformHelper

    getEnvironmentName
  • Constructor Details

    • ForgePlatformHelper

      public ForgePlatformHelper()
  • 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.