Interface IPlatformHelper

All Known Implementing Classes:
NeoForgePlatformHelper

public interface IPlatformHelper
  • 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.
    • isClient

      boolean isClient()
      Gets the name of the environment type as a string.
      Returns:
      The name of the environment type.
    • getEnvironmentName

      default String getEnvironmentName()
    • registerDataAttachment

      <T> void registerDataAttachment(CommonDataAttachment<T> attachment)
    • getAttachedValue

      @Nullable <T> T getAttachedValue(Object object, CommonDataAttachment<T> attachment)
    • getOrCreateAttachedValue

      default <T> T getOrCreateAttachedValue(net.minecraft.world.entity.Entity entity, CommonDataAttachment<T> attachment)
    • setAttachedValue

      <T> void setAttachedValue(Object object, CommonDataAttachment<T> attachment, @Nullable T value)
    • registerClientPlayPacket

      <MSG extends S2CModPacket<?>> void registerClientPlayPacket(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<MSG> type, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,MSG> streamCodec)
    • registerServerPlayPacket

      <MSG extends C2SModPacket<?>> void registerServerPlayPacket(net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<MSG> type, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,MSG> streamCodec)
    • sendToClient

      void sendToClient(S2CModPacket<?> msg, net.minecraft.server.level.ServerPlayer player)
    • sendToServer

      void sendToServer(C2SModPacket<?> msg)
    • getSimpleParticle

      net.minecraft.core.particles.SimpleParticleType getSimpleParticle()