Class PlatformProxy
java.lang.Object
com.refinedmods.refinedstorage.common.PlatformProxy
- All Implemented Interfaces:
Platform
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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) boolean
canEditBoxLoseFocus
(net.minecraft.client.gui.components.EditBox editBox) createTransferManager
(net.minecraft.world.inventory.AbstractContainerMenu containerMenu) drainContainer
(net.minecraft.world.item.ItemStack container) fillContainer
(net.minecraft.world.item.ItemStack container, ResourceAmount resourceAmount) 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) long
Optional
<net.minecraft.sounds.SoundEvent> getBucketPickupSound
(net.minecraft.world.level.block.LiquidBlock liquidBlock, net.minecraft.world.level.block.state.BlockState state) 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) getContainerProvider
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction) getContainerProviderSafely
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction) getEnergyStorage
(net.minecraft.world.item.ItemStack stack) net.minecraft.world.entity.player.Player
getFakePlayer
(net.minecraft.server.level.ServerLevel level, UUID playerId) int
getItemColor
(net.minecraft.world.item.ItemStack stack, int tintIndex) 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) long
insertIntoContainer
(net.minecraft.world.Container container, ItemResource itemResource, long amount, Action action) boolean
isKeyDown
(net.minecraft.client.KeyMapping keyMapping) static void
loadPlatform
(Platform platform) void
onItemCrafted
(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack craftedStack, net.minecraft.world.inventory.CraftingContainer container) 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) 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) 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) void
renderTooltip
(net.minecraft.client.gui.GuiGraphics graphics, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, int x, int y) void
requestModelDataUpdateOnClient
(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, boolean updateChunk) 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) <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>
voidsendPacketToClient
(net.minecraft.server.level.ServerPlayer player, T packet) <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>
voidsendPacketToServer
(T packet) void
setSlotY
(net.minecraft.world.inventory.Slot slot, int y)
-
Constructor Details
-
PlatformProxy
public PlatformProxy()
-
-
Method Details
-
loadPlatform
-
getMenuOpener
- Specified by:
getMenuOpener
in interfacePlatform
-
getBucketAmount
public long getBucketAmount()- Specified by:
getBucketAmount
in interfacePlatform
-
getConfig
-
canEditBoxLoseFocus
public boolean canEditBoxLoseFocus(net.minecraft.client.gui.components.EditBox editBox) - Specified by:
canEditBoxLoseFocus
in interfacePlatform
-
isKeyDown
public boolean isKeyDown(net.minecraft.client.KeyMapping keyMapping) -
getItemGridResourceFactory
- Specified by:
getItemGridResourceFactory
in interfacePlatform
-
getFluidGridResourceFactory
- Specified by:
getFluidGridResourceFactory
in interfacePlatform
-
getDefaultGridInsertionStrategyFactory
- Specified by:
getDefaultGridInsertionStrategyFactory
in interfacePlatform
-
getFluidRenderer
- Specified by:
getFluidRenderer
in interfacePlatform
-
drainContainer
- Specified by:
drainContainer
in interfacePlatform
-
fillContainer
public Optional<FluidOperationResult> fillContainer(net.minecraft.world.item.ItemStack container, ResourceAmount resourceAmount) - Specified by:
fillContainer
in interfacePlatform
-
createTransferManager
public TransferManager createTransferManager(net.minecraft.world.inventory.AbstractContainerMenu containerMenu) - Specified by:
createTransferManager
in interfacePlatform
-
insertIntoContainer
public long insertIntoContainer(net.minecraft.world.Container container, ItemResource itemResource, long amount, Action action) - Specified by:
insertIntoContainer
in interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
getFakePlayer
public net.minecraft.world.entity.player.Player getFakePlayer(net.minecraft.server.level.ServerLevel level, @Nullable UUID playerId) - Specified by:
getFakePlayer
in interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
getEnergyStorage
- Specified by:
getEnergyStorage
in interfacePlatform
-
sendPacketToServer
public <T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> void sendPacketToServer(T packet) - Specified by:
sendPacketToServer
in interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
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 interfacePlatform
-
getItemColor
public int getItemColor(net.minecraft.world.item.ItemStack stack, int tintIndex) - Specified by:
getItemColor
in interfacePlatform
-
setSlotY
public void setSlotY(net.minecraft.world.inventory.Slot slot, int y) -
requestModelDataUpdateOnClient
public void requestModelDataUpdateOnClient(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, boolean updateChunk) - Specified by:
requestModelDataUpdateOnClient
in interfacePlatform
-