Class FabricPlatformHelper

java.lang.Object
dev.dhyces.trimmed.modhelper.services.helpers.FabricPlatformHelper
All Implemented Interfaces:
PlatformHelper

public final class FabricPlatformHelper extends Object implements PlatformHelper
  • Constructor Details

    • FabricPlatformHelper

      public FabricPlatformHelper()
  • Method Details

    • isModLoaded

      public boolean isModLoaded(String modid)
      Specified by:
      isModLoaded in interface PlatformHelper
    • isClientDist

      public boolean isClientDist()
      Specified by:
      isClientDist in interface PlatformHelper
    • isProduction

      public boolean isProduction()
      Specified by:
      isProduction in interface PlatformHelper
    • resolveRegistryPath

      public String resolveRegistryPath(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> resourceKey)
      Specified by:
      resolveRegistryPath in interface PlatformHelper
    • modRegistryExists

      public <T> boolean modRegistryExists(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> modRegistry)
      Specified by:
      modRegistryExists in interface PlatformHelper
    • decodeWithConditions

      public <T> Optional<T> decodeWithConditions(com.mojang.serialization.Codec<T> codec, com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> jsonOps, com.google.gson.JsonObject jsonObject)
      Specified by:
      decodeWithConditions in interface PlatformHelper
    • getRegistryValue

      public <T> T getRegistryValue(@Nullable @Nullable net.minecraft.core.RegistryAccess registryAccess, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.resources.ResourceLocation valueKey)
      Specified by:
      getRegistryValue in interface PlatformHelper