Interface IPlatformHelper

All Known Implementing Classes:
FabricPlatformHelper

public interface IPlatformHelper
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    bonemeal(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player)
     
    float
    getCompostChance(net.minecraft.world.item.ItemStack stack)
     
    Gets the name of the current platform
    boolean
    Check if the game is currently in a development environment.
    boolean
    Checks if a mod with the given id is loaded.
    boolean
     
    <T> net.minecraft.core.Holder<T>
    register(net.minecraft.core.Registry<T> registry, String id, Supplier<T> obj)
     
    default net.minecraft.core.Holder<net.minecraft.world.item.Item>
    registerItem(String id, Supplier<net.minecraft.world.item.Item> obj)
     
  • Method Details

    • getPlatformName

      String getPlatformName()
      Gets the name of the current platform
      Returns:
      The name of the current platform.
    • isModLoaded

      boolean isModLoaded(String modId)
      Checks if a mod with the given id is loaded.
      Parameters:
      modId - The mod to check if it is loaded.
      Returns:
      True if the mod is loaded, false otherwise.
    • isDevelopmentEnvironment

      boolean isDevelopmentEnvironment()
      Check if the game is currently in a development environment.
      Returns:
      True if in a development environment, false otherwise.
    • isSideClient

      boolean isSideClient()
    • getCompostChance

      float getCompostChance(net.minecraft.world.item.ItemStack stack)
    • registerItem

      default net.minecraft.core.Holder<net.minecraft.world.item.Item> registerItem(String id, Supplier<net.minecraft.world.item.Item> obj)
    • register

      <T> net.minecraft.core.Holder<T> register(net.minecraft.core.Registry<T> registry, String id, Supplier<T> obj)
    • bonemeal

      boolean bonemeal(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player)