Class NeoForgePlatformHelper

java.lang.Object
net.sashiro.compressedblocks.neoforge.platform.NeoForgePlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class NeoForgePlatformHelper extends Object implements IPlatformHelper
  • Constructor Details

    • NeoForgePlatformHelper

      public NeoForgePlatformHelper()
  • Method Details

    • getPlatformName

      public String getPlatformName()
      Description copied from interface: IPlatformHelper
      Gets the name of the current platform
      Specified by:
      getPlatformName in interface IPlatformHelper
      Returns:
      The name of the current platform.
    • isModLoaded

      public boolean isModLoaded(String modId)
      Description copied from interface: IPlatformHelper
      Checks if a mod with the given id is loaded.
      Specified by:
      isModLoaded in interface IPlatformHelper
      Parameters:
      modId - The mod to check if it is loaded.
      Returns:
      True if the mod is loaded, false otherwise.
    • isDevelopmentEnvironment

      public boolean isDevelopmentEnvironment()
      Description copied from interface: IPlatformHelper
      Check if the game is currently in a development environment.
      Specified by:
      isDevelopmentEnvironment in interface IPlatformHelper
      Returns:
      True if in a development environment, false otherwise.
    • registerBlock

      public void registerBlock(String name, net.minecraft.world.level.block.Block... blocks)
      Description copied from interface: IPlatformHelper
      Function for platform-dependent registration of Blocks
      Specified by:
      registerBlock in interface IPlatformHelper
      Parameters:
      name - the registry name of the Block
      blocks - the Blocks to be registered
    • registerCrate

      public void registerCrate(String name, net.minecraft.world.level.block.Block... crateBlocks)
      Description copied from interface: IPlatformHelper
      Function for platform-dependent registration of Crates
      Specified by:
      registerCrate in interface IPlatformHelper
      Parameters:
      name - the registry name of the Block
      crateBlocks - the Crate Blocks to be registered
    • areBlocksEnabled

      public boolean areBlocksEnabled()
      Description copied from interface: IPlatformHelper
      Check if compressed blocks are enabled
      Specified by:
      areBlocksEnabled in interface IPlatformHelper
      Returns:
      True if compressed blocks are enabled, false otherwise.
    • areCratesEnabled

      public boolean areCratesEnabled()
      Description copied from interface: IPlatformHelper
      Check if crates are enabled
      Specified by:
      areCratesEnabled in interface IPlatformHelper
      Returns:
      True if crates are enabled, false otherwise.
    • maxCompressionLevel

      public int maxCompressionLevel()
      Description copied from interface: IPlatformHelper
      Get the maximum compression level for blocks
      Specified by:
      maxCompressionLevel in interface IPlatformHelper
      Returns:
      The maximum compression level for blocks
    • maxCrateCompressionLevel

      public int maxCrateCompressionLevel()
      Description copied from interface: IPlatformHelper
      Get the maximum compression level for crates
      Specified by:
      maxCrateCompressionLevel in interface IPlatformHelper
      Returns:
      The maximum compression level for crates
    • isBlockEnabled

      public boolean isBlockEnabled(String name)
      Description copied from interface: IPlatformHelper
      Check if a block is enabled
      Specified by:
      isBlockEnabled in interface IPlatformHelper
      Parameters:
      name - The name of the block to check
      Returns:
      True if the block is enabled, false otherwise