Class PlatformProxy

java.lang.Object
com.refinedmods.refinedstorage.common.PlatformProxy
All Implemented Interfaces:
Platform

public class PlatformProxy extends Object implements Platform
  • Constructor Details

    • PlatformProxy

      public PlatformProxy()
  • Method Details

    • loadPlatform

      public static void loadPlatform(Platform platform)
    • getMenuOpener

      public MenuOpener getMenuOpener()
      Specified by:
      getMenuOpener in interface Platform
    • getBucketAmount

      public long getBucketAmount()
      Specified by:
      getBucketAmount in interface Platform
    • getConfig

      public Config getConfig()
      Specified by:
      getConfig in interface Platform
    • canEditBoxLoseFocus

      public boolean canEditBoxLoseFocus(net.minecraft.client.gui.components.EditBox editBox)
      Specified by:
      canEditBoxLoseFocus in interface Platform
    • isKeyDown

      public boolean isKeyDown(net.minecraft.client.KeyMapping keyMapping)
      Specified by:
      isKeyDown in interface Platform
    • getItemGridResourceFactory

      public GridResourceFactory getItemGridResourceFactory()
      Specified by:
      getItemGridResourceFactory in interface Platform
    • getFluidGridResourceFactory

      public GridResourceFactory getFluidGridResourceFactory()
      Specified by:
      getFluidGridResourceFactory in interface Platform
    • getDefaultGridInsertionStrategyFactory

      public GridInsertionStrategyFactory getDefaultGridInsertionStrategyFactory()
      Specified by:
      getDefaultGridInsertionStrategyFactory in interface Platform
    • getFluidRenderer

      public FluidRenderer getFluidRenderer()
      Specified by:
      getFluidRenderer in interface Platform
    • drainContainer

      public Optional<FluidOperationResult> drainContainer(net.minecraft.world.item.ItemStack container)
      Specified by:
      drainContainer in interface Platform
    • fillContainer

      public Optional<FluidOperationResult> fillContainer(net.minecraft.world.item.ItemStack container, ResourceAmount resourceAmount)
      Specified by:
      fillContainer in interface Platform
    • createTransferManager

      public TransferManager createTransferManager(net.minecraft.world.inventory.AbstractContainerMenu containerMenu)
      Specified by:
      createTransferManager in interface Platform
    • insertIntoContainer

      public long insertIntoContainer(net.minecraft.world.Container container, ItemResource itemResource, long amount, Action action)
      Specified by:
      insertIntoContainer in interface Platform
    • getCloneItemStack

      public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.world.phys.BlockHitResult hitResult, net.minecraft.world.entity.player.Player player)
      Specified by:
      getCloneItemStack in interface Platform
    • getRemainingCraftingItems

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getRemainingCraftingItems(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.crafting.CraftingRecipe craftingRecipe, net.minecraft.world.item.crafting.CraftingInput input)
      Specified by:
      getRemainingCraftingItems in interface Platform
    • onItemCrafted

      public void onItemCrafted(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack craftedStack, net.minecraft.world.inventory.CraftingContainer container)
      Specified by:
      onItemCrafted in interface Platform
    • getFakePlayer

      public net.minecraft.world.entity.player.Player getFakePlayer(net.minecraft.server.level.ServerLevel level, @Nullable UUID playerId)
      Specified by:
      getFakePlayer in interface Platform
    • canBreakBlock

      public boolean canBreakBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player)
      Specified by:
      canBreakBlock in interface Platform
    • placeBlock

      public boolean placeBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack)
      Specified by:
      placeBlock in interface Platform
    • placeFluid

      public boolean placeFluid(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, net.minecraft.world.entity.player.Player player, FluidResource fluidResource)
      Specified by:
      placeFluid in interface Platform
    • getBlockAsItemStack

      public net.minecraft.world.item.ItemStack getBlockAsItemStack(net.minecraft.world.level.block.Block block, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction direction, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
      Specified by:
      getBlockAsItemStack in interface Platform
    • getBucketPickupSound

      public Optional<net.minecraft.sounds.SoundEvent> getBucketPickupSound(net.minecraft.world.level.block.LiquidBlock liquidBlock, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      getBucketPickupSound in interface Platform
    • processTooltipComponents

      public List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> processTooltipComponents(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.GuiGraphics graphics, int mouseX, Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> imageComponent, List<net.minecraft.network.chat.Component> components)
      Specified by:
      processTooltipComponents in interface Platform
    • renderTooltip

      public void renderTooltip(net.minecraft.client.gui.GuiGraphics graphics, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, int x, int y)
      Specified by:
      renderTooltip in interface Platform
    • getEnergyStorage

      public Optional<EnergyStorage> getEnergyStorage(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getEnergyStorage in interface Platform
    • sendPacketToServer

      public <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> void sendPacketToServer(T packet)
      Specified by:
      sendPacketToServer in interface Platform
    • sendPacketToClient

      public <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> void sendPacketToClient(net.minecraft.server.level.ServerPlayer player, T packet)
      Specified by:
      sendPacketToClient in interface Platform
    • saveSavedData

      public void saveSavedData(net.minecraft.world.level.saveddata.SavedData savedData, File file, net.minecraft.core.HolderLookup.Provider provider, BiConsumer<File,net.minecraft.core.HolderLookup.Provider> defaultSaveFunction)
      Specified by:
      saveSavedData in interface Platform
    • getContainerProvider

      @Nullable public NetworkNodeContainerProvider getContainerProvider(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.core.Direction direction)
      Specified by:
      getContainerProvider in interface Platform
    • getContainerProviderSafely

      @Nullable public NetworkNodeContainerProvider getContainerProviderSafely(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.core.Direction direction)
      Specified by:
      getContainerProviderSafely in interface Platform
    • getItemColor

      public int getItemColor(net.minecraft.world.item.ItemStack stack, int tintIndex)
      Specified by:
      getItemColor in interface Platform
    • setSlotY

      public void setSlotY(net.minecraft.world.inventory.Slot slot, int y)
      Specified by:
      setSlotY in interface Platform