From 36e1ac0ec57e98870526a16b87a52fa4e1bdc6a2 Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Tue, 31 Oct 2023 09:53:40 +0100 Subject: [PATCH 01/24] fix: cleanup some storage monitor code --- .../common/block/StorageMonitorBlock.java | 23 +++++++++++++------ .../StorageMonitorBlockEntity.java | 17 +++++++++----- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java index 74a6fef2f..16f02315f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java @@ -11,6 +11,7 @@ import javax.annotation.Nullable; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -29,7 +30,7 @@ public class StorageMonitorBlock extends AbstractDirectionalBlock i new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getStorageMonitor); public StorageMonitorBlock() { - super(BlockConstants.PROPERTIES.strength(1.5F, 6.0F)); + super(BlockConstants.PROPERTIES.strength(2.5F, 6.0F)); } @Override @@ -60,6 +61,10 @@ public InteractionResult use(final BlockState state, if (player.isCrouching()) { return super.use(state, level, pos, player, hand, hit); } + final BiDirection direction = getDirection(state); + if (direction == null || hit.getDirection() != direction.asDirection()) { + return InteractionResult.FAIL; + } if (!level.isClientSide()) { final BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity instanceof StorageMonitorBlockEntity storageMonitor) { @@ -83,19 +88,23 @@ public void attack(final BlockState state, final Level level, final BlockPos pos if (direction == null) { return; } + final Direction hitDirection = getHitDirection(level, player); + if (hitDirection != direction.asDirection()) { + return; + } + storageMonitor.extract(player); + } + + private Direction getHitDirection(final Level level, final Player player) { final Vec3 base = player.getEyePosition(1.0F); final Vec3 look = player.getLookAngle(); final Vec3 target = base.add(look.x * 20, look.y * 20, look.z * 20); - final BlockHitResult hitResult = level.clip(new ClipContext( + return level.clip(new ClipContext( base, target, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, player - )); - if (hitResult.getDirection() != direction.asDirection()) { - return; - } - storageMonitor.extract(player); + )).getDirection(); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java index 21586c41c..2f3c0730c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java @@ -64,9 +64,7 @@ public StorageMonitorBlockEntity(final BlockPos pos, final BlockState state) { final ResourceContainer resourceContainer = ResourceContainerImpl.createForFilter(1); this.filter = FilterWithFuzzyMode.create(resourceContainer, () -> { setChanged(); - if (level != null) { - sendDisplayUpdate(level, getAmount(), getNode().isActive()); - } + sendDisplayUpdate(); }); } @@ -139,7 +137,7 @@ private void extract( if (!success) { return; } - sendDisplayUpdate(level, getAmount(), getNode().isActive()); + sendDisplayUpdate(); level.playSound( null, getBlockPos(), @@ -152,7 +150,7 @@ private void extract( public void insert(final Player player, final InteractionHand hand) { if (level != null && doInsert(player, hand)) { - sendDisplayUpdate(level, getAmount(), getNode().isActive()); + sendDisplayUpdate(); } } @@ -308,10 +306,17 @@ public CompoundTag getUpdateTag() { return tag; } + private void sendDisplayUpdate() { + if (level == null) { + return; + } + sendDisplayUpdate(level, getAmount(), getNode().isActive()); + } + private void sendDisplayUpdate(final Level level, final long amount, final boolean active) { currentAmount = amount; currentlyActive = active; level.sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL); - LOGGER.info("Sending display update for storage monitor {} with amount {}", worldPosition, amount); + LOGGER.debug("Sending display update for storage monitor {} with amount {}", worldPosition, amount); } } From 872885724a47539f5a3cd3c721b2d1a4aac9e706 Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Tue, 31 Oct 2023 10:24:13 +0100 Subject: [PATCH 02/24] refactor: split up configuration read/writes from unique read/writes --- .../blockentity/ConfigurationCardTarget.java | 12 + ...ternalNetworkNodeContainerBlockEntity.java | 26 +- ...actingNetworkNodeContainerBlockEntity.java | 3 +- ...dulingNetworkNodeContainerBlockEntity.java | 8 +- .../block/entity/ImporterBlockEntity.java | 10 +- .../StorageConfigurationContainerImpl.java | 3 +- .../constructor/ConstructorBlockEntity.java | 8 +- .../destructor/DestructorBlockEntity.java | 8 +- .../entity/detector/DetectorBlockEntity.java | 16 +- .../AbstractDiskDriveBlockEntity.java | 13 +- .../ExternalStorageBlockEntity.java | 339 +++++++++--------- .../entity/iface/InterfaceBlockEntity.java | 12 +- .../AbstractStorageBlockBlockEntity.java | 12 +- .../StorageMonitorBlockEntity.java | 12 +- 14 files changed, 274 insertions(+), 208 deletions(-) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java new file mode 100644 index 000000000..09f7ebc5d --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java @@ -0,0 +1,12 @@ +package com.refinedmods.refinedstorage2.platform.api.blockentity; + +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.block.entity.BlockEntityType; + +public interface ConfigurationCardTarget { + BlockEntityType getBlockEntityType(); + + void writeConfiguration(CompoundTag tag); + + void readConfiguration(CompoundTag tag); +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java index 7c32c3318..474cd4c8c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; @@ -25,7 +26,7 @@ public abstract class AbstractInternalNetworkNodeContainerBlockEntity extends AbstractNetworkNodeContainerBlockEntity - implements PlayerAware { + implements PlayerAware, ConfigurationCardTarget { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInternalNetworkNodeContainerBlockEntity.class); private static final String TAG_REDSTONE_MODE = "rm"; @@ -56,23 +57,38 @@ && getNode().getNetwork() != null @Override public void saveAdditional(final CompoundTag tag) { super.saveAdditional(tag); - tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); + writeConfiguration(tag); if (placedByPlayerId != null) { tag.putUUID(TAG_PLACED_BY_PLAYER_ID, placedByPlayerId); } } + @Override + public void writeConfiguration(final CompoundTag tag) { + tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); + } + @Override public void load(final CompoundTag tag) { super.load(tag); - if (tag.contains(TAG_REDSTONE_MODE)) { - redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); - } + readConfiguration(tag); if (tag.hasUUID(TAG_PLACED_BY_PLAYER_ID)) { placedByPlayerId = tag.getUUID(TAG_PLACED_BY_PLAYER_ID); } } + @Override + public void readConfiguration(final CompoundTag tag) { + if (tag.contains(TAG_REDSTONE_MODE)) { + redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); + } + } + + @Override + public BlockEntityType getBlockEntityType() { + return getType(); + } + public void updateActiveness(final BlockState state, @Nullable final BooleanProperty activenessProperty) { final boolean newActive = isActive(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java index 8c66c1785..a0904f263 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java @@ -14,7 +14,7 @@ public abstract class AbstractLevelInteractingNetworkNodeContainerBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity { private static final Logger LOGGER = LoggerFactory.getLogger( - AbstractLevelInteractingNetworkNodeContainerBlockEntity.class + AbstractLevelInteractingNetworkNodeContainerBlockEntity.class ); protected AbstractLevelInteractingNetworkNodeContainerBlockEntity( @@ -28,7 +28,6 @@ protected AbstractLevelInteractingNetworkNodeContainerBlockEntity( // used to handle rotations @Override - @SuppressWarnings("deprecation") public void setBlockState(final BlockState newBlockState) { super.setBlockState(newBlockState); if (!(level instanceof ServerLevel serverLevel)) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java index e298d8b87..636538a98 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java @@ -43,17 +43,17 @@ protected AbstractSchedulingNetworkNodeContainerBlockEntity( } @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); schedulingMode.writeToTag(tag); filter.save(tag); } @Override - public void load(final CompoundTag tag) { + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); schedulingMode.load(tag); filter.load(tag); - super.load(tag); } public void setSchedulingModeType(final SchedulingModeType type) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java index 71b12cea2..be7b11fc4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java @@ -79,21 +79,19 @@ private CompositeImporterTransferStrategy createStrategy(final ServerLevel serve } @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); tag.putInt(TAG_FILTER_MODE, FilterModeSettings.getFilterMode(getNode().getFilterMode())); filter.save(tag); } @Override - public void load(final CompoundTag tag) { + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); if (tag.contains(TAG_FILTER_MODE)) { getNode().setFilterMode(FilterModeSettings.getFilterMode(tag.getInt(TAG_FILTER_MODE))); } - filter.load(tag); - - super.load(tag); } public boolean isFuzzyMode() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java index 3fb40d138..f1890948f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java @@ -26,8 +26,7 @@ public StorageConfigurationContainerImpl(final StorageConfiguration config, final FilterWithFuzzyMode filter, final Runnable listener, final Supplier redstoneModeSupplier, - final Consumer redstoneModeConsumer - ) { + final Consumer redstoneModeConsumer) { this.config = config; this.filter = filter; this.listener = listener; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java index 104736dc4..6137b4f8a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java @@ -99,17 +99,17 @@ public void postDoWork() { } @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); tag.putBoolean(TAG_DROP_ITEMS, dropItems); } @Override - public void load(final CompoundTag tag) { + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); if (tag.contains(TAG_DROP_ITEMS)) { dropItems = tag.getBoolean(TAG_DROP_ITEMS); } - super.load(tag); } public boolean isDropItems() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java index f9e4f9aa9..3d2e7ad75 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java @@ -83,15 +83,16 @@ public void setFilterMode(final FilterMode mode) { } @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); tag.putInt(TAG_FILTER_MODE, FilterModeSettings.getFilterMode(filter.getMode())); tag.putBoolean(TAG_PICKUP_ITEMS, pickupItems); filterWithFuzzyMode.save(tag); } @Override - public void load(final CompoundTag tag) { + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); filterWithFuzzyMode.load(tag); if (tag.contains(TAG_FILTER_MODE)) { filter.setMode(FilterModeSettings.getFilterMode(tag.getInt(TAG_FILTER_MODE))); @@ -99,7 +100,6 @@ public void load(final CompoundTag tag) { if (tag.contains(TAG_PICKUP_ITEMS)) { pickupItems = tag.getBoolean(TAG_PICKUP_ITEMS); } - super.load(tag); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java index 98afeed4f..696c62b01 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java @@ -64,10 +64,9 @@ public DetectorBlockEntity(final BlockPos pos, final BlockState state) { initialize(); } - @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); filter.save(tag); tag.putDouble(TAG_AMOUNT, amount); tag.putInt(TAG_MODE, DetectorModeSettings.getDetectorMode(getNode().getMode())); @@ -75,6 +74,14 @@ public void saveAdditional(final CompoundTag tag) { @Override public void load(final CompoundTag tag) { + super.load(tag); + initialize(); + propagateAmount(); + } + + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); filter.load(tag); if (tag.contains(TAG_AMOUNT)) { this.amount = tag.getDouble(TAG_AMOUNT); @@ -82,9 +89,6 @@ public void load(final CompoundTag tag) { if (tag.contains(TAG_MODE)) { getNode().setMode(DetectorModeSettings.getDetectorMode(tag.getInt(TAG_MODE))); } - initialize(); - propagateAmount(); - super.load(tag); } public void setAmount(final double amount) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java index 2e99a8364..625bcd74d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java @@ -155,21 +155,28 @@ public void activenessChanged(final BlockState state, @Override public void load(final CompoundTag tag) { fromClientTag(tag); - if (tag.contains(TAG_DISK_INVENTORY)) { ContainerUtil.read(tag.getCompound(TAG_DISK_INVENTORY), diskInventory); } + super.load(tag); + } + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); configContainer.load(tag); filter.load(tag); - - super.load(tag); } @Override public void saveAdditional(final CompoundTag tag) { super.saveAdditional(tag); tag.put(TAG_DISK_INVENTORY, ContainerUtil.write(diskInventory)); + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); configContainer.save(tag); filter.save(tag); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java index 94bebab8c..d16595b60 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java @@ -1,165 +1,174 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; - -import com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage.ExternalStorageNetworkNode; -import com.refinedmods.refinedstorage2.api.network.node.externalstorage.ExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; - -import java.util.Optional; -import javax.annotation.Nullable; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.Tag; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.BooleanProperty; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ExternalStorageBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity - implements ExtendedMenuProvider { - private static final Logger LOGGER = LoggerFactory.getLogger(ExternalStorageBlockEntity.class); - private static final String TAG_TRACKED_RESOURCES = "tr"; - - private final FilterWithFuzzyMode filter; - private final StorageConfigurationContainerImpl configContainer; - private final ExternalStorageTrackedStorageRepositoryProvider trackedStorageRepositoryProvider; - private final WorkRate workRate = new WorkRate(); - private boolean initialized; - - public ExternalStorageBlockEntity(final BlockPos pos, final BlockState state) { - super(BlockEntities.INSTANCE.getExternalStorage(), pos, state, new ExternalStorageNetworkNode( - Platform.INSTANCE.getConfig().getExternalStorage().getEnergyUsage() - )); - this.filter = FilterWithFuzzyMode.createAndListenForUniqueTemplates( - ResourceContainerImpl.createForFilter(), - this::setChanged, - templates -> getNode().setFilterTemplates(templates) - ); - this.trackedStorageRepositoryProvider = new ExternalStorageTrackedStorageRepositoryProvider( - PlatformApi.INSTANCE.getStorageChannelTypeRegistry(), - this::setChanged - ); - getNode().setNormalizer(filter.createNormalizer()); - getNode().initialize( - PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll(), - System::currentTimeMillis, - trackedStorageRepositoryProvider - ); - this.configContainer = new StorageConfigurationContainerImpl( - getNode(), - filter, - this::setChanged, - this::getRedstoneMode, - this::setRedstoneMode - ); - } - - @Override - @SuppressWarnings("deprecation") - public void setBlockState(final BlockState newBlockState) { - super.setBlockState(newBlockState); - if (level instanceof ServerLevel serverLevel) { - LOGGER.debug("Reloading external storage @ {} as block state has changed", worldPosition); - loadStorage(serverLevel); - } - } - - @Override - protected void activenessChanged(final BlockState state, - final boolean newActive, - @Nullable final BooleanProperty activenessProperty) { - super.activenessChanged(state, newActive, activenessProperty); - if (!initialized && level instanceof ServerLevel serverLevel) { - LOGGER.debug("Triggering initial load of external storage {}", worldPosition); - loadStorage(serverLevel); - initialized = true; - } - } - - public void loadStorage(final ServerLevel serverLevel) { - final Direction direction = getDirection(); - LOGGER.debug("Loading storage for external storage with direction {} @ {}", direction, worldPosition); - if (direction == null) { - return; - } - getNode().initialize(new ExternalStorageProviderFactory() { - @Override - public Optional> create(final StorageChannelType channelType) { - final Direction incomingDirection = direction.getOpposite(); - final BlockPos sourcePosition = worldPosition.relative(direction); - return PlatformApi.INSTANCE - .getExternalStorageProviderFactories() - .stream() - .flatMap(factory -> factory.create(serverLevel, sourcePosition, incomingDirection, channelType) - .stream()) - .findFirst(); - } - }); - } - - @Override - public void doWork() { - super.doWork(); - if (workRate.canDoWork()) { - final boolean hasChanges = getNode().detectChanges(); - if (hasChanges) { - LOGGER.debug("External storage @ {} has changed!", worldPosition); - workRate.faster(); - } else { - workRate.slower(); - } - } - } - - @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); - filter.save(tag); - configContainer.save(tag); - tag.put(TAG_TRACKED_RESOURCES, trackedStorageRepositoryProvider.toTag()); - } - - @Override - public void load(final CompoundTag tag) { - super.load(tag); - filter.load(tag); - configContainer.load(tag); - trackedStorageRepositoryProvider.fromTag(tag.getList(TAG_TRACKED_RESOURCES, Tag.TAG_COMPOUND)); - } - - @Override - public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { - filter.getFilterContainer().writeToUpdatePacket(buf); - } - - @Override - public Component getDisplayName() { - return ContentNames.EXTERNAL_STORAGE; - } - - @Nullable - @Override - public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { - return new ExternalStorageContainerMenu(syncId, player, filter.getFilterContainer(), configContainer); - } -} +package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; + +import com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage.ExternalStorageNetworkNode; +import com.refinedmods.refinedstorage2.api.network.node.externalstorage.ExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; +import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; + +import java.util.Optional; +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ExternalStorageBlockEntity + extends AbstractInternalNetworkNodeContainerBlockEntity + implements ExtendedMenuProvider { + private static final Logger LOGGER = LoggerFactory.getLogger(ExternalStorageBlockEntity.class); + private static final String TAG_TRACKED_RESOURCES = "tr"; + + private final FilterWithFuzzyMode filter; + private final StorageConfigurationContainerImpl configContainer; + private final ExternalStorageTrackedStorageRepositoryProvider trackedStorageRepositoryProvider; + private final WorkRate workRate = new WorkRate(); + private boolean initialized; + + public ExternalStorageBlockEntity(final BlockPos pos, final BlockState state) { + super(BlockEntities.INSTANCE.getExternalStorage(), pos, state, new ExternalStorageNetworkNode( + Platform.INSTANCE.getConfig().getExternalStorage().getEnergyUsage() + )); + this.filter = FilterWithFuzzyMode.createAndListenForUniqueTemplates( + ResourceContainerImpl.createForFilter(), + this::setChanged, + templates -> getNode().setFilterTemplates(templates) + ); + this.trackedStorageRepositoryProvider = new ExternalStorageTrackedStorageRepositoryProvider( + PlatformApi.INSTANCE.getStorageChannelTypeRegistry(), + this::setChanged + ); + getNode().setNormalizer(filter.createNormalizer()); + getNode().initialize( + PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll(), + System::currentTimeMillis, + trackedStorageRepositoryProvider + ); + this.configContainer = new StorageConfigurationContainerImpl( + getNode(), + filter, + this::setChanged, + this::getRedstoneMode, + this::setRedstoneMode + ); + } + + @Override + public void setBlockState(final BlockState newBlockState) { + super.setBlockState(newBlockState); + if (level instanceof ServerLevel serverLevel) { + LOGGER.debug("Reloading external storage @ {} as block state has changed", worldPosition); + loadStorage(serverLevel); + } + } + + @Override + protected void activenessChanged(final BlockState state, + final boolean newActive, + @Nullable final BooleanProperty activenessProperty) { + super.activenessChanged(state, newActive, activenessProperty); + if (!initialized && level instanceof ServerLevel serverLevel) { + LOGGER.debug("Triggering initial load of external storage {}", worldPosition); + loadStorage(serverLevel); + initialized = true; + } + } + + public void loadStorage(final ServerLevel serverLevel) { + final Direction direction = getDirection(); + LOGGER.debug("Loading storage for external storage with direction {} @ {}", direction, worldPosition); + if (direction == null) { + return; + } + getNode().initialize(new ExternalStorageProviderFactory() { + @Override + public Optional> create(final StorageChannelType channelType) { + final Direction incomingDirection = direction.getOpposite(); + final BlockPos sourcePosition = worldPosition.relative(direction); + return PlatformApi.INSTANCE + .getExternalStorageProviderFactories() + .stream() + .flatMap(factory -> factory.create(serverLevel, sourcePosition, incomingDirection, channelType) + .stream()) + .findFirst(); + } + }); + } + + @Override + public void doWork() { + super.doWork(); + if (workRate.canDoWork()) { + final boolean hasChanges = getNode().detectChanges(); + if (hasChanges) { + LOGGER.debug("External storage @ {} has changed!", worldPosition); + workRate.faster(); + } else { + workRate.slower(); + } + } + } + + @Override + public void saveAdditional(final CompoundTag tag) { + super.saveAdditional(tag); + tag.put(TAG_TRACKED_RESOURCES, trackedStorageRepositoryProvider.toTag()); + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); + filter.save(tag); + configContainer.save(tag); + } + + @Override + public void load(final CompoundTag tag) { + super.load(tag); + trackedStorageRepositoryProvider.fromTag(tag.getList(TAG_TRACKED_RESOURCES, Tag.TAG_COMPOUND)); + } + + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); + filter.load(tag); + configContainer.load(tag); + } + + @Override + public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { + filter.getFilterContainer().writeToUpdatePacket(buf); + } + + @Override + public Component getDisplayName() { + return ContentNames.EXTERNAL_STORAGE; + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new ExternalStorageContainerMenu(syncId, player, filter.getFilterContainer(), configContainer); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java index 9edacdb05..d08df7577 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java @@ -107,6 +107,11 @@ static long getTransferQuota(final ResourceTemplate resourceTemplate) { public void saveAdditional(final CompoundTag tag) { super.saveAdditional(tag); tag.put(TAG_EXPORT_ITEMS, exportedResources.toTag()); + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); filter.save(tag); } @@ -115,10 +120,15 @@ public void load(final CompoundTag tag) { if (tag.contains(TAG_EXPORT_ITEMS)) { exportedResources.fromTag(tag.getCompound(TAG_EXPORT_ITEMS)); } - filter.load(tag); super.load(tag); } + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); + filter.load(tag); + } + public boolean isFuzzyMode() { return filter.isFuzzyMode(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java index ccce42bcf..df47b9537 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java @@ -114,11 +114,14 @@ public void load(final CompoundTag tag) { } storageId = actualStorageId; } + super.load(tag); + } + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); configContainer.load(tag); filter.load(tag); - - super.load(tag); } @SuppressWarnings("unchecked") @@ -149,6 +152,11 @@ public void saveAdditional(final CompoundTag tag) { if (storageId != null) { tag.putUUID(TAG_STORAGE_ID, storageId); } + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); configContainer.save(tag); filter.save(tag); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java index 2f3c0730c..caee98062 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java @@ -259,8 +259,8 @@ public boolean isCurrentlyActive() { } @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); + public void writeConfiguration(final CompoundTag tag) { + super.writeConfiguration(tag); filter.save(tag); } @@ -270,12 +270,16 @@ public void load(final CompoundTag tag) { filter.getFilterContainer().fromTag(tag.getCompound(TAG_CLIENT_FILTER)); currentAmount = tag.getLong(TAG_CLIENT_AMOUNT); currentlyActive = tag.getBoolean(TAG_CLIENT_ACTIVE); - } else { - filter.load(tag); } super.load(tag); } + @Override + public void readConfiguration(final CompoundTag tag) { + super.readConfiguration(tag); + filter.load(tag); + } + @Override public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { filter.getFilterContainer().writeToUpdatePacket(buf); From 8330c0d3726b9aa01c9bbe9925f1eef217f8e22c Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Tue, 31 Oct 2023 14:39:53 +0100 Subject: [PATCH 03/24] feat: configuration card --- CHANGELOG.md | 1 + .../blockentity/ConfigurationCardTarget.java | 12 +- .../common/AbstractModInitializer.java | 5 + ...ternalNetworkNodeContainerBlockEntity.java | 12 +- ...deableNetworkNodeContainerBlockEntity.java | 22 ++ .../entity/detector/DetectorBlockEntity.java | 9 +- .../platform/common/content/ContentIds.java | 1 + .../common/content/CreativeModeTabItems.java | 1 + .../platform/common/content/Items.java | 10 + .../common/item/ConfigurationCardItem.java | 205 ++++++++++++++++++ ...ConfigurationCardItemPropertyFunction.java | 26 +++ .../assets/refinedstorage2/lang/en_us.json | 11 +- .../models/item/configuration_card.json | 17 ++ .../item/configuration_card/active.json | 6 + .../item/configuration_card/inactive.json | 6 + .../item/configuration_card/active.png | Bin 0 -> 997 bytes .../item/configuration_card/inactive.png | Bin 0 -> 852 bytes .../recipes/configuration_card.json | 22 ++ .../fabric/ClientModInitializerImpl.java | 6 + .../platform/forge/ClientModInitializer.java | 6 + 20 files changed, 365 insertions(+), 13 deletions(-) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/active.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/inactive.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/configuration_card/active.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/configuration_card/inactive.png create mode 100644 refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/configuration_card.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b229e26..3799f1e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Curios integration on Forge. - Trinkets integration on Fabric. - Storage Monitor +- Configuration Card. It copies device configurations and can transfer upgrades. ### Changed diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java index 09f7ebc5d..1d5dd88bf 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java @@ -1,12 +1,18 @@ package com.refinedmods.refinedstorage2.platform.api.blockentity; +import java.util.List; + import net.minecraft.nbt.CompoundTag; -import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.item.Item; +import org.apiguardian.api.API; +@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2") public interface ConfigurationCardTarget { - BlockEntityType getBlockEntityType(); - void writeConfiguration(CompoundTag tag); void readConfiguration(CompoundTag tag); + + List getUpgradeItems(); + + boolean addUpgradeItem(Item upgradeItem); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 161c294ef..2b343c38d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -77,6 +77,7 @@ import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.item.ConfigurationCardItem; import com.refinedmods.refinedstorage2.platform.common.item.FluidStorageDiskItem; import com.refinedmods.refinedstorage2.platform.common.item.FortuneUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.item.ItemStorageDiskItem; @@ -321,6 +322,10 @@ private void registerSimpleItems(final RegistryCallback callback) { for (final ProcessorItem.Type type : ProcessorItem.Type.values()) { registerProcessor(callback, type); } + Items.INSTANCE.setConfigurationCard(callback.register( + ContentIds.CONFIGURATION_CARD, + ConfigurationCardItem::new + )); } private void registerProcessor(final RegistryCallback callback, final ProcessorItem.Type type) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java index 474cd4c8c..1fd6f3861 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java @@ -9,6 +9,8 @@ import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import java.util.Collections; +import java.util.List; import java.util.UUID; import javax.annotation.Nullable; @@ -18,6 +20,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -85,8 +88,13 @@ public void readConfiguration(final CompoundTag tag) { } @Override - public BlockEntityType getBlockEntityType() { - return getType(); + public List getUpgradeItems() { + return Collections.emptyList(); + } + + @Override + public boolean addUpgradeItem(final Item upgradeItem) { + return false; } public void updateActiveness(final BlockState state, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java index c1a725fe3..030524f05 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java @@ -5,12 +5,16 @@ import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import java.util.ArrayList; +import java.util.List; + import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -63,6 +67,24 @@ private void upgradeContainerChanged() { } } + @Override + public List getUpgradeItems() { + final List upgradeItems = new ArrayList<>(); + for (int i = 0; i < upgradeContainer.getContainerSize(); ++i) { + final ItemStack itemStack = upgradeContainer.getItem(i); + if (itemStack.isEmpty()) { + continue; + } + upgradeItems.add(itemStack.getItem()); + } + return upgradeItems; + } + + @Override + public boolean addUpgradeItem(final Item upgradeItem) { + return upgradeContainer.addItem(new ItemStack(upgradeItem)).isEmpty(); + } + @Override public void saveAdditional(final CompoundTag tag) { super.saveAdditional(tag); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java index 696c62b01..4391e381e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java @@ -72,13 +72,6 @@ public void writeConfiguration(final CompoundTag tag) { tag.putInt(TAG_MODE, DetectorModeSettings.getDetectorMode(getNode().getMode())); } - @Override - public void load(final CompoundTag tag) { - super.load(tag); - initialize(); - propagateAmount(); - } - @Override public void readConfiguration(final CompoundTag tag) { super.readConfiguration(tag); @@ -89,6 +82,8 @@ public void readConfiguration(final CompoundTag tag) { if (tag.contains(TAG_MODE)) { getNode().setMode(DetectorModeSettings.getDetectorMode(tag.getInt(TAG_MODE))); } + initialize(); + propagateAmount(); } public void setAmount(final double amount) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index cd3f251c8..2ca3bd93a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -48,6 +48,7 @@ public final class ContentIds { public static final ResourceLocation RANGE_UPGRADE = createIdentifier("range_upgrade"); public static final ResourceLocation CREATIVE_RANGE_UPGRADE = createIdentifier("creative_range_upgrade"); public static final ResourceLocation STORAGE_MONITOR = createIdentifier("storage_monitor"); + public static final ResourceLocation CONFIGURATION_CARD = createIdentifier("configuration_card"); private ContentIds() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index 5af4cd217..002b99b20 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -95,5 +95,6 @@ private static void appendItems(final Consumer consumer) { itemConsumer.accept(Items.INSTANCE.getWirelessGrid()); consumer.accept(Items.INSTANCE.getWirelessGrid().createAtEnergyCapacity()); itemConsumer.accept(Items.INSTANCE.getCreativeWirelessGrid()); + itemConsumer.accept(Items.INSTANCE.getConfigurationCard()); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index 6734b231a..fdfcdc5f3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -78,6 +78,8 @@ public final class Items { private Supplier wirelessGrid; @Nullable private Supplier creativeWirelessGrid; + @Nullable + private Supplier configurationCard; private Items() { } @@ -353,4 +355,12 @@ public WirelessGridItem getCreativeWirelessGrid() { public void setCreativeWirelessGrid(final Supplier supplier) { this.creativeWirelessGrid = supplier; } + + public Item getConfigurationCard() { + return Objects.requireNonNull(configurationCard).get(); + } + + public void setConfigurationCard(final Supplier supplier) { + this.configurationCard = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java new file mode 100644 index 000000000..045bf8b18 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java @@ -0,0 +1,205 @@ +package com.refinedmods.refinedstorage2.platform.common.item; + +import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; +import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; + +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +import net.minecraft.ChatFormatting; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.nbt.Tag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.tooltip.TooltipComponent; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; +import static java.util.Objects.requireNonNull; + +// TODO: textures +public class ConfigurationCardItem extends Item { + private static final Component EMPTY_HELP = createTranslation("item", "configuration_card.empty_help"); + private static final Component CONFIGURED_HELP = createTranslation("item", "configuration_card.configured_help"); + + private static final Component EMPTY = createTranslation("item", "configuration_card.empty") + .withStyle(ChatFormatting.GRAY); + + private static final String TAG_TYPE = "type"; + private static final String TAG_CONFIG = "config"; + private static final String TAG_UPGRADES = "upgrades"; + + public ConfigurationCardItem() { + super(new Item.Properties().stacksTo(1)); + } + + @Override + public InteractionResult useOn(final UseOnContext ctx) { + if (ctx.getLevel().isClientSide() || ctx.getPlayer() == null) { + return InteractionResult.CONSUME; + } + final BlockEntity blockEntity = ctx.getLevel().getBlockEntity(ctx.getClickedPos()); + if (!(blockEntity instanceof ConfigurationCardTarget target)) { + return InteractionResult.CONSUME; + } + final ItemStack stack = ctx.getItemInHand(); + if (stack.getTag() == null) { + writeConfiguration(stack, ctx.getPlayer(), target, blockEntity.getType()); + return InteractionResult.CONSUME; + } + return applyConfiguration(ctx.getPlayer(), blockEntity, target, stack.getTag()); + } + + private InteractionResult applyConfiguration( + final Player player, + final BlockEntity targetBlockEntity, + final ConfigurationCardTarget target, + final CompoundTag tag + ) { + final BlockEntityType existingConfiguredType = getConfiguredType(tag); + if (existingConfiguredType != targetBlockEntity.getType()) { + return configurationCardIsConfiguredForDifferentType(player, existingConfiguredType); + } + target.readConfiguration(tag.getCompound(TAG_CONFIG)); + tryTransferUpgrades(player, target, tag); + targetBlockEntity.setChanged(); + player.sendSystemMessage(createTranslation("item", "configuration_card.applied_configuration")); + return InteractionResult.SUCCESS; + } + + private void tryTransferUpgrades(final Player player, final ConfigurationCardTarget target, final CompoundTag tag) { + final ListTag upgradesTag = tag.getList(TAG_UPGRADES, Tag.TAG_STRING); + for (final Tag upgradeItemTag : upgradesTag) { + final ResourceLocation upgradeItemKey = new ResourceLocation(upgradeItemTag.getAsString()); + final Item upgradeItem = BuiltInRegistries.ITEM.get(upgradeItemKey); + final int upgradeIndexInPlayerInventory = player.getInventory().findSlotMatchingItem( + new ItemStack(upgradeItem) + ); + if (upgradeIndexInPlayerInventory >= 0 && target.addUpgradeItem(upgradeItem)) { + player.getInventory().removeItem(upgradeIndexInPlayerInventory, 1); + } + } + } + + private InteractionResult configurationCardIsConfiguredForDifferentType( + final Player player, + @Nullable final BlockEntityType existingConfiguredType + ) { + if (existingConfiguredType != null) { + player.sendSystemMessage(createTranslation( + "item", + "configuration_card.cannot_apply_configuration", + getConfiguredTypeTranslation(existingConfiguredType).withStyle(ChatFormatting.YELLOW) + )); + } + return InteractionResult.CONSUME; + } + + private void writeConfiguration(final ItemStack stack, + final Player player, + final ConfigurationCardTarget target, + final BlockEntityType type) { + final CompoundTag tag = new CompoundTag(); + tag.putString(TAG_TYPE, requireNonNull(BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(type)).toString()); + tag.put(TAG_CONFIG, createConfigTag(target)); + tag.put(TAG_UPGRADES, createUpgradesTag(target)); + stack.setTag(tag); + sendCopiedConfigurationMessage(player, type); + } + + private CompoundTag createConfigTag(final ConfigurationCardTarget target) { + final CompoundTag tag = new CompoundTag(); + target.writeConfiguration(tag); + return tag; + } + + private ListTag createUpgradesTag(final ConfigurationCardTarget target) { + final ListTag tag = new ListTag(); + target.getUpgradeItems().forEach(item -> { + final ResourceLocation itemKey = BuiltInRegistries.ITEM.getKey(item); + tag.add(StringTag.valueOf(itemKey.toString())); + }); + return tag; + } + + private void sendCopiedConfigurationMessage(final Player player, final BlockEntityType configuredType) { + if (player.level().isClientSide()) { + return; + } + player.sendSystemMessage(createTranslation( + "item", + "configuration_card.copied_configuration", + getConfiguredTypeTranslation(configuredType).withStyle(ChatFormatting.YELLOW) + )); + } + + @Override + public InteractionResultHolder use(final Level level, final Player player, final InteractionHand hand) { + if (player.isCrouching()) { + if (!level.isClientSide()) { + player.sendSystemMessage(createTranslation("item", "configuration_card.cleared_configuration")); + } + return new InteractionResultHolder<>(InteractionResult.CONSUME, new ItemStack(this)); + } + return super.use(level, player, hand); + } + + @Override + public void appendHoverText(final ItemStack stack, + @Nullable final Level level, + final List lines, + final TooltipFlag flag) { + super.appendHoverText(stack, level, lines, flag); + if (stack.getTag() == null) { + lines.add(EMPTY); + return; + } + final BlockEntityType configuredType = getConfiguredType(stack.getTag()); + if (configuredType == null) { + return; + } + lines.add(createTranslation( + "item", + "configuration_card.configured", + getConfiguredTypeTranslation(configuredType).withStyle(ChatFormatting.WHITE) + ).withStyle(ChatFormatting.GRAY)); + } + + @Nullable + private BlockEntityType getConfiguredType(final CompoundTag tag) { + final ResourceLocation type = new ResourceLocation(tag.getString(TAG_TYPE)); + return BuiltInRegistries.BLOCK_ENTITY_TYPE.get(type); + } + + private MutableComponent getConfiguredTypeTranslation(final BlockEntityType type) { + final ResourceLocation typeId = BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(type); + if (typeId == null) { + return Component.empty(); + } + return Component.translatable("block." + typeId.getNamespace() + "." + typeId.getPath()); + } + + @Override + public Optional getTooltipImage(final ItemStack stack) { + return Optional.of(new HelpTooltipComponent(isActive(stack) ? CONFIGURED_HELP : EMPTY_HELP)); + } + + public boolean isActive(final ItemStack stack) { + return stack.getTag() != null && stack.getTag().contains(TAG_TYPE); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java new file mode 100644 index 000000000..e60ee181e --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java @@ -0,0 +1,26 @@ +package com.refinedmods.refinedstorage2.platform.common.render; + +import com.refinedmods.refinedstorage2.platform.common.item.ConfigurationCardItem; + +import javax.annotation.Nullable; + +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ClampedItemPropertyFunction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; + +public class ConfigurationCardItemPropertyFunction implements ClampedItemPropertyFunction { + public static final ResourceLocation NAME = new ResourceLocation("active"); + + @Override + public float unclampedCall(final ItemStack itemStack, + @Nullable final ClientLevel clientLevel, + @Nullable final LivingEntity livingEntity, + final int i) { + if (itemStack.getItem() instanceof ConfigurationCardItem cardItem) { + return cardItem.isActive(itemStack) ? 1 : 0; + } + return 0; + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index 59ef8d0bb..f2fc84abb 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -194,6 +194,15 @@ "item.refinedstorage2.network_item.bound_to": "Bound to %d, %d, %d.", "item.refinedstorage2.network_item.cannot_open_with_shortcut_due_to_duplicate": "There is more than one %s in your inventory.", "item.refinedstorage2.network_item.cannot_open_because_not_found": "There isn't any %s in your inventory.", + "item.refinedstorage2.configuration_card": "Configuration Card", + "item.refinedstorage2.configuration_card.empty": "Empty.", + "item.refinedstorage2.configuration_card.configured": "Contains configuration for %s.", + "item.refinedstorage2.configuration_card.copied_configuration": "Copied configuration for %s.", + "item.refinedstorage2.configuration_card.cleared_configuration": "Cleared configuration.", + "item.refinedstorage2.configuration_card.cannot_apply_configuration": "Cannot apply configuration card to different type of device. It is configured for %s.", + "item.refinedstorage2.configuration_card.applied_configuration": "Applied configuration.", + "item.refinedstorage2.configuration_card.empty_help": "Use on a storage network device while crouching to copy its configuration and upgrades to the card.", + "item.refinedstorage2.configuration_card.configured_help": "Use on the destination storage network device while crouching to transfer the configuration and upgrades. Use while crouching to clear.", "misc.refinedstorage2.stored": "Stored: %s", "misc.refinedstorage2.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage2.total": "%d total", @@ -225,7 +234,7 @@ "text.autoconfig.refinedstorage2.option.grid": "Grid", "text.autoconfig.refinedstorage2.option.grid.largeFont": "Large font", "text.autoconfig.refinedstorage2.option.grid.maxRowsStretch": "Maximum amount of rows when stretched", - "text.autoconfig.refinedstorage2.option.grid.preventSortingWhileShiftIsDown": "Prevent sorting while shift is down", + "text.autoconfig.refinedstorage2.option.grid.preventSortingWhileShiftIsDown": "Prevent sorting while SHIFT is down", "text.autoconfig.refinedstorage2.option.grid.detailedTooltip": "Detailed tooltip", "text.autoconfig.refinedstorage2.option.grid.rememberSearchQuery": "Remember search query", "text.autoconfig.refinedstorage2.option.grid.energyUsage": "Energy usage", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card.json new file mode 100644 index 000000000..d0e58b52d --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card.json @@ -0,0 +1,17 @@ +{ + "parent": "item/generated", + "overrides": [ + { + "predicate": { + "active": 0 + }, + "model": "refinedstorage2:item/configuration_card/inactive" + }, + { + "predicate": { + "active": 1 + }, + "model": "refinedstorage2:item/configuration_card/active" + } + ] +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/active.json new file mode 100644 index 000000000..d59df8a1f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/active.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage2:item/configuration_card/active" + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/inactive.json new file mode 100644 index 000000000..211dd1de5 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/configuration_card/inactive.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage2:item/configuration_card/inactive" + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/configuration_card/active.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/configuration_card/active.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d8387d7052183ad39a52f520fc5ac98864d5a0 GIT binary patch literal 997 zcmVEX>4Tx04R}tkv&MmKpe$iQ>9X>4t5Yx%ut;yh>AFB6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfb#YR3krMxx6k5c3aNLh~_a1le0HIc5n$k~y#OK6gCS8#Dk?V@bZ=CZk3p_Jyrjql-VPY}g!b%IXf~gTt5l2)_r+gvp zvC4UivsS9G#y$B9Ls@-gnd>wM5yv8yAVGwJ3W_MfMwC{a6bnh(kG1g+xPFOT3b~44 z`U&8F2Cnp`zgz=mK1r`O zwa5|ByA51iH#KDsxZDBypA6ZQUCB>V$mM|dGy0|s(02<2*Sy{u`#607Qq)!A1~@nb zM)Q=t-sat1t-bwwrqSOIoz`-=tvThp00006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=L#PVCIviogi`eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00F&8L_t(I%cavzOH^SL2k_raqE><{7q)3p?Sd9p1GYbMKrMa|z#qpaTaUp8xaw z&;PvfpH@0^6Z(&#YyV1AG328UYN`%29N4uW44)I=wlGk54-8|$gxs2t7oJH@5QK_D zUmd7Av~J5Qp}zxnOt|ibl0F>D<(d*J`ijrfDvmtRrB_KwT|=(34L(x0qA7&B6?LPg z+@h#O=(lWMrX_?#V%fZDm39hWv?MYuyTbUHoa;vII*<$7npRB~NRhe8aRE2wI zIfU*Bl3+~JqFg4I+O(}^ z$A*S2VZ;xgBt@B1;iuGRzwns0;u&wGmNeyBQZ2c#?@$;K2JBdr$fQCD6I$5DNEt5; zdhNS4t3pf3p0H{MQ%a`v8nW)G4O`}EX>4Tx04R}tkv&MmKpe$iQ>9X>4t5Yx%ut;yh>AFB6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfb#YR3krMxx6k5c3aNLh~_a1le0HIc5n$k~y#OK6gCS8#Dk?V@bZ=CZk3p_Jyrjql-VPY}g!b%IXf~gTt5l2)_r+gvp zvC4UivsS9G#y$B9Ls@-gnd>wM5yv8yAVGwJ3W_MfMwC{a6bnh(kG1g+xPFOT3b~44 z`U&8F2Cnp`zgz=mK1r`O zwa5|ByA51iH#KDsxZDBypA6ZQUCB>V$mM|dGy0|s(02<2*Sy{u`#607Qq)!A1~@nb zM)Q=t-sat1t-bwwrqSOIoz`-=tvThp00006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru=L#PVB`?h59!3BF02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00AsXL_t(I%f-`8E5uP02Jjz4h+=C}q6vGHB`Yf>AAyDJ z?3H{COG`^7Vq>A?H6;r#d5MJ$d5tiP%^6Mqj9FMXb-K6vob%js&V4TbZDp~JqaPW3 z;t2DYE=5p*QH-Glm2sZN&JXdO=!*R|b}G;l$z`|;zeyzahBu=<@WXrsgLuLQmN5In z%>x)hH8ycv2xhT`#v*MtVhyjjz(}0c Date: Tue, 31 Oct 2023 19:11:52 +0100 Subject: [PATCH 04/24] feat: network receiver --- CHANGELOG.md | 12 ++- .../blockstates/black_network_receiver.json | 10 ++ .../blockstates/blue_network_receiver.json | 10 ++ .../blockstates/brown_network_receiver.json | 10 ++ .../blockstates/cyan_network_receiver.json | 10 ++ .../blockstates/gray_network_receiver.json | 10 ++ .../blockstates/green_network_receiver.json | 10 ++ .../light_gray_network_receiver.json | 10 ++ .../blockstates/lime_network_receiver.json | 10 ++ .../blockstates/magenta_network_receiver.json | 10 ++ .../blockstates/network_receiver.json | 10 ++ .../blockstates/orange_network_receiver.json | 10 ++ .../blockstates/pink_network_receiver.json | 10 ++ .../blockstates/purple_network_receiver.json | 10 ++ .../blockstates/red_network_receiver.json | 10 ++ .../blockstates/white_network_receiver.json | 10 ++ .../blockstates/yellow_network_receiver.json | 10 ++ .../models/block/network_receiver/black.json | 8 ++ .../models/block/network_receiver/blue.json | 8 ++ .../models/block/network_receiver/brown.json | 8 ++ .../models/block/network_receiver/cyan.json | 8 ++ .../models/block/network_receiver/gray.json | 8 ++ .../models/block/network_receiver/green.json | 8 ++ .../block/network_receiver/inactive.json | 8 ++ .../block/network_receiver/light_blue.json | 8 ++ .../block/network_receiver/light_gray.json | 8 ++ .../models/block/network_receiver/lime.json | 8 ++ .../block/network_receiver/magenta.json | 8 ++ .../models/block/network_receiver/orange.json | 8 ++ .../models/block/network_receiver/pink.json | 8 ++ .../models/block/network_receiver/purple.json | 8 ++ .../models/block/network_receiver/red.json | 8 ++ .../models/block/network_receiver/white.json | 8 ++ .../models/block/network_receiver/yellow.json | 8 ++ .../models/item/black_network_receiver.json | 6 ++ .../models/item/blue_network_receiver.json | 6 ++ .../models/item/brown_network_receiver.json | 6 ++ .../models/item/cyan_network_receiver.json | 6 ++ .../models/item/gray_network_receiver.json | 6 ++ .../models/item/green_network_receiver.json | 6 ++ .../item/light_gray_network_receiver.json | 6 ++ .../models/item/lime_network_receiver.json | 6 ++ .../models/item/magenta_network_receiver.json | 6 ++ .../models/item/network_receiver.json | 6 ++ .../models/item/orange_network_receiver.json | 6 ++ .../models/item/pink_network_receiver.json | 6 ++ .../models/item/purple_network_receiver.json | 6 ++ .../models/item/red_network_receiver.json | 6 ++ .../models/item/white_network_receiver.json | 6 ++ .../models/item/yellow_network_receiver.json | 6 ++ .../misc/coloring/black_network_receiver.json | 33 ++++++ .../misc/coloring/blue_network_receiver.json | 33 ++++++ .../misc/coloring/brown_network_receiver.json | 33 ++++++ .../misc/coloring/cyan_network_receiver.json | 33 ++++++ .../misc/coloring/gray_network_receiver.json | 33 ++++++ .../misc/coloring/green_network_receiver.json | 33 ++++++ .../coloring/light_blue_network_receiver.json | 33 ++++++ .../coloring/light_gray_network_receiver.json | 33 ++++++ .../misc/coloring/lime_network_receiver.json | 33 ++++++ .../coloring/magenta_network_receiver.json | 33 ++++++ .../coloring/orange_network_receiver.json | 33 ++++++ .../misc/coloring/pink_network_receiver.json | 33 ++++++ .../coloring/purple_network_receiver.json | 33 ++++++ .../misc/coloring/red_network_receiver.json | 33 ++++++ .../misc/coloring/white_network_receiver.json | 33 ++++++ .../coloring/yellow_network_receiver.json | 33 ++++++ .../blocks/black_network_receiver.json | 20 ++++ .../blocks/blue_network_receiver.json | 20 ++++ .../blocks/brown_network_receiver.json | 20 ++++ .../blocks/cyan_network_receiver.json | 20 ++++ .../blocks/gray_network_receiver.json | 20 ++++ .../blocks/green_network_receiver.json | 20 ++++ .../blocks/light_gray_network_receiver.json | 20 ++++ .../blocks/lime_network_receiver.json | 20 ++++ .../blocks/magenta_network_receiver.json | 20 ++++ .../loot_tables/blocks/network_receiver.json | 20 ++++ .../blocks/orange_network_receiver.json | 20 ++++ .../blocks/pink_network_receiver.json | 20 ++++ .../blocks/purple_network_receiver.json | 20 ++++ .../blocks/red_network_receiver.json | 20 ++++ .../blocks/white_network_receiver.json | 20 ++++ .../blocks/yellow_network_receiver.json | 20 ++++ .../coloring/black_network_receiver.json | 15 +++ .../coloring/blue_network_receiver.json | 15 +++ .../coloring/brown_network_receiver.json | 15 +++ .../coloring/cyan_network_receiver.json | 15 +++ .../coloring/gray_network_receiver.json | 15 +++ .../coloring/green_network_receiver.json | 15 +++ .../coloring/light_blue_network_receiver.json | 15 +++ .../coloring/light_gray_network_receiver.json | 15 +++ .../coloring/lime_network_receiver.json | 15 +++ .../coloring/magenta_network_receiver.json | 15 +++ .../coloring/orange_network_receiver.json | 15 +++ .../coloring/pink_network_receiver.json | 15 +++ .../coloring/purple_network_receiver.json | 15 +++ .../coloring/red_network_receiver.json | 15 +++ .../coloring/white_network_receiver.json | 15 +++ .../coloring/yellow_network_receiver.json | 15 +++ .../tags/items/network_receivers.json | 20 ++++ .../common/AbstractModInitializer.java | 21 +++- .../platform/common/Config.java | 2 + .../platform/common/block/CableBlock.java | 12 ++- .../common/block/NetworkReceiverBlock.java | 94 ++++++++++++++++++ ...ternalNetworkNodeContainerBlockEntity.java | 1 + .../common/block/entity/CableBlockEntity.java | 19 ---- ...SimpleNetworkNodeContainerBlockEntity.java | 18 ++++ .../common/content/BlockEntities.java | 18 +++- .../platform/common/content/Blocks.java | 11 ++ .../platform/common/content/ContentIds.java | 1 + .../platform/common/content/ContentNames.java | 1 + .../common/content/CreativeModeTabItems.java | 1 + .../common/content/DefaultEnergyUsage.java | 1 + .../platform/common/content/Items.java | 9 ++ .../platform/common/content/Tags.java | 1 + .../assets/refinedstorage2/lang/en_us.json | 4 + .../textures/block/network_receiver/base.png | Bin 0 -> 673 bytes .../block/network_receiver/cutouts/black.png | Bin 0 -> 2958 bytes .../block/network_receiver/cutouts/blue.png | Bin 0 -> 2957 bytes .../block/network_receiver/cutouts/brown.png | Bin 0 -> 2975 bytes .../block/network_receiver/cutouts/cyan.png | Bin 0 -> 2985 bytes .../block/network_receiver/cutouts/gray.png | Bin 0 -> 2968 bytes .../block/network_receiver/cutouts/green.png | Bin 0 -> 2978 bytes .../network_receiver/cutouts/inactive.png | Bin 0 -> 268 bytes .../network_receiver/cutouts/light_blue.png | Bin 0 -> 338 bytes .../network_receiver/cutouts/light_gray.png | Bin 0 -> 2956 bytes .../block/network_receiver/cutouts/lime.png | Bin 0 -> 2974 bytes .../network_receiver/cutouts/magenta.png | Bin 0 -> 2968 bytes .../block/network_receiver/cutouts/orange.png | Bin 0 -> 2955 bytes .../block/network_receiver/cutouts/pink.png | Bin 0 -> 2930 bytes .../block/network_receiver/cutouts/purple.png | Bin 0 -> 2988 bytes .../block/network_receiver/cutouts/red.png | Bin 0 -> 2961 bytes .../block/network_receiver/cutouts/white.png | Bin 0 -> 2929 bytes .../block/network_receiver/cutouts/yellow.png | Bin 0 -> 2955 bytes .../recipes/network_receiver.json | 31 ++++++ .../fabric/ClientModInitializerImpl.java | 17 ++++ .../platform/fabric/ConfigImpl.java | 10 ++ .../rei/RefinedStorageREIClientPlugin.java | 1 + .../platform/forge/ConfigImpl.java | 11 ++ .../forge/datagen/BlockModelProvider.java | 17 ++++ .../forge/datagen/BlockStateProvider.java | 18 ++++ .../forge/datagen/ItemModelProvider.java | 13 +++ .../forge/datagen/loot/BlockDropProvider.java | 2 + .../recipe/RecoloringRecipeProvider.java | 3 + .../forge/datagen/tag/ItemTagGenerator.java | 5 + .../rei/RefinedStorageREIClientPlugin.java | 1 + settings.gradle | 2 +- 146 files changed, 1824 insertions(+), 33 deletions(-) create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/cyan.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/gray.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/green.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/inactive.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/magenta.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/orange.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/purple.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/white.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png create mode 100644 refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 3799f1e1a..b6761925f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Configuration Card. It copies device configurations and can transfer upgrades. +- Network Receiver + ## [2.0.0-milestone.3.1] - 2023-10-30 ### Added @@ -15,7 +20,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Curios integration on Forge. - Trinkets integration on Fabric. - Storage Monitor -- Configuration Card. It copies device configurations and can transfer upgrades. ### Changed @@ -333,9 +337,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - The Wrench now dismantles devices when crouching. - - The Disk Drive in item form now supports rendering of disks that were dismantled. - - In order to retain Controller energy, the Controller must now be dismantled. - - All config and upgrades are transferred to the item. + - The Disk Drive in item form now supports rendering of disks that were dismantled. + - In order to retain Controller energy, the Controller must now be dismantled. + - All config and upgrades are transferred to the item. - You can now use any Wrench from other mods in order to rotate or dismantle. - Item and fluid storage blocks. - Initial advancements. diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json new file mode 100644 index 000000000..7c3d97c33 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/black" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json new file mode 100644 index 000000000..f86cea069 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/blue" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json new file mode 100644 index 000000000..272697d4f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/brown" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json new file mode 100644 index 000000000..03ed7c3b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/cyan" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json new file mode 100644 index 000000000..6bbc9fb00 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/gray" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json new file mode 100644 index 000000000..86e310337 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/green" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json new file mode 100644 index 000000000..80e4ab4db --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/light_gray" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json new file mode 100644 index 000000000..1c06161a2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/lime" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json new file mode 100644 index 000000000..0496045b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/magenta" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json new file mode 100644 index 000000000..6fd106527 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/light_blue" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json new file mode 100644 index 000000000..f42263881 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/orange" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json new file mode 100644 index 000000000..f72f2d31c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/pink" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json new file mode 100644 index 000000000..f62a02452 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/purple" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json new file mode 100644 index 000000000..a4db02c72 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/red" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json new file mode 100644 index 000000000..9d47582c7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/white" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json new file mode 100644 index 000000000..f553637ea --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/yellow" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json new file mode 100644 index 000000000..b353d302b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/black", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json new file mode 100644 index 000000000..e37eb0248 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/blue", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json new file mode 100644 index 000000000..a7068e51e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/brown", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json new file mode 100644 index 000000000..c48b00fc0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/cyan", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json new file mode 100644 index 000000000..5bf2981bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/gray", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json new file mode 100644 index 000000000..552c8d37c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/green", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json new file mode 100644 index 000000000..090ddd01a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/inactive", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json new file mode 100644 index 000000000..44b9e35b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_blue", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json new file mode 100644 index 000000000..f19ff741c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_gray", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json new file mode 100644 index 000000000..bbfdb16ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/lime", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json new file mode 100644 index 000000000..daf1629ed --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/magenta", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json new file mode 100644 index 000000000..57808fc14 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/orange", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json new file mode 100644 index 000000000..b7ac3a556 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/pink", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json new file mode 100644 index 000000000..aa8f409de --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/purple", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json new file mode 100644 index 000000000..c8c0c9d00 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/red", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json new file mode 100644 index 000000000..5643b7496 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/white", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json new file mode 100644 index 000000000..6ad1d45b0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/yellow", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json new file mode 100644 index 000000000..ade596183 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json new file mode 100644 index 000000000..bcf3097c7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json new file mode 100644 index 000000000..249d08271 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json new file mode 100644 index 000000000..be8369e76 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json new file mode 100644 index 000000000..e91a0cbb1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json new file mode 100644 index 000000000..509ec28ad --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json new file mode 100644 index 000000000..cf103c918 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json new file mode 100644 index 000000000..7acce74fa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json new file mode 100644 index 000000000..c1952d7e5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json new file mode 100644 index 000000000..c237c3d55 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json new file mode 100644 index 000000000..8ef759ae0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json new file mode 100644 index 000000000..c9d5ae064 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json new file mode 100644 index 000000000..df74529c0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json new file mode 100644 index 000000000..24e8dff77 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json new file mode 100644 index 000000000..5654fa20c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json new file mode 100644 index 000000000..cb901d1bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json new file mode 100644 index 000000000..c7b33755b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json new file mode 100644 index 000000000..22f8c8709 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json new file mode 100644 index 000000000..2dcce70a1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json new file mode 100644 index 000000000..5579db0c2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json new file mode 100644 index 000000000..f91f93326 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json new file mode 100644 index 000000000..4213a221a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json new file mode 100644 index 000000000..d1053d126 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json new file mode 100644 index 000000000..3ddba8f5d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json new file mode 100644 index 000000000..4304825b5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json new file mode 100644 index 000000000..6eac125ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json new file mode 100644 index 000000000..a68106768 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json new file mode 100644 index 000000000..3d4551d03 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json new file mode 100644 index 000000000..cf37cb575 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json new file mode 100644 index 000000000..7a0d917dd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json new file mode 100644 index 000000000..c0d7cf997 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json new file mode 100644 index 000000000..28300c863 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json new file mode 100644 index 000000000..0ffff7793 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:black_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/black_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json new file mode 100644 index 000000000..dd9a16080 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:blue_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/blue_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json new file mode 100644 index 000000000..126e8020a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:brown_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/brown_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json new file mode 100644 index 000000000..09b99f3ff --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:cyan_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/cyan_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json new file mode 100644 index 000000000..0b6fa43d1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:gray_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/gray_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json new file mode 100644 index 000000000..db633f063 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:green_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/green_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json new file mode 100644 index 000000000..3e81cc321 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_gray_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/light_gray_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json new file mode 100644 index 000000000..7e2244265 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:lime_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/lime_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json new file mode 100644 index 000000000..eda8e2384 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:magenta_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/magenta_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json new file mode 100644 index 000000000..34a5d8900 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json new file mode 100644 index 000000000..f61f350bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:orange_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/orange_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json new file mode 100644 index 000000000..962eea8de --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:pink_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/pink_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json new file mode 100644 index 000000000..59612d49b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:purple_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/purple_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json new file mode 100644 index 000000000..9019cb58b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:red_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/red_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json new file mode 100644 index 000000000..cccc597dc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:white_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/white_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json new file mode 100644 index 000000000..9aa605850 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:yellow_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/yellow_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json new file mode 100644 index 000000000..10adc17ab --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json new file mode 100644 index 000000000..2cf78ae46 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json new file mode 100644 index 000000000..8f315166a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json new file mode 100644 index 000000000..1740e8a1b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json new file mode 100644 index 000000000..d81adf188 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:gray_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json new file mode 100644 index 000000000..17bebbdbc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json new file mode 100644 index 000000000..76b5e6fc4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json new file mode 100644 index 000000000..0e08e1676 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json new file mode 100644 index 000000000..cc0ae467a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json new file mode 100644 index 000000000..3a51f49ad --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json new file mode 100644 index 000000000..7f5f93995 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json new file mode 100644 index 000000000..8108f41b8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json new file mode 100644 index 000000000..e62460fb2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json new file mode 100644 index 000000000..9648c407a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json new file mode 100644 index 000000000..c8250b9ae --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json new file mode 100644 index 000000000..1c9a4ce3e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json new file mode 100644 index 000000000..2e1d18612 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_network_receiver", + "refinedstorage2:orange_network_receiver", + "refinedstorage2:magenta_network_receiver", + "refinedstorage2:network_receiver", + "refinedstorage2:yellow_network_receiver", + "refinedstorage2:lime_network_receiver", + "refinedstorage2:pink_network_receiver", + "refinedstorage2:gray_network_receiver", + "refinedstorage2:light_gray_network_receiver", + "refinedstorage2:cyan_network_receiver", + "refinedstorage2:purple_network_receiver", + "refinedstorage2:blue_network_receiver", + "refinedstorage2:brown_network_receiver", + "refinedstorage2:green_network_receiver", + "refinedstorage2:red_network_receiver", + "refinedstorage2:black_network_receiver" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 2b343c38d..4479dfe6e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -14,9 +14,9 @@ import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ItemDropConstructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceBlockConstructorStrategy; @@ -129,6 +129,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.INTERFACE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.ITEM_STORAGE_BLOCK; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.MACHINE_CASING; +import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.NETWORK_RECEIVER; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.PROCESSOR_BINDING; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON_BLOCK; @@ -273,6 +274,7 @@ protected final void registerBlocks( Blocks.INSTANCE.setInterface(callback.register(INTERFACE, InterfaceBlock::new)); Blocks.INSTANCE.getWirelessTransmitter().registerBlocks(callback); Blocks.INSTANCE.setStorageMonitor(callback.register(STORAGE_MONITOR, StorageMonitorBlock::new)); + Blocks.INSTANCE.getNetworkReceiver().registerBlocks(callback); } protected final void registerItems( @@ -294,6 +296,7 @@ protected final void registerItems( Blocks.INSTANCE.getConstructor().registerItems(callback, Items.INSTANCE::addConstructor); Blocks.INSTANCE.getDestructor().registerItems(callback, Items.INSTANCE::addDestructor); Blocks.INSTANCE.getWirelessTransmitter().registerItems(callback, Items.INSTANCE::addWirelessTransmitter); + Blocks.INSTANCE.getNetworkReceiver().registerItems(callback, Items.INSTANCE::addNetworkReceiver); registerStorageItems(callback); registerUpgrades(callback, regulatorUpgradeItemSupplier); Items.INSTANCE.setWirelessGrid(callback.register(WIRELESS_GRID, wirelessGridItemSupplier)); @@ -476,7 +479,12 @@ protected final void registerBlockEntities( ) { BlockEntities.INSTANCE.setCable(callback.register( CABLE, - () -> typeFactory.create(CableBlockEntity::new, Blocks.INSTANCE.getCable().toArray()) + () -> typeFactory.create((pos, state) -> new SimpleNetworkNodeContainerBlockEntity( + BlockEntities.INSTANCE.getCable(), + pos, + state, + Platform.INSTANCE.getConfig().getCable().getEnergyUsage() + ), Blocks.INSTANCE.getCable().toArray()) )); BlockEntities.INSTANCE.setController(callback.register( CONTROLLER, @@ -563,6 +571,15 @@ protected final void registerBlockEntities( STORAGE_MONITOR, () -> typeFactory.create(StorageMonitorBlockEntity::new, Blocks.INSTANCE.getStorageMonitor()) )); + BlockEntities.INSTANCE.setNetworkReceiver(callback.register( + NETWORK_RECEIVER, + () -> typeFactory.create((pos, state) -> new SimpleNetworkNodeContainerBlockEntity( + BlockEntities.INSTANCE.getNetworkReceiver(), + pos, + state, + Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage() + ), Blocks.INSTANCE.getNetworkReceiver().toArray()) + )); } protected final void registerMenus(final RegistryCallback> callback, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java index 7f89c1abb..cf7e69c22 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java @@ -46,6 +46,8 @@ public interface Config { SimpleEnergyUsageEntry getStorageMonitor(); + SimpleEnergyUsageEntry getNetworkReceiver(); + interface SimpleEnergyUsageEntry { long getEnergyUsage(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java index 2895ff79e..b74a74646 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.block; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; @@ -37,7 +38,7 @@ public class CableBlock extends AbstractBaseBlock implements ColorableBlock, SimpleWaterloggedBlock, EntityBlock, BlockItemProvider { - private static final AbstractBlockEntityTicker TICKER = + private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getCable); private final DyeColor color; @@ -115,7 +116,12 @@ public VoxelShape getShape(final BlockState state, @Override public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { - return new CableBlockEntity(pos, state); + return new SimpleNetworkNodeContainerBlockEntity( + BlockEntities.INSTANCE.getCable(), + pos, + state, + Platform.INSTANCE.getConfig().getCable().getEnergyUsage() + ); } @Nullable diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java new file mode 100644 index 000000000..ffbc8faaf --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java @@ -0,0 +1,94 @@ +package com.refinedmods.refinedstorage2.platform.common.block; + +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BooleanProperty; + +public class NetworkReceiverBlock extends AbstractBaseBlock implements ColorableBlock, + BlockItemProvider, EntityBlock { + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + private static final AbstractBlockEntityTicker TICKER = + new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getNetworkReceiver, ACTIVE); + + private final DyeColor color; + private final MutableComponent name; + + public NetworkReceiverBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.PROPERTIES); + this.color = color; + this.name = name; + } + + @Override + protected BlockState getDefaultState() { + return super.getDefaultState().setValue(ACTIVE, false); + } + + @Override + protected void createBlockStateDefinition(final StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(ACTIVE); + } + + @Override + public MutableComponent getName() { + return name; + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getNetworkReceiver(); + } + + @Override + public DyeColor getColor() { + return color; + } + + @Override + public BlockItem createBlockItem() { + return new NamedBlockItem(this, new Item.Properties(), name); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { + return new SimpleNetworkNodeContainerBlockEntity( + BlockEntities.INSTANCE.getNetworkReceiver(), + pos, + state, + Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage() + ); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java index 1fd6f3861..1785ad4e3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java @@ -27,6 +27,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +// TODO: inherit from simple network node container block entity public abstract class AbstractInternalNetworkNodeContainerBlockEntity extends AbstractNetworkNodeContainerBlockEntity implements PlayerAware, ConfigurationCardTarget { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java deleted file mode 100644 index 7594f24bb..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; - -import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; - -public class CableBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity { - public CableBlockEntity(final BlockPos pos, final BlockState state) { - super( - BlockEntities.INSTANCE.getCable(), - pos, - state, - new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) - ); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java new file mode 100644 index 000000000..c90e7ad4b --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java @@ -0,0 +1,18 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity; + +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +// TODO: fix inheritance (no need for RedstoneMode here!) +public final class SimpleNetworkNodeContainerBlockEntity + extends AbstractInternalNetworkNodeContainerBlockEntity { + public SimpleNetworkNodeContainerBlockEntity(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final long energyUsage) { + super(type, pos, state, new SimpleNetworkNode(energyUsage)); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index 2a0bee746..65e74664d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; @@ -31,7 +31,7 @@ public final class BlockEntities { public static final BlockEntities INSTANCE = new BlockEntities(); @Nullable - private Supplier> cable; + private Supplier> cable; @Nullable private Supplier> diskDrive; @Nullable @@ -64,15 +64,17 @@ public final class BlockEntities { private Supplier> wirelessTransmitter; @Nullable private Supplier> storageMonitor; + @Nullable + private Supplier> networkReceiver; private BlockEntities() { } - public BlockEntityType getCable() { + public BlockEntityType getCable() { return Objects.requireNonNull(cable).get(); } - public void setCable(final Supplier> supplier) { + public void setCable(final Supplier> supplier) { this.cable = supplier; } @@ -205,4 +207,12 @@ public BlockEntityType getStorageMonitor() { public void setStorageMonitor(final Supplier> supplier) { this.storageMonitor = supplier; } + + public BlockEntityType getNetworkReceiver() { + return Objects.requireNonNull(networkReceiver).get(); + } + + public void setNetworkReceiver(final Supplier> supplier) { + this.networkReceiver = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java index 18c5e28d4..12832d9fd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java @@ -13,6 +13,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; @@ -117,6 +118,12 @@ public final class Blocks { ContentNames.WIRELESS_TRANSMITTER, COLOR ); + private final BlockColorMap networkReceiver = new BlockColorMap<>( + NetworkReceiverBlock::new, + ContentIds.NETWORK_RECEIVER, + ContentNames.NETWORK_RECEIVER, + COLOR + ); @Nullable private Supplier quartzEnrichedIronBlock; @@ -240,4 +247,8 @@ public void setStorageMonitor(final Supplier supplier) { public StorageMonitorBlock getStorageMonitor() { return Objects.requireNonNull(storageMonitor).get(); } + + public BlockColorMap getNetworkReceiver() { + return networkReceiver; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 2ca3bd93a..4d78b1573 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -49,6 +49,7 @@ public final class ContentIds { public static final ResourceLocation CREATIVE_RANGE_UPGRADE = createIdentifier("creative_range_upgrade"); public static final ResourceLocation STORAGE_MONITOR = createIdentifier("storage_monitor"); public static final ResourceLocation CONFIGURATION_CARD = createIdentifier("configuration_card"); + public static final ResourceLocation NETWORK_RECEIVER = createIdentifier("network_receiver"); private ContentIds() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java index b1ac504ec..32a2e65d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java @@ -22,6 +22,7 @@ public final class ContentNames { public static final MutableComponent STORAGE_MONITOR = createTranslation("block", "storage_monitor"); public static final MutableComponent INTERFACE = createTranslation("block", "interface"); public static final MutableComponent DISK_DRIVE = createTranslation("block", "disk_drive"); + public static final MutableComponent NETWORK_RECEIVER = createTranslation("block", "network_receiver"); private ContentNames() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index 002b99b20..d2c58c041 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -47,6 +47,7 @@ private static void appendBlocks(final Consumer consumer) { itemConsumer.accept(Blocks.INSTANCE.getMachineCasing()); itemConsumer.accept(Blocks.INSTANCE.getQuartzEnrichedIronBlock()); itemConsumer.accept(Blocks.INSTANCE.getStorageMonitor()); + Items.INSTANCE.getNetworkReceivers().stream().map(Supplier::get).forEach(itemConsumer); } private static void appendBlockColors(final Consumer consumer, final BlockColorMap map) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java index ba04bd65e..733a39e42 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java @@ -14,6 +14,7 @@ public final class DefaultEnergyUsage { public static final long DESTRUCTOR = 3; public static final long DISK_DRIVE_PER_DISK = 4; public static final long STORAGE_MONITOR = 4; + public static final long NETWORK_RECEIVER = 8; public static final long CONTROLLER_CAPACITY = 1000; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index fdfcdc5f3..9851418ac 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -39,6 +39,7 @@ public final class Items { private final List> allDestructors = new ArrayList<>(); private final List> allConstructors = new ArrayList<>(); private final List> allWirelessTransmitters = new ArrayList<>(); + private final List> allNetworkReceivers = new ArrayList<>(); @Nullable private Supplier quartzEnrichedIron; @Nullable @@ -363,4 +364,12 @@ public Item getConfigurationCard() { public void setConfigurationCard(final Supplier supplier) { this.configurationCard = supplier; } + + public void addNetworkReceiver(final Supplier supplier) { + allNetworkReceivers.add(supplier); + } + + public List> getNetworkReceivers() { + return Collections.unmodifiableList(allNetworkReceivers); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java index 658435383..cc62023c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java @@ -21,6 +21,7 @@ public final class Tags { public static final TagKey CONSTRUCTORS = createTag("constructors"); public static final TagKey DESTRUCTORS = createTag("destructors"); public static final TagKey WIRELESS_TRANSMITTERS = createTag("wireless_transmitters"); + public static final TagKey NETWORK_RECEIVERS = createTag("network_receivers"); private Tags() { } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index f2fc84abb..f5a4215a3 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -28,6 +28,7 @@ "block.refinedstorage2.destructor": "Destructor", "block.refinedstorage2.wireless_transmitter": "Wireless Transmitter", "block.refinedstorage2.storage_monitor": "Storage Monitor", + "block.refinedstorage2.network_receiver": "Network Receiver", "gui.refinedstorage2.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage2.disk_drive.disks": "Disks", "gui.refinedstorage2.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -301,7 +302,10 @@ "text.autoconfig.refinedstorage2.option.wirelessTransmitter": "Wireless Transmitter", "text.autoconfig.refinedstorage2.option.wirelessTransmitter.energyUsage": "Energy usage", "text.autoconfig.refinedstorage2.option.wirelessTransmitter.baseRange": "Base range", + "text.autoconfig.refinedstorage2.option.storageMonitor": "Storage Monitor", "text.autoconfig.refinedstorage2.option.storageMonitor.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage2.option.networkReceiver": "Network Receiver", + "text.autoconfig.refinedstorage2.option.networkReceiver.energyUsage": "Energy usage", "advancements.refinedstorage2.root.description": "Use one or multiple Controllers in a network to provide your network with energy", "advancements.refinedstorage2.connecting": "Connecting", "advancements.refinedstorage2.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png new file mode 100644 index 0000000000000000000000000000000000000000..f0fdad1d7ae215e5d0382822309b4c0e1fbb7416 GIT binary patch literal 673 zcmV;S0$%-zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00I$7L_t(IPfb%v%Yk7O^@muS$4n6+WQxpl z#tbRRLRl!1l!aI*l7;-g`+eusE9&$-@6$c!o;y(4Y&Nmm?P4?t#HKVF4U+wSzZ8o_x>mW}ZVEuTP$)<{yWQk`KFjm@l+wE37 z9uJeiF$ItTfNdy)h%!)4r_+&szc1Zxm-plG$hsi_G8(H=YK2HN8kN`UCG+|GI}H#J zQ?J+Ma5&HbY6ph`P{M~I0;|Y~F{;&S(P%Ujs#dGAUay%|iDwgkACL(SU>`G91mFS! zaPS)sVHE-uawHOA)5ha59UuS>0nB~3+wn~i`IZ2nNf_7r{boaZy&m6Cd%0ZZx!G*k z4>TK`uRy!qWXQ0fGb1cZ1zF8O?(M7YJ@fC6YxsZ=5n-9}jo zSpnWah7cAhm&600000NkvXX Hu0mjfVL%S7 literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png new file mode 100644 index 0000000000000000000000000000000000000000..58f7b9244574ba293514af24307de57ddf5cd24a GIT binary patch literal 2958 zcmcImON<^`B>@wH5rTvOK`|y?xDY&u5fkLV$%Ao?5)Q^h4kl{i1*1l*=C!l3%WhCQ=~w+< z{g1Ey|F1gK-?w>r*P5X7ojkQV zmFgPti>0Jg*kWT^Nh6m!Bwee744q1?-%tw?-b)g}AwzzU6@R&OSrmLXEAG?_un_i; zVZV1GBHJhWig;o#wp?+;^TPU?%@kBff`nS79K?1lE7tYe?3)iuqELq)8XjO-)}8^leT7-3Qkg_4|xJfu3%#cf+LmK+GC-!Nna6YnZ%+<~X+q;+ItvMH@iZzD z-*{nb2aVzuAQ-rjDfTaP%L5r%g_jLT%7<}u^i}O&%-Ki z&CgLh%9D!EZ`7AdG1Jjr4I4YifHKQ>NK^CW$P+gONjH}7Ok{$lgT}#zu)pQt#Q+9i3nMMWbGR{>|;Hzyj^~_bo z>nkhD&A}2+)$(X#&{QD1B$+>(^1(UeQ{o+g&nQ+zf#-`|x4)gWF6Mxt>#E)y@Aqq@ zT*~>3wYcGk(J2|6F5#VwSE$|V$1LZ@o4sZ`8EJl%eW6~IHo}b%FwaiHC~XY;Gc54@ zsBFxy4iiS!9kR9oi>a4XQAE0j7{hZ`g*2P$0iIP&NqgES5t$(I9YC-2_I) z!VXjwLS(ZQ`t7c(wyfET+NzAIfQ4p(OvZq~ z#G08QD5D{h%oNOw4dEUKgK02EqK?E0QH0n=N}@O`dJ(M%C=AO!u2+{d7P!s*sa=pl zLWQaJGb?E>iTsWn=(N&yLHHl-&6#oY>xQ=%%ROEsi60OeZ9w{WhiLrg8cc5DYg6BN z?U{PPd~=ZP#5QZ~b2NKbwy@!tIzX1;09ohdiF6Af)l*d6Fm&u8p3z(z{jbfQ=TM!7 zj&oCMh#kiGXZsY$e%j|q60o|B*eTH|JjYI!@Zsv=t4xats z$k7$S5&YeP{Ib)v(qr3>f3$A0dg;QE(|?^k`1z`_RBB}3pIx^;lg`{+pe~FT4j%vE z*TOre9^Wq?8z?<`;KYYZ3SaGe>a`*~FuCU9K8l{Y@!A?z8P zbe24H=%-I!y+8L#>B5R#-*oS|G0{D^`@PEbYulD1&;4=t+c)36dTr~mfm;ukzrTFn z^^dQPoci|XzVp$_Mb7HQxkaP9UOahb^B-@%^yTjleqnF9MxQ*8@Dp=>V_)w43w!qe E1H2W(BLDyZ literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png new file mode 100644 index 0000000000000000000000000000000000000000..00d6eb6f0d72f5bd66c1cebbeaae760a55bc9827 GIT binary patch literal 2957 zcmcguTWl3Y7(Nh0tzsY`UZQbb3}Rr;?(BUx9Bw^8YkIILhfov)vpcgrE9dMkyW94( zQ67jS@_^B3Vl48gkU)%>_=1Az15YL;Dj^zTG@2+X2ti^bKIqK3Y)_@7ji{UKZRVT* z|L2?U|7Z4hZ`wGo?ZLK8CNrc^VxmJT>5E3LYL(Pl`O)6O|sQWNYRv%P}#(dKI^_YEc6fk|3^HDf_Wi&G9w67X4<;0?*YT$*vr~mO12l z3*B6M5D`wxiog*?iPOz2)D%S%S8$RjiGrvKPy$f1M8$$S*SL7<05C#Vavx9Ori24L*nx-I1f+PWo0P&EYpepd=B~1%?5<8I>CSKrk%p$Ub{v^lK zNb6ImgsE9SZqP&t6RIc_U{+*PssXW+;==x@Tyu^cfs{#w_(@E$FvU`q3WXFtso6>; zMaRkd0UA+bZj++p;!sG09uf!rkwexGP>)NRfyGG=8K-6j!znx+9F~G4h)cl~B&6LF zs7O3_3Wuy`0+dv}DWI$;g@#spL{Jh$#ULm*wbR{jnMPq2wM29P{T zNRDSh0-^zAu_#HF2rU&Z7wLyshZd+bF-lM?*rfQPBwC6*0U2P=9lALVJC++n6-1ZJ ztDrt2gnnPmPoZFS`f-AMhjiw1JPk7IdDtS70}Tmlz>uH_bX&23?IIHx2G%5-AVX5j z=JtI2N5NJv&P$lF76)FhWs!0GO64arq=#H&4tvwZaG`Uf^ z)hde$Q;RM!G}*y6kg-mHffWc$XtRfkO<94mZd3Ng{k8|?ASwiyvMuu*TW5=!r=cR2 zSvejy8he>Y%l-96T@vXfK=y3(Z=0rnynBo9QHmv=V@k1V{x{R2MFY@ORaP7A-CmWH zd-EP;Ev^Tmwf1bA*u!cV%T24pi>ca%8dYX9+1>amdt5CYE#%av;4obh%r~07Nfvl! zRMyQ7mIx*5CVH*I;=oM?QAF1EQHH0@2VttEE{(4nqC5o!durmO*#C?c?BRR@}3 zI<_b?t?A9F-x#`VLB*2N1o|hTH)wTA$nPU``w{qCm<&=36U!37M3Vv0X`&gnN>ffT zY+{&-rVuLK8`t5+Qt%(o#0mTX61Au*L=mFmes22d?@3o=+pRd!nfh|mJv$ZCx z0&s@vqr0y~i~2NW9z)a7Y+VJ&)NBA%mY7I20g_!wRy9p^T*S1@tOd7P=9z$MG_;(R znoaZo#y-=NAN@(sj>M-K8_|>D+3n{?>8Wz8GrzWI9Qfe1uiEymnZNJMg^_p2eG3-l zlP}L-J9e`0#)3ub=Hs76E@{tR+c;wPetqfULt|raKI(2*I49Hf!zb%TA0GJPfok{F zyTQHR7CNr$M^9f|dS(A(FLnH4YtJlwy}0jt{dV%6+tagU&*+h3=f2TrAL_jP^RkbQ zp9${i+IV*H@#ha7I`v1i^SXBB^s4RBffZdlW*4o2o$DbP>+j`=+CqKWo{OR57 Pz}&fhQ~up`JNNztzaY!8 literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png new file mode 100644 index 0000000000000000000000000000000000000000..63204a3af3edf0e1a72070136d08ff2a352fd4e3 GIT binary patch literal 2975 zcmcImU2GIp6kg>g3RaCoKwcaNqN3iNx${30)>^v77P?s4MM@&b-8*;M3A;1Xnc41^ z2NHkyRbKFcgkZ#AFiJFFOhhFj3C0KUNn%VuNfdoR4GAPDyx_h2*R8a)L78O!?)mOH z-#Pc3bMKCxmCv@!S}-e-NVIfyrhDo8eszr(-9hKtD3O>whuwE1_U@aX zNX!~?v;A>@rrW}PA&G21N0Q}2K+%cBlGbv7@J14IIWpjSDgNT;$9c}RQ~Vk=BW8kj zGU#@03Q6Clm07%LBQ|Zm^=WQN*`f*xBt~4hkoO|1oZ>5bE&9!d1)i%w;*BZ3jTz+n zGd*0p9}-SWiU5nE#OY=dYKo$XPjQkciGrvKPy$f1M8$$SSG#y>Ewml0H@&Q8i~gnf z!8i^qK`50<$&#G(!vO)BrYVS$AW48CKs4gTs0_SlVO>L-L^yPV*!4Y*X+$}{7^is3 zwCX}3XsGp~T9|0Sgfa>Qm=u{y6`+k9xS$y3E5>askUS|6FODb{Hn22GnM?yduG&JO zfsW#iVallH+qmc`I}#9~mqdOs#H3@GT3lEs7R9|}G&EC~PT`Ho!Jr@e(V#y;5E|k! zp@>~)0)tF421?5A1W+bvKm)5iBq;X7tncURxzkhU#z`B1E1uzEV7_4feBC%@?bKx+Ky|fb3b5ubo6bDqiimG{h3mv3#*A_WNk-q69QmmDSpK zk6R}B{UOKvZ}T;NNBKblC@P>AS8O2R0`JE33TP!Qx@T&XT$*t2W< zQ==fc*yl#u&xApeH)+OAtsCB0EVp@)1a?5EwgKVa9isZ5u10bh zTbs(pYmL_nrkaCvC$?y7pQPE_(8O9!R{=7$9Dph-Po$av$&Mtenx?vw`Gl8-@egy?}=yTZ#j2L zS^drfPqZE0@W{|yeTdVC=Iz*?dF9bXuO1}v=GT%7K3Lp4``nec{<`G+)cX4Np6SyP z2j@H{&;Pjlg4*)J(k(0YA3l4w|Jtei=It%(k6iIi{kY&>F0N+TXwp8=G8Ul zKmG2$zjvKD`r@_EcCOOD4-(v+@6Wyd!^tBviWipc{_@C-)AJr$+GXrJaB@TG*utY1 z4lVy>+s>qI5NSeCUoaX?R31&_AQbu7Xyk;BsOj;2gu$>V$LFY*GuzP-v5y2T%6|n)hx&c z?PSpH91Tg|Xm`#Y-Dew^-}Df-v20QWMG_;fTr7BzSx)m6y(ax;!y?aBAo0F5-^L7b z1KA#~-46+;C4pcAAaS~pgqosg-~mno5)gqZLP>y{2^16RT~qBuM}oE(;uewY`bVHhHiL`f1TLWoAZ7?lMtT3y$WA(0)rLG1b-$220#ABxjF z^|Ts7F=(juqFS10!o)HPM3@9DqzVw*4O}o37AnTEEs_E$5-*M@7B;XnOWAA#KC9Yd zv4M`_juQ2#7Tc`oC^r%iv6n>tP-v5m61BLx?pPG}lBv`zU^<02CI^Fl>_>zC97$-1 zXQU!_ojD9L$qXndyK_L9qyY`g_K=|14|Bd>sB@>M?i(k;q{OZ3cRlP6N9$SOwFxAH zVv^<=kpz$uWRR026F^gi8vy+PRcMw{6QdYS2OAWhlYps6Ce&ttee60T^Fpz0I(}G0 zbm810$`dj0@)c{@tl8y7G4gEEl}Yo|)uiiU6UvsNTMiTmNZA6^6;-eRRs{tTVh|+- zF~Rlu8Q&gaq+;`{^@V+#>S(NnsS{ZSHc$lBz*vAlv4s@SiJ+x)MMI9P0&LW^Z4X^q z;;1lPEAt9djSfj^vW+c4#&mWHD^M_?#U3g)WChB)MRPc1x7{!JVb;eq=Q7W+)i$Ym z>MCOOmF8h>aDY*@FjO7XB|t9`vS&@ca~}DWc!%fG6iYnE_+nP<_tDlx9ne%&R%_!u zZkZGYGA_+pRCPp~F4;L#!a5nNP_xsGDCb6My{3=suYDCALq z3%syYR_6~75}K?Vu(k?|d?y}8A!*Cg49{B?;#|&0sB~l3DH|bx8W9{r)&!L(K(J(0 zr))B83&;{7P_Ku6z3Z|G6;qPyHFPts*V1YaA}>$qCM5DV9}F@qWZRA!jqBH8)`svO2V?tQiG&;b;}l4L8s|vj(Yg)kDe=;^;9YvcoaoB5Y;};v-9T71ejl6(2Vh`_^9`DxJMra>hCS)V<3R zpmqDE=J3_AqZ5m^uH19+(6@z-iSw<;F6?S)+I8X+O<#9s$DZSVUbuRcd+y0U*1Y}m zr4876W9jc>n^*pJ_VJEaF1NjuxIO&dvJStt+$=u=q08#U#YOO_G&jK+%cB+VzzHqCpaKHp#nQn!j=OJkPl}&2QJTVm9a? z18&!7NVbmlLqmo{D0G9^^*xShgtlLb(>(RG z7D6#-s`a8eO_VU90s}!xiY%lm5Thn8D20Wpaf}2~AVuQE5yeVPEM+O1ZNev2TP!xw zQQSF9J*vkxDLTrH1Vrc~kzWcC=^UmOmp2@X;yyA)%?zefcyn?v;KzP6;7>t9Q#^r+ z*mb5b$Rrb>q~cBiWs)W|usT8lV?WIKexZ>&y$#s_m|a{c_aC0ljcQhZJpEm^lTZ35WGt}`+%6eG*=!y=>$ z=N4g}2!WTcTFYjwZZC?Vhe&rO%~MyCu8S=wV+2J*1|oDcU=tMr({vPou_}K|XnQ(zX^F$a zc&*GUOf@Zz-c z)mNIA>Vy3(RSTuspdpL&5+wGl%Xds89}{o$TuQObb1Yx1s{O6Bbx{X&O;fb`c&}R_ zh5n37S&M3p(D17>s*)WOC9IRN3bnf2i00f#z1M6dL-ntM%TTybSyNjcAe5{-WNi%=`A%GhA!*N3hNrCxVJhb%IDBWJo-MT;HFX z1+tu$TW{zrS$X57rW;lDHP9xsx>4hXe2ApEmK)c!LyCO5LR zscyX1WW8XfIY@V6i?;S@nmv|Gq}zr@TfA-qNn_;+H4{L^krhqXHRM26o=ltnUzZyZK{}Z$ES2lSjze z4GTJ#>|OTpC5}H#+D;Arx^{QVx_1sgQrh`Z@iKRO=dH`LH*LANV&9Ly%{hJX{aNSd zzw7={TG0L4O@5b?dKs;GwJ&U)eSP-18|cma4_7Y?WiFrk;B9yDL!SqWzCUvA#*3Fm z7v{E+D}QciTlv_h3;$Xj>^z$O_KEDZn{5|{zCJ?QH}5}j{miNZul&B^#Pio4SbwzV VnYVsAKElq<-JLy|6B~Bz`5UA`%&hEeZ}viF@^oobfy9 zsM9?e(80;RES?<0CK0zkBy6i#OhJ)GNT?JGZfI3fVpXrjzWJ~u3ROrnmJ&O-L18G< zFLZhV6^ytHuq-P=!i+;h(+s&?P-I1xWL<&^fQBV&7EB2BOJvpplCuWVU3FXRFC~sf zk#9*-xm=Ey)wmbrC1{$aBrB4l0EPhJgd3p>aKpBShBOUv;P{c_xdPXSY;QbDiOkbl z2t~iC)(z`vVhNKf$d_PT<{?#q1UGU1cu=SsCs?8dTBL3iGAwLjS(Y-HCVWA)#bOg3 zM!QPPqk3!$qQmTjPo)7GdgB46yGqPrTf?z18lbbOS;lk*Z%+0{y~qnky+xAH6wgaV zkrgA}`2#UZKIA{)TUY0^^Es|6a!>UO9Y#2VS2*(F`0BeaJOvhEbEC2+akX44+kGOVcb_nFscWlbcu)O0bplf+AuI z=M+(%O1_(~TFYdt9yg4Ti)l|fB{EmzjzcU(Mo6VL1sWn0B(bIglbQ%Xl+%*7tR^u@ zH0Gy0JkCkQ=hy0sc$n#Eu7;(n2qra!vXU}2peDFBf^A^Sx{P%bF^xt;+n&H-C5{Sn zwQ{cr)0m@4L&d}fDoHS}hz5ZPZT`@SscKM7*er*$c00X-7i2uba;}O3Uu}!2XRab% zUnvpR2ZuOS3*)uHgd(#`g8W&R4=*8~6+h}aEX9f_aK2bo`-7}?F$WA?SM~aMzf+-w zp|r!Y7Shndq#fhyfIWbwH@50uv<& zQ0$y(+PaOPX)hGaf(_v&2ZKGgM1wiR@=<`;MoNP)CFTOJC?MZ2IJjC}QpqLt{i#`y zLgWdv?Pt-X5gIsiI55{r(*@yww6`SVme&pc&A6MqND@CF)Y^db&kj-hPuDWp#n+~~ z@mdS@g5`3M?Zg&q?MpO!0!?h#2^}EQumRM0c_Q5eNX;p#ZWubwAB)n~-+QXRC1AI(p1r&r&9=451V8adK8GdOeT)#o-&A-M9Mjz7No^P?^8*IwH^ Y6Yu@x@`X2c@>6uruD0#LT=By}Z;C1rt33 zJtM=93Yk-ZifTMv978PpmrlIM)u6!R`d3W!%K!fdu6BwkPA~dekR^BX!0wc^{S$<| zG_O@}zcwrI{P(^oe&>E}lw8uIkjkQ|EHi(5xfaLt|D_!~E4SW~NY+2kxTgEa%J2jR z+biuqKC!%?I9(8;RQ6EQ&HEFDI69X^PJbVx_|$5eS$gjEy}cXdnt<+L@O1TaS?83{ F1OQ&3VJ!dv literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..a6b017a448d929aeef6bdaa460b18898cd60d3cc GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJwr2>%=KS^iVk_YIEGmGC;#~W-`-VXwE~Cx{J)>-&;5P>|FwSo|M`WFlmj?+Tdip_ z$l3PnRsHs@<_$h?J}LBsP7r}%9<`$Lb<9CGL?0Y_nXXWEV9p!k`2V}t>|+yCU}MkU z_qG1r-}??~R~lA+um8LKZUwiF15a60{p0$Br7Fyi^lI3PJq{*{*D+~ku_~zo9iR!s zJl6TU{@$;?TdE+u+lC`ql;vTE_x}IKV}E_!|N7bb|1+Q0F|=-2eOSxG=HGb+2Ag&N VvzjXwDFc1O;OXk;vd$@?2>>j9g(3g| literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..fca72ba2ef01f6cb84d45a9d2456ef5790cde5fb GIT binary patch literal 2956 zcmcImTWl0n7+w+~wMZhO1`Nh=@S!MY=RUJDVS(B$bk!}TEMZF^a^{>f-AQ+6rZdy- zwu%OVMDg}uGz1JWk@yA=MvO=d-i^d~eZa&Jq9z)H#tUygi0ACBTWx8BGRfS|`Og3U z=R4p3pYy~(|E49Kw{<2Gi6z;-%piT=$nK6s^m)gn%aFdV5Bi3pL}KwWb}vXAesOss z(K+ho3vnU$fQ9^W5@O#b$!a;E=tN@e`f32t2#GnH47*;M|Mm14o^x@U->&7vT+l;` zZr@}`wodlv(c}m+F~5Etx3+3g17#9Ju39d6kyTCeHM+wUv=}8eFQIt8uOiH?{>f#zs7G+ToH9?Yrq+6nDNe0)rciw$kWAAQL|Kq!KoKCC@M2g6UbL!dAwwb*x**~+aHV5JdLzI zg>uj`>qQNkC}Bbs27;6n*_3KPj9R#0EG*TWVz2ns5s%BtOJV>Ufna6MnZw(HLe(Xm@e-;v2-P5Ru zU1t`DtY;dORNYyitfvJHte%j-*bno*UutS+pcxw{OG%mQ+U|PTuSBca#2W)h2F4`K zGa&&n1r#wa%a$lvnskpyKg2pTN2Q5j4BNpb#ph+wl66bbrh$FzIumn3F|r&#EJM0* zZW#^}A@GK4-f}rB>qRm25XolJJPkGJy4ccf!06j*eBM zIX>f~F(xWDzMfy$N7P1ZH7tlEU6TwENVcv5l2RRD8nz8&TZfvVI?%*+)7s|Hr6~?e z?N(V-m|Ap5N>>oJfr1SJQdpIMDcS6yVN+2h#jq)dQ+|8=k{{-LOgUG0j;*#u&C^gJ z%da#qH5v;{s->}dqalm*5+wF)^bgI^Kh?d>b1B6#&oRANHUC>_>7oJXnx<%t_5rs_ zN`;I|S&Qm{=l;JtELYOW12##MlbjeU9QPK%;OhpG8QAJ=YngR5b ziEL4k36ZEaXA51iB-N6YW)59V=ndPb2)$uKHz9$)`pKja)diy4fuU+9a5U8bP&HLx z=$cJL?8qqyXPV561>qV`2KnAN3EPAfz!1`nl!Q^5cS66+!5}EPsFq#AxQ842Q!634 z*ypCo&#a_j61r^~X!p_zf%_l*&8fKgRl|QP?iw$WzzzuYG9di3Le&2=btX5mwW)2q z)=afvz8a)Eu|-S!9K{|>Cem#~1JKlMAZaW;A=Nfi99hwHT|-Vy(af6vUyD7{P>qJR zb5pa49>&;b>l8?TTIWdO(Yy`mDY4^&Eicd$<~!L;cRuy>$>*}2`#0Rs`{=RT-`>&H z_1);&Q|Fd~>$=}B?B1y!e{I>p^Zt>utDfJRxo&fH!G@zh9@%hn?@b5pJhWoZg_qad zzvIluul@|a?itCA?Rv8O&F&v^e{5g4>8bDgK6&`hg%{Pyy%##ZRNqP;yeo@ueY|7k zN2k{OzURSxT;cA4`@a2j-E#E#>%Z{D!;3yV^xl@^D-OV;&n!%A+qSF!ua{1~GW6U2 z%bh#V-SXL`{?iY=advd&;-%fIA3JgJSl7Yx>%RCZI+~bxxBtyYetLEjJ1=K@`!gr* H-M#N`M6$y7 literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png new file mode 100644 index 0000000000000000000000000000000000000000..d2dc60135013ec9e10526454befabbc1c13093f8 GIT binary patch literal 2974 zcmcguduSX*7{5ZReb9O}P=f!s-T0)P+ns&g?$B#(bEygS(vX}qMbymh%-t=y+uiPN zl577FB8YMo>!;X|)O}h(!<-^bes>|4@WlXYQ3mlP1*1!oKGF z&G-1t_kA;u_4VGpeCbU~6N$v~p6+Zvdnft5_&WBy`Ijr0y_N*s+oMEcSsT9>B%a^j zo=7a+;pPY9!Q4H_@hd4ze4D1Km4KlWiFF&Q0d|IIEZDT@dKvNJ#QUP)l8m@b&&j!< zla}1>T_GLV)th&A4LcSQH>?-dRS{EAp)nS!m9iJ1YDTQ-MeLgoOQKMN#KReJBR41v z=K6$AKcs?@l7S=3ijcNa(9kqPUMncFB1^I^K?Ohq$r^%bp>c`KT1X10KfAeMi~VK9 zQXB_JlE%iyQe$e$4~r7CEK8CVNl^epfM}-|<0|l?j;4kzjhxU8V%PTst`Xb*NSqOw zr}YpjK})R{HE3dlNmU$3FeUSlYCz(&aKT7et{EqeM9Z{7y*Of6*upZFa=8|KMzxhn z3mwH>qs*g5Y%`*x{LX+%{WS7NLWg#ZGK(Ee$D+8OPEs?E=?vbQ9F+Xnk4pY5B(%iS zsEFOdEC#t`8kAPuS)g3ff(EEFq&W7&yziHrxzpG5O;BJ;5$@RLdc+@#?&N_tCeSR7 zX-4FU1Y{Gaa$Zr843Q4k$m~O|Lvt)O36Akpu*L9sMMj#5G<_P_CvIWqoKWJRf*)2e zTR69Zi&P4{V$E7EhkCpy#-2lavKf)NnsQx&2vN;+fhquNjs{o(6o6@C9hfR6R4tgQ zNz={wS>GAqNyX>a>x=jf)6rTDLfT8QE-Wcz5 ztF%0rbs1|>-4SD|Wczdp?_|6}QMVhhoZH#xH3M`<2GFS{16$S8 zz%VVxmQ{sP$Z~Tw*Hr{Hq^Qjrx)#?Px}6gCij-|al6dXGXqE{HrUoDsL!hae1~AoF zY_?@!*^;42S(g4im>Cd}u>i}DZ4WQ1;6YCbhYC%zT!_b`qYxZ?-{D0c)c@EWR zm~w7v4za@+|7@KC*-z^nNj+A#Av+}=_@wtNJ7Ip&liip%cc0udv10tLWLI(F!X-Dj z$4(quecMN8B<+ubi{QcI$KQgNk{{mRzO3!h_s$%6<;8FJOsFTiv+}}~iJ>3S$??O( zZ-1U&+wD3}g;Qs@bapIQS?+pd%kKv+>!qLDR$M;6bvr6?A9iL~Mc1&czUP`p4Nl;A@iD*E7yT7{}b1Rt$b&=Rx=E%lteWn+^j)XTu! z&i|eN@}2+x&zTw?dU{RwBi*rBY)xh`Jwo3-?C!dkJ~zzWLiDxT9~=u~vHRAt`<~dD zx7NjC-G`i9KFViz8Q3ewk>!~rUMu?)9gA(X2wW#cyW@ zxqNn*>-Pe}X>lN6039_L!zN9XFtLVw5yk-vsSdPo8|PPoQr)fV` z+vqSFn4lgtV_Os*<|ch2j*!r+1egp=P>UN|j)l<(nWtt2(%ZNKt$gy)U9Q+M#c>zS(WqkpL=$nyv~2TB-oCA_>W)f&|T!G$140mUPn6wmWcW ziK9}dR_2vOHQFSp$=EUl*-8*0X(>?9p~)VqrOOJG6DH+w-fq8F@`9{qQO;$aW2MO;==3t(sYN^r~Oh|xUB4p2|d~6x{ym+tcP>Lm%7B(EwIwfNZC9IRN3N;3ukmlTEv)7E0L(Q*}!_|w@K)4YCX4y$BzB%kH zvcM~&vZ1zGB$TW>WNiZ$dUjMr0oh)l3@=+1;!@6sXyVSU!-N6>)QDi~vL>iR0fH&3 z2|-Kh*aWgf2u!p>zuk427LXyyts1%;*PFEBB616aZbBk|_rchbj3t=Rgap)WTI4Jk zQ<4S6l#rH$60sAs&~9IcMH|9@91Ql{2@-T9mX88NH&POWDc%meGKYM>T}$X#A%eOzvQ7 zQ{Q-vMSH;tbCB-D25s%jG z4%KPsI5)M1=wXa~woifdr+tnjF0I>uo)W+O^yUCPVSbTGZ_g!9&%Cy$`{jp>)R7G4a$sU16jXI5Q!aLfMd zSNCptZ0&Qa*WKTn9-rE@Y4$97*_o=xb@vKN=+x%T}>_QR3yJ z_a+h@d)?efJd)jRV!xC`wr`PSwG>cvBC)Bf8X&xf#GFO)u9xO7PMzX8*G}`h)U1>Z zdPu?Tp9sm$iNPG6*neS=E+G zEp!z3mZ?XL*k(mXx$%IA!zA*@LQHzg)Z)6PV^KUzrc<+k=@j0Y92ET6j|%=ANoa{@ zq#|~mISew%3@E9(b3mD-1r5xekf7KPbG~0}a%ZUN8wWuWau4ltJ=?ED8(83t2_%DJ zlI9ta1SuuRQVv2>0;UQcmgt96hh`}?Z4{$+utD)TD4DWuLS+Wnw_Rs^UZ{;t#}7-0 zE}UCJc_Id0zGf|(H3z&XMjj>unKVybO}egaLQT>%TXF=bAXTt{0)>=rK>;Jnu}O*m zqFK%P86S@^QnC5<`m%jYb+lH)bR1;svf>B?KwD6WVhbq=(+bmprRh)s$f(Coz1b1E zw8T-dT`Tj-rWzfR(qwE~f^6$VNZASy3}CT`Y8$cwWZj~ArtS9lML*2?HqE)rb8NMl zdg>}-^_Av9V{n8~wK!HE)S*N#5wK@NK01$lTKt&j(iB6UV|+1d_IJ|OMIF#oRaP70 zLvEE6M=~zWT2yyLYnP19l(0_5D%9+EBg(n)Mz7gP_BOtXE>|l`6XALYn6Z=Cd}G+1 zWq}u#%DUQ0fzV{#gtc{86cftL8oCwN8)?M_?a*|Qt_ zQ>!4k*ypC(&zwoKN$9q5pxsK#1@2$8H!tHB)(!vnMH1Noq230>zjuiGf2N+vKDIWs zjn|yD7c7v2bSE}xYoDjt+rYq@rK%P_KZWd zG_;+YnnUz3#y(r8K>E`zygKvMg#({* zYfjv=`plL~KVDzkHMp{~x8uHLos*L0{5G+4{yJD|PIXA zxszY7Ub=Yuhf|Zkbsiesa3Foh=TjG7eKY8Kak=;4XGbm^|KS|iwsrlXU(P>q{ejEN z&c61|`KOJ(w+8lYJiO!E(atXxe}CxLgJ=Huec$l@Q&(>Pa+~qpQ&zN_9hV1s2QzPP H*?sUYR2aqb literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png new file mode 100644 index 0000000000000000000000000000000000000000..7991ef0d9f8fd47e53bb38013906c25abc8d0818 GIT binary patch literal 2930 zcmcImUu+ab7(Y!QSRpFbM2N=CLX1TAc4qe9?aD!Fuh<%|)bI5BynOtN_`p%TqCyWL|PP? zr_B(8C{r6IEt(i%aveu9%mW@$1L!&#E}Dp|4dbpOlPU>Fm?jJhGc04NT+ZMNsttk+ zouqw}%%fIp3!;Q<&q2q4Fpq>McKM-8Ysn@acxwVF;gl3b zo=6fXND8PRWC3Vt@JYZvKoeSKsp;YrcY;lZuOMJ)21~qoVCwqb)RIuwu{;_Fm@S+i z;4vac;aJ03xoi!DNs2><43vr@b2ab#u0>SSaSZ|_L>wYPsOpjpU_ml94D5ogW3QmJ z=a;B6!IO&5Z`PMf9i}5&4a-HU0X^4cI=q4e995OD=DCt$BV?#bff%OO*0v+|S&8Fn zr&jKj%QSkVpev4ROA7N%D!3|?Olb3m=9-EM6~ks6&e`pyRT`J6%Q$D=^3}GOdgdzT z^;HyMYjBjOYIUMHXdu8Y8S-aKzIzGzoOoyGGm4QY@O-fv_D5LjVh-q9bS3Cp>uR<9W$ds|;sUuYDig`H*y4$n^FimhRPfdyV3 zl})v^al**DMbn&QHaU6~jwh77N?FWNx+dxo7lE<@IK`NFoFxd`6 zSgAm}U?9z2D3}Es!W|CAq2VNnI}$6xF=iVniIbw}#WWCb6jgnvQC;$6=(hH!tRRJy z3UlpeQPNxz`yDyZX(e+(_#f>pnQ_bOhBp_>9bP1v9}t>tK>l}!X#SU)Om63E)7W^e zg?hnqbCB)C7HjQGHG60}x@~9@Hg#Kq8ZS?*nG#k!q-eUXIUeR2&9%}0+U$7_HE8HK zH?@b@VT^xfr$F|Tog+!e>NaMl#Qr}n?`J2>V*{n0O5v^Zvprp3fbPZhYyjvQP2&diV7U+-S=RDPyA7}@mc)!>yYzn$Co$$4XS?s)M1;msdinOXbD>X)zY z-}r<3{I}1(w(r!syFXaB|Dtg2(Fd#@Z%-W9c5TDiLpOGwupjSQ{pNIkeB$6QYt)BM zsRu8wJpAE`t?N$ye0=@8U!6VuYVU!ov!Zw7=$GBj*GJC0e|_Xd8x7_6eSGosrPmD!FZdUIdk0^SrEG|t+-Ij8j9h;GiT21j_l41Gt=%a zA(SeYm|%D?Mgu6CnE0lV2Q*@6qsGJ=^+iL14`M%-sZBQne+xfrq zU%vDI|2fa~u3x*T{f_onEVihpJJm#5KCck@g7>nI}8@=bn4jx__ zi?wfaGW}71`Y{7}g*dc46UR#hpP*y0m8(lWL|bvhm^kaWN%q&{BP`=sNp_Qx7SetP z&N73mhcdKI&>WDo@f96_d3$h)CYO0reG2KlDLJj+xe(bgoph8kr0 z)4fcG7hpz>3mg&zkX5M%>rO#NbswZO8CzEoG;7WqrE zxhV1to-Y=Q@uC#>f-DboUFQXn7e$UBxUlR-u*A9H@`i>K4pHFvk>j}x)d)>*AWE{t z(^?1xzp2&@>ogI<_!9Ja5Ep1jRiK5MIDa6>SB+bU$9Y`9ZWIzMXkrOV>2wo5t=dAN zi4LRALE=$8wrSB}rtD+B4~O1BfNzSI3dAFLPit~0T>E+Kp-DN4VosYX~77#f^~w=h=QSr1`wuzJlEvk2!B%h1&} zh@8?Sv%f%Jp8e5pS!1{HLPw?`i5LT|5&D&`O9qe)QEJrCwYXlV73H9t#bguW*=r95o1%sVlE^aFMNTJW z!9h)wIa`txo0N+xn0UHirfmqtrlxRES4|Emv^=3g(ps`bNl{e=*`(Rmyz%~P zv!^*!rJ?2A)EFX%G5Xm&1(KiUITE|1ZUb^kJo)nIhvbBLrYE%~lXxCYR4S|Iuh_L` zczF2rwP^9)-R%d?4VB|}?;RW3DeU;;;vbMNAj nk;=%0^S6KFn{UVu&5s>FvF_MO?duomdAg@_ed?`8o_gjVq1)ux literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png new file mode 100644 index 0000000000000000000000000000000000000000..d4b83ce383d473d470eacd5dc95d67ece9a5d8b1 GIT binary patch literal 2961 zcmcguYlsz99KT8USd~QW!4fr$D=0O0&Y9<((d%okx*J|ycW<~W6rDM9W_R-5IpfUi z-n&wXl2Cz?L>l(^R-a4)S%r#P2qXGp1z{hOB*CB$y`&-#>YV$S-OXKhvB$u?&i{A* zkKg(K|K~j4vvd2>w)VD6CbP7=tI*5d%lN%;K6^fR{ZGVRi^8sfIFnhtg5P&!PQ7+t zCeyaxFZCz=#T_=Ll`L|pL$b9>$k3V0`i->^;e8|#95Uz!dGW{hJ`@Gt&5L{VA}EHP zWXSJ25RtwEJ4^V$K5V(-#tp*yn#~kcNP>h~r5wa|Eicyf+U%PT%c4++B>VE>W^PdE zFZKwXG$MkL1ri285lkx!4NWt^!-4`7AOl^7iUbWCXf`y3<|Q&~k?YyLg>6k+>@P14 zB}r(@aMH7ST!wKNn+j3Ylxd>RN`BXa0)k{6k$ zjSwnfsy2w5G%>>D8VY5Y1w5oW(8Vb(9FEF$<1Us-nN&!S#0(2lEMuuyOySe2tyEHU zoNOIo9yMc|79E#HLn8N*m<~snY#m`1SG63AlU_1G%^apPcse;8q6v+M=nN#J;we-l zzBhwGE|~%)HGc*um!#0p?u-aZXjG!K+{&GvmT!Urvx=~0j~}?S8n5MnHz$w+N=RPh zi6nuXq=J&7*Z|r(dJJnUct!A9)Nn_ZF5N*t9Z zYvo?K+$)kZRO~vE>Y7B#xf+x#=~_*Jjf&J|oU5Y1SDUM6t|DGv zc@Z`T`+2IChZ}>Y0@x)({%pzzW|2>b9}Rp)u_6jQU+lX5KGwRJ1BR}vdUL$TuaR

v`_nD( zoTzN5tqu`J)-AHO0gI`ZR8d4W4>E>ltqOT2=VLT-YuBNvK>!URd6sHOI?;gSsJbZ` zISV^LRS1D*EA*RPS8b@-irOl;+i|@~D;`3@AYq%3EZ%-FhKCd_r@N8^ks>)cO_g${ z;jnT?gq513VVz~u&Fe62L->z_!88~l(WJx*QH0n=N}@O~dJ(M%C=AO!u2+{l61dI% zDJ@7Lp~6J_nUOS?ME;~4m~16=LHHN#&6;s@>xTdPBFX%K&}akl-#bL(ztCWE8(*9H z#%oX43+9@GY$vu^YoDdryU@ahW3s)%VtEX8UYQ&Q^>`aluU*NEuU)wJ$lLIJIRC`L zb8Eux<)1$lFZt-?rhAW%eS6}q({Dbz`bquZj?Wgr#bW!7!}p&)cEy~x;Nq+03m<%c zJTsm-@yOA8ejdB_tFwF8J72W-{qo|;)enq5zWD32O9lph+xun5>gDI6?eoURR&{*y z-08dNA?wDT@iiCDTwM~JH$Po>i7Xnw)V_cBPu8(@zjs`FlCm&>i{?{kLe`%d;>b{l=JyK)uM*Yc=uB+2DgtYQCKa)%Dz zo6B|JpfsEg7az3|spg?aT%500BZ|)Dx;ED%h{kZrxp*`P3;gAGKj68*EATtDA}B^Z zxE%EDj`8;010}S33|St(`C+cBZc_zSoI?tabgaO4GlSf4 zagggFG3N9<5D)+|XIObjS5+N!ax##C2sBZW1xdGoYD)%}{dj6E_I!KD>CJ4>uL56A z)5sRZTCJ9^DR~l)ijrknB9KK{7AQhUCc_lgg)mv)(%|3(#X*z?B;=Sz=#ufYz*A3~ zAylKb+Azt|L=z^~VI)dO)DCJGxL(udU3%1rf z1dTH~vGvW$@(7|j+WTPpGO`TMf`TO@NzisS zuRN;J$EL0z&lMEUz=G+il3+c*{15LtB_Sz zftRw$VMfx*cyrQ_0sV;*duH;HMdUN$9brIIEb|;=iruikoi;7%fUaqZmdy_abzB*C z0-Cj?=?D$Kv7#XvnJZyEjMb*y7bKKzlUbM9j-Sj%m4IuMqYY6r1jKlWJwBTb=Gow- zrLw8ER>m}0*WqgumJmO!!5DXs(hM(J58^`3Cvf8Wu1kh00ZGS#Zz;N$5!bV{qB0CeF+F}n{>Fn*B-2o20}8tC0YP?ES8#!$ z3aW{ajuc=3W!_+}Z3Q%&w?5Aa2(7cz-%jR7r6h?-lB9{S}VM^Qf}rBiR@C)YyjfFdqeZvX{NE4ZA{~^ zwdd;sOJyHDeQny*7isgJWFg%(Gyz(=D@YnEOsH7`RD4;{bX`L}Jv5r$kpJ4|8G#yU zm~~fbP0$2$sKYrAC_Q=$_moC`mp5xojf4;#xael?0y`QR|T-tc?^iMpueC!hLfBEOmv+<=P z8#})F^4WuTy9eIbb?Cw42Uj2a>gZIj^Z4|4FFd_|@2-2M*ZjTd)EA#wHT&B$J5EmR o|M2kOf#;vOaQWQFU4NYuJMS2{vaI9vGP@M_Zy9h-KC)}iKTfs1W&i*H literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..b6fcecf4b17229ac8d7617a79e9b1e19396e6395 GIT binary patch literal 2955 zcmcImZD<@t7(Su2n%G*jN-3i27W}}@?aY4OF1?nRYnl|Vrs+v9DA?KAx!iJhyPMrj z?h@*c)>14Qu(m(M5Be)0Es8~2!J@4QrJyLbRFLWqp=y6rDk?=pj5GI@#3oIsc45Ef zedhgm=6&Cp{ry`vFYj2>kw_$#_w{B5*n1_vZ(quu5B@fV+3Sv=cQ8sMI`854ZHd?4 zT%AaC47<5}oXiIzfgql%OUd86e$)s)Y=pd5O$g=oGAhOi$Am`%8<( zI1VgHs#dGXs*?1>AqknLDM4A1Wxx<18uMaY175VYr6EHj61qX``kufwV%r~y(<1Y< z5ke(stM#HLO^h(9h64#DArGkzbVwT)jD+R7afe8>Oe@rjBZft7EMqB~ZNukOTdB0s zQM_rCdDM(;PIQzT3#c?eBYz|$bkiuaxVGh36c5m8Y8Ek_!P}FAq96NF(VvHews;m5 zv0IqOAeYR7(waLDluO#s!0HYuj{Pv_`{h>d^tXHyWR#SJM|ZfM<5#1{c;L+mG=pQB z7I`88m;wsS$+88JrJ=_m`+yB-mZheHV>}aVGJH;kmXfj*Wfs_X+``y`P={CrKdfN3 zaBc+;Q7Q0->ejMZtIvyK>=D|RNsG+Yr0Y5sLWmLtQXtDR0j8o7fQ^&}4Ba+tRdrADY8_M2cZE4yWyQ`(;1O`VQk<5e2^57E{k$ z#k{`KB5Drid8(F28iR%m*(D+VY{~~0kWY)B_FP7>EDAhdth)W}taUL5bWKyV=6Jtb zqvd?YWvoRFM_Bmv8Fk6vYzgmVyh5#BH)1(A*6cOg>2UL_>ptHgP`n^dUZ*op3~f) z+65`ZzA)W><|WOcp*tf7W?E^xApDQ^7S6aub;Ik6^GbmdYL#}8gyu?OC{@0su9 zSB7hyWY^SYbmoJVuPwRU^AQ|AaB$`CCx5;+S(%K3P49iVxh|d2E@u=Gnh5@9g+-#r_Y!dE`prXy+dj!e{3$9PK^7_xWX? z3w!hHwrv?+weRB>g#Py)zUvF~?KjSJ9yzk~r*AJE`7>WSaCW?F+luaAC(fEF_I@x-n#U;4`Y{_CrMEt$BIy>#u^hU5IW+_!0K=G`ZD G?)e8~62-Fs literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json new file mode 100644 index 000000000..4f9df536f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ANA", + "CMD", + "EEE" + ], + "key": { + "E": { + "item": "minecraft:ender_pearl" + }, + "C": { + "item": "refinedstorage2:construction_core" + }, + "M": { + "item": "refinedstorage2:machine_casing" + }, + "D": { + "item": "refinedstorage2:destruction_core" + }, + "A": { + "item": "refinedstorage2:advanced_processor" + }, + "N": { + "item": "minecraft:netherite_ingot" + } + }, + "result": { + "item": "refinedstorage2:network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 338e5269d..f02216b03 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -108,6 +108,7 @@ private void setRenderLayers() { setCutout(Blocks.INSTANCE.getConstructor()); setCutout(Blocks.INSTANCE.getDestructor()); setCutout(Blocks.INSTANCE.getWirelessTransmitter()); + setCutout(Blocks.INSTANCE.getNetworkReceiver()); } private void setCutout(final BlockColorMap blockMap) { @@ -144,6 +145,9 @@ private void registerEmissiveModels() { Blocks.INSTANCE.getWirelessTransmitter().forEach( (color, id, block) -> registerEmissiveWirelessTransmitterModels(color, id) ); + Blocks.INSTANCE.getNetworkReceiver().forEach( + (color, id, block) -> registerEmissiveNetworkReceiverModels(color, id) + ); } private void registerEmissiveControllerModels(final DyeColor color) { @@ -223,6 +227,19 @@ private void registerEmissiveWirelessTransmitterModels(final DyeColor color, fin ); } + private void registerEmissiveNetworkReceiverModels(final DyeColor color, final ResourceLocation id) { + // Block + EmissiveModelRegistry.INSTANCE.register( + createIdentifier("block/network_receiver/" + color.getName()), + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + ); + // Item + EmissiveModelRegistry.INSTANCE.register( + id, + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + ); + } + private void registerPackets() { ClientPlayNetworking.registerGlobalReceiver(PacketIds.STORAGE_INFO_RESPONSE, new StorageInfoResponsePacket()); ClientPlayNetworking.registerGlobalReceiver(PacketIds.GRID_UPDATE, new GridUpdatePacket()); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java index 49f8c4428..0a1468184 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java @@ -75,6 +75,11 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage2.p DefaultEnergyUsage.STORAGE_MONITOR ); + @ConfigEntry.Gui.CollapsibleObject + private SimpleEnergyUsageEntryImpl networkReceiver = new SimpleEnergyUsageEntryImpl( + DefaultEnergyUsage.NETWORK_RECEIVER + ); + public static ConfigImpl get() { return AutoConfig.getConfigHolder(ConfigImpl.class).getConfig(); } @@ -169,6 +174,11 @@ public SimpleEnergyUsageEntry getStorageMonitor() { return storageMonitor; } + @Override + public SimpleEnergyUsageEntry getNetworkReceiver() { + return networkReceiver; + } + private static class GridEntryImpl implements GridEntry { private boolean largeFont = false; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java index f11ede392..789a3d5a7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -88,6 +88,7 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) ContentIds.WIRELESS_TRANSMITTER, Tags.WIRELESS_TRANSMITTERS ); + groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); } @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index 782b8fd36..b8ca777b6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -36,6 +36,7 @@ public class ConfigImpl implements Config { private final WirelessGridEntry wirelessGrid; private final WirelessTransmitterEntry wirelessTransmitter; private final SimpleEnergyUsageEntry storageMonitor; + private final SimpleEnergyUsageEntry networkReceiver; public ConfigImpl() { cable = new SimpleEnergyUsageEntryImpl("cable", "Cable", DefaultEnergyUsage.CABLE); @@ -64,6 +65,11 @@ public ConfigImpl() { "Storage Monitor", DefaultEnergyUsage.STORAGE_MONITOR ); + networkReceiver = new SimpleEnergyUsageEntryImpl( + "networkReceiver", + "Network Receiver", + DefaultEnergyUsage.NETWORK_RECEIVER + ); spec = builder.build(); } @@ -161,6 +167,11 @@ public SimpleEnergyUsageEntry getStorageMonitor() { return storageMonitor; } + @Override + public SimpleEnergyUsageEntry getNetworkReceiver() { + return networkReceiver; + } + private class SimpleEnergyUsageEntryImpl implements SimpleEnergyUsageEntry { private final ForgeConfigSpec.LongValue energyUsage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index 3b4a672b7..a726d4e1e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -24,6 +24,7 @@ protected void registerModels() { registerGrids(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid"); registerDetectors(); registerWirelessTransmitters(); + registerNetworkReceivers(); } private void registerCables() { @@ -110,4 +111,20 @@ private void registerWirelessTransmitters() { .forEach((color, id, block) -> withExistingParent("block/wireless_transmitter/" + color.getName(), parent) .texture("cutout", createIdentifier("block/wireless_transmitter/cutouts/" + color.getName()))); } + + private void registerNetworkReceivers() { + final ResourceLocation base = createIdentifier("block/emissive_all_cutout"); + final ResourceLocation baseTexture = createIdentifier("block/network_receiver/base"); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, receiver) -> { + final ResourceLocation cutout = createIdentifier("block/network_receiver/cutouts/" + color.getName()); + withExistingParent("block/network_receiver/" + color.getName(), base) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", cutout); + }); + withExistingParent("block/network_receiver/inactive", base) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", createIdentifier("block/network_receiver/cutouts/inactive")); + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java index 208e90ddd..2a4249ef0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; import com.refinedmods.refinedstorage2.platform.common.block.ControllerEnergyType; import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; @@ -61,6 +62,7 @@ protected void registerStatesAndModels() { registerWirelessTransmitters(); registerConstructorDestructors(Blocks.INSTANCE.getConstructor(), "constructor"); registerConstructorDestructors(Blocks.INSTANCE.getDestructor(), "destructor"); + registerNetworkReceivers(); } private void registerCables() { @@ -257,6 +259,22 @@ private ConfiguredModel[] registerDetector(final ModelFile unpowered, return model.build(); } + private void registerNetworkReceivers() { + final ModelFile inactive = modelFile(createIdentifier("block/network_receiver/inactive")); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> { + final var builder = getVariantBuilder(block.get()); + builder.forAllStates(blockState -> { + final ConfiguredModel.Builder model = ConfiguredModel.builder(); + if (Boolean.TRUE.equals(blockState.getValue(NetworkReceiverBlock.ACTIVE))) { + model.modelFile(modelFile(createIdentifier("block/network_receiver/" + color.getName()))); + } else { + model.modelFile(inactive); + } + return model.build(); + }); + }); + } + private void addRotation(final ConfiguredModel.Builder model, final Direction direction) { final int rotationX; if (direction.getAxis() == Direction.Axis.Y) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java index 67778356c..cb5fcb142 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; @@ -42,6 +43,7 @@ protected void registerModels() { registerConstructors(); registerDestructors(); registerWirelessTransmitters(); + registerNetworkReceivers(); } private void registerCables() { @@ -181,6 +183,17 @@ private void registerWirelessTransmitters() { )); } + private void registerNetworkReceivers() { + final ResourceLocation base = createIdentifier("block/network_receiver/inactive"); + final ColorMap blocks = Blocks.INSTANCE.getNetworkReceiver(); + blocks.forEach((color, id, block) -> singleTexture( + id.getPath(), + base, + "cutout", + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + )); + } + private ModelFile modelFile(final ResourceLocation location) { return new ModelFile.ExistingModelFile(location, existingFileHelper); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java index 799c7985d..c250309a8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java @@ -30,6 +30,7 @@ protected void generate() { Blocks.INSTANCE.getConstructor().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getDestructor().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> dropSelf(block.get())); } @Override @@ -44,6 +45,7 @@ protected Iterable getKnownBlocks() { blocks.addAll(Blocks.INSTANCE.getConstructor().values()); blocks.addAll(Blocks.INSTANCE.getDestructor().values()); blocks.addAll(Blocks.INSTANCE.getWirelessTransmitter().values()); + blocks.addAll(Blocks.INSTANCE.getNetworkReceiver().values()); return blocks; } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java index 9d6cd3443..0ccedf2a8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java @@ -57,6 +57,9 @@ protected void buildRecipes(final Consumer provider) { Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> recolorItems(Tags.WIRELESS_TRANSMITTERS, block.get().asItem(), color) .save(provider, createIdentifier("coloring/" + color.getName() + "_wireless_transmitter"))); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> + recolorItems(Tags.NETWORK_RECEIVERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_network_receiver"))); } private ShapelessRecipeBuilder recolorItems(final TagKey dyeable, final Item result, final DyeColor color) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java index 7cd840ee3..0b04c869b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java @@ -31,6 +31,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.Tags.FLUID_STORAGE_DISKS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.GRIDS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.IMPORTERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.NETWORK_RECEIVERS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.STORAGE_DISKS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.WIRELESS_TRANSMITTERS; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; @@ -99,6 +100,10 @@ protected void addTags(final HolderLookup.Provider provider) { Blocks.INSTANCE.getWirelessTransmitter().values().stream() .map(block -> (Supplier) block::asItem) .toList()); + addAllToTag(NETWORK_RECEIVERS, + Blocks.INSTANCE.getNetworkReceiver().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); } private void addAllToTag(final TagKey t, final Collection> items) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java index 95f94a182..52aa07a34 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -87,6 +87,7 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) ContentIds.WIRELESS_TRANSMITTER, Tags.WIRELESS_TRANSMITTERS ); + groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); } @Override diff --git a/settings.gradle b/settings.gradle index 48e8abd26..142a92e09 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -gradle.ext.refinedArchitectVersion = "0.9.0" +gradle.ext.refinedArchitectVersion = "0.9.1" dependencyResolutionManagement { repositories { From 456a3cfa6b7cefb33a8d3c5c50980797edadeb76 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 31 Oct 2023 20:32:15 +0100 Subject: [PATCH 05/24] refactor: class hierarchy of network node containers Introduced NetworkNodeContainerBlockEntityImpl, that inherits from the API block entity. It only has code for activeness checking. Modified AbstractInternalNetworkNodeContainerBlockEntity to have redstone mode, placed by and configuration card code. Modified cable and network receiver to inherit from NetworkNodeContainerBlockEntityImpl since they don't need redstone mode and especially not configuration card support. --- CHANGELOG.md | 6 +- .../platform/api/grid/Grid.java | 2 +- .../common/AbstractModInitializer.java | 11 +- .../common/block/AbstractColoredBlock.java | 36 +++++++ .../platform/common/block/CableBlock.java | 46 +++----- .../common/block/NetworkReceiverBlock.java | 37 ++----- ...actingNetworkNodeContainerBlockEntity.java | 2 +- ...neModeNetworkNodeContainerBlockEntity.java | 100 ++++++++++++++++++ .../block/entity/ControllerBlockEntity.java | 2 +- ... NetworkNodeContainerBlockEntityImpl.java} | 96 ++--------------- ...SimpleNetworkNodeContainerBlockEntity.java | 18 ---- .../entity/detector/DetectorBlockEntity.java | 4 +- .../AbstractDiskDriveBlockEntity.java | 4 +- .../ExternalStorageBlockEntity.java | 4 +- .../entity/grid/AbstractGridBlockEntity.java | 7 +- .../entity/iface/InterfaceBlockEntity.java | 4 +- .../AbstractStorageBlockBlockEntity.java | 4 +- .../StorageMonitorBlockEntity.java | 4 +- .../WirelessTransmitterBlockEntity.java | 5 +- .../ticker/NetworkNodeBlockEntityTicker.java | 4 +- .../grid/AbstractGridContainerMenu.java | 8 +- .../common/content/BlockEntities.java | 19 ++-- .../common/internal/grid/WirelessGrid.java | 2 +- .../common/menu/GridExtendedMenuProvider.java | 2 +- 24 files changed, 215 insertions(+), 212 deletions(-) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/{AbstractInternalNetworkNodeContainerBlockEntity.java => NetworkNodeContainerBlockEntityImpl.java} (59%) delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java diff --git a/CHANGELOG.md b/CHANGELOG.md index b6761925f..e41581516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -337,9 +337,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - The Wrench now dismantles devices when crouching. - - The Disk Drive in item form now supports rendering of disks that were dismantled. - - In order to retain Controller energy, the Controller must now be dismantled. - - All config and upgrades are transferred to the item. + - The Disk Drive in item form now supports rendering of disks that were dismantled. + - In order to retain Controller energy, the Controller must now be dismantled. + - All config and upgrades are transferred to the item. - You can now use any Wrench from other mods in order to rotate or dismantle. - Item and fluid storage blocks. - Initial advancements. diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java index 3248a1016..17c6d34ac 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java @@ -21,7 +21,7 @@ public interface Grid { Storage getItemStorage(); - boolean isActive(); + boolean isGridActive(); List> getResources(StorageChannelType type, Class actorType); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 4479dfe6e..ae08e3872 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.component.EnergyNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.component.StorageNetworkComponentImpl; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.PlatformApiProxy; import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; @@ -16,7 +17,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ItemDropConstructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceBlockConstructorStrategy; @@ -479,11 +480,11 @@ protected final void registerBlockEntities( ) { BlockEntities.INSTANCE.setCable(callback.register( CABLE, - () -> typeFactory.create((pos, state) -> new SimpleNetworkNodeContainerBlockEntity( + () -> typeFactory.create((pos, state) -> new NetworkNodeContainerBlockEntityImpl<>( BlockEntities.INSTANCE.getCable(), pos, state, - Platform.INSTANCE.getConfig().getCable().getEnergyUsage() + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) ), Blocks.INSTANCE.getCable().toArray()) )); BlockEntities.INSTANCE.setController(callback.register( @@ -573,11 +574,11 @@ protected final void registerBlockEntities( )); BlockEntities.INSTANCE.setNetworkReceiver(callback.register( NETWORK_RECEIVER, - () -> typeFactory.create((pos, state) -> new SimpleNetworkNodeContainerBlockEntity( + () -> typeFactory.create((pos, state) -> new NetworkNodeContainerBlockEntityImpl<>( BlockEntities.INSTANCE.getNetworkReceiver(), pos, state, - Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage() + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) ), Blocks.INSTANCE.getNetworkReceiver().toArray()) )); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java new file mode 100644 index 000000000..a674ae71f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage2.platform.common.block; + +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; + +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +public abstract class AbstractColoredBlock + extends AbstractBaseBlock implements ColorableBlock, BlockItemProvider { + private final DyeColor color; + private final MutableComponent name; + + protected AbstractColoredBlock(final Properties properties, final DyeColor color, final MutableComponent name) { + super(properties); + this.color = color; + this.name = name; + } + + @Override + public MutableComponent getName() { + return name; + } + + @Override + public DyeColor getColor() { + return color; + } + + @Override + public BlockItem createBlockItem() { + return new NamedBlockItem(this, new Item.Properties(), name); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java index b74a74646..b74a819aa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java @@ -1,22 +1,20 @@ package com.refinedmods.refinedstorage2.platform.common.block; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.DyeColor; -import net.minecraft.world.item.Item; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -36,23 +34,13 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -public class CableBlock extends AbstractBaseBlock +public class CableBlock extends AbstractColoredBlock implements ColorableBlock, SimpleWaterloggedBlock, EntityBlock, BlockItemProvider { - private static final AbstractBlockEntityTicker TICKER = + private static final AbstractBlockEntityTicker> TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getCable); - private final DyeColor color; - private final MutableComponent name; - public CableBlock(final DyeColor color, final MutableComponent name) { - super(BlockConstants.CABLE_PROPERTIES); - this.color = color; - this.name = name; - } - - @Override - public DyeColor getColor() { - return color; + super(BlockConstants.CABLE_PROPERTIES, color, name); } @Override @@ -116,34 +104,24 @@ public VoxelShape getShape(final BlockState state, @Override public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { - return new SimpleNetworkNodeContainerBlockEntity( + return new NetworkNodeContainerBlockEntityImpl<>( BlockEntities.INSTANCE.getCable(), pos, state, - Platform.INSTANCE.getConfig().getCable().getEnergyUsage() + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) ); } - @Nullable - @Override - public BlockEntityTicker getTicker(final Level level, - final BlockState blockState, - final BlockEntityType type) { - return TICKER.get(level, type); - } - @Override public BlockColorMap getBlockColorMap() { return Blocks.INSTANCE.getCable(); } + @Nullable @Override - public MutableComponent getName() { - return name; - } - - @Override - public BlockItem createBlockItem() { - return new NamedBlockItem(this, new Item.Properties(), name); + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java index ffbc8faaf..90ced803f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java @@ -1,21 +1,19 @@ package com.refinedmods.refinedstorage2.platform.common.block; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.DyeColor; -import net.minecraft.world.item.Item; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.EntityBlock; @@ -26,20 +24,14 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; -public class NetworkReceiverBlock extends AbstractBaseBlock implements ColorableBlock, - BlockItemProvider, EntityBlock { +public class NetworkReceiverBlock extends AbstractColoredBlock implements EntityBlock { public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); - private static final AbstractBlockEntityTicker TICKER = + private static final AbstractBlockEntityTicker> TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getNetworkReceiver, ACTIVE); - private final DyeColor color; - private final MutableComponent name; - public NetworkReceiverBlock(final DyeColor color, final MutableComponent name) { - super(BlockConstants.PROPERTIES); - this.color = color; - this.name = name; + super(BlockConstants.PROPERTIES, color, name); } @Override @@ -53,34 +45,19 @@ protected void createBlockStateDefinition(final StateDefinition.Builder getBlockColorMap() { return Blocks.INSTANCE.getNetworkReceiver(); } - @Override - public DyeColor getColor() { - return color; - } - - @Override - public BlockItem createBlockItem() { - return new NamedBlockItem(this, new Item.Properties(), name); - } - @Nullable @Override public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { - return new SimpleNetworkNodeContainerBlockEntity( + return new NetworkNodeContainerBlockEntityImpl<>( BlockEntities.INSTANCE.getNetworkReceiver(), pos, state, - Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage() + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) ); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java index a0904f263..e0c9fa77b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java @@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractLevelInteractingNetworkNodeContainerBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity { + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity { private static final Logger LOGGER = LoggerFactory.getLogger( AbstractLevelInteractingNetworkNodeContainerBlockEntity.class ); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java new file mode 100644 index 000000000..b35d96dac --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java @@ -0,0 +1,100 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity; + +import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; +import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; + +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +public abstract class AbstractRedstoneModeNetworkNodeContainerBlockEntity + extends NetworkNodeContainerBlockEntityImpl implements PlayerAware, ConfigurationCardTarget { + private static final String TAG_REDSTONE_MODE = "rm"; + private static final String TAG_PLACED_BY_PLAYER_ID = "pbpid"; + + private RedstoneMode redstoneMode = RedstoneMode.IGNORE; + @Nullable + private UUID placedByPlayerId; + + protected AbstractRedstoneModeNetworkNodeContainerBlockEntity(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final T node) { + super(type, pos, state, node); + } + + @Override + protected boolean isActive() { + return super.isActive() && level != null && redstoneMode.isActive(level.hasNeighborSignal(worldPosition)); + } + + @Override + public void saveAdditional(final CompoundTag tag) { + super.saveAdditional(tag); + writeConfiguration(tag); + if (placedByPlayerId != null) { + tag.putUUID(TAG_PLACED_BY_PLAYER_ID, placedByPlayerId); + } + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); + } + + @Override + public void load(final CompoundTag tag) { + super.load(tag); + readConfiguration(tag); + if (tag.hasUUID(TAG_PLACED_BY_PLAYER_ID)) { + placedByPlayerId = tag.getUUID(TAG_PLACED_BY_PLAYER_ID); + } + } + + @Override + public void readConfiguration(final CompoundTag tag) { + if (tag.contains(TAG_REDSTONE_MODE)) { + redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); + } + } + + @Override + public List getUpgradeItems() { + return Collections.emptyList(); + } + + @Override + public boolean addUpgradeItem(final Item upgradeItem) { + return false; + } + + public RedstoneMode getRedstoneMode() { + return redstoneMode; + } + + public void setRedstoneMode(final RedstoneMode redstoneMode) { + this.redstoneMode = redstoneMode; + setChanged(); + } + + @Override + public void setPlacedBy(final UUID playerId) { + this.placedByPlayerId = playerId; + setChanged(); + } + + protected final Player getFakePlayer(final ServerLevel serverLevel) { + return Platform.INSTANCE.getFakePlayer(serverLevel, placedByPlayerId); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java index f45ad0545..86287650b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java @@ -29,7 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ControllerBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class ControllerBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, EnergyBlockEntity { private static final Logger LOGGER = LoggerFactory.getLogger(ControllerBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java similarity index 59% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java index 1785ad4e3..4e03b0369 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java @@ -3,101 +3,42 @@ import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; -import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; -import java.util.Collections; -import java.util.List; -import java.util.UUID; import javax.annotation.Nullable; import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -// TODO: inherit from simple network node container block entity -public abstract class AbstractInternalNetworkNodeContainerBlockEntity - extends AbstractNetworkNodeContainerBlockEntity - implements PlayerAware, ConfigurationCardTarget { - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInternalNetworkNodeContainerBlockEntity.class); - - private static final String TAG_REDSTONE_MODE = "rm"; - private static final String TAG_PLACED_BY_PLAYER_ID = "pbpid"; +public class NetworkNodeContainerBlockEntityImpl + extends AbstractNetworkNodeContainerBlockEntity { + private static final Logger LOGGER = LoggerFactory.getLogger(NetworkNodeContainerBlockEntityImpl.class); private final RateLimiter activenessChangeRateLimiter = RateLimiter.create(1); private boolean lastActive; - private RedstoneMode redstoneMode = RedstoneMode.IGNORE; - @Nullable - private UUID placedByPlayerId; - protected AbstractInternalNetworkNodeContainerBlockEntity(final BlockEntityType type, - final BlockPos pos, - final BlockState state, - final T node) { - super(type, pos, state, node); + public NetworkNodeContainerBlockEntityImpl(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final T networkNode) { + super(type, pos, state, networkNode); } - private boolean isActive() { + protected boolean isActive() { final long energyUsage = getNode().getEnergyUsage(); final boolean hasLevel = level != null && level.isLoaded(worldPosition); return hasLevel - && redstoneMode.isActive(level.hasNeighborSignal(worldPosition)) && getNode().getNetwork() != null && getNode().getNetwork().getComponent(EnergyNetworkComponent.class).getStored() >= energyUsage; } - @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); - writeConfiguration(tag); - if (placedByPlayerId != null) { - tag.putUUID(TAG_PLACED_BY_PLAYER_ID, placedByPlayerId); - } - } - - @Override - public void writeConfiguration(final CompoundTag tag) { - tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); - } - - @Override - public void load(final CompoundTag tag) { - super.load(tag); - readConfiguration(tag); - if (tag.hasUUID(TAG_PLACED_BY_PLAYER_ID)) { - placedByPlayerId = tag.getUUID(TAG_PLACED_BY_PLAYER_ID); - } - } - - @Override - public void readConfiguration(final CompoundTag tag) { - if (tag.contains(TAG_REDSTONE_MODE)) { - redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); - } - } - - @Override - public List getUpgradeItems() { - return Collections.emptyList(); - } - - @Override - public boolean addUpgradeItem(final Item upgradeItem) { - return false; - } - public void updateActiveness(final BlockState state, @Nullable final BooleanProperty activenessProperty) { final boolean newActive = isActive(); @@ -130,15 +71,6 @@ private void updateActivenessState(final BlockState state, } } - public RedstoneMode getRedstoneMode() { - return redstoneMode; - } - - public void setRedstoneMode(final RedstoneMode redstoneMode) { - this.redstoneMode = redstoneMode; - setChanged(); - } - public void doWork() { getNode().doWork(); } @@ -193,14 +125,4 @@ protected final Direction getDirection() { } return directionalBlock.extractDirection(blockState); } - - @Override - public void setPlacedBy(final UUID playerId) { - this.placedByPlayerId = playerId; - setChanged(); - } - - protected final Player getFakePlayer(final ServerLevel serverLevel) { - return Platform.INSTANCE.getFakePlayer(serverLevel, placedByPlayerId); - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java deleted file mode 100644 index c90e7ad4b..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SimpleNetworkNodeContainerBlockEntity.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; - -import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraft.world.level.block.state.BlockState; - -// TODO: fix inheritance (no need for RedstoneMode here!) -public final class SimpleNetworkNodeContainerBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity { - public SimpleNetworkNodeContainerBlockEntity(final BlockEntityType type, - final BlockPos pos, - final BlockState state, - final long energyUsage) { - super(type, pos, state, new SimpleNetworkNode(energyUsage)); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java index 4391e381e..d3ba29d42 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DetectorBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class DetectorBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(DetectorBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java index 625bcd74d..cbf9409ed 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; @@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractDiskDriveBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements BlockEntityWithDrops, MultiStorageListener, ExtendedMenuProvider { public static final int AMOUNT_OF_DISKS = 8; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java index d16595b60..37b7b9711 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; @@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory; public class ExternalStorageBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(ExternalStorageBlockEntity.class); private static final String TAG_TRACKED_RESOURCES = "tr"; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java index 0c252a86d..b56d17283 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java @@ -14,7 +14,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import java.util.List; @@ -25,7 +25,8 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public abstract class AbstractGridBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public abstract class AbstractGridBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements Grid, MenuProvider { protected AbstractGridBlockEntity(final BlockEntityType type, final BlockPos pos, @@ -55,7 +56,7 @@ public GridOperations createOperations(final PlatformStorageChannelType + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, BlockEntityWithDrops { private static final String TAG_EXPORT_ITEMS = "ei"; private static final int EXPORT_SLOTS = 9; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java index df47b9537..aaa2d791a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractStorageBlockBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity> + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity> implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractStorageBlockBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java index caee98062..19b42690d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java @@ -12,7 +12,7 @@ import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannel; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -42,7 +42,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class StorageMonitorBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class StorageMonitorBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(StorageMonitorBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java index a45aede31..6b2e78e1d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -29,7 +29,8 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; -public class WirelessTransmitterBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class WirelessTransmitterBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, WirelessTransmitter { private static final String TAG_UPGRADES = "u"; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java index f2e9a10fa..6fce3d6c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.block.ticker; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -14,7 +14,7 @@ public class NetworkNodeBlockEntityTicker< N extends AbstractNetworkNode, - T extends AbstractInternalNetworkNodeContainerBlockEntity + T extends NetworkNodeContainerBlockEntityImpl > extends AbstractBlockEntityTicker { @Nullable private final BooleanProperty activenessProperty; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java index 71f13a5c4..c77697a1e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java @@ -389,7 +389,7 @@ public void toggleStorageChannelType() { @Override public boolean onInsert(final GridInsertMode insertMode, final boolean tryAlternatives) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return insertionStrategy.onInsert(insertMode, tryAlternatives); @@ -400,7 +400,7 @@ public boolean onExtract(final PlatformStorageChannelType storageChannelT final T resource, final GridExtractMode extractMode, final boolean cursor) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return extractionStrategy.onExtract(storageChannelType, resource, extractMode, cursor); @@ -411,7 +411,7 @@ public boolean onScroll(final PlatformStorageChannelType storageChannelTy final T resource, final GridScrollMode scrollMode, final int slotIndex) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return scrollingStrategy.onScroll(storageChannelType, resource, scrollMode, slotIndex); @@ -424,7 +424,7 @@ public boolean onTransfer(final int slotIndex) { @Override public ItemStack quickMoveStack(final Player playerEntity, final int slotIndex) { - if (!playerEntity.level().isClientSide() && grid != null && grid.isActive()) { + if (!playerEntity.level().isClientSide() && grid != null && grid.isGridActive()) { final Slot slot = getSlot(slotIndex); if (slot.hasItem()) { insertionStrategy.onTransfer(slot.index); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index 65e74664d..f200fb29b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -1,8 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.content; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SimpleNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; @@ -31,7 +32,7 @@ public final class BlockEntities { public static final BlockEntities INSTANCE = new BlockEntities(); @Nullable - private Supplier> cable; + private Supplier>> cable; @Nullable private Supplier> diskDrive; @Nullable @@ -65,16 +66,18 @@ public final class BlockEntities { @Nullable private Supplier> storageMonitor; @Nullable - private Supplier> networkReceiver; + private Supplier>> networkReceiver; private BlockEntities() { } - public BlockEntityType getCable() { + public BlockEntityType> getCable() { return Objects.requireNonNull(cable).get(); } - public void setCable(final Supplier> supplier) { + public void setCable( + final Supplier>> supplier + ) { this.cable = supplier; } @@ -208,11 +211,13 @@ public void setStorageMonitor(final Supplier getNetworkReceiver() { + public BlockEntityType> getNetworkReceiver() { return Objects.requireNonNull(networkReceiver).get(); } - public void setNetworkReceiver(final Supplier> supplier) { + public void setNetworkReceiver( + final Supplier>> supplier + ) { this.networkReceiver = supplier; } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java index c624df9ba..0090b8c2e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java @@ -57,7 +57,7 @@ public Storage getItemStorage() { } @Override - public boolean isActive() { + public boolean isGridActive() { final boolean networkActive = session.resolveNetwork().map( network -> network.getComponent(EnergyNetworkComponent.class).getStored() > 0 ).orElse(false); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java index 364ec831b..a8e97e1b1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java @@ -34,7 +34,7 @@ public GridExtendedMenuProvider(final Grid grid, @Override public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { - buf.writeBoolean(grid.isActive()); + buf.writeBoolean(grid.isGridActive()); final List> types = storageChannelTypeRegistry.getAll(); buf.writeInt(types.size()); types.forEach(type -> writeStorageChannel(type, buf)); From a9edf42c945635673b625b8e9e733f324c158220 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 31 Oct 2023 22:04:00 +0100 Subject: [PATCH 06/24] refactor: partition by feature --- .../platform/api/PlatformApi.java | 54 +++--- .../platform/api/PlatformApiProxy.java | 54 +++--- .../wirelesstransmitter/package-info.java | 7 - .../ConfigurationCardTarget.java | 5 +- .../api/configurationcard/package-info.java | 7 + .../ConstructorStrategy.java | 2 +- .../ConstructorStrategyFactory.java | 2 +- .../DestructorStrategy.java | 2 +- .../DestructorStrategyFactory.java | 2 +- .../package-info.java | 2 +- .../node => }/exporter/AmountOverride.java | 2 +- .../ExporterTransferStrategyFactory.java | 2 +- .../{registry => exporter}/package-info.java | 2 +- .../platform/api/grid/Grid.java | 2 +- .../GridExtractionStrategy.java | 2 +- .../GridExtractionStrategyFactory.java | 4 +- .../{ => strategy}/GridInsertionStrategy.java | 2 +- .../GridInsertionStrategyFactory.java | 4 +- .../{ => strategy}/GridScrollingStrategy.java | 3 +- .../GridScrollingStrategyFactory.java | 4 +- .../api/grid/strategy/package-info.java | 7 + .../AbstractPlatformGridResource.java | 2 +- .../grid/{ => view}/PlatformGridResource.java | 5 +- .../platform/api/grid/view/package-info.java | 7 + .../ImporterTransferStrategyFactory.java | 4 +- .../{resource => importer}/package-info.java | 2 +- .../network/node/exporter/package-info.java | 7 - .../node/externalstorage/package-info.java | 7 - .../network/node/importer/package-info.java | 7 - .../api/network/node/package-info.java | 7 - .../recipemod/IngredientConverter.java | 2 +- .../platform/api/recipemod/package-info.java | 7 + .../api/resource/list/package-info.java | 7 - .../AbstractStorageContainerBlockItem.java | 4 +- .../AbstractStorageContainerItem.java | 3 +- .../api/storage/SerializableStorage.java | 2 - .../StorageContainerItem.java | 3 +- .../StorageContainerItemHelper.java | 3 +- .../api/storage/{type => }/StorageType.java | 2 +- .../channel/FuzzyStorageChannelImpl.java | 4 +- ...latformExternalStorageProviderFactory.java | 2 +- .../externalstorage}/package-info.java | 2 +- .../api/storage/type/package-info.java | 7 - .../StorageMonitorExtractionStrategy.java | 2 +- .../StorageMonitorInsertionStrategy.java | 2 +- .../api/storagemonitor/package-info.java | 7 + ...stractNetworkNodeContainerBlockEntity.java | 3 +- .../{util => support}/AmountFormatting.java | 2 +- .../HelpTooltipComponent.java | 2 +- .../PlatformNetworkNodeContainer.java | 2 +- .../energy}/AbstractEnergyBlockItem.java | 2 +- .../energy}/AbstractEnergyItem.java | 2 +- .../AbstractNetworkBoundEnergyItem.java | 5 +- .../energy}/EnergyBlockEntity.java | 2 +- .../{item => support/energy}/EnergyItem.java | 2 +- .../energy}/EnergyItemHelper.java | 2 +- .../api/support/energy/package-info.java | 7 + .../NetworkBoundItemHelper.java | 2 +- .../NetworkBoundItemSession.java | 2 +- .../networkbounditem}/SlotReference.java | 2 +- .../SlotReferenceFactory.java | 2 +- .../SlotReferenceProvider.java | 2 +- .../networkbounditem/package-info.java | 7 + .../platform/api/support}/package-info.java | 2 +- .../registry/PlatformRegistry.java | 2 +- .../api/support/registry/package-info.java | 7 + .../{ => support}/resource/FluidResource.java | 2 +- .../resource/FuzzyModeNormalizer.java | 2 +- .../{ => support}/resource/ItemResource.java | 2 +- .../resource/ResourceAmountTemplate.java | 2 +- .../resource/ResourceContainer.java | 2 +- .../resource/ResourceContainerType.java | 2 +- .../resource/ResourceFactory.java | 2 +- .../resource/ResourceRendering.java | 2 +- .../resource/list/FuzzyResourceList.java | 4 +- .../resource/list/FuzzyResourceListImpl.java | 4 +- .../support/resource/list/package-info.java | 7 + .../api/support/resource/package-info.java | 7 + .../AbstractUpgradeItem.java | 6 +- .../WirelessTransmitter.java | 2 +- .../WirelessTransmitterRangeModifier.java | 2 +- .../api/wirelesstransmitter/package-info.java | 7 + .../AmountFormattingTest.java | 2 +- .../resource/FluidResourceTest.java | 2 +- .../resource/ItemResourceTest.java | 2 +- .../list/FuzzyResourceListImplTest.java | 4 +- .../common/AbstractClientModInitializer.java | 46 +++--- .../common/AbstractModInitializer.java | 154 +++++++++--------- .../platform/common/AbstractPlatform.java | 10 +- .../platform/common/Config.java | 6 +- .../platform/common/ContainedFluid.java | 2 +- .../platform/common/Platform.java | 16 +- .../platform/common/PlatformApiImpl.java | 110 ++++++------- .../platform/common/PlatformProxy.java | 16 +- .../common/block/CableShapeCacheKey.java | 23 --- .../platform/common/block/ControllerType.java | 6 - .../common/block/direction/package-info.java | 7 - .../entity/constructor/package-info.java | 7 - .../block/entity/destructor/package-info.java | 7 - .../block/entity/detector/package-info.java | 7 - .../block/entity/diskdrive/package-info.java | 7 - .../block/entity/exporter/package-info.java | 7 - .../entity/externalstorage/package-info.java | 7 - .../block/entity/grid/package-info.java | 7 - .../block/entity/iface/package-info.java | 7 - .../common/block/entity/package-info.java | 7 - .../block/entity/storage/package-info.java | 7 - .../entity/storagemonitor/package-info.java | 7 - .../wirelesstransmitter/package-info.java | 7 - .../common/block/grid/package-info.java | 7 - .../platform/common/block/package-info.java | 7 - .../common/block/ticker/package-info.java | 7 - .../ConfigurationCardItem.java | 6 +- ...ConfigurationCardItemPropertyFunction.java | 4 +- .../configurationcard/package-info.java | 7 + .../AbstractConstructorDestructorBlock.java | 8 +- .../AbstractItemConstructorStrategy.java | 8 +- .../BlockBreakDestructorStrategy.java | 8 +- .../BlockBreakDestructorStrategyFactory.java | 6 +- .../CompositeConstructorStrategy.java | 4 +- .../CompositeDestructorStrategy.java | 4 +- .../ConstructorBlock.java | 8 +- .../ConstructorBlockEntity.java | 11 +- .../ConstructorContainerMenu.java | 16 +- .../ConstructorDropItemsSideButtonWidget.java | 5 +- .../ConstructorScreen.java | 11 +- .../DestructorBlock.java | 8 +- .../DestructorBlockEntity.java | 17 +- .../DestructorContainerMenu.java | 18 +- ...DestructorPickupItemsSideButtonWidget.java | 5 +- .../DestructorScreen.java | 9 +- .../FluidBreakDestructorStrategy.java | 8 +- .../FluidBreakDestructorStrategyFactory.java | 6 +- .../ItemDropConstructorStrategy.java | 4 +- .../ItemDropConstructorStrategyFactory.java | 6 +- .../ItemPickupDestructorStrategy.java | 8 +- .../ItemPickupDestructorStrategyFactory.java | 6 +- .../PlaceBlockConstructorStrategy.java | 4 +- .../PlaceFireworksConstructorStrategy.java | 4 +- .../PlaceFluidConstructorStrategy.java | 8 +- .../constructordestructor/package-info.java | 7 + .../containermenu/detector/package-info.java | 7 - .../containermenu/grid/package-info.java | 7 - .../common/containermenu/package-info.java | 7 - .../containermenu/property/package-info.java | 7 - .../containermenu/slot/package-info.java | 7 - .../storage/block/package-info.java | 7 - .../storage/diskdrive/package-info.java | 7 - .../containermenu/storage/package-info.java | 7 - .../containermenu/transfer/package-info.java | 7 - .../common/content/BlockColorMap.java | 2 +- .../{block => content}/BlockConstants.java | 2 +- .../common/content/BlockEntities.java | 36 ++-- .../platform/common/content/Blocks.java | 44 ++--- .../platform/common/content/ContentIds.java | 6 +- .../common/content/CreativeModeTabItems.java | 8 +- .../platform/common/content/Items.java | 10 +- .../platform/common/content/Menus.java | 34 ++-- .../ControllerBlock.java | 10 +- .../ControllerBlockEntity.java | 14 +- .../ControllerBlockEntityTicker.java | 4 +- .../ControllerBlockItem.java | 6 +- .../ControllerContainerMenu.java | 12 +- .../ControllerEnergyType.java | 2 +- .../ControllerModelPredicateProvider.java | 2 +- .../ControllerScreen.java | 10 +- .../common/controller/ControllerType.java | 6 + .../CreativeControllerBlockItem.java | 4 +- .../common/controller/package-info.java | 7 + .../detector/DetectorAmount.java | 2 +- .../{block => detector}/DetectorBlock.java | 17 +- .../detector/DetectorBlockEntity.java | 18 +- .../detector/DetectorContainerMenu.java | 13 +- .../detector/DetectorModeSettings.java | 2 +- .../DetectorModeSideButtonWidget.java | 5 +- .../amount => detector}/DetectorScreen.java | 9 +- .../detector/FuzzyDetectorAmountStrategy.java | 2 +- .../common/detector}/package-info.java | 2 +- ...AbstractFuzzyExporterTransferStrategy.java | 2 +- .../{block => exporter}/ExporterBlock.java | 13 +- .../exporter/ExporterBlockEntity.java | 11 +- .../ExporterContainerMenu.java | 10 +- .../{screen => exporter}/ExporterScreen.java | 10 +- .../common/exporter}/package-info.java | 2 +- .../{block => }/grid/AbstractGridBlock.java | 18 +- .../grid/AbstractGridBlockEntity.java | 8 +- .../grid/AbstractGridContainerMenu.java | 24 ++- .../grid/AbstractGridSynchronizer.java | 4 +- .../grid/ClientCraftingGridSource.java | 5 +- .../{block => }/grid/CraftingGridBlock.java | 11 +- .../grid/CraftingGridBlockEntity.java | 8 +- .../grid/CraftingGridContainerMenu.java | 15 +- .../grid/CraftingGridMatrixCloseBehavior.java | 2 +- .../grid/CraftingGridRefillContext.java | 4 +- .../grid/CraftingGridRefillContextImpl.java | 5 +- .../grid/CraftingGridResultSlot.java | 5 +- .../grid/CraftingGridSource.java | 5 +- .../grid/CraftingGridSourceImpl.java | 8 +- .../entity => }/grid/CraftingMatrix.java | 2 +- .../grid/CraftingMatrixContainerMenu.java | 2 +- .../common/{block => }/grid/GridBlock.java | 11 +- .../entity => }/grid/GridBlockEntity.java | 4 +- .../grid/GridContainerMenu.java | 11 +- .../GridExtendedMenuProvider.java | 5 +- .../common/{internal => }/grid/GridSize.java | 2 +- .../{internal => }/grid/GridSortingTypes.java | 4 +- .../grid/NoOpGridSynchronizer.java | 2 +- .../SnapshotCraftingGridRefillContext.java | 6 +- .../{internal => }/grid/WirelessGrid.java | 8 +- .../grid/WirelessGridContainerMenu.java | 4 +- .../WirelessGridExtendedMenuProvider.java | 7 +- .../{item => grid}/WirelessGridItem.java | 10 +- .../grid/WirelessGridOperations.java | 4 +- .../platform/common/grid}/package-info.java | 2 +- .../screen}/AbstractGridScreen.java | 28 ++-- .../screen}/AutoSelectedSideButtonWidget.java | 6 +- .../screen}/CraftingGridScreen.java | 6 +- .../grid => grid/screen}/GridScreen.java | 4 +- .../grid => grid/screen}/GridSearchBox.java | 2 +- .../screen}/GridSearchBoxWidget.java | 6 +- .../grid => grid/screen}/LastModified.java | 2 +- .../screen}/SizeSideButtonWidget.java | 6 +- .../SortingDirectionSideButtonWidget.java | 6 +- .../screen}/SortingTypeSideButtonWidget.java | 8 +- .../StorageChannelTypeSideButtonWidget.java | 8 +- .../SynchronizationSideButtonWidget.java | 6 +- .../screen}/hint/FluidGridInsertionHint.java | 4 +- .../screen}/hint/GridInsertionHintsImpl.java | 2 +- .../screen}/hint/ItemGridInsertionHint.java | 6 +- .../hint/SingleItemGridInsertionHint.java | 4 +- .../common/grid/screen/hint/package-info.java | 7 + .../common/grid/screen/package-info.java | 7 + .../ClientGridExtractionStrategy.java | 4 +- .../ClientGridInsertionStrategy.java | 4 +- .../ClientGridScrollingStrategy.java | 4 +- .../CompositeGridExtractionStrategy.java | 4 +- .../CompositeGridInsertionStrategy.java | 4 +- .../CompositeGridScrollingStrategy.java | 4 +- .../common/grid/strategy/package-info.java | 7 + .../AbstractFluidGridResourceFactory.java | 4 +- .../view/AbstractItemGridResourceFactory.java | 4 +- .../view/CompositeGridResourceFactory.java | 4 +- .../grid/view/FluidGridResource.java | 14 +- .../grid/view/ItemGridResource.java | 16 +- .../common/grid/view/package-info.java | 7 + .../iface/ExportedResourcesContainer.java | 12 +- .../{block => iface}/InterfaceBlock.java | 11 +- .../iface/InterfaceBlockEntity.java | 17 +- .../InterfaceContainerMenu.java | 18 +- ...latformExternalStorageProviderFactory.java | 5 +- ...InterfaceProxyExternalStorageProvider.java | 5 +- .../{screen => iface}/InterfaceScreen.java | 10 +- .../platform/common/iface/package-info.java | 7 + .../{block => importer}/ImporterBlock.java | 13 +- .../ImporterBlockEntity.java | 16 +- .../ImporterContainerMenu.java | 18 +- .../{screen => importer}/ImporterScreen.java | 10 +- .../common/importer/package-info.java | 7 + .../common/integration/package-info.java | 7 - .../recipemod/jei/package-info.java | 7 - .../integration/recipemod/package-info.java | 7 - .../common/internal/energy/package-info.java | 7 - .../common/internal/grid/package-info.java | 7 - .../internal/grid/view/package-info.java | 7 - .../common/internal/item/package-info.java | 7 - .../iface/externalstorage/package-info.java | 7 - .../internal/network/node/package-info.java | 7 - .../common/internal/network/package-info.java | 7 - .../internal/registry/package-info.java | 7 - .../internal/resource/package-info.java | 7 - .../storage/channel/package-info.java | 7 - .../common/internal/storage/package-info.java | 7 - .../internal/storage/type/package-info.java | 7 - .../common/internal/upgrade/package-info.java | 7 - .../common/item/block/package-info.java | 7 - .../platform/common/loot/package-info.java | 7 - .../platform/common/menu/package-info.java | 7 - .../common/{item => misc}/ProcessorItem.java | 2 +- .../common/{item => misc}/WrenchItem.java | 4 +- .../platform/common/misc}/package-info.java | 2 +- .../{block => networking}/CableBlock.java | 13 +- .../common/networking/CableShapeCacheKey.java | 23 +++ .../NetworkReceiverBlock.java | 10 +- .../common/networking/package-info.java | 7 + .../platform/common/packet/package-info.java | 7 - .../platform/common/recipe/package-info.java | 7 - .../CompositeIngredientConverter.java | 4 +- .../recipemod/jei/ClickableIngredient.java | 2 +- .../CraftingGridRecipeTransferHandler.java | 6 +- .../ExclusionZonesGuiContainerHandler.java | 4 +- .../recipemod/jei/GhostIngredientHandler.java | 10 +- .../jei/GridGuiContainerHandler.java | 6 +- .../jei/GridResourceIngredientConverter.java | 8 +- .../recipemod/jei/JeiGridSynchronizer.java | 4 +- .../recipemod/jei/JeiProxy.java | 2 +- .../jei/MissingItemRecipeTransferError.java | 2 +- .../jei/RefinedStorageJeiModPlugin.java | 8 +- .../jei/ResourceGuiContainerHandler.java | 6 +- .../jei/ResourceIngredientConverter.java | 10 +- .../common/recipemod/jei/package-info.java | 7 + .../common/recipemod/package-info.java | 7 + .../common/render/entity/package-info.java | 7 - .../common/render/model/package-info.java | 7 - .../platform/common/render/package-info.java | 7 - .../common/screen/TooltipRenderer.java | 11 -- .../common/screen/amount/package-info.java | 7 - .../common/screen/grid/hint/package-info.java | 8 - .../common/screen/grid/package-info.java | 7 - .../platform/common/screen/package-info.java | 7 - .../common/screen/tooltip/package-info.java | 7 - .../common/screen/widget/package-info.java | 7 - .../storage/AbstractStorageContainerMenu.java | 12 +- .../AbstractStorageScreen.java | 22 +-- .../AccessModeSettings.java | 2 +- .../AccessModeSideButtonWidget.java | 5 +- ...ucketPlayerInventoryInsertableStorage.java | 6 +- .../storage/ClientStorageRepository.java | 2 +- .../type => storage}/FluidStorageType.java | 8 +- .../type => storage}/ItemStorageType.java | 8 +- .../storage/LimitedPlatformStorage.java | 4 +- .../storage/PlatformStorage.java | 4 +- .../PrioritySideButtonWidget.java | 7 +- .../storage/StorageAccessor.java | 2 +- .../StorageConfigurationContainer.java | 4 +- .../StorageConfigurationContainerImpl.java | 7 +- .../StorageContainerItemHelperImpl.java | 5 +- .../storage/StorageRepositoryImpl.java | 6 +- .../storage/StorageTooltipHelper.java | 2 +- .../type => storage}/StorageTypes.java | 2 +- .../channel/FluidStorageChannelType.java | 12 +- .../channel/ItemStorageChannelType.java | 12 +- .../storage/channel/StorageChannelTypes.java | 6 +- .../common/storage/channel/package-info.java | 7 + .../AbstractDiskDriveBlockEntity.java | 16 +- .../AbstractDiskDriveBlockEntityRenderer.java | 8 +- .../diskdrive}/DiskDriveBlock.java | 16 +- .../DiskDriveBlockEntityTicker.java | 4 +- .../diskdrive/DiskDriveContainerMenu.java | 19 +-- .../diskdrive/DiskDriveInventory.java | 4 +- .../diskdrive}/DiskDriveScreen.java | 4 +- .../EmptyStorageDiskInfoAccessor.java | 2 +- .../diskdrive/StorageDiskInfoAccessor.java | 2 +- .../StorageDiskInfoAccessorImpl.java | 4 +- .../storage/diskdrive/package-info.java | 7 + .../ExternalStorageBlock.java | 13 +- .../ExternalStorageBlockEntity.java | 15 +- .../ExternalStorageContainerMenu.java | 10 +- .../ExternalStorageScreen.java | 15 +- ...ternalStorageTrackedStorageRepository.java | 4 +- ...orageTrackedStorageRepositoryProvider.java | 4 +- .../ExternalStorageWorkRate.java} | 4 +- .../externalstorage}/package-info.java | 2 +- .../common/storage}/package-info.java | 2 +- .../storageblock}/AbstractStorageBlock.java | 6 +- .../AbstractStorageBlockBlockEntity.java | 16 +- .../AbstractStorageBlockContainerMenu.java | 16 +- .../AbstractStorageBlockScreen.java | 4 +- .../storageblock}/FluidStorageBlock.java | 8 +- .../FluidStorageBlockBlockEntity.java | 11 +- .../FluidStorageBlockBlockItem.java | 7 +- .../FluidStorageBlockContainerMenu.java | 6 +- .../FluidStorageBlockScreen.java | 3 +- .../storageblock}/ItemStorageBlock.java | 8 +- .../ItemStorageBlockBlockEntity.java | 11 +- .../ItemStorageBlockBlockItem.java | 9 +- .../ItemStorageBlockContainerMenu.java | 6 +- .../storageblock}/ItemStorageBlockScreen.java | 4 +- .../StorageBlockLootItemFunction.java | 3 +- ...torageBlockLootItemFunctionSerializer.java | 2 +- .../storage/storageblock/package-info.java | 7 + .../storagedisk}/FluidStorageDiskItem.java | 12 +- .../storagedisk}/ItemStorageDiskItem.java | 14 +- .../storage/storagedisk}/package-info.java | 2 +- ...ositeStorageMonitorExtractionStrategy.java | 4 +- ...positeStorageMonitorInsertionStrategy.java | 4 +- ...FluidStorageMonitorExtractionStrategy.java | 10 +- .../FluidStorageMonitorInsertionStrategy.java | 8 +- .../storagemonitor/InsertTracker.java | 4 +- .../ItemStorageMonitorExtractionStrategy.java | 8 +- .../ItemStorageMonitorInsertionStrategy.java | 8 +- .../StorageMonitorBlock.java | 15 +- .../StorageMonitorBlockEntity.java | 17 +- .../StorageMonitorBlockEntityRenderer.java | 12 +- .../StorageMonitorContainerMenu.java | 18 +- .../StorageMonitorScreen.java | 10 +- .../common/storagemonitor/package-info.java | 7 + .../{block => support}/AbstractBaseBlock.java | 4 +- .../AbstractBaseContainerMenu.java | 16 +- .../AbstractBaseScreen.java | 26 +-- .../AbstractBlockEntityTicker.java | 2 +- .../AbstractColoredBlock.java | 4 +- .../AbstractDirectionalBlock.java | 4 +- .../AbstractDirectionalCableBlock.java | 8 +- .../AbstractFilterScreen.java | 7 +- ...actingNetworkNodeContainerBlockEntity.java | 2 +- ...neModeNetworkNodeContainerBlockEntity.java | 5 +- ...dulingNetworkNodeContainerBlockEntity.java | 8 +- ...deableNetworkNodeContainerBlockEntity.java | 5 +- .../BlockEntityWithDrops.java | 2 +- .../{block => support}/BlockItemProvider.java | 2 +- .../{block => support}/CableBlockSupport.java | 13 +- .../ClientToServerCommunications.java | 8 +- .../{block => support}/ColorableBlock.java | 2 +- .../DirectionalCableBlockShapes.java | 58 +++---- .../FilterModeSettings.java | 2 +- .../FilterWithFuzzyMode.java | 6 +- .../LevelConnectionProvider.java | 4 +- .../block => support}/NamedBlockItem.java | 4 +- .../NetworkNodeBlockEntityTicker.java | 3 +- .../NetworkNodeContainerBlockEntityImpl.java | 6 +- .../entity => support}/PlayerAware.java | 2 +- .../{util => support}/RedstoneMode.java | 2 +- .../RedstoneModeSettings.java | 4 +- .../entity => support}/SchedulingMode.java | 2 +- .../SchedulingModeType.java | 2 +- .../ServerToClientCommunications.java | 4 +- .../{block => support}/SimpleBlock.java | 4 +- .../block => support}/SimpleBlockItem.java | 4 +- .../common/{item => support}/SimpleItem.java | 2 +- .../{screen => support}/TextureIds.java | 2 +- .../amount/AbstractAmountScreen.java | 4 +- .../amount/AbstractSingleAmountScreen.java | 4 +- .../amount/AmountOperations.java | 2 +- .../amount/AmountScreenConfiguration.java | 2 +- .../amount/DoubleAmountOperations.java | 2 +- .../amount/IntegerAmountOperations.java | 2 +- .../amount/LongAmountOperations.java | 2 +- .../amount/PriorityScreen.java | 4 +- .../amount/ResourceAmountScreen.java | 6 +- .../common/support/amount/package-info.java | 7 + .../AbstractResourceContainerMenu.java | 6 +- .../AbstractSchedulingContainerMenu.java | 17 +- .../AbstractSimpleFilterContainerMenu.java | 13 +- .../AbstractSingleAmountContainerMenu.java | 9 +- .../containermenu}/ClientProperty.java | 2 +- .../containermenu}/DisabledSlot.java | 2 +- .../containermenu}/ExtendedMenuProvider.java | 2 +- .../containermenu}/MenuOpener.java | 2 +- .../containermenu}/Property.java | 2 +- .../containermenu}/PropertyType.java | 2 +- .../containermenu}/PropertyTypes.java | 14 +- .../ResourceInventoryDestination.java | 4 +- .../containermenu}/ResourceSlot.java | 10 +- .../containermenu}/ServerProperty.java | 2 +- .../containermenu}/TransferDestination.java | 2 +- .../containermenu}/TransferManager.java | 4 +- .../containermenu}/ValidatedSlot.java | 2 +- .../support/containermenu/package-info.java | 7 + .../direction}/BiDirection.java | 2 +- .../direction/BiDirectionType.java | 4 +- .../direction/DirectionType.java | 2 +- .../direction/DirectionTypeImpl.java | 2 +- .../support/direction/package-info.java | 7 + .../energy}/BlockEntityEnergyStorage.java | 2 +- .../energy/CreativeEnergyStorage.java | 2 +- .../energy}/EnergyItemHelperImpl.java | 8 +- .../energy}/EnergyLootItemFunction.java | 4 +- .../EnergyLootItemFunctionSerializer.java | 2 +- .../energy/ItemEnergyStorage.java | 2 +- .../common/support}/energy/package-info.java | 2 +- .../CompositeSlotReferenceProvider.java | 6 +- .../InventorySlotReference.java | 6 +- .../InventorySlotReferenceFactory.java | 6 +- .../InventorySlotReferenceProvider.java | 6 +- .../NetworkBoundItemHelperImpl.java | 12 +- ...NetworkBoundItemItemPropertyFunction.java} | 6 +- .../NetworkBoundItemSessionImpl.java | 10 +- .../networkbounditem/package-info.java | 7 + .../platform/common/support/package-info.java | 7 + .../registry/PlatformRegistryImpl.java | 4 +- .../common/support/registry/package-info.java | 7 + .../render}/AbstractFluidRenderer.java | 4 +- .../{ => support}/render/CubeBuilder.java | 2 +- .../{ => support}/render/FluidRenderer.java | 4 +- .../common/support/render/package-info.java | 7 + ...ractResourceContainerContainerAdapter.java | 10 +- .../resource/FluidResourceFactory.java | 10 +- .../resource/FluidResourceRendering.java | 6 +- .../resource/ItemResourceFactory.java | 10 +- .../resource/ItemResourceRendering.java | 8 +- .../resource/ResourceContainerImpl.java | 10 +- .../common/support/resource/package-info.java | 7 + .../CompositeClientTooltipComponent.java | 2 +- .../tooltip/HelpClientTooltipComponent.java | 4 +- .../MouseWithIconClientTooltipComponent.java | 4 +- .../ResourceClientTooltipComponent.java | 6 +- .../tooltip/SmallText.java | 2 +- .../SmallTextClientTooltipComponent.java | 2 +- .../common/support/tooltip/package-info.java | 7 + .../widget/AbstractSideButtonWidget.java | 8 +- .../widget/AbstractYesNoSideButtonWidget.java | 4 +- .../widget/FilterModeSideButtonWidget.java | 4 +- .../widget/FuzzyModeSideButtonWidget.java | 4 +- .../{screen => support}/widget/History.java | 2 +- .../widget/ProgressWidget.java | 2 +- .../widget/RedstoneModeSideButtonWidget.java | 6 +- .../SchedulingModeSideButtonWidget.java | 6 +- .../widget/ScrollbarWidget.java | 2 +- .../widget/SearchFieldWidget.java | 2 +- .../common/support/widget/package-info.java | 7 + .../BuiltinUpgradeDestinationsImpl.java | 2 +- .../{item => upgrade}/FortuneUpgradeItem.java | 4 +- .../{item => upgrade}/RangeUpgradeItem.java | 4 +- .../RegulatorUpgradeContainerMenu.java | 7 +- .../RegulatorUpgradeItem.java | 17 +- .../RegulatorUpgradeScreen.java | 5 +- .../{item => upgrade}/SimpleUpgradeItem.java | 4 +- .../entity => upgrade}/UpgradeContainer.java | 3 +- ...radeDestinationClientTooltipComponent.java | 2 +- .../upgrade/UpgradeDestinations.java | 2 +- .../UpgradeItemClientTooltipComponent.java | 2 +- .../upgrade/UpgradeRegistryImpl.java | 2 +- .../slot => upgrade}/UpgradeSlot.java | 3 +- .../UpgradeWithEnchantedBookRecipe.java | 2 +- ...radeWithEnchantedBookRecipeSerializer.java | 2 +- .../platform/common/upgrade/package-info.java | 7 + .../common/util/BucketAmountFormatting.java | 2 +- .../platform/common/util/IdentifierUtil.java | 2 +- .../platform/common/util/PacketUtil.java | 4 +- .../BaseWirelessTransmitterRangeModifier.java | 4 +- ...ositeWirelessTransmitterRangeModifier.java | 4 +- ...gradeWirelessTransmitterRangeModifier.java | 4 +- ...gradeWirelessTransmitterRangeModifier.java | 4 +- .../WirelessTransmitterBlock.java | 17 +- .../WirelessTransmitterBlockEntity.java | 13 +- .../WirelessTransmitterContainerMenu.java | 18 +- .../WirelessTransmitterScreen.java | 8 +- .../wirelesstransmitter/package-info.java | 7 + .../platform/common/PlatformTestFixtures.java | 8 +- .../platform/common/SimpleListener.java | 4 - .../grid/GridSortingTypesTest.java | 6 +- .../screen}/LastModifiedTest.java | 2 +- .../storage/ClientStorageRepositoryTest.java | 2 +- .../FluidStorageTypeTest.java | 6 +- .../type => storage}/ItemStorageTypeTest.java | 6 +- .../storage/LimitedPlatformStorageTest.java | 5 +- .../storage/PlatformStorageTest.java | 5 +- .../storage/StorageRepositoryImplTest.java | 5 +- .../registry/PlatformRegistryImplTest.java | 4 +- .../widget/HistoryTest.java | 2 +- .../fabric/ClientModInitializerImpl.java | 44 ++--- .../platform/fabric/ConfigImpl.java | 6 +- .../platform/fabric/ModInitializerImpl.java | 48 +++--- .../platform/fabric/PlatformImpl.java | 26 +-- .../fabric/block/entity/package-info.java | 7 - .../fabric/containermenu/package-info.java | 7 - ...torageExporterTransferStrategyFactory.java | 10 +- .../fabric/exporter/package-info.java | 7 + .../FluidGridExtractionStrategy.java | 12 +- .../strategy}/FluidGridInsertionStrategy.java | 12 +- .../strategy}/ItemGridExtractionStrategy.java | 10 +- .../strategy}/ItemGridInsertionStrategy.java | 12 +- .../strategy}/ItemGridScrollingStrategy.java | 10 +- .../fabric/grid/strategy/package-info.java | 7 + .../view/FabricFluidGridResourceFactory.java | 8 +- .../view/FabricItemGridResourceFactory.java | 4 +- .../fabric/grid/view/package-info.java | 7 + .../importer/StorageImporterSource.java | 8 +- ...torageImporterTransferStrategyFactory.java | 6 +- .../fabric/importer/package-info.java | 7 + .../fabric/integration/package-info.java | 7 - .../integration/recipemod/package-info.java | 7 - .../recipemod/rei/package-info.java | 7 - .../integration/trinkets/package-info.java | 7 - .../fabric/internal/energy/package-info.java | 7 - .../fabric/internal/grid/package-info.java | 7 - .../internal/grid/view/package-info.java | 7 - .../network/node/exporter/package-info.java | 7 - .../node/externalstorage/package-info.java | 7 - .../network/node/importer/package-info.java | 7 - .../fabric/internal/storage/package-info.java | 7 - .../platform/fabric/menu/package-info.java | 7 - .../mixin/AbstractModelBakerImplMixin.java | 2 +- .../ModMenuApiImpl.java} | 4 +- .../platform/fabric/modmenu/package-info.java | 7 + .../c2s/ClientToServerCommunicationsImpl.java | 8 +- .../packet/c2s/CraftingGridClearPacket.java | 2 +- .../c2s/CraftingGridRecipeTransferPacket.java | 4 +- .../fabric/packet/c2s/GridExtractPacket.java | 2 +- .../fabric/packet/c2s/GridInsertPacket.java | 2 +- .../fabric/packet/c2s/GridScrollPacket.java | 2 +- .../packet/c2s/PropertyChangePacket.java | 2 +- .../c2s/ResourceFilterSlotChangePacket.java | 2 +- .../c2s/ResourceSlotAmountChangePacket.java | 2 +- .../packet/c2s/ResourceSlotChangePacket.java | 2 +- .../packet/c2s/SingleAmountChangePacket.java | 2 +- .../packet/c2s/UseNetworkBoundItemPacket.java | 6 +- .../s2c/ControllerEnergyInfoPacket.java | 2 +- .../fabric/packet/s2c/GridClearPacket.java | 2 +- .../fabric/packet/s2c/GridUpdatePacket.java | 2 +- .../packet/s2c/ResourceSlotUpdatePacket.java | 4 +- .../s2c/ServerToClientCommunicationsImpl.java | 4 +- .../packet/s2c/StorageInfoResponsePacket.java | 2 +- .../s2c/WirelessTransmitterRangePacket.java | 2 +- .../rei/CraftingGridTransferHandler.java | 6 +- .../rei/DraggableStackVisitorImpl.java | 10 +- .../rei/ExclusionZonesProviderImpl.java | 4 +- .../rei/GridFocusedStackProvider.java | 6 +- .../rei/GridResourceIngredientConverter.java | 8 +- .../recipemod/rei/MissingIngredients.java | 2 +- .../rei/RefinedStorageREIClientPlugin.java | 10 +- .../recipemod/rei/ReiGridSynchronizer.java | 4 +- .../fabric}/recipemod/rei/ReiProxy.java | 2 +- .../rei/ResourceFocusedStackProvider.java | 6 +- .../rei/ResourceIngredientConverter.java | 10 +- .../fabric/recipemod/rei/package-info.java | 7 + .../fabric/render/entity/package-info.java | 7 - .../render/model/baked/package-info.java | 7 - .../model/baked/transform/package-info.java | 7 - .../fabric/render/model/package-info.java | 7 - .../platform/fabric/render/package-info.java | 7 - .../storage/StorageExtractableStorage.java | 5 +- .../storage/StorageInsertableStorage.java | 5 +- .../diskdrive}/DiskDriveBakedModel.java | 12 +- .../DiskDriveBlockEntityRendererImpl.java | 7 +- .../diskdrive}/DiskDriveUnbakedModel.java | 4 +- .../FabricDiskDriveBlockEntity.java | 4 +- .../storage/diskdrive/package-info.java | 7 + .../StorageExternalStorageProvider.java | 8 +- ...latformExternalStorageProviderFactory.java | 4 +- .../storage/externalstorage/package-info.java | 7 + .../platform/fabric/storage/package-info.java | 7 + .../ContainerTransferDestination.java | 4 +- .../FabricExtendedMenuProviderAdapter.java | 4 +- .../containermenu}/MenuOpenerImpl.java | 6 +- .../support/containermenu/package-info.java | 7 + .../energy/EnergyStorageAdapter.java | 2 +- .../fabric/support/energy/package-info.java | 7 + .../TrinketsSlotReference.java | 6 +- .../TrinketsSlotReferenceFactory.java | 6 +- .../TrinketsSlotReferenceProvider.java | 6 +- .../networkbounditem/package-info.java | 7 + .../render/FluidVariantFluidRenderer.java | 8 +- .../render/model}/EmissiveBakedModel.java | 4 +- .../render/model/EmissiveModelRegistry.java | 4 +- .../render/model}/EmissiveTransform.java | 2 +- .../render/model}/QuadRotator.java | 4 +- .../render/model}/QuadTranslator.java | 2 +- .../support/render/model/package-info.java | 7 + .../fabric/support/render/package-info.java | 7 + .../ResourceContainerFluidStorageAdapter.java | 14 +- .../resource}/VariantUtil.java | 6 +- .../fabric/support/resource/package-info.java | 7 + .../storage => util}/FabricStorageUtil.java | 6 +- .../src/main/resources/fabric.mod.json | 6 +- .../platform/forge/ClientModInitializer.java | 42 ++--- .../platform/forge/ConfigImpl.java | 6 +- .../platform/forge/ModInitializer.java | 46 +++--- .../platform/forge/PlatformImpl.java | 24 +-- .../forge/block/entity/package-info.java | 7 - .../forge/containermenu/package-info.java | 7 - .../forge/datagen/BlockModelProvider.java | 2 +- .../forge/datagen/BlockStateProvider.java | 22 +-- .../forge/datagen/ItemModelProvider.java | 24 +-- .../forge/datagen/loot/BlockDropProvider.java | 2 +- .../forge/datagen/tag/ItemTagGenerator.java | 4 +- ...andlerExporterTransferStrategyFactory.java | 18 +- ...andlerExporterTransferStrategyFactory.java | 16 +- .../platform/forge/exporter/package-info.java | 7 + .../FluidHandlerExternalStorageProvider.java | 12 +- ...latformExternalStorageProviderFactory.java | 8 +- .../ItemHandlerExternalStorageProvider.java | 12 +- ...latformExternalStorageProviderFactory.java | 8 +- .../forge/externalstorage/package-info.java | 7 + .../{internal => }/grid/CursorStorage.java | 2 +- .../forge/{menu => grid}/package-info.java | 2 +- .../FluidGridExtractionStrategy.java | 14 +- .../strategy}/FluidGridInsertionStrategy.java | 14 +- .../strategy}/ItemGridExtractionStrategy.java | 15 +- .../strategy}/ItemGridInsertionStrategy.java | 17 +- .../strategy}/ItemGridScrollingStrategy.java | 17 +- .../forge/grid/strategy/package-info.java | 7 + .../view/ForgeFluidGridResourceFactory.java | 8 +- .../view/ForgeItemGridResourceFactory.java | 4 +- .../forge/grid/view/package-info.java | 7 + .../importer/FluidHandlerImporterSource.java | 12 +- ...andlerImporterTransferStrategyFactory.java | 12 +- .../importer/ItemHandlerImporterSource.java | 12 +- ...andlerImporterTransferStrategyFactory.java | 12 +- .../platform/forge/importer/package-info.java | 7 + .../integration/curios/package-info.java | 7 - .../forge/integration/package-info.java | 7 - .../integration/recipemod/package-info.java | 7 - .../recipemod/rei/package-info.java | 7 - .../forge/internal/grid/package-info.java | 7 - .../internal/grid/view/package-info.java | 7 - .../network/node/exporter/package-info.java | 7 - .../node/externalstorage/package-info.java | 7 - .../network/node/importer/package-info.java | 7 - .../forge/internal/storage/package-info.java | 7 - .../c2s/ClientToServerCommunicationsImpl.java | 8 +- .../packet/c2s/CraftingGridClearPacket.java | 2 +- .../c2s/CraftingGridRecipeTransferPacket.java | 4 +- .../forge/packet/c2s/GridExtractPacket.java | 2 +- .../forge/packet/c2s/GridInsertPacket.java | 2 +- .../forge/packet/c2s/GridScrollPacket.java | 2 +- .../packet/c2s/PropertyChangePacket.java | 2 +- .../c2s/ResourceFilterSlotChangePacket.java | 2 +- .../c2s/ResourceSlotAmountChangePacket.java | 2 +- .../packet/c2s/ResourceSlotChangePacket.java | 2 +- .../packet/c2s/SingleAmountChangePacket.java | 2 +- .../packet/c2s/UseNetworkBoundItemPacket.java | 6 +- .../s2c/ControllerEnergyInfoPacket.java | 2 +- .../forge/packet/s2c/GridClearPacket.java | 2 +- .../forge/packet/s2c/GridUpdatePacket.java | 2 +- .../packet/s2c/ResourceSlotUpdatePacket.java | 4 +- .../s2c/ServerToClientCommunicationsImpl.java | 4 +- .../packet/s2c/StorageInfoResponsePacket.java | 2 +- .../s2c/WirelessTransmitterRangePacket.java | 2 +- .../rei/CraftingGridTransferHandler.java | 6 +- .../rei/DraggableStackVisitorImpl.java | 10 +- .../rei/ExclusionZonesProviderImpl.java | 4 +- .../rei/GridFocusedStackProvider.java | 6 +- .../rei/GridResourceIngredientConverter.java | 8 +- .../recipemod/rei/MissingIngredients.java | 2 +- .../rei/RefinedStorageREIClientPlugin.java | 10 +- .../recipemod/rei/ReiGridSynchronizer.java | 4 +- .../forge}/recipemod/rei/ReiProxy.java | 2 +- .../rei/ResourceFocusedStackProvider.java | 6 +- .../rei/ResourceIngredientConverter.java | 10 +- .../forge/recipemod/rei/package-info.java | 7 + .../forge/render/entity/package-info.java | 7 - .../render/model/baked/package-info.java | 7 - .../forge/render/model/package-info.java | 7 - .../platform/forge/render/package-info.java | 7 - .../FluidHandlerExtractableStorage.java | 12 +- .../FluidHandlerInsertableStorage.java | 12 +- .../ForgeHandlerUtil.java} | 10 +- .../storage/InteractionCoordinates.java | 10 +- .../storage/InteractionCoordinatesImpl.java | 2 +- .../ItemHandlerExtractableStorage.java | 8 +- .../storage/ItemHandlerInsertableStorage.java | 8 +- .../DiskDriveBlockEntityRendererImpl.java | 7 +- .../diskdrive}/ForgeDiskDriveBlockEntity.java | 4 +- .../forge/storage/diskdrive/package-info.java | 7 + .../platform/forge/storage/package-info.java | 7 + .../ContainerTransferDestination.java | 4 +- .../containermenu}/MenuOpenerImpl.java | 6 +- .../support/containermenu/package-info.java | 7 + .../energy/EnergyStorageAdapter.java | 2 +- .../forge/support/energy/package-info.java | 7 + .../CuriosSlotReference.java | 6 +- .../CuriosSlotReferenceFactory.java | 6 +- .../CuriosSlotReferenceProvider.java | 6 +- .../networkbounditem/package-info.java | 7 + .../render/FluidStackFluidRenderer.java | 6 +- .../render/model}/DiskDriveBakedModel.java | 10 +- .../render/model/DiskDriveGeometryLoader.java | 2 +- .../model}/DiskDriveItemBakedModel.java | 2 +- .../model/DiskDriveUnbakedGeometry.java | 5 +- .../support/render/model/package-info.java | 7 + .../forge/support/render/package-info.java | 7 + .../ResourceContainerFluidHandlerAdapter.java | 16 +- .../resource}/VariantUtil.java | 4 +- .../forge/support/resource/package-info.java | 7 + .../platform/forge/util/package-info.java | 7 - 756 files changed, 2595 insertions(+), 2873 deletions(-) delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => configurationcard}/ConfigurationCardTarget.java (73%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity/constructor => constructordestructor}/ConstructorStrategy.java (84%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity/constructor => constructordestructor}/ConstructorStrategyFactory.java (90%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity/destructor => constructordestructor}/DestructorStrategy.java (92%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity/destructor => constructordestructor}/DestructorStrategyFactory.java (90%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{integration/recipemod => constructordestructor}/package-info.java (73%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{network/node => }/exporter/AmountOverride.java (91%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{network/node => }/exporter/ExporterTransferStrategyFactory.java (89%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{registry => exporter}/package-info.java (76%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridExtractionStrategy.java (87%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridExtractionStrategyFactory.java (74%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridInsertionStrategy.java (82%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridInsertionStrategyFactory.java (73%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridScrollingStrategy.java (74%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => strategy}/GridScrollingStrategyFactory.java (73%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => view}/AbstractPlatformGridResource.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/{ => view}/PlatformGridResource.java (78%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{network/node => }/importer/ImporterTransferStrategyFactory.java (79%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{resource => importer}/package-info.java (76%) delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/package-info.java delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/package-info.java delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/package-info.java delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{integration => }/recipemod/IngredientConverter.java (82%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/package-info.java delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item/block => storage}/AbstractStorageContainerBlockItem.java (93%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => storage}/AbstractStorageContainerItem.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => storage}/StorageContainerItem.java (79%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => storage}/StorageContainerItemHelper.java (92%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/{type => }/StorageType.java (86%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{network/node => storage}/externalstorage/PlatformExternalStorageProviderFactory.java (88%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity/constructor => storage/externalstorage}/package-info.java (72%) delete mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => }/storagemonitor/StorageMonitorExtractionStrategy.java (84%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => }/storagemonitor/StorageMonitorInsertionStrategy.java (85%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => support}/AbstractNetworkNodeContainerBlockEntity.java (94%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{util => support}/AmountFormatting.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support}/HelpTooltipComponent.java (88%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{network/node => support}/PlatformNetworkNodeContainer.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/energy}/AbstractEnergyBlockItem.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/energy}/AbstractEnergyItem.java (95%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/energy}/AbstractNetworkBoundEnergyItem.java (88%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => support/energy}/EnergyBlockEntity.java (85%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/energy}/EnergyItem.java (88%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/energy}/EnergyItemHelper.java (90%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/networkbounditem}/NetworkBoundItemHelper.java (91%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/networkbounditem}/NetworkBoundItemSession.java (80%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/networkbounditem}/SlotReference.java (85%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/networkbounditem}/SlotReferenceFactory.java (74%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => support/networkbounditem}/SlotReferenceProvider.java (81%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java rename {refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item => refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support}/package-info.java (77%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/registry/PlatformRegistry.java (96%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/FluidResource.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/FuzzyModeNormalizer.java (69%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ItemResource.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ResourceAmountTemplate.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ResourceContainer.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ResourceContainerType.java (55%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ResourceFactory.java (81%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ResourceRendering.java (91%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/list/FuzzyResourceList.java (80%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/list/FuzzyResourceListImpl.java (93%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/package-info.java create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{item => upgrade}/AbstractUpgradeItem.java (78%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => }/wirelesstransmitter/WirelessTransmitter.java (80%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/{blockentity => }/wirelesstransmitter/WirelessTransmitterRangeModifier.java (80%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/package-info.java rename refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/{util => support}/AmountFormattingTest.java (98%) rename refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/FluidResourceTest.java (98%) rename refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/ItemResourceTest.java (98%) rename refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/{ => support}/resource/list/FuzzyResourceListImplTest.java (98%) delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableShapeCacheKey.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerType.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => configurationcard}/ConfigurationCardItem.java (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render => configurationcard}/ConfigurationCardItemPropertyFunction.java (85%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => constructordestructor}/AbstractConstructorDestructorBlock.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/AbstractItemConstructorStrategy.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/BlockBreakDestructorStrategy.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/BlockBreakDestructorStrategyFactory.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/CompositeConstructorStrategy.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/CompositeDestructorStrategy.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => constructordestructor}/ConstructorBlock.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/ConstructorBlockEntity.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => constructordestructor}/ConstructorContainerMenu.java (74%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/widget => constructordestructor}/ConstructorDropItemsSideButtonWidget.java (67%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => constructordestructor}/ConstructorScreen.java (63%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => constructordestructor}/DestructorBlock.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/DestructorBlockEntity.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => constructordestructor}/DestructorContainerMenu.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/widget => constructordestructor}/DestructorPickupItemsSideButtonWidget.java (67%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => constructordestructor}/DestructorScreen.java (67%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/FluidBreakDestructorStrategy.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/FluidBreakDestructorStrategyFactory.java (73%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/ItemDropConstructorStrategy.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/ItemDropConstructorStrategyFactory.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/ItemPickupDestructorStrategy.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/destructor => constructordestructor}/ItemPickupDestructorStrategyFactory.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/PlaceBlockConstructorStrategy.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/PlaceFireworksConstructorStrategy.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/constructor => constructordestructor}/PlaceFluidConstructorStrategy.java (85%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => content}/BlockConstants.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => controller}/ControllerBlock.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => controller}/ControllerBlockEntity.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/ticker => controller}/ControllerBlockEntityTicker.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => controller}/ControllerBlockItem.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => controller}/ControllerContainerMenu.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => controller}/ControllerEnergyType.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render/model => controller}/ControllerModelPredicateProvider.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => controller}/ControllerScreen.java (84%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerType.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => controller}/CreativeControllerBlockItem.java (77%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/detector/DetectorAmount.java (61%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => detector}/DetectorBlock.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/detector/DetectorBlockEntity.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/detector/DetectorContainerMenu.java (75%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/detector/DetectorModeSettings.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/widget => detector}/DetectorModeSideButtonWidget.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/amount => detector}/DetectorScreen.java (61%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/detector/FuzzyDetectorAmountStrategy.java (94%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector}/package-info.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/network/node => exporter}/AbstractFuzzyExporterTransferStrategy.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => exporter}/ExporterBlock.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/exporter/ExporterBlockEntity.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => exporter}/ExporterContainerMenu.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => exporter}/ExporterScreen.java (62%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter}/package-info.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => }/grid/AbstractGridBlock.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/grid/AbstractGridBlockEntity.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/AbstractGridContainerMenu.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/AbstractGridSynchronizer.java (72%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/ClientCraftingGridSource.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => }/grid/CraftingGridBlock.java (81%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/grid/CraftingGridBlockEntity.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridContainerMenu.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/CraftingGridMatrixCloseBehavior.java (59%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridRefillContext.java (58%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridRefillContextImpl.java (68%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridResultSlot.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridSource.java (75%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/CraftingGridSourceImpl.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/grid/CraftingMatrix.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/grid/CraftingMatrixContainerMenu.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => }/grid/GridBlock.java (80%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/grid/GridBlockEntity.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/GridContainerMenu.java (63%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{menu => grid}/GridExtendedMenuProvider.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/GridSize.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/GridSortingTypes.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/NoOpGridSynchronizer.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/SnapshotCraftingGridRefillContext.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/WirelessGrid.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/grid/WirelessGridContainerMenu.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{menu => grid}/WirelessGridExtendedMenuProvider.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => grid}/WirelessGridItem.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/WirelessGridOperations.java (92%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid}/package-info.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/AbstractGridScreen.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/AutoSelectedSideButtonWidget.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/CraftingGridScreen.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/GridScreen.java (81%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/GridSearchBox.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/GridSearchBoxWidget.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/LastModified.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/SizeSideButtonWidget.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/SortingDirectionSideButtonWidget.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/SortingTypeSideButtonWidget.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/StorageChannelTypeSideButtonWidget.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/SynchronizationSideButtonWidget.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/hint/FluidGridInsertionHint.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/hint/GridInsertionHintsImpl.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/hint/ItemGridInsertionHint.java (72%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/hint/SingleItemGridInsertionHint.java (77%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/package-info.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/ClientGridExtractionStrategy.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/ClientGridInsertionStrategy.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/ClientGridScrollingStrategy.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/CompositeGridExtractionStrategy.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/CompositeGridInsertionStrategy.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/grid => grid/strategy}/CompositeGridScrollingStrategy.java (86%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/view/AbstractFluidGridResourceFactory.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/view/AbstractItemGridResourceFactory.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/view/CompositeGridResourceFactory.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/view/FluidGridResource.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/view/ItemGridResource.java (86%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/iface/ExportedResourcesContainer.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => iface}/InterfaceBlock.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/iface/InterfaceBlockEntity.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => iface}/InterfaceContainerMenu.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/network/node/iface/externalstorage => iface}/InterfacePlatformExternalStorageProviderFactory.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/network/node/iface/externalstorage => iface}/InterfaceProxyExternalStorageProvider.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => iface}/InterfaceScreen.java (73%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => importer}/ImporterBlock.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => importer}/ImporterBlockEntity.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => importer}/ImporterContainerMenu.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => importer}/ImporterScreen.java (69%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => misc}/ProcessorItem.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => misc}/WrenchItem.java (82%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc}/package-info.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => networking}/CableBlock.java (87%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => networking}/NetworkReceiverBlock.java (84%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/CompositeIngredientConverter.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/ClickableIngredient.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/CraftingGridRecipeTransferHandler.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/ExclusionZonesGuiContainerHandler.java (69%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/GhostIngredientHandler.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/GridGuiContainerHandler.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/GridResourceIngredientConverter.java (75%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/JeiGridSynchronizer.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/JeiProxy.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/MissingItemRecipeTransferError.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/RefinedStorageJeiModPlugin.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/ResourceGuiContainerHandler.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{integration => }/recipemod/jei/ResourceIngredientConverter.java (81%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/package-info.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TooltipRenderer.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/package-info.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/AbstractStorageContainerMenu.java (81%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage}/AbstractStorageScreen.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/AccessModeSettings.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/widget => storage}/AccessModeSideButtonWidget.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/BucketPlayerInventoryInsertableStorage.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/ClientStorageRepository.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/storage/type => storage}/FluidStorageType.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/storage/type => storage}/ItemStorageType.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/LimitedPlatformStorage.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/PlatformStorage.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/widget => storage}/PrioritySideButtonWidget.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/StorageAccessor.java (63%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/StorageConfigurationContainer.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/StorageConfigurationContainerImpl.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => storage}/StorageContainerItemHelperImpl.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/StorageRepositoryImpl.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/StorageTooltipHelper.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/storage/type => storage}/StorageTypes.java (73%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/channel/FluidStorageChannelType.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/channel/ItemStorageChannelType.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/channel/StorageChannelTypes.java (61%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/diskdrive/AbstractDiskDriveBlockEntity.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render/entity => storage/diskdrive}/AbstractDiskDriveBlockEntityRenderer.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storage/diskdrive}/DiskDriveBlock.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/ticker => storage/diskdrive}/DiskDriveBlockEntityTicker.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/diskdrive/DiskDriveContainerMenu.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/diskdrive/DiskDriveInventory.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage/diskdrive}/DiskDriveScreen.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/diskdrive/EmptyStorageDiskInfoAccessor.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/diskdrive/StorageDiskInfoAccessor.java (72%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => }/storage/diskdrive/StorageDiskInfoAccessorImpl.java (82%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storage/externalstorage}/ExternalStorageBlock.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/externalstorage/ExternalStorageBlockEntity.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/storage => storage/externalstorage}/ExternalStorageContainerMenu.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage/externalstorage}/ExternalStorageScreen.java (64%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/externalstorage/ExternalStorageTrackedStorageRepository.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => storage}/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/externalstorage/WorkRate.java => storage/externalstorage/ExternalStorageWorkRate.java} (88%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage}/package-info.java (72%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage}/package-info.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storage/storageblock}/AbstractStorageBlock.java (80%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/storage => storage/storageblock}/AbstractStorageBlockBlockEntity.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/storage/block => storage/storageblock}/AbstractStorageBlockContainerMenu.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage/storageblock}/AbstractStorageBlockScreen.java (81%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storage/storageblock}/FluidStorageBlock.java (69%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/storage => storage/storageblock}/FluidStorageBlockBlockEntity.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => storage/storageblock}/FluidStorageBlockBlockItem.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/storage/block => storage/storageblock}/FluidStorageBlockContainerMenu.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage/storageblock}/FluidStorageBlockScreen.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storage/storageblock}/ItemStorageBlock.java (69%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity/storage => storage/storageblock}/ItemStorageBlockBlockEntity.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => storage/storageblock}/ItemStorageBlockBlockItem.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/storage/block => storage/storageblock}/ItemStorageBlockContainerMenu.java (81%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storage/storageblock}/ItemStorageBlockScreen.java (69%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{loot => storage/storageblock}/StorageBlockLootItemFunction.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{loot => storage/storageblock}/StorageBlockLootItemFunctionSerializer.java (91%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => storage/storagedisk}/FluidStorageDiskItem.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => storage/storagedisk}/ItemStorageDiskItem.java (74%) rename {refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk}/package-info.java (73%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/CompositeStorageMonitorExtractionStrategy.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/CompositeStorageMonitorInsertionStrategy.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/FluidStorageMonitorExtractionStrategy.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/FluidStorageMonitorInsertionStrategy.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/InsertTracker.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/ItemStorageMonitorExtractionStrategy.java (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/ItemStorageMonitorInsertionStrategy.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => storagemonitor}/StorageMonitorBlock.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/storagemonitor/StorageMonitorBlockEntity.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render/entity => storagemonitor}/StorageMonitorBlockEntityRenderer.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => storagemonitor}/StorageMonitorContainerMenu.java (72%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => storagemonitor}/StorageMonitorScreen.java (73%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/AbstractBaseBlock.java (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => support}/AbstractBaseContainerMenu.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/AbstractBaseScreen.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/ticker => support}/AbstractBlockEntityTicker.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/AbstractColoredBlock.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/AbstractDirectionalBlock.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/AbstractDirectionalCableBlock.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/AbstractFilterScreen.java (75%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/AbstractSchedulingNetworkNodeContainerBlockEntity.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/AbstractUpgradeableNetworkNodeContainerBlockEntity.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/BlockEntityWithDrops.java (70%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/BlockItemProvider.java (67%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/CableBlockSupport.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{packet => support}/ClientToServerCommunications.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/ColorableBlock.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/DirectionalCableBlockShapes.java (55%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/FilterModeSettings.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/FilterWithFuzzyMode.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/network => support}/LevelConnectionProvider.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => support}/NamedBlockItem.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/ticker => support}/NetworkNodeBlockEntityTicker.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/NetworkNodeContainerBlockEntityImpl.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/PlayerAware.java (57%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{util => support}/RedstoneMode.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/RedstoneModeSettings.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/SchedulingMode.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support}/SchedulingModeType.java (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{packet => support}/ServerToClientCommunications.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/SimpleBlock.java (54%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item/block => support}/SimpleBlockItem.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => support}/SimpleItem.java (70%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/TextureIds.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/AbstractAmountScreen.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/AbstractSingleAmountScreen.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/AmountOperations.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/AmountScreenConfiguration.java (99%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/DoubleAmountOperations.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/IntegerAmountOperations.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/LongAmountOperations.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/PriorityScreen.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/amount/ResourceAmountScreen.java (90%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/containermenu/AbstractResourceContainerMenu.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/containermenu/AbstractSchedulingContainerMenu.java (73%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/containermenu/AbstractSimpleFilterContainerMenu.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/containermenu/AbstractSingleAmountContainerMenu.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/property => support/containermenu}/ClientProperty.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/slot => support/containermenu}/DisabledSlot.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{menu => support/containermenu}/ExtendedMenuProvider.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{menu => support/containermenu}/MenuOpener.java (70%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/property => support/containermenu}/Property.java (66%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/property => support/containermenu}/PropertyType.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/property => support/containermenu}/PropertyTypes.java (79%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/transfer => support/containermenu}/ResourceInventoryDestination.java (64%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/slot => support/containermenu}/ResourceSlot.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/property => support/containermenu}/ServerProperty.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/transfer => support/containermenu}/TransferDestination.java (71%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/transfer => support/containermenu}/TransferManager.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/slot => support/containermenu}/ValidatedSlot.java (89%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{util => support/direction}/BiDirection.java (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/direction/BiDirectionType.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/direction/DirectionType.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => support}/direction/DirectionTypeImpl.java (94%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => support/energy}/BlockEntityEnergyStorage.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/energy/CreativeEnergyStorage.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/energy}/EnergyItemHelperImpl.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{loot => support/energy}/EnergyLootItemFunction.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{loot => support/energy}/EnergyLootItemFunctionSerializer.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/energy/ItemEnergyStorage.java (95%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal => refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support}/energy/package-info.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/CompositeSlotReferenceProvider.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/InventorySlotReference.java (83%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/InventorySlotReferenceFactory.java (60%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/InventorySlotReferenceProvider.java (74%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/NetworkBoundItemHelperImpl.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render/NetworkItemItemPropertyFunction.java => support/networkbounditem/NetworkBoundItemItemPropertyFunction.java} (75%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal/item => support/networkbounditem}/NetworkBoundItemSessionImpl.java (87%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/registry/PlatformRegistryImpl.java (94%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{render/model => support/render}/AbstractFluidRenderer.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/render/CubeBuilder.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{ => support}/render/FluidRenderer.java (77%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/AbstractResourceContainerContainerAdapter.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/FluidResourceFactory.java (61%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/FluidResourceRendering.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/ItemResourceFactory.java (60%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/ItemResourceRendering.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/resource/ResourceContainerImpl.java (97%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/CompositeClientTooltipComponent.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/HelpClientTooltipComponent.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/MouseWithIconClientTooltipComponent.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/ResourceClientTooltipComponent.java (88%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/SmallText.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/tooltip/SmallTextClientTooltipComponent.java (93%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/AbstractSideButtonWidget.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/AbstractYesNoSideButtonWidget.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/FilterModeSideButtonWidget.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/FuzzyModeSideButtonWidget.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/History.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/ProgressWidget.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/RedstoneModeSideButtonWidget.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/SchedulingModeSideButtonWidget.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/ScrollbarWidget.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/SearchFieldWidget.java (97%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/upgrade/BuiltinUpgradeDestinationsImpl.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => upgrade}/FortuneUpgradeItem.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => upgrade}/RangeUpgradeItem.java (84%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => upgrade}/RegulatorUpgradeContainerMenu.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => upgrade}/RegulatorUpgradeItem.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => upgrade}/RegulatorUpgradeScreen.java (64%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{item => upgrade}/SimpleUpgradeItem.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => upgrade}/UpgradeContainer.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/tooltip => upgrade}/UpgradeDestinationClientTooltipComponent.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/upgrade/UpgradeDestinations.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen/tooltip => upgrade}/UpgradeItemClientTooltipComponent.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/upgrade/UpgradeRegistryImpl.java (97%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu/slot => upgrade}/UpgradeSlot.java (82%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{recipe => upgrade}/UpgradeWithEnchantedBookRecipe.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{recipe => upgrade}/UpgradeWithEnchantedBookRecipeSerializer.java (97%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java (67%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java (80%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java (73%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java (76%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block => wirelesstransmitter}/WirelessTransmitterBlock.java (85%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{block/entity => }/wirelesstransmitter/WirelessTransmitterBlockEntity.java (86%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{containermenu => wirelesstransmitter}/WirelessTransmitterContainerMenu.java (80%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{screen => wirelesstransmitter}/WirelessTransmitterScreen.java (82%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/package-info.java rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/grid/GridSortingTypesTest.java (95%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{screen/grid => grid/screen}/LastModifiedTest.java (98%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/ClientStorageRepositoryTest.java (95%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal/storage/type => storage}/FluidStorageTypeTest.java (94%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal/storage/type => storage}/ItemStorageTypeTest.java (94%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/LimitedPlatformStorageTest.java (80%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/PlatformStorageTest.java (94%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => }/storage/StorageRepositoryImplTest.java (97%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{internal => support}/registry/PlatformRegistryImplTest.java (96%) rename refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/{screen => support}/widget/HistoryTest.java (97%) delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/network/node => }/exporter/StorageExporterTransferStrategyFactory.java (87%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/grid => grid/strategy}/FluidGridExtractionStrategy.java (93%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/grid => grid/strategy}/FluidGridInsertionStrategy.java (89%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/grid => grid/strategy}/ItemGridExtractionStrategy.java (86%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/grid => grid/strategy}/ItemGridInsertionStrategy.java (86%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/grid => grid/strategy}/ItemGridScrollingStrategy.java (90%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal => }/grid/view/FabricFluidGridResourceFactory.java (77%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal => }/grid/view/FabricItemGridResourceFactory.java (80%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/network/node => }/importer/StorageImporterSource.java (89%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/network/node => }/importer/StorageImporterTransferStrategyFactory.java (90%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{integration/ModMenuIntegration.java => modmenu/ModMenuApiImpl.java} (79%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/package-info.java rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/CraftingGridTransferHandler.java (95%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/DraggableStackVisitorImpl.java (91%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/ExclusionZonesProviderImpl.java (77%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/GridFocusedStackProvider.java (82%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/GridResourceIngredientConverter.java (74%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/MissingIngredients.java (90%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{integration => }/recipemod/rei/RefinedStorageREIClientPlugin.java (93%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/ReiGridSynchronizer.java (89%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/ReiProxy.java (88%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/ResourceFocusedStackProvider.java (87%) rename {refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration => refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric}/recipemod/rei/ResourceIngredientConverter.java (79%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/package-info.java delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal => }/storage/StorageExtractableStorage.java (92%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal => }/storage/StorageInsertableStorage.java (92%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model/baked => storage/diskdrive}/DiskDriveBakedModel.java (89%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/entity => storage/diskdrive}/DiskDriveBlockEntityRendererImpl.java (78%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model => storage/diskdrive}/DiskDriveUnbakedModel.java (92%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{block/entity => storage/diskdrive}/FabricDiskDriveBlockEntity.java (75%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/network/node => storage}/externalstorage/StorageExternalStorageProvider.java (89%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/network/node => storage}/externalstorage/StoragePlatformExternalStorageProviderFactory.java (89%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/package-info.java create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{ => support}/containermenu/ContainerTransferDestination.java (85%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{menu => support/containermenu}/FabricExtendedMenuProviderAdapter.java (87%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{menu => support/containermenu}/MenuOpenerImpl.java (64%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal => support}/energy/EnergyStorageAdapter.java (96%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{integration/trinkets => support/networkbounditem}/TrinketsSlotReference.java (82%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{integration/trinkets => support/networkbounditem}/TrinketsSlotReferenceFactory.java (61%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{integration/trinkets => support/networkbounditem}/TrinketsSlotReferenceProvider.java (84%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{ => support}/render/FluidVariantFluidRenderer.java (88%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model/baked => support/render/model}/EmissiveBakedModel.java (90%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{ => support}/render/model/EmissiveModelRegistry.java (90%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model/baked/transform => support/render/model}/EmissiveTransform.java (95%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model/baked/transform => support/render/model}/QuadRotator.java (92%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{render/model/baked/transform => support/render/model}/QuadTranslator.java (89%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/storage => support/resource}/ResourceContainerFluidStorageAdapter.java (88%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{util => support/resource}/VariantUtil.java (77%) create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{internal/storage => util}/FabricStorageUtil.java (71%) delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/exporter/FluidHandlerExporterTransferStrategyFactory.java (72%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/exporter/ItemHandlerExporterTransferStrategyFactory.java (73%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/externalstorage/FluidHandlerExternalStorageProvider.java (75%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java (71%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/externalstorage/ItemHandlerExternalStorageProvider.java (75%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java (71%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/grid/CursorStorage.java (97%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{menu => grid}/package-info.java (77%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/grid => grid/strategy}/FluidGridExtractionStrategy.java (90%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/grid => grid/strategy}/FluidGridInsertionStrategy.java (80%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/grid => grid/strategy}/ItemGridExtractionStrategy.java (75%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/grid => grid/strategy}/ItemGridInsertionStrategy.java (78%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/grid => grid/strategy}/ItemGridScrollingStrategy.java (82%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/grid/view/ForgeFluidGridResourceFactory.java (67%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/grid/view/ForgeItemGridResourceFactory.java (77%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/importer/FluidHandlerImporterSource.java (74%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/importer/FluidHandlerImporterTransferStrategyFactory.java (73%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/importer/ItemHandlerImporterSource.java (74%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/network/node => }/importer/ItemHandlerImporterTransferStrategyFactory.java (71%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/package-info.java rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/CraftingGridTransferHandler.java (95%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/DraggableStackVisitorImpl.java (91%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/ExclusionZonesProviderImpl.java (77%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/GridFocusedStackProvider.java (82%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/GridResourceIngredientConverter.java (74%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/MissingIngredients.java (90%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{integration => }/recipemod/rei/RefinedStorageREIClientPlugin.java (93%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/ReiGridSynchronizer.java (89%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/ReiProxy.java (88%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/ResourceFocusedStackProvider.java (87%) rename {refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge}/recipemod/rei/ResourceIngredientConverter.java (79%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/FluidHandlerExtractableStorage.java (72%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/FluidHandlerInsertableStorage.java (77%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/storage/HandlerUtil.java => storage/ForgeHandlerUtil.java} (76%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/InteractionCoordinates.java (91%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/InteractionCoordinatesImpl.java (95%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/ItemHandlerExtractableStorage.java (87%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => }/storage/ItemHandlerInsertableStorage.java (85%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{render/entity => storage/diskdrive}/DiskDriveBlockEntityRendererImpl.java (75%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{block/entity => storage/diskdrive}/ForgeDiskDriveBlockEntity.java (83%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/package-info.java create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{ => support}/containermenu/ContainerTransferDestination.java (74%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{menu => support/containermenu}/MenuOpenerImpl.java (70%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal => support}/energy/EnergyStorageAdapter.java (94%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{integration/curios => support/networkbounditem}/CuriosSlotReference.java (81%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{integration/curios => support/networkbounditem}/CuriosSlotReferenceFactory.java (60%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{integration/curios => support/networkbounditem}/CuriosSlotReferenceProvider.java (82%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{ => support}/render/FluidStackFluidRenderer.java (92%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{render/model/baked => support/render/model}/DiskDriveBakedModel.java (94%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{ => support}/render/model/DiskDriveGeometryLoader.java (86%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{render/model/baked => support/render/model}/DiskDriveItemBakedModel.java (97%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{ => support}/render/model/DiskDriveUnbakedGeometry.java (95%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{internal/storage => support/resource}/ResourceContainerFluidHandlerAdapter.java (79%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{util => support/resource}/VariantUtil.java (90%) create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/package-info.java delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/package-info.java diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java index 5387f40f7..01e3a7ff6 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java @@ -5,41 +5,41 @@ import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHints; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.api.upgrade.BuiltinUpgradeDestinations; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import java.util.Collection; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java index b4f895589..2faae7cc4 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java @@ -5,41 +5,41 @@ import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHints; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.api.upgrade.BuiltinUpgradeDestinations; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import java.util.Collection; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/package-info.java deleted file mode 100644 index 71e76a806..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/ConfigurationCardTarget.java similarity index 73% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/ConfigurationCardTarget.java index 1d5dd88bf..16500540f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/ConfigurationCardTarget.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/ConfigurationCardTarget.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity; +package com.refinedmods.refinedstorage2.platform.api.configurationcard; import java.util.List; @@ -6,6 +6,9 @@ import net.minecraft.world.item.Item; import org.apiguardian.api.API; +/** + * Implement this on a block entity that supports the configuration card. + */ @API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2") public interface ConfigurationCardTarget { void writeConfiguration(CompoundTag tag); diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/package-info.java new file mode 100644 index 000000000..096af66d9 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/configurationcard/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.configurationcard; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategy.java similarity index 84% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategy.java index d41b77c5e..2e51e0308 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.constructor; +package com.refinedmods.refinedstorage2.platform.api.constructordestructor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategyFactory.java similarity index 90% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategyFactory.java index 1e607d1d8..221bab6da 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/ConstructorStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/ConstructorStrategyFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.constructor; +package com.refinedmods.refinedstorage2.platform.api.constructordestructor; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategy.java similarity index 92% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategy.java index 773d33755..719dec17d 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.destructor; +package com.refinedmods.refinedstorage2.platform.api.constructordestructor; import com.refinedmods.refinedstorage2.api.core.filter.Filter; import com.refinedmods.refinedstorage2.api.network.Network; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategyFactory.java similarity index 90% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategyFactory.java index 95fdcb71a..bf1b7eeb3 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/DestructorStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/DestructorStrategyFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.destructor; +package com.refinedmods.refinedstorage2.platform.api.constructordestructor; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/package-info.java similarity index 73% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/package-info.java index daf4f55f7..cdb81c84a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/constructordestructor/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.integration.recipemod; +package com.refinedmods.refinedstorage2.platform.api.constructordestructor; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/AmountOverride.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/AmountOverride.java similarity index 91% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/AmountOverride.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/AmountOverride.java index 1da91391b..12cf11a6f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/AmountOverride.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/AmountOverride.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.network.node.exporter; +package com.refinedmods.refinedstorage2.platform.api.exporter; import java.util.function.LongSupplier; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/ExporterTransferStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/ExporterTransferStrategyFactory.java similarity index 89% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/ExporterTransferStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/ExporterTransferStrategyFactory.java index 1a39ef015..153e5f9f4 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/ExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/ExporterTransferStrategyFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.network.node.exporter; +package com.refinedmods.refinedstorage2.platform.api.exporter; import com.refinedmods.refinedstorage2.api.network.node.exporter.ExporterTransferStrategy; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/package-info.java similarity index 76% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/package-info.java index 1a3cac5c8..8c0e409db 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/exporter/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.registry; +package com.refinedmods.refinedstorage2.platform.api.exporter; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java index 17c6d34ac..ac8540118 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java @@ -6,8 +6,8 @@ import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.TrackedResourceAmount; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import java.util.List; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategy.java similarity index 87% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategy.java index e29436908..79531e4dc 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategyFactory.java similarity index 74% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategyFactory.java index 877fb4f60..5ed2926fd 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridExtractionStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridExtractionStrategyFactory.java @@ -1,4 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; + +import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategy.java similarity index 82% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategy.java index 0d5d01618..ef606ff6f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategyFactory.java similarity index 73% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategyFactory.java index 2bcf1db77..05594da03 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridInsertionStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridInsertionStrategyFactory.java @@ -1,4 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; + +import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategy.java similarity index 74% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategy.java index fdd5125f3..2648e9424 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategy.java @@ -1,5 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; +import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import org.apiguardian.api.API; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategyFactory.java similarity index 73% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategyFactory.java index 2ce809ea7..e3638940c 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/GridScrollingStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/GridScrollingStrategyFactory.java @@ -1,4 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; + +import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/package-info.java new file mode 100644 index 000000000..ec1631346 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/strategy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.grid.strategy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/AbstractPlatformGridResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/AbstractPlatformGridResource.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/AbstractPlatformGridResource.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/AbstractPlatformGridResource.java index 2383f6e8b..1cdf4b95f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/AbstractPlatformGridResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/AbstractPlatformGridResource.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.view; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceAttributeKey; import com.refinedmods.refinedstorage2.api.grid.view.GridView; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/PlatformGridResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/PlatformGridResource.java similarity index 78% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/PlatformGridResource.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/PlatformGridResource.java index 92ef6a334..a469a88f8 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/PlatformGridResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/PlatformGridResource.java @@ -1,7 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.api.grid; +package com.refinedmods.refinedstorage2.platform.api.grid.view; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; +import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/package-info.java new file mode 100644 index 000000000..8303cec5a --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/view/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.grid.view; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/ImporterTransferStrategyFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/ImporterTransferStrategyFactory.java similarity index 79% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/ImporterTransferStrategyFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/ImporterTransferStrategyFactory.java index 60216d7c9..9f15f1da9 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/ImporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/ImporterTransferStrategyFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.api.network.node.importer; +package com.refinedmods.refinedstorage2.platform.api.importer; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import net.minecraft.core.BlockPos; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/package-info.java similarity index 76% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/package-info.java index e897c25d5..33f2b92a9 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/importer/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.importer; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/package-info.java deleted file mode 100644 index 5d0ef7028..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/exporter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.network.node.exporter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/package-info.java deleted file mode 100644 index 1a8231b09..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/package-info.java deleted file mode 100644 index a5a4f0b8c..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/importer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.network.node.importer; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/package-info.java deleted file mode 100644 index 0ea893733..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.network.node; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/IngredientConverter.java similarity index 82% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/IngredientConverter.java index fe45490cb..53934e2a0 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/recipemod/IngredientConverter.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/IngredientConverter.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.integration.recipemod; +package com.refinedmods.refinedstorage2.platform.api.recipemod; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/package-info.java new file mode 100644 index 000000000..5edfdcca5 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/recipemod/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.recipemod; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/package-info.java deleted file mode 100644 index 48d760595..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.resource.list; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerBlockItem.java similarity index 93% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerBlockItem.java index 928d8b643..438bee050 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/AbstractStorageContainerBlockItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerBlockItem.java @@ -1,8 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.api.item.block; +package com.refinedmods.refinedstorage2.platform.api.storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.List; import java.util.UUID; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerItem.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerItem.java index 42109c34a..ea09277b1 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractStorageContainerItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/AbstractStorageContainerItem.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.storage; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.api.storage.TypedStorage; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/SerializableStorage.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/SerializableStorage.java index cc20fcdbf..688eddd8b 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/SerializableStorage.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/SerializableStorage.java @@ -1,7 +1,5 @@ package com.refinedmods.refinedstorage2.platform.api.storage; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; - import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.4") diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItem.java similarity index 79% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItem.java index eb894e919..dae2a1f27 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItem.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.api.storage.TypedStorage; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItemHelper.java similarity index 92% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItemHelper.java index 4121a6b9b..c530fb5e5 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/StorageContainerItemHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageContainerItemHelper.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.storage; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; -import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/StorageType.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageType.java similarity index 86% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/StorageType.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageType.java index 1811cad1a..81091b40a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/StorageType.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/StorageType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.storage.type; +package com.refinedmods.refinedstorage2.platform.api.storage; import com.refinedmods.refinedstorage2.api.storage.Storage; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/channel/FuzzyStorageChannelImpl.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/channel/FuzzyStorageChannelImpl.java index 60fe60a32..a8a11086a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/channel/FuzzyStorageChannelImpl.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/channel/FuzzyStorageChannelImpl.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.FuzzyModeNormalizer; -import com.refinedmods.refinedstorage2.platform.api.resource.list.FuzzyResourceList; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FuzzyModeNormalizer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.list.FuzzyResourceList; import java.util.Collection; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/PlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/PlatformExternalStorageProviderFactory.java similarity index 88% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/PlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/PlatformExternalStorageProviderFactory.java index 42f37edd4..4ef0049f9 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/externalstorage/PlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/PlatformExternalStorageProviderFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.api.storage.externalstorage; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/package-info.java similarity index 72% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/package-info.java index 687287584..dbe45c708 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/constructor/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/externalstorage/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.blockentity.constructor; +package com.refinedmods.refinedstorage2.platform.api.storage.externalstorage; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/package-info.java deleted file mode 100644 index 49a60dc7c..000000000 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storage/type/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.storage.type; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorExtractionStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorExtractionStrategy.java similarity index 84% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorExtractionStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorExtractionStrategy.java index 519fd326a..595d6df0e 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorExtractionStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorExtractionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.api.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorInsertionStrategy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorInsertionStrategy.java similarity index 85% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorInsertionStrategy.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorInsertionStrategy.java index b2168b22c..624bfb67a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/StorageMonitorInsertionStrategy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/StorageMonitorInsertionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.api.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/package-info.java new file mode 100644 index 000000000..2c9aac42f --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/storagemonitor/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.storagemonitor; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java similarity index 94% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java index c0c5ed9af..efc028e34 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/AbstractNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity; +package com.refinedmods.refinedstorage2.platform.api.support; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormatting.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormatting.java index 9d88e3f8f..3b9dabee7 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormatting.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormatting.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.util; +package com.refinedmods.refinedstorage2.platform.api.support; import java.math.RoundingMode; import java.text.DecimalFormat; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/HelpTooltipComponent.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/HelpTooltipComponent.java similarity index 88% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/HelpTooltipComponent.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/HelpTooltipComponent.java index 85a79cf66..9cbe3e7a2 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/HelpTooltipComponent.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/HelpTooltipComponent.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support; import net.minecraft.network.chat.Component; import net.minecraft.world.inventory.tooltip.TooltipComponent; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java index b16b61837..d94d49501 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/network/node/PlatformNetworkNodeContainer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.network.node; +package com.refinedmods.refinedstorage2.platform.api.support; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyBlockItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyBlockItem.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyBlockItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyBlockItem.java index 52870ecec..f89cf8afd 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyBlockItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyBlockItem.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import java.util.List; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyItem.java similarity index 95% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyItem.java index e4dbd9b95..98ec52e94 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractEnergyItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractEnergyItem.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import java.util.List; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractNetworkBoundEnergyItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java similarity index 88% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractNetworkBoundEnergyItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java index 28d0c49e2..6248945fa 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractNetworkBoundEnergyItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java @@ -1,6 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/EnergyBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyBlockEntity.java similarity index 85% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/EnergyBlockEntity.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyBlockEntity.java index a95e857de..c231e5006 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/EnergyBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItem.java similarity index 88% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItem.java index fb7b3c7d8..6c0901f3a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItem.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItemHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItemHelper.java similarity index 90% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItemHelper.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItemHelper.java index 7d7160f0f..e13ec3cfd 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/EnergyItemHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/EnergyItemHelper.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.energy; import java.util.List; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/package-info.java new file mode 100644 index 000000000..1fc4d620d --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.energy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java similarity index 91% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemHelper.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java index 9d08fad52..858a95037 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemSession.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java similarity index 80% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemSession.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java index 4ecf4618a..da6398e83 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/NetworkBoundItemSession.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; import com.refinedmods.refinedstorage2.api.network.Network; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReference.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java similarity index 85% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReference.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java index c1f4541d7..dbac8a01f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReference.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java similarity index 74% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java index d29200b50..fcab5a538 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; import net.minecraft.network.FriendlyByteBuf; import org.apiguardian.api.API; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceProvider.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java similarity index 81% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceProvider.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java index ebe5ede52..dfbba125b 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/SlotReferenceProvider.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; import java.util.List; import java.util.Set; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java new file mode 100644 index 000000000..93ac9eb3c --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/package-info.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/package-info.java index fd85eb48f..03921a727 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.api.support; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/PlatformRegistry.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/PlatformRegistry.java index 54f3e6745..1e179ce6e 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/registry/PlatformRegistry.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/PlatformRegistry.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.registry; +package com.refinedmods.refinedstorage2.platform.api.support.registry; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/package-info.java new file mode 100644 index 000000000..14281e814 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/registry/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.registry; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResource.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResource.java index 41555465c..e71622db8 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResource.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FuzzyModeNormalizer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FuzzyModeNormalizer.java similarity index 69% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FuzzyModeNormalizer.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FuzzyModeNormalizer.java index e868a00d0..eb6bbc642 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/FuzzyModeNormalizer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FuzzyModeNormalizer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import org.apiguardian.api.API; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResource.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResource.java index b73ea051c..8fd372aae 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResource.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResource.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceAmountTemplate.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceAmountTemplate.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceAmountTemplate.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceAmountTemplate.java index 0abf50b7c..b131d7d3a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceAmountTemplate.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceAmountTemplate.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainer.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainer.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainer.java index be85261a0..c9f65c5f8 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainerType.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainerType.java similarity index 55% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainerType.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainerType.java index 83ed7a93f..b19ce7980 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceContainerType.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceContainerType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; public enum ResourceContainerType { FILTER, diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceFactory.java similarity index 81% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceFactory.java index 65230cb58..c1ac32c0c 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceRendering.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceRendering.java similarity index 91% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceRendering.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceRendering.java index 87bc86a42..f85937be1 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/ResourceRendering.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ResourceRendering.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import java.util.List; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceList.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceList.java similarity index 80% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceList.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceList.java index 9f7d436fe..e624bbf1b 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceList.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceList.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.api.resource.list; +package com.refinedmods.refinedstorage2.platform.api.support.resource.list; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.FuzzyModeNormalizer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FuzzyModeNormalizer; import java.util.Collection; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImpl.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImpl.java similarity index 93% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImpl.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImpl.java index 4e554edf3..a19a293aa 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImpl.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImpl.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.api.resource.list; +package com.refinedmods.refinedstorage2.platform.api.support.resource.list; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.resource.list.AbstractProxyResourceList; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; import com.refinedmods.refinedstorage2.api.resource.list.ResourceListOperationResult; -import com.refinedmods.refinedstorage2.platform.api.resource.FuzzyModeNormalizer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FuzzyModeNormalizer; import java.util.Collection; import java.util.Collections; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/package-info.java new file mode 100644 index 000000000..0da3ef37c --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.resource.list; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/package-info.java new file mode 100644 index 000000000..9e1292653 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/resource/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.resource; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/upgrade/AbstractUpgradeItem.java similarity index 78% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/upgrade/AbstractUpgradeItem.java index b5b6c73f5..db9032560 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/AbstractUpgradeItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/upgrade/AbstractUpgradeItem.java @@ -1,8 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.item; - -import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeItem; -import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; -import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; +package com.refinedmods.refinedstorage2.platform.api.upgrade; import java.util.Optional; import java.util.Set; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitter.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitter.java similarity index 80% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitter.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitter.java index d405201a5..6cacdc33d 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitter.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitter.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitterRangeModifier.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitterRangeModifier.java similarity index 80% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitterRangeModifier.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitterRangeModifier.java index d3a241f95..aa6cd8b09 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/wirelesstransmitter/WirelessTransmitterRangeModifier.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/WirelessTransmitterRangeModifier.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/package-info.java new file mode 100644 index 000000000..33089bb77 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/wirelesstransmitter/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormattingTest.java similarity index 98% rename from refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java rename to refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormattingTest.java index cb66bccf1..7947fc363 100644 --- a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/util/AmountFormattingTest.java +++ b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/AmountFormattingTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.util; +package com.refinedmods.refinedstorage2.platform.api.support; import org.junit.jupiter.api.Test; diff --git a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResourceTest.java b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResourceTest.java similarity index 98% rename from refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResourceTest.java rename to refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResourceTest.java index a0f1fe9e8..e57fe1687 100644 --- a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/FluidResourceTest.java +++ b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/FluidResourceTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; diff --git a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResourceTest.java b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResourceTest.java similarity index 98% rename from refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResourceTest.java rename to refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResourceTest.java index 58e650ceb..47dbf56ff 100644 --- a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/ItemResourceTest.java +++ b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/ItemResourceTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.resource; +package com.refinedmods.refinedstorage2.platform.api.support.resource; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; diff --git a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImplTest.java b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImplTest.java similarity index 98% rename from refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImplTest.java rename to refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImplTest.java index f36fafcfb..54873b215 100644 --- a/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/resource/list/FuzzyResourceListImplTest.java +++ b/refinedstorage2-platform-api/src/test/java/com/refinedmods/refinedstorage2/platform/api/support/resource/list/FuzzyResourceListImplTest.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.api.resource.list; +package com.refinedmods.refinedstorage2.platform.api.support.resource.list; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import java.util.Collection; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java index 8fb4b7f45..0e872f7cb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java @@ -1,32 +1,32 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.WirelessGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorScreen; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorScreen; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.FluidResourceRendering; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ItemResourceRendering; -import com.refinedmods.refinedstorage2.platform.common.screen.ConstructorScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.ControllerScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.DestructorScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.DiskDriveScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.ExporterScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.ExternalStorageScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.FluidStorageBlockScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.ImporterScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.InterfaceScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.ItemStorageBlockScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.RegulatorUpgradeScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.StorageMonitorScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.WirelessTransmitterScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.amount.DetectorScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.CraftingGridScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.GridScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.hint.FluidGridInsertionHint; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerScreen; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorScreen; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterScreen; +import com.refinedmods.refinedstorage2.platform.common.grid.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.CraftingGridScreen; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.GridScreen; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.hint.FluidGridInsertionHint; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceScreen; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterScreen; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveScreen; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageScreen; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockScreen; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockScreen; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorScreen; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResourceRendering; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeScreen; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterScreen; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index ae08e3872..8fefa1e76 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -8,60 +8,18 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.PlatformApiProxy; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; -import com.refinedmods.refinedstorage2.platform.common.block.DiskDriveBlock; -import com.refinedmods.refinedstorage2.platform.common.block.FluidStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; -import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ItemDropConstructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceBlockConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceFireworksConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceFluidConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.BlockBreakDestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.FluidBreakDestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.ItemPickupDestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.FluidStorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.FluidStorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.ItemStorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.ItemStorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.BaseWirelessTransmitterRangeModifier; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.CreativeRangeUpgradeWirelessTransmitterRangeModifier; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.RangeUpgradeWirelessTransmitterRangeModifier; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.WirelessTransmitterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ConstructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.DestructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.RegulatorUpgradeContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.WirelessGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive.DiskDriveContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.configurationcard.ConfigurationCardItem; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.BlockBreakDestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.FluidBreakDestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ItemDropConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ItemPickupDestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.PlaceBlockConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.PlaceFireworksConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.PlaceFluidConstructorStrategy; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntityTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; @@ -72,29 +30,71 @@ import com.refinedmods.refinedstorage2.platform.common.content.Menus; import com.refinedmods.refinedstorage2.platform.common.content.RegistryCallback; import com.refinedmods.refinedstorage2.platform.common.content.Sounds; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.FluidResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.item.ConfigurationCardItem; -import com.refinedmods.refinedstorage2.platform.common.item.FluidStorageDiskItem; -import com.refinedmods.refinedstorage2.platform.common.item.FortuneUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.ItemStorageDiskItem; -import com.refinedmods.refinedstorage2.platform.common.item.ProcessorItem; -import com.refinedmods.refinedstorage2.platform.common.item.RangeUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.SimpleItem; -import com.refinedmods.refinedstorage2.platform.common.item.SimpleUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.WirelessGridItem; -import com.refinedmods.refinedstorage2.platform.common.item.WrenchItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.FluidStorageBlockBlockItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.ItemStorageBlockBlockItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.SimpleBlockItem; -import com.refinedmods.refinedstorage2.platform.common.loot.EnergyLootItemFunctionSerializer; -import com.refinedmods.refinedstorage2.platform.common.loot.StorageBlockLootItemFunctionSerializer; -import com.refinedmods.refinedstorage2.platform.common.recipe.UpgradeWithEnchantedBookRecipeSerializer; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerType; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.GridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.grid.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlock; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.misc.WrenchItem; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockBlockItem; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockBlockItem; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.StorageBlockLootItemFunctionSerializer; +import com.refinedmods.refinedstorage2.platform.common.storage.storagedisk.FluidStorageDiskItem; +import com.refinedmods.refinedstorage2.platform.common.storage.storagedisk.ItemStorageDiskItem; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.FluidStorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.FluidStorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.ItemStorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.ItemStorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlock; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlock; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleItem; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyLootItemFunctionSerializer; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.upgrade.FortuneUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RangeUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.SimpleUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeWithEnchantedBookRecipeSerializer; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.BaseWirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.CreativeRangeUpgradeWirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.RangeUpgradeWirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterContainerMenu; import java.util.Optional; import java.util.function.BiFunction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java index 282796396..4a29e60cf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage2.platform.common; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.common.menu.MenuOpener; -import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; -import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; -import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; public abstract class AbstractPlatform implements Platform { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java index cf7e69c22..25635fec4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridMatrixCloseBehavior; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSize; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSortingTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java index f5d161b7c..8844f28b7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java index 4368389a8..2a26f87b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java @@ -3,14 +3,14 @@ import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.menu.MenuOpener; -import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; -import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; -import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index ccd58f6ad..e8d5c4f34 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -9,71 +9,71 @@ import com.refinedmods.refinedstorage2.api.network.impl.NetworkFactory; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHints; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.api.upgrade.BuiltinUpgradeDestinations; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.CompositeStorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.CompositeStorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.CompositeWirelessTransmitterRangeModifier; -import com.refinedmods.refinedstorage2.platform.common.integration.recipemod.CompositeIngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.internal.energy.ItemEnergyStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CompositeGridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.NoOpGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.common.internal.item.CompositeSlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.common.internal.item.EnergyItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.item.InventorySlotReference; -import com.refinedmods.refinedstorage2.platform.common.internal.item.InventorySlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.item.NetworkBoundItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.item.StorageContainerItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.network.LevelConnectionProvider; -import com.refinedmods.refinedstorage2.platform.common.internal.registry.PlatformRegistryImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.FluidResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ItemResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.ClientStorageRepository; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.StorageRepositoryImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.BuiltinUpgradeDestinationsImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeRegistryImpl; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.hint.GridInsertionHintsImpl; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.hint.ItemGridInsertionHint; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.hint.SingleItemGridInsertionHint; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; +import com.refinedmods.refinedstorage2.platform.common.grid.NoOpGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.hint.GridInsertionHintsImpl; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.hint.ItemGridInsertionHint; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.hint.SingleItemGridInsertionHint; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.CompositeGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.CompositeGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.CompositeGridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.common.recipemod.CompositeIngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.storage.ClientStorageRepository; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageContainerItemHelperImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageRepositoryImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.common.support.LevelConnectionProvider; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; +import com.refinedmods.refinedstorage2.platform.common.support.energy.ItemEnergyStorage; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.CompositeSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReference; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemHelperImpl; +import com.refinedmods.refinedstorage2.platform.common.support.registry.PlatformRegistryImpl; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.upgrade.BuiltinUpgradeDestinationsImpl; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.CompositeWirelessTransmitterRangeModifier; import java.util.ArrayList; import java.util.Arrays; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java index 9867803af..a3ee1bd32 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java @@ -3,14 +3,14 @@ import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.menu.MenuOpener; -import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; -import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; -import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableShapeCacheKey.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableShapeCacheKey.java deleted file mode 100644 index 26a9c5b36..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableShapeCacheKey.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.block; - -import net.minecraft.world.level.block.state.BlockState; - -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.DOWN; -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.EAST; -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.NORTH; -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.SOUTH; -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.UP; -import static com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport.WEST; - -public record CableShapeCacheKey(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) { - static CableShapeCacheKey of(final BlockState state) { - return new CableShapeCacheKey( - state.getValue(NORTH), - state.getValue(EAST), - state.getValue(SOUTH), - state.getValue(WEST), - state.getValue(UP), - state.getValue(DOWN) - ); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerType.java deleted file mode 100644 index ffa70e415..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerType.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.block; - -public enum ControllerType { - NORMAL, - CREATIVE -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/package-info.java deleted file mode 100644 index 95548756b..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.direction; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/package-info.java deleted file mode 100644 index 4b3c1e0ee..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/package-info.java deleted file mode 100644 index 722fc4c9b..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/package-info.java deleted file mode 100644 index 9a01ce159..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.detector; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/package-info.java deleted file mode 100644 index 4781627de..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/package-info.java deleted file mode 100644 index c7c03d927..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.exporter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/package-info.java deleted file mode 100644 index 54005274b..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java deleted file mode 100644 index ac8ae526c..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/package-info.java deleted file mode 100644 index 72943d835..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.iface; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/package-info.java deleted file mode 100644 index 2fa61e508..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/package-info.java deleted file mode 100644 index 4c4a038db..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.storage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/package-info.java deleted file mode 100644 index acaf1c2fe..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/package-info.java deleted file mode 100644 index feb736764..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java deleted file mode 100644 index 0518428e0..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/package-info.java deleted file mode 100644 index b68a15e67..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/package-info.java deleted file mode 100644 index 48aa23dc4..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.block.ticker; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java index 045bf8b18..315b4eae4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ConfigurationCardItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.configurationcard; -import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.configurationcard.ConfigurationCardTarget; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItemPropertyFunction.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItemPropertyFunction.java index e60ee181e..0da16a8f9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/ConfigurationCardItemPropertyFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItemPropertyFunction.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.render; - -import com.refinedmods.refinedstorage2.platform.common.item.ConfigurationCardItem; +package com.refinedmods.refinedstorage2.platform.common.configurationcard; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/package-info.java new file mode 100644 index 000000000..a3c44929c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.configurationcard; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractConstructorDestructorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractConstructorDestructorBlock.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractConstructorDestructorBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractConstructorDestructorBlock.java index 90c819494..9144a29a4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractConstructorDestructorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractConstructorDestructorBlock.java @@ -1,6 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalCableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/AbstractItemConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/AbstractItemConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java index 5ba56635d..9764fad8b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/AbstractItemConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java index d93383b3a..efd701758 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.core.filter.Filter; @@ -6,10 +6,10 @@ import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.List; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategyFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategyFactory.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategyFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategyFactory.java index df66a81f9..a6f0c4927 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/BlockBreakDestructorStrategyFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategyFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/CompositeConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/CompositeConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java index 170a58150..a0b19c148 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/CompositeConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategy; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/CompositeDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/CompositeDestructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java index 198467463..448725d9a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/CompositeDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.filter.Filter; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ConstructorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ConstructorBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java index 0efabbdfb..89ffe27fe 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ConstructorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java index 6137b4f8a..b741112e1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ConstructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; @@ -7,14 +7,13 @@ import com.refinedmods.refinedstorage2.api.network.node.task.TaskExecutor; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractSchedulingNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ConstructorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.ArrayList; import java.util.Collection; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ConstructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java similarity index 74% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ConstructorContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java index 4430587ba..5c353e667 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ConstructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSchedulingContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ConstructorDropItemsSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ConstructorDropItemsSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java index d8d900e65..bb0351593 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ConstructorDropItemsSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java @@ -1,6 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractYesNoSideButtonWidget; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ConstructorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java similarity index 63% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ConstructorScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java index db41127ab..7929d28b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ConstructorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java @@ -1,10 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ConstructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.ConstructorDropItemsSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.SchedulingModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.SchedulingModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DestructorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DestructorBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java index e60dbdb31..df899e769 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DestructorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java index 3d2e7ad75..dd28f952a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/DestructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.filter.Filter; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; @@ -6,17 +6,16 @@ import com.refinedmods.refinedstorage2.api.network.node.NetworkNodeActor; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractUpgradeableNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterModeSettings; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.DestructorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractUpgradeableNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.List; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/DestructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/DestructorContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java index 0ef3973b4..6ea56146f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/DestructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSimpleFilterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DestructorPickupItemsSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DestructorPickupItemsSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java index bc8f403d5..56fd53f66 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DestructorPickupItemsSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java @@ -1,6 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractYesNoSideButtonWidget; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DestructorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DestructorScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java index fa4e8d9ec..de4b64039 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DestructorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.DestructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.DestructorPickupItemsSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FilterModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FilterModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java index 74f7ec688..5db002d5e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.core.filter.Filter; @@ -6,10 +6,10 @@ import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategyFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategyFactory.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategyFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategyFactory.java index b210e9d98..61a70b149 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/FluidBreakDestructorStrategyFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategyFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java index c0d23a4d4..e2a855891 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategyFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategyFactory.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategyFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategyFactory.java index 849711b6d..fb4644a0a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/ItemDropConstructorStrategyFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategyFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java index 81eb35d1b..aedccbee2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.core.filter.Filter; @@ -6,9 +6,9 @@ import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.List; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategyFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategyFactory.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategyFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategyFactory.java index b478e0bc8..36b9bc027 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/destructor/ItemPickupDestructorStrategyFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategyFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.destructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.blockentity.destructor.DestructorStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.DestructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceBlockConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceBlockConstructorStrategy.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceBlockConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceBlockConstructorStrategy.java index 78e8bd9c7..b2dd9717f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceBlockConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceBlockConstructorStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; import net.minecraft.core.BlockPos; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFireworksConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFireworksConstructorStrategy.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFireworksConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFireworksConstructorStrategy.java index 8f8a4f3b1..98a804750 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFireworksConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFireworksConstructorStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFluidConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFluidConstructorStrategy.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFluidConstructorStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFluidConstructorStrategy.java index a438d72a3..3987a67e1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/constructor/PlaceFluidConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/PlaceFluidConstructorStrategy.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.constructor; +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.constructor.ConstructorStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.constructordestructor.ConstructorStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/package-info.java new file mode 100644 index 000000000..2ea0fb378 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/package-info.java deleted file mode 100644 index 98c102cfb..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.detector; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java deleted file mode 100644 index 91ebe8cad..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/package-info.java deleted file mode 100644 index d70deab8c..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/package-info.java deleted file mode 100644 index c1a0e9ed7..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/package-info.java deleted file mode 100644 index 9565d25b4..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/package-info.java deleted file mode 100644 index eec7d4ee8..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/package-info.java deleted file mode 100644 index fbb8aeb9d..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/package-info.java deleted file mode 100644 index 7b5605d89..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/package-info.java deleted file mode 100644 index 7da7737fa..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.containermenu.transfer; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java index ccb05c8f0..2d52bb6d0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockColorMap.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.block.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import java.util.Objects; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockConstants.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockConstants.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockConstants.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockConstants.java index 661f965f8..8a5daa3aa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockConstants.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockConstants.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.content; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index f200fb29b..42b6fc876 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -1,24 +1,24 @@ package com.refinedmods.refinedstorage2.platform.common.content; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; -import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.WirelessTransmitterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.grid.GridBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlockEntity; import java.util.EnumMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java index 12832d9fd..d8c8ac8ea 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java @@ -1,27 +1,27 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.block.CableBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ConstructorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; -import com.refinedmods.refinedstorage2.platform.common.block.DestructorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.DiskDriveBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.FluidStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; -import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; -import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; -import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.ControllerBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorBlock; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorBlock; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlock; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerType; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlock; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterBlock; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.grid.GridBlock; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlock; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.CableBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlock; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlock; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlock; import java.util.EnumMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 4d78b1573..22f82f038 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.item.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index d2c58c041..cde4fde76 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.internal.item.EnergyItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.item.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; import java.util.Arrays; import java.util.function.Consumer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index 9851418ac..608cd7e32 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.item.ProcessorItem; -import com.refinedmods.refinedstorage2.platform.common.item.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import java.util.ArrayList; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java index 671b2ba41..c859f54f9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java @@ -1,22 +1,22 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ConstructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.DestructorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.RegulatorUpgradeContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.WirelessGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive.DiskDriveContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.GridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterContainerMenu; import java.util.Objects; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlock.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlock.java index c07cf8318..be41270c2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlock.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.controller; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.ControllerBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.ControllerBlockItem; -import com.refinedmods.refinedstorage2.platform.common.item.block.CreativeControllerBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java index 86287650b..cd836c654 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java @@ -1,18 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.network.impl.node.controller.ControllerNetworkNode; -import com.refinedmods.refinedstorage2.platform.api.blockentity.EnergyBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerEnergyType; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.energy.CreativeEnergyStorage; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.energy.BlockEntityEnergyStorage; +import com.refinedmods.refinedstorage2.platform.common.support.energy.CreativeEnergyStorage; import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/ControllerBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/ControllerBlockEntityTicker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java index fc386bf8f..228520546 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/ControllerBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.ticker; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.api.network.impl.node.controller.ControllerNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockItem.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockItem.java index c03d60f9d..034a7f446 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ControllerBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockItem.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.network.impl.energy.EnergyStorageImpl; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractEnergyBlockItem; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractEnergyBlockItem; import com.refinedmods.refinedstorage2.platform.common.Platform; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ControllerContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ControllerContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java index 571c184a5..f8beb08ee 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ControllerContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerEnergyType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerEnergyType.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerEnergyType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerEnergyType.java index ccd5c7044..bf11163a6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ControllerEnergyType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerEnergyType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.api.network.impl.node.controller.ControllerEnergyState; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/ControllerModelPredicateProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerModelPredicateProvider.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/ControllerModelPredicateProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerModelPredicateProvider.java index 550c33368..bcf8ceaa8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/ControllerModelPredicateProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerModelPredicateProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.render.model; +package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerScreen.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerScreen.java index e7b023401..424a3624c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ControllerScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.controller; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.ProgressWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.ProgressWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerType.java new file mode 100644 index 000000000..42f02035e --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerType.java @@ -0,0 +1,6 @@ +package com.refinedmods.refinedstorage2.platform.common.controller; + +public enum ControllerType { + NORMAL, + CREATIVE +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java index 5277f6c32..20ba2efea 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/CreativeControllerBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java @@ -1,4 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.controller; + +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; import net.minecraft.network.chat.Component; import net.minecraft.world.item.Item; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/package-info.java new file mode 100644 index 000000000..2b5a97d76 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.controller; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorAmount.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java similarity index 61% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorAmount.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java index bfd3a2155..2860f141a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorAmount.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.detector; +package com.refinedmods.refinedstorage2.platform.common.detector; public interface DetectorAmount { long getAmount(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DetectorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DetectorBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java index 62673529b..ca8d821ae 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DetectorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java @@ -1,14 +1,17 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.detector; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; -import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java index d3ba29d42..8c7b047e4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java @@ -1,21 +1,19 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.detector; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorAmountStrategy; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorAmountStrategyImpl; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorNetworkNode; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java index 973507fde..550068f5d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/detector/DetectorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java @@ -1,13 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.detector; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorModeSettings.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java index 773a768d6..7a3f72c5a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.detector; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DetectorModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DetectorModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java index 58559075b..78b1cd534 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/DetectorModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java @@ -1,7 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DetectorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java similarity index 61% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DetectorScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java index f631c035f..1861821ec 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DetectorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.detector; -import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.DetectorModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.amount.AbstractSingleAmountScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/FuzzyDetectorAmountStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/FuzzyDetectorAmountStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java index 49ce60812..0b404b412 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/FuzzyDetectorAmountStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.detector; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.AbstractDetectorAmountStrategy; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/package-info.java similarity index 76% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/package-info.java index 0161aed3b..661d9457a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/integration/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.integration; +package com.refinedmods.refinedstorage2.platform.common.detector; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/AbstractFuzzyExporterTransferStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/AbstractFuzzyExporterTransferStrategy.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/AbstractFuzzyExporterTransferStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/AbstractFuzzyExporterTransferStrategy.java index f3f6401fb..b2ec80ad9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/AbstractFuzzyExporterTransferStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/AbstractFuzzyExporterTransferStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.network.node; +package com.refinedmods.refinedstorage2.platform.common.exporter; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.AbstractExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java index 3377851ea..20001c171 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java @@ -1,12 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.exporter; -import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalCableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java index 1dd5071d4..b28e33526 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/exporter/ExporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java @@ -1,19 +1,18 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.exporter; +package com.refinedmods.refinedstorage2.platform.common.exporter; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.CompositeExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.ExporterNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.exporter.ExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.task.TaskExecutor; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractSchedulingNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.List; import java.util.function.LongSupplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ExporterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ExporterContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java index d2855e04a..41bc668a0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ExporterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.exporter; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.exporter.ExporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSchedulingContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExporterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterScreen.java similarity index 62% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExporterScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterScreen.java index 3b1f0056a..16bd5ea65 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExporterScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.exporter; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ExporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.SchedulingModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.SchedulingModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/package-info.java similarity index 76% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/package-info.java index a43fa36d6..9765c7b93 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.blockentity; +package com.refinedmods.refinedstorage2.platform.common.exporter; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlock.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlock.java index 27aa3852c..e1747fe9c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/AbstractGridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlock.java @@ -1,16 +1,14 @@ - -package com.refinedmods.refinedstorage2.platform.common.block.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; -import com.refinedmods.refinedstorage2.platform.common.block.BlockConstants; -import com.refinedmods.refinedstorage2.platform.common.block.BlockItemProvider; -import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.menu.GridExtendedMenuProvider; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java index b56d17283..9b70694aa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; @@ -12,10 +12,10 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import java.util.List; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java index c77697a1e..5c2817a0d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; @@ -14,25 +14,23 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridResourceAttributeKeys; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.ClientGridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.CompositeGridResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.GridSearchBox; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.GridSearchBox; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.common.grid.view.CompositeGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import com.refinedmods.refinedstorage2.query.lexer.LexerTokenMappings; import com.refinedmods.refinedstorage2.query.parser.ParserOperatorMappings; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/AbstractGridSynchronizer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridSynchronizer.java similarity index 72% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/AbstractGridSynchronizer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridSynchronizer.java index 0363fd554..9aa55136a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/AbstractGridSynchronizer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridSynchronizer.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java index c2f7e17ad..10029c993 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/ClientCraftingGridSource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java index 3b6765ba4..77525d83c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/CraftingGridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java @@ -1,13 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.block.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.common.block.BlockItemProvider; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java index 54900e49e..0d4a978c8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java @@ -1,18 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.node.grid.GridNetworkNode; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.common.util.ContainerUtil; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java index d7bec2098..88edef327 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java @@ -1,15 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import java.util.ArrayList; import java.util.HashSet; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridMatrixCloseBehavior.java similarity index 59% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridMatrixCloseBehavior.java index 4ea51c0d9..f1d9649b0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CraftingGridMatrixCloseBehavior.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridMatrixCloseBehavior.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; public enum CraftingGridMatrixCloseBehavior { NONE, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java similarity index 58% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java index 117832b78..b9243666a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContext.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java similarity index 68% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java index 984af4fc8..c35aef55f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridRefillContextImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java index 4fcae14dd..76b3cc231 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridResultSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java index 5ba2331b1..d801f4c7b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java index 20375687a..28da566e9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/CraftingGridSourceImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java @@ -1,13 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Comparator; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java index c6ec81cdc..8302bb3ef 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrix.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrixContainerMenu.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrixContainerMenu.java index 52534f587..ee2f926d1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/CraftingMatrixContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrixContainerMenu.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java similarity index 80% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java index 90cdff0fb..6f52dcb9d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/grid/GridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java @@ -1,13 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.block.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.common.block.BlockItemProvider; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlockEntity.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlockEntity.java index 5a31f7b21..4f51fb385 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/GridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlockEntity.java @@ -1,8 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.GridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java similarity index 63% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java index f51e0d5b6..5112a79c4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/GridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.GridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java index a8e97e1b1..d4d1d9bc3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java @@ -1,10 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.menu; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.storage.TrackedResourceAmount; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSize.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSize.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSize.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSize.java index 12ed6c0fa..f045e4881 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSize.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSize.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; public enum GridSize { STRETCH, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypes.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypes.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypes.java index 1b08553ba..97cfd835d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypes.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridSortingType; import com.refinedmods.refinedstorage2.api.grid.view.GridView; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; -import com.refinedmods.refinedstorage2.platform.api.grid.PlatformGridResource; +import com.refinedmods.refinedstorage2.platform.api.grid.view.PlatformGridResource; import java.util.Comparator; import java.util.function.Function; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/NoOpGridSynchronizer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/NoOpGridSynchronizer.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/NoOpGridSynchronizer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/NoOpGridSynchronizer.java index 9dbfd0af3..e7915548d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/NoOpGridSynchronizer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/NoOpGridSynchronizer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java index 2d0e597a2..11bfb33bc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/SnapshotCraftingGridRefillContext.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java @@ -1,13 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingGridBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.grid.CraftingMatrix; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java index 0090b8c2e..844609ef9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; @@ -17,10 +17,10 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Collection; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/WirelessGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/WirelessGridContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java index f2b3adab6..c09545546 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/WirelessGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.content.Menus; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/WirelessGridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/WirelessGridExtendedMenuProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java index a938057ae..b9879eb82 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/WirelessGridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.menu; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.WirelessGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WirelessGridItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WirelessGridItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java index c32068be4..0192cd841 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WirelessGridItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java @@ -1,15 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.network.impl.energy.EnergyStorageImpl; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.WirelessGrid; -import com.refinedmods.refinedstorage2.platform.common.menu.WirelessGridExtendedMenuProvider; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGridOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGridOperations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java index 4b239a038..72a53107e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGridOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.grid.GridWatchers; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; import com.refinedmods.refinedstorage2.platform.common.Platform; public class WirelessGridOperations implements GridOperations { diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/package-info.java similarity index 77% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/package-info.java index d38c214aa..978b34830 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.item; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java index 6b295bda9..1e49eda87 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AbstractGridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; @@ -8,20 +8,20 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridSynchronizer; -import com.refinedmods.refinedstorage2.platform.api.grid.PlatformGridResource; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.view.PlatformGridResource; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.DisabledSlot; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.SmallTextClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.History; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.ScrollbarWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.DisabledSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.SmallTextClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.widget.History; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.ScrollbarWidget; import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighter; import com.refinedmods.refinedstorage2.query.lexer.SyntaxHighlighterColors; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java index e299b9500..294fa9653 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/AutoSelectedSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java index 6c9209490..e5ef60dfc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/CraftingGridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridResultSlot; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridResultSlot; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridScreen.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridScreen.java index 27c23f6a9..2a5ca09ca 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBox.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBox.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java index b91b3a9f9..f0462f29f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBox.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import java.util.function.Consumer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java index ef18e46e7..4be049973 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/GridSearchBoxWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.History; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.SearchFieldWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.History; +import com.refinedmods.refinedstorage2.platform.common.support.widget.SearchFieldWidget; import com.refinedmods.refinedstorage2.query.lexer.Lexer; import com.refinedmods.refinedstorage2.query.lexer.LexerException; import com.refinedmods.refinedstorage2.query.lexer.LexerTokenMappings; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java index 4f6e481e0..4d3f3fc45 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModified.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; record LastModified(Type type, long amount) { private static final long SECOND = 1000; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java index dc74f41da..c69a792bd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SizeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java index 58d091f4b..1ef307191 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingDirectionSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java index 53f6b99b6..92ea334e6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SortingTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSortingTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java index a6b1e8873..68f89df4e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/StorageChannelTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java index 48c4d71f4..b4517f120 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/SynchronizationSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/FluidGridInsertionHint.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/FluidGridInsertionHint.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java index a2f806c31..9b512c7ec 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/FluidGridInsertionHint.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid.hint; +package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/GridInsertionHintsImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/GridInsertionHintsImpl.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/GridInsertionHintsImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/GridInsertionHintsImpl.java index d4a8a8308..c4b258e3b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/GridInsertionHintsImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/GridInsertionHintsImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid.hint; +package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHints; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/ItemGridInsertionHint.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/ItemGridInsertionHint.java similarity index 72% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/ItemGridInsertionHint.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/ItemGridInsertionHint.java index 1be792b0f..47173ff65 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/ItemGridInsertionHint.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/ItemGridInsertionHint.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid.hint; +package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/SingleItemGridInsertionHint.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/SingleItemGridInsertionHint.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/SingleItemGridInsertionHint.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/SingleItemGridInsertionHint.java index 84207b482..7a4a514b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/SingleItemGridInsertionHint.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/SingleItemGridInsertionHint.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid.hint; +package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/package-info.java new file mode 100644 index 000000000..65a19a5e0 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/package-info.java new file mode 100644 index 000000000..ab8127760 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.grid.screen; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridExtractionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridExtractionStrategy.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridExtractionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridExtractionStrategy.java index 11898dbf8..4c0dd60f7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridExtractionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridExtractionStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridInsertionStrategy.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridInsertionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridInsertionStrategy.java index 5024aa0c2..8a005135c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridInsertionStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.Platform; public class ClientGridInsertionStrategy implements GridInsertionStrategy { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridScrollingStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridScrollingStrategy.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridScrollingStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridScrollingStrategy.java index 35411f0a2..4596a90c0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/ClientGridScrollingStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/ClientGridScrollingStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridExtractionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridExtractionStrategy.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridExtractionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridExtractionStrategy.java index 2a44a9a78..fe3f068a7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridExtractionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridExtractionStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridInsertionStrategy.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridInsertionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridInsertionStrategy.java index ee726499f..4abc1d8c6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridInsertionStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridScrollingStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridScrollingStrategy.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridScrollingStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridScrollingStrategy.java index f3c5d5c7f..51ba457d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/CompositeGridScrollingStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/CompositeGridScrollingStrategy.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/package-info.java new file mode 100644 index 000000000..0d503cef2 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/strategy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.grid.strategy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractFluidGridResourceFactory.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractFluidGridResourceFactory.java index 537d7fadb..bf38d4884 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractFluidGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractFluidGridResourceFactory.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.common.grid.view; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import java.util.Optional; import java.util.Set; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractItemGridResourceFactory.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractItemGridResourceFactory.java index 1acf07e20..10dd7cf6d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/AbstractItemGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/AbstractItemGridResourceFactory.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.common.grid.view; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import java.util.Optional; import java.util.Set; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/CompositeGridResourceFactory.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/CompositeGridResourceFactory.java index 7c2c7e23e..90526370b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/CompositeGridResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/CompositeGridResourceFactory.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.common.grid.view; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java index ac68dd07b..05afa5db5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/FluidGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.common.grid.view; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.grid.AbstractPlatformGridResource; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridResourceAttributeKeys; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.view.AbstractPlatformGridResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.List; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/ItemGridResource.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/ItemGridResource.java index 84729ae2c..df3aaafce 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/ItemGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/ItemGridResource.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.common.grid.view; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.grid.AbstractPlatformGridResource; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.grid.GridResourceAttributeKeys; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.view.AbstractPlatformGridResource; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.List; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/package-info.java new file mode 100644 index 000000000..605637003 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.grid.view; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/ExportedResourcesContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/ExportedResourcesContainer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java index 0ae8247dc..2953ae747 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/ExportedResourcesContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java @@ -1,17 +1,17 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.iface; +package com.refinedmods.refinedstorage2.platform.common.iface; import com.refinedmods.refinedstorage2.api.network.impl.node.iface.InterfaceExportState; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.FuzzyModeNormalizer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainerType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannel; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FuzzyModeNormalizer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainerType; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Collection; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/InterfaceBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/InterfaceBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java index f35e537a5..dadc0732e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/InterfaceBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java @@ -1,10 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.iface; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.item.block.SimpleBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java index e0831d42a..ba8206982 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/iface/InterfaceBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.iface; +package com.refinedmods.refinedstorage2.platform.common.iface; import com.refinedmods.refinedstorage2.api.network.impl.node.iface.InterfaceNetworkNode; import com.refinedmods.refinedstorage2.api.network.impl.node.iface.externalstorage.InterfaceExternalStorageProvider; @@ -6,18 +6,17 @@ import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainerType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainerType; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.BlockEntityWithDrops; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/InterfaceContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/InterfaceContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java index 45691c629..481cb023e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/InterfaceContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.iface; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfacePlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfacePlatformExternalStorageProviderFactory.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfacePlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfacePlatformExternalStorageProviderFactory.java index cc0a42c2a..0cc89388b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfacePlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfacePlatformExternalStorageProviderFactory.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.network.node.iface.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.iface; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfaceProxyExternalStorageProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfaceProxyExternalStorageProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java index 5b5ffeb88..c7b5cb50e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/InterfaceProxyExternalStorageProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.network.node.iface.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.iface; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.impl.node.iface.InterfaceNetworkNode; @@ -6,8 +6,7 @@ import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.AbstractNetworkNodeContainerBlockEntity; import java.util.Collections; import java.util.Iterator; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/InterfaceScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceScreen.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/InterfaceScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceScreen.java index 73a72b953..fcba67225 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/InterfaceScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.iface; -import com.refinedmods.refinedstorage2.platform.common.containermenu.InterfaceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/package-info.java new file mode 100644 index 000000000..3a2baefdf --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.iface; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java index 667088e69..b033d33fd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ImporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java @@ -1,12 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.importer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalCableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java index be7b11fc4..835401d38 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java @@ -1,20 +1,22 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.importer; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; import com.refinedmods.refinedstorage2.api.network.impl.node.importer.CompositeImporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.impl.node.importer.ImporterNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategy; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractUpgradeableNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.List; import java.util.function.LongSupplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ImporterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ImporterContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java index 575505068..8dace9a94 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/ImporterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.importer; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSimpleFilterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ImporterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterScreen.java similarity index 69% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ImporterScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterScreen.java index cfd251938..e77a4766b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ImporterScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.importer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ImporterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FilterModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FilterModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/package-info.java new file mode 100644 index 000000000..451566b79 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.importer; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java deleted file mode 100644 index d101874c8..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.integration; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java deleted file mode 100644 index ea15fc24a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java deleted file mode 100644 index 59e9f845a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/package-info.java deleted file mode 100644 index bac26d372..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.energy; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/package-info.java deleted file mode 100644 index 4ced6e450..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/package-info.java deleted file mode 100644 index fc6f12ad8..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/view/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.grid.view; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/package-info.java deleted file mode 100644 index c7e7486bc..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.item; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/package-info.java deleted file mode 100644 index ab2aeab3a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/iface/externalstorage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.network.node.iface.externalstorage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/package-info.java deleted file mode 100644 index 5aea8532a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/node/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.network.node; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/package-info.java deleted file mode 100644 index 2723c7662..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.network; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java deleted file mode 100644 index f2a37e56b..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.registry; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/package-info.java deleted file mode 100644 index 4d1afd1b1..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.resource; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/package-info.java deleted file mode 100644 index 96e3df0db..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.storage.channel; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/package-info.java deleted file mode 100644 index 615b22f95..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.storage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/package-info.java deleted file mode 100644 index b634f6ce7..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/package-info.java deleted file mode 100644 index 664f955c6..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.internal.upgrade; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/package-info.java deleted file mode 100644 index 7fa2468c8..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.item.block; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/package-info.java deleted file mode 100644 index 32030996a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.loot; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/package-info.java deleted file mode 100644 index b8d919aa7..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.menu; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ProcessorItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/ProcessorItem.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ProcessorItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/ProcessorItem.java index 14fd04787..af6e6b2f9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ProcessorItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/ProcessorItem.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.misc; import net.minecraft.world.item.Item; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WrenchItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/WrenchItem.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WrenchItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/WrenchItem.java index 544b7fb5b..e0f2a0c76 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/WrenchItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/WrenchItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.misc; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/package-info.java similarity index 77% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/package-info.java index accc64647..e0f528efe 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/util/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/misc/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.util; +package com.refinedmods.refinedstorage2.platform.common.misc; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java index b74a819aa..73a7ece1c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java @@ -1,13 +1,18 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.networking; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java new file mode 100644 index 000000000..890108d10 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java @@ -0,0 +1,23 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import net.minecraft.world.level.block.state.BlockState; + +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.DOWN; +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.EAST; +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.NORTH; +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.SOUTH; +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.UP; +import static com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport.WEST; + +public record CableShapeCacheKey(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) { + public static CableShapeCacheKey of(final BlockState state) { + return new CableShapeCacheKey( + state.getValue(NORTH), + state.getValue(EAST), + state.getValue(SOUTH), + state.getValue(WEST), + state.getValue(UP), + state.getValue(DOWN) + ); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java index 90ced803f..88d1f01be 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java @@ -1,13 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.networking; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/package-info.java new file mode 100644 index 000000000..71023c966 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/package-info.java deleted file mode 100644 index a09ff90e2..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.packet; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/package-info.java deleted file mode 100644 index ae708cfeb..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.recipe; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/CompositeIngredientConverter.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/CompositeIngredientConverter.java index 7d2c93148..5e266022a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/CompositeIngredientConverter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/CompositeIngredientConverter.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod; +package com.refinedmods.refinedstorage2.platform.common.recipemod; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import java.util.Collection; import java.util.HashSet; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java index 4615c14ed..0515e2f36 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ClickableIngredient.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import mezz.jei.api.ingredients.ITypedIngredient; import mezz.jei.api.runtime.IClickableIngredient; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java index fbc6f3937..7e8c7ae80 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/CraftingGridRecipeTransferHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ExclusionZonesGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java similarity index 69% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ExclusionZonesGuiContainerHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java index ac7830d0c..d2028311a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ExclusionZonesGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GhostIngredientHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GhostIngredientHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java index 7e271daf8..9f38ce57f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GhostIngredientHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; import java.util.ArrayList; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java index 2cf862cb3..cd6bc3f46 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java index 48f12da92..11a44d600 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java index 816ce48a3..d34c68f3b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiGridSynchronizer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiProxy.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiProxy.java index a57c59bd5..fc1f40c9e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/JeiProxy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiProxy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import mezz.jei.api.runtime.IJeiRuntime; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java index 114ddd75b..ffa54ae69 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/MissingItemRecipeTransferError.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import java.awt.Color; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/RefinedStorageJeiModPlugin.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/RefinedStorageJeiModPlugin.java index b3291425f..7c322fa83 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/RefinedStorageJeiModPlugin.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/RefinedStorageJeiModPlugin.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceGuiContainerHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java index 428977573..6ffe564cd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceIngredientConverter.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java index d46c7c58a..cc39906b1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/integration/recipemod/jei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei; +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/package-info.java new file mode 100644 index 000000000..7d9498461 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.recipemod.jei; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/package-info.java new file mode 100644 index 000000000..51b4e8ecf --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.recipemod; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/package-info.java deleted file mode 100644 index 0dde66e2a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.render.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/package-info.java deleted file mode 100644 index 265163d45..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.render.model; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/package-info.java deleted file mode 100644 index ccef01fd0..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.render; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TooltipRenderer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TooltipRenderer.java deleted file mode 100644 index 602ded5ff..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TooltipRenderer.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; - -import java.util.List; - -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.network.chat.Component; - -@FunctionalInterface -public interface TooltipRenderer { - void render(GuiGraphics graphics, List lines, int x, int y); -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/package-info.java deleted file mode 100644 index 0c5bbe0aa..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen.amount; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/package-info.java deleted file mode 100644 index 839ca5cc4..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/hint/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ - -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen.grid.hint; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/package-info.java deleted file mode 100644 index a869e42dc..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/package-info.java deleted file mode 100644 index ecf4395a5..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/package-info.java deleted file mode 100644 index 3faf55777..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/package-info.java deleted file mode 100644 index db748f677..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.screen.widget; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/AbstractStorageContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/AbstractStorageContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java index c4fa0e6bb..b8384a624 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/AbstractStorageContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.MenuType; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java index e4cf2c900..9d626c462 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java @@ -1,16 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; - -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.AbstractStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageAccessor; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.StorageTooltipHelper; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AccessModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FilterModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.PrioritySideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.ProgressWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +package com.refinedmods.refinedstorage2.platform.common.storage; + +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FilterModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.ProgressWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AccessModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AccessModeSettings.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java index 2b9e27d24..200ffa503 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AccessModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.AccessMode; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AccessModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSideButtonWidget.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AccessModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSideButtonWidget.java index 08e73ed44..957f45eb2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AccessModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSideButtonWidget.java @@ -1,7 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/BucketPlayerInventoryInsertableStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/BucketPlayerInventoryInsertableStorage.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/BucketPlayerInventoryInsertableStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/BucketPlayerInventoryInsertableStorage.java index f102d74e2..a1f5a397b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/BucketPlayerInventoryInsertableStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/BucketPlayerInventoryInsertableStorage.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; import com.refinedmods.refinedstorage2.api.storage.Storage; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepository.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepository.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepository.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepository.java index ca2cc6854..330d2fa6a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepository.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepository.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.storage.Storage; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageType.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageType.java index d56a8d2c1..6822e780f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.InMemoryStorageImpl; @@ -9,12 +9,10 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.LimitedPlatformStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.PlatformStorage; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageType.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageType.java index f2270d09f..fbf747c35 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.InMemoryStorageImpl; @@ -9,11 +9,9 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.LimitedPlatformStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.PlatformStorage; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java index 1dcbcbb3e..b058703b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.limited.LimitedStorage; import com.refinedmods.refinedstorage2.api.storage.limited.LimitedStorageImpl; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; public class LimitedPlatformStorage extends PlatformStorage implements LimitedStorage { private final LimitedStorageImpl limitedStorage; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java index 7dcf36f6d..218213516 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.AbstractProxyStorage; @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.SerializableStorage; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/PrioritySideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PrioritySideButtonWidget.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/PrioritySideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PrioritySideButtonWidget.java index dfa2b79aa..94fc285af 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/PrioritySideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PrioritySideButtonWidget.java @@ -1,7 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.storage; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.screen.amount.PriorityScreen; +import com.refinedmods.refinedstorage2.platform.common.support.amount.PriorityScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageAccessor.java similarity index 63% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageAccessor.java index e3a43e111..f45b0818b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageAccessor.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; public interface StorageAccessor { long getStored(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageConfigurationContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainer.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageConfigurationContainer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainer.java index c2dd98edb..723141478 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/StorageConfigurationContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainer.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; public interface StorageConfigurationContainer { int getPriority(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainerImpl.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainerImpl.java index f1890948f..883d6afd6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/StorageConfigurationContainerImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageConfigurationContainerImpl.java @@ -1,10 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; import com.refinedmods.refinedstorage2.api.network.node.StorageConfiguration; import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageConfigurationContainer; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; import java.util.function.Consumer; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageContainerItemHelperImpl.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageContainerItemHelperImpl.java index 8f2688022..bb6802484 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/StorageContainerItemHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageContainerItemHelperImpl.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItemHelper; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItemHelper; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.StorageTooltipHelper; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImpl.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImpl.java index fb890bb37..34f75ae7f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImpl.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.SerializableStorage; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java index 4c479ad03..c725062c6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageTooltipHelper.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/StorageTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/StorageTypes.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java index d1700aa35..8e8f4791c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/StorageTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; +package com.refinedmods.refinedstorage2.platform.common.storage; public final class StorageTypes { public static final ItemStorageType ITEM = new ItemStorageType(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/FluidStorageChannelType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/FluidStorageChannelType.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/FluidStorageChannelType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/FluidStorageChannelType.java index b9566d1c2..e6a324666 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/FluidStorageChannelType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/FluidStorageChannelType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.channel; +package com.refinedmods.refinedstorage2.platform.common.storage.channel; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperationsImpl; @@ -8,14 +8,14 @@ import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.list.FuzzyResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.list.FuzzyResourceListImpl; import com.refinedmods.refinedstorage2.platform.api.storage.channel.AbstractPlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannelImpl; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.list.FuzzyResourceList; +import com.refinedmods.refinedstorage2.platform.api.support.resource.list.FuzzyResourceListImpl; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/ItemStorageChannelType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/ItemStorageChannelType.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/ItemStorageChannelType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/ItemStorageChannelType.java index 307e1dcb7..909c14bce 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/ItemStorageChannelType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/ItemStorageChannelType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.channel; +package com.refinedmods.refinedstorage2.platform.common.storage.channel; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperationsImpl; @@ -8,14 +8,14 @@ import com.refinedmods.refinedstorage2.api.resource.list.ResourceListImpl; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.list.FuzzyResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.list.FuzzyResourceListImpl; import com.refinedmods.refinedstorage2.platform.api.storage.channel.AbstractPlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannelImpl; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.list.FuzzyResourceList; +import com.refinedmods.refinedstorage2.platform.api.support.resource.list.FuzzyResourceListImpl; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/StorageChannelTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/StorageChannelTypes.java similarity index 61% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/StorageChannelTypes.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/StorageChannelTypes.java index b7f830692..01e9179c3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/channel/StorageChannelTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/StorageChannelTypes.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.channel; +package com.refinedmods.refinedstorage2.platform.common.storage.channel; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; public final class StorageChannelTypes { public static final PlatformStorageChannelType ITEM = new ItemStorageChannelType(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/package-info.java new file mode 100644 index 000000000..72cbfb5b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/channel/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.storage.channel; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index cbf9409ed..bcd434e8a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageListener; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageNetworkNode; @@ -6,16 +6,14 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.BlockEntityWithDrops; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive.DiskDriveContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive.EmptyStorageDiskInfoAccessor; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.util.ContainerUtil; import com.refinedmods.refinedstorage2.platform.common.util.LevelUtil; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/AbstractDiskDriveBlockEntityRenderer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntityRenderer.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/AbstractDiskDriveBlockEntityRenderer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntityRenderer.java index 1080c43c1..4049f051c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/AbstractDiskDriveBlockEntityRenderer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntityRenderer.java @@ -1,11 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.render.entity; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.DiskDriveBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.render.CubeBuilder; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.render.CubeBuilder; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DiskDriveBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlock.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DiskDriveBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlock.java index c1d252797..597b90aff 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DiskDriveBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlock.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; - -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.DiskDriveBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.item.block.SimpleBlockItem; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; + +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import java.util.function.BiFunction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/DiskDriveBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/DiskDriveBlockEntityTicker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java index c6646cdd1..3f51d4099 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/DiskDriveBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.ticker; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java index 753856c63..fa170ad51 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/DiskDriveContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java @@ -1,17 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItem; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ValidatedSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.AbstractStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageAccessor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItem; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageAccessor; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ValidatedSlot; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/DiskDriveInventory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/DiskDriveInventory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java index 4b314f931..c75713926 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/DiskDriveInventory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageProvider; import com.refinedmods.refinedstorage2.api.storage.TypedStorage; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItem; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DiskDriveScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveScreen.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DiskDriveScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveScreen.java index cac6204bb..62d0c0c06 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/DiskDriveScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive.DiskDriveContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageScreen; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java index d4ac47b4c..233d885c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/EmptyStorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java similarity index 72% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java index 4c1827edc..757508dbd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java index bda3cb129..0d658bd0c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/diskdrive/StorageDiskInfoAccessorImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.diskdrive; +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; -import com.refinedmods.refinedstorage2.platform.api.item.StorageContainerItem; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/package-info.java new file mode 100644 index 000000000..96fe08d70 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.storage.diskdrive; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java index fc5cb0972..f97d1bdf9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ExternalStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java @@ -1,12 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; -import com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage.ExternalStorageBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalCableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java index 37b7b9711..1e904cec6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; import com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage.ExternalStorageNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.externalstorage.ExternalStorageProviderFactory; @@ -6,14 +6,13 @@ import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Optional; import javax.annotation.Nullable; @@ -43,7 +42,7 @@ public class ExternalStorageBlockEntity private final FilterWithFuzzyMode filter; private final StorageConfigurationContainerImpl configContainer; private final ExternalStorageTrackedStorageRepositoryProvider trackedStorageRepositoryProvider; - private final WorkRate workRate = new WorkRate(); + private final ExternalStorageWorkRate workRate = new ExternalStorageWorkRate(); private boolean initialized; public ExternalStorageBlockEntity(final BlockPos pos, final BlockState state) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/ExternalStorageContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/ExternalStorageContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java index e038b320e..cd07f880c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/ExternalStorageContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java @@ -1,9 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExternalStorageScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java similarity index 64% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExternalStorageScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java index ab09e6551..2e7af6c22 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ExternalStorageScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java @@ -1,11 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AccessModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FilterModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.PrioritySideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageScreen; +import com.refinedmods.refinedstorage2.platform.common.storage.AccessModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.storage.PrioritySideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FilterModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepository.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepository.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepository.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepository.java index 7754f4103..8ae59bcad 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepository.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepository.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.tracked.InMemoryTrackedStorageRepository; @@ -38,7 +38,7 @@ ListTag toTag() { void fromTag(final ListTag items) { items.forEach(tag -> type.fromTag( - (CompoundTag) tag, + (CompoundTag) tag, // call super here to avoid marking dirty. (resource, trackedResource) -> super.update( resource, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java index 6b718854b..01f051694 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageTrackedStorageRepositoryProvider.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; import com.refinedmods.refinedstorage2.api.network.impl.node.externalstorage.TrackedStorageRepositoryProvider; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/WorkRate.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/WorkRate.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java index 1c530a918..23cb50b17 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/WorkRate.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.externalstorage; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; import com.google.common.util.concurrent.RateLimiter; -class WorkRate { +class ExternalStorageWorkRate { private static final double[] RATE_LIMITERS = new double[] { 0.5D, // slowest, every 2 sec 0.75D, // faster diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/package-info.java similarity index 72% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/package-info.java index 34cea1edd..dbd3fe16a 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/storagemonitor/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storage.externalstorage; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/package-info.java similarity index 76% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/package-info.java index 251629c87..d5c5c0aa4 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/item/block/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.item.block; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java similarity index 80% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java index 9f7aed88c..dc4ce5c33 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java index aaa2d791a..86e969796 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storage; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.api.network.impl.node.storage.StorageNetworkNode; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Objects; import java.util.UUID; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/AbstractStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockContainerMenu.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/AbstractStorageBlockContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockContainerMenu.java index 6793f6912..a3cd05fa1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/AbstractStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockContainerMenu.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.AbstractStorageContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageAccessor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageConfigurationContainer; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageAccessor; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageBlockScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java index 7c349c920..601f328ff 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.AbstractStorageBlockContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageScreen; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/FluidStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java similarity index 69% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/FluidStorageBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java index 8842b89d2..c8ad7a230 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/FluidStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.FluidStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/FluidStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockEntity.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/FluidStorageBlockBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockEntity.java index 3c5fafc96..b80290bcd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/FluidStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockEntity.java @@ -1,15 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storage; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.api.network.impl.node.storage.StorageNetworkNode; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.FluidStorageBlockContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java index fc90f5772..8a08599da 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/FluidStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java @@ -1,12 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.block.AbstractStorageContainerBlockItem; +import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerBlockItem; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import java.util.UUID; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java index 2a32bfb65..ed6d7eaf4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/FluidStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainer; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java index 0051eb51b..24306c3b6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/FluidStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.AbstractStorageBlockContainerMenu; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ItemStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java similarity index 69% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ItemStorageBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java index 854453343..4badd0804 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ItemStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.ItemStorageBlockBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/ItemStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockEntity.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/ItemStorageBlockBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockEntity.java index 50e06c8dd..f77c3642c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/ItemStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockEntity.java @@ -1,15 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storage; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.api.network.impl.node.storage.StorageNetworkNode; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.ItemStorageBlockContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockItem.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockItem.java index f34d72258..b36ed9efd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/ItemStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockBlockItem.java @@ -1,12 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.block.AbstractStorageContainerBlockItem; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerBlockItem; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import java.util.UUID; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java similarity index 81% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java index cd43b9b56..c8279811c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/storage/block/ItemStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.StorageConfigurationContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainer; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ItemStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockScreen.java similarity index 69% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ItemStorageBlockScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockScreen.java index bbfb9ed98..ceaa93a83 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/ItemStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockScreen.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; - -import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.block.AbstractStorageBlockContainerMenu; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunction.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java index 7d391f748..61c494ad0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.loot; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storage.AbstractStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.LootFunctions; import java.util.UUID; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunctionSerializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunctionSerializer.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunctionSerializer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunctionSerializer.java index face54610..d66b00ee4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/StorageBlockLootItemFunctionSerializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunctionSerializer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.loot; +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/package-info.java new file mode 100644 index 000000000..be2984c49 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java index 70b8f7187..4c752ee4c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FluidStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.storage.storagedisk; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractStorageContainerItem; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/ItemStorageDiskItem.java similarity index 74% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/ItemStorageDiskItem.java index 456cb365c..f2d696c56 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/ItemStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/ItemStorageDiskItem.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.storage.storagedisk; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractStorageContainerItem; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/package-info.java similarity index 73% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/package-info.java index c064632c2..7b412880e 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/blockentity/destructor/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.blockentity.destructor; +package com.refinedmods.refinedstorage2.platform.common.storage.storagedisk; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorExtractionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorExtractionStrategy.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorExtractionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorExtractionStrategy.java index 48472b1aa..05367d735 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorExtractionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorExtractionStrategy.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorInsertionStrategy.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorInsertionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorInsertionStrategy.java index 95e98fdd1..31e9c8f30 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/CompositeStorageMonitorInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/CompositeStorageMonitorInsertionStrategy.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorExtractionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorExtractionStrategy.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorExtractionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorExtractionStrategy.java index 629dfc662..77d48a9df 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorExtractionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorExtractionStrategy.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.TransferHelper; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.BucketPlayerInventoryInsertableStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.BucketPlayerInventoryInsertableStorage; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorInsertionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java index 35a7ed952..95d0a164c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/FluidStorageMonitorInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; @@ -6,11 +6,11 @@ import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/InsertTracker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/InsertTracker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java index 87d42cdee..43c617870 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/InsertTracker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorExtractionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorExtractionStrategy.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorExtractionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorExtractionStrategy.java index 4338802e2..0cf8a8c9a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorExtractionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorExtractionStrategy.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorInsertionStrategy.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorInsertionStrategy.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorInsertionStrategy.java index 297741a93..82ccb5cca 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/ItemStorageMonitorInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/ItemStorageMonitorInsertionStrategy.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.blockentity.storagemonitor.StorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java index 16f02315f..58deb7001 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/StorageMonitorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java @@ -1,12 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java index 19b42690d..215cf30ec 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; @@ -6,19 +6,18 @@ import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannel; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/StorageMonitorBlockEntityRenderer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntityRenderer.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/StorageMonitorBlockEntityRenderer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntityRenderer.java index b1bf7d150..dfc29ce40 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/entity/StorageMonitorBlockEntityRenderer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntityRenderer.java @@ -1,12 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.render.entity; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; -import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/StorageMonitorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java similarity index 72% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/StorageMonitorContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java index ab288c604..d7e8835eb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/StorageMonitorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/StorageMonitorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorScreen.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/StorageMonitorScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorScreen.java index 47b5cf231..4b55dcce1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/StorageMonitorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorScreen.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; -import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.FuzzyModeSideButtonWidget; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.FuzzyModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/package-info.java new file mode 100644 index 000000000..84be21a57 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.storagemonitor; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractBaseBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractBaseBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java index 94438607c..3b0fa491f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractBaseBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java @@ -1,8 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.BlockEntityWithDrops; -import com.refinedmods.refinedstorage2.platform.common.block.entity.PlayerAware; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Sounds; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractBaseContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractBaseContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java index b2f16454b..f8fb21c1f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractBaseContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.Property; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.DisabledSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.DisabledSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.Property; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseScreen.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseScreen.java index fee620d19..b54951840 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractBaseScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseScreen.java @@ -1,21 +1,21 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.UpgradeSlot; -import com.refinedmods.refinedstorage2.platform.common.screen.amount.ResourceAmountScreen; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.HelpClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.MouseWithIconClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.SmallTextClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.UpgradeItemClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.amount.ResourceAmountScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.SmallTextClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.widget.AbstractSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeItemClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeSlot; import java.util.ArrayList; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/AbstractBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBlockEntityTicker.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/AbstractBlockEntityTicker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBlockEntityTicker.java index 813d25cd2..019670400 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/AbstractBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBlockEntityTicker.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.ticker; +package com.refinedmods.refinedstorage2.platform.common.support; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractColoredBlock.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractColoredBlock.java index a674ae71f..7a6e06ac5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractColoredBlock.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block; - -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.item.BlockItem; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java index 34a0bc0c7..cb372c160 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java index bbdbdf330..a4da093fe 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractDirectionalCableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java @@ -1,7 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.networking.CableShapeCacheKey; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; import java.util.Map; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractFilterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractFilterScreen.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractFilterScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractFilterScreen.java index 0c3079c56..dd47a7d05 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/AbstractFilterScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractFilterScreen.java @@ -1,8 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java index e0c9fa77b..d3f218009 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java index b35d96dac..7bfc1ebf4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; +import com.refinedmods.refinedstorage2.platform.api.configurationcard.ConfigurationCardTarget; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java index 636538a98..8bf658309 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractSchedulingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.task.TaskExecutor; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.List; import java.util.stream.Collectors; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java index 030524f05..ade7a61a2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractUpgradeableNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java @@ -1,9 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityWithDrops.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockEntityWithDrops.java similarity index 70% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityWithDrops.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockEntityWithDrops.java index efc79a017..e8a676aad 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityWithDrops.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockEntityWithDrops.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockItemProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockItemProvider.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockItemProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockItemProvider.java index 684966115..a437fbbdb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/BlockItemProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/BlockItemProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.world.item.BlockItem; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java index 92150dacc..09bd61a98 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java @@ -1,6 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.common.networking.CableShapeCacheKey; import java.util.HashMap; import java.util.Map; @@ -39,7 +40,7 @@ public final class CableBlockSupport { private CableBlockSupport() { } - static BlockState getDefaultState(final BlockState state) { + public static BlockState getDefaultState(final BlockState state) { return state .setValue(NORTH, false) .setValue(EAST, false) @@ -50,11 +51,11 @@ static BlockState getDefaultState(final BlockState state) { .setValue(BlockStateProperties.WATERLOGGED, false); } - static void appendBlockStateProperties(final StateDefinition.Builder builder) { + public static void appendBlockStateProperties(final StateDefinition.Builder builder) { builder.add(NORTH, EAST, SOUTH, WEST, UP, DOWN, BlockStateProperties.WATERLOGGED); } - static VoxelShape getShape(final CableShapeCacheKey cacheKey) { + public static VoxelShape getShape(final CableShapeCacheKey cacheKey) { return SHAPE_CACHE.computeIfAbsent(cacheKey, CableBlockSupport::calculateShape); } @@ -81,7 +82,7 @@ private static VoxelShape calculateShape(final CableShapeCacheKey cacheKey) { return shape; } - static BlockState getState( + public static BlockState getState( final BlockState currentState, final LevelAccessor world, final BlockPos pos, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java index 59ff10a08..5e552171b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ClientToServerCommunications.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.packet; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; import java.util.List; import java.util.UUID; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ColorableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ColorableBlock.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ColorableBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ColorableBlock.java index 18b43aa8c..a3128725e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ColorableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ColorableBlock.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DirectionalCableBlockShapes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/DirectionalCableBlockShapes.java similarity index 55% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DirectionalCableBlockShapes.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/DirectionalCableBlockShapes.java index b9db76e42..a645d5df3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/DirectionalCableBlockShapes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/DirectionalCableBlockShapes.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import static net.minecraft.world.level.block.Block.box; -final class DirectionalCableBlockShapes { +public final class DirectionalCableBlockShapes { private static final VoxelShape EXPORTER_NORTH_1 = box(6, 6, 0, 10, 10, 2); private static final VoxelShape EXPORTER_NORTH_2 = box(5, 5, 2, 11, 11, 4); private static final VoxelShape EXPORTER_NORTH_3 = box(3, 3, 4, 13, 13, 6); @@ -61,33 +61,33 @@ final class DirectionalCableBlockShapes { private static final VoxelShape HOLDER_UP = box(7, 10, 7, 9, 14, 9); private static final VoxelShape HOLDER_DOWN = box(7, 2, 7, 9, 6, 9); - static final VoxelShape EXPORTER_NORTH = Shapes.or(EXPORTER_NORTH_1, EXPORTER_NORTH_2, EXPORTER_NORTH_3); - static final VoxelShape EXPORTER_EAST = Shapes.or(EXPORTER_EAST_1, EXPORTER_EAST_2, EXPORTER_EAST_3); - static final VoxelShape EXPORTER_SOUTH = Shapes.or(EXPORTER_SOUTH_1, EXPORTER_SOUTH_2, EXPORTER_SOUTH_3); - static final VoxelShape EXPORTER_WEST = Shapes.or(EXPORTER_WEST_1, EXPORTER_WEST_2, EXPORTER_WEST_3); - static final VoxelShape EXPORTER_UP = Shapes.or(EXPORTER_UP_1, EXPORTER_UP_2, EXPORTER_UP_3); - static final VoxelShape EXPORTER_DOWN = Shapes.or(EXPORTER_DOWN_1, EXPORTER_DOWN_2, EXPORTER_DOWN_3); - - static final VoxelShape IMPORTER_NORTH = Shapes.or(IMPORTER_NORTH_1, IMPORTER_NORTH_2, IMPORTER_NORTH_3); - static final VoxelShape IMPORTER_EAST = Shapes.or(IMPORTER_EAST_1, IMPORTER_EAST_2, IMPORTER_EAST_3); - static final VoxelShape IMPORTER_SOUTH = Shapes.or(IMPORTER_SOUTH_1, IMPORTER_SOUTH_2, IMPORTER_SOUTH_3); - static final VoxelShape IMPORTER_WEST = Shapes.or(IMPORTER_WEST_1, IMPORTER_WEST_2, IMPORTER_WEST_3); - static final VoxelShape IMPORTER_UP = Shapes.or(IMPORTER_UP_1, IMPORTER_UP_2, IMPORTER_UP_3); - static final VoxelShape IMPORTER_DOWN = Shapes.or(IMPORTER_DOWN_1, IMPORTER_DOWN_2, IMPORTER_DOWN_3); - - static final VoxelShape EXTERNAL_STORAGE_NORTH = Shapes.or(box(3, 3, 0, 13, 13, 2), HOLDER_NORTH); - static final VoxelShape EXTERNAL_STORAGE_EAST = Shapes.or(box(14, 3, 3, 16, 13, 13), HOLDER_EAST); - static final VoxelShape EXTERNAL_STORAGE_SOUTH = Shapes.or(box(3, 3, 14, 13, 13, 16), HOLDER_SOUTH); - static final VoxelShape EXTERNAL_STORAGE_WEST = Shapes.or(box(0, 3, 3, 2, 13, 13), HOLDER_WEST); - static final VoxelShape EXTERNAL_STORAGE_UP = Shapes.or(box(3, 14, 3, 13, 16, 13), HOLDER_UP); - static final VoxelShape EXTERNAL_STORAGE_DOWN = Shapes.or(box(3, 0, 3, 13, 2, 13), HOLDER_DOWN); - - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_NORTH = Shapes.or(box(2, 2, 0, 14, 14, 2), HOLDER_NORTH); - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_EAST = Shapes.or(box(14, 2, 2, 16, 14, 14), HOLDER_EAST); - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_SOUTH = Shapes.or(box(2, 2, 14, 14, 14, 16), HOLDER_SOUTH); - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_WEST = Shapes.or(box(0, 2, 2, 2, 14, 14), HOLDER_WEST); - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_DOWN = Shapes.or(box(2, 0, 2, 14, 2, 14), HOLDER_DOWN); - static final VoxelShape CONSTRUCTOR_DESTRUCTOR_UP = Shapes.or(box(2, 14, 2, 14, 16, 14), HOLDER_UP); + public static final VoxelShape EXPORTER_NORTH = Shapes.or(EXPORTER_NORTH_1, EXPORTER_NORTH_2, EXPORTER_NORTH_3); + public static final VoxelShape EXPORTER_EAST = Shapes.or(EXPORTER_EAST_1, EXPORTER_EAST_2, EXPORTER_EAST_3); + public static final VoxelShape EXPORTER_SOUTH = Shapes.or(EXPORTER_SOUTH_1, EXPORTER_SOUTH_2, EXPORTER_SOUTH_3); + public static final VoxelShape EXPORTER_WEST = Shapes.or(EXPORTER_WEST_1, EXPORTER_WEST_2, EXPORTER_WEST_3); + public static final VoxelShape EXPORTER_UP = Shapes.or(EXPORTER_UP_1, EXPORTER_UP_2, EXPORTER_UP_3); + public static final VoxelShape EXPORTER_DOWN = Shapes.or(EXPORTER_DOWN_1, EXPORTER_DOWN_2, EXPORTER_DOWN_3); + + public static final VoxelShape IMPORTER_NORTH = Shapes.or(IMPORTER_NORTH_1, IMPORTER_NORTH_2, IMPORTER_NORTH_3); + public static final VoxelShape IMPORTER_EAST = Shapes.or(IMPORTER_EAST_1, IMPORTER_EAST_2, IMPORTER_EAST_3); + public static final VoxelShape IMPORTER_SOUTH = Shapes.or(IMPORTER_SOUTH_1, IMPORTER_SOUTH_2, IMPORTER_SOUTH_3); + public static final VoxelShape IMPORTER_WEST = Shapes.or(IMPORTER_WEST_1, IMPORTER_WEST_2, IMPORTER_WEST_3); + public static final VoxelShape IMPORTER_UP = Shapes.or(IMPORTER_UP_1, IMPORTER_UP_2, IMPORTER_UP_3); + public static final VoxelShape IMPORTER_DOWN = Shapes.or(IMPORTER_DOWN_1, IMPORTER_DOWN_2, IMPORTER_DOWN_3); + + public static final VoxelShape EXTERNAL_STORAGE_NORTH = Shapes.or(box(3, 3, 0, 13, 13, 2), HOLDER_NORTH); + public static final VoxelShape EXTERNAL_STORAGE_EAST = Shapes.or(box(14, 3, 3, 16, 13, 13), HOLDER_EAST); + public static final VoxelShape EXTERNAL_STORAGE_SOUTH = Shapes.or(box(3, 3, 14, 13, 13, 16), HOLDER_SOUTH); + public static final VoxelShape EXTERNAL_STORAGE_WEST = Shapes.or(box(0, 3, 3, 2, 13, 13), HOLDER_WEST); + public static final VoxelShape EXTERNAL_STORAGE_UP = Shapes.or(box(3, 14, 3, 13, 16, 13), HOLDER_UP); + public static final VoxelShape EXTERNAL_STORAGE_DOWN = Shapes.or(box(3, 0, 3, 13, 2, 13), HOLDER_DOWN); + + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_NORTH = Shapes.or(box(2, 2, 0, 14, 14, 2), HOLDER_NORTH); + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_EAST = Shapes.or(box(14, 2, 2, 16, 14, 14), HOLDER_EAST); + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_SOUTH = Shapes.or(box(2, 2, 14, 14, 14, 16), HOLDER_SOUTH); + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_WEST = Shapes.or(box(0, 2, 2, 2, 14, 14), HOLDER_WEST); + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_DOWN = Shapes.or(box(2, 0, 2, 14, 2, 14), HOLDER_DOWN); + public static final VoxelShape CONSTRUCTOR_DESTRUCTOR_UP = Shapes.or(box(2, 14, 2, 14, 16, 14), HOLDER_UP); private DirectionalCableBlockShapes() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterModeSettings.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterModeSettings.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterModeSettings.java index f0f5654b5..c63f1141e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterModeSettings.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterWithFuzzyMode.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterWithFuzzyMode.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterWithFuzzyMode.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterWithFuzzyMode.java index 501c0d385..0b43296d7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/FilterWithFuzzyMode.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/FilterWithFuzzyMode.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.FuzzyModeNormalizer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FuzzyModeNormalizer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import java.util.List; import java.util.Set; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java index 358301027..49242561e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/network/LevelConnectionProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.network; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.ConnectionProvider; import com.refinedmods.refinedstorage2.api.network.Connections; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; import java.util.ArrayDeque; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NamedBlockItem.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NamedBlockItem.java index 02108e39f..80183c9b0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/NamedBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NamedBlockItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java index 6fce3d6c7..bf5506a0f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block.ticker; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java index 4e03b0369..271dba1cf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java @@ -1,10 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.api.support.AbstractNetworkNodeContainerBlockEntity; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/PlayerAware.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java similarity index 57% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/PlayerAware.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java index 0ba6c42e0..37c2b1d59 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/PlayerAware.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import java.util.UUID; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/RedstoneMode.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneMode.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/RedstoneMode.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneMode.java index 7b673ec27..86568ab54 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/RedstoneMode.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneMode.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.util; +package com.refinedmods.refinedstorage2.platform.common.support; public enum RedstoneMode { IGNORE, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/RedstoneModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneModeSettings.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/RedstoneModeSettings.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneModeSettings.java index afa443360..a5228c2d4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/RedstoneModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/RedstoneModeSettings.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; - -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +package com.refinedmods.refinedstorage2.platform.common.support; public class RedstoneModeSettings { private static final int IGNORE = 0; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingMode.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingMode.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingMode.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingMode.java index 7bf6576f8..0364aac21 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingMode.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingMode.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.node.task.TaskExecutor; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingModeType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingModeType.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingModeType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingModeType.java index 46448c81d..af4fc46d2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/SchedulingModeType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SchedulingModeType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.network.impl.node.task.DefaultTaskExecutor; import com.refinedmods.refinedstorage2.api.network.impl.node.task.RandomTaskExecutor; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ServerToClientCommunications.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ServerToClientCommunications.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java index 5022943f3..3ebb2ec52 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/packet/ServerToClientCommunications.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.packet; +package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; import java.util.UUID; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/SimpleBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlock.java similarity index 54% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/SimpleBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlock.java index f5c7368fc..2418a3dbb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/SimpleBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlock.java @@ -1,4 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.support; + +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import net.minecraft.world.level.block.Block; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/SimpleBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlockItem.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/SimpleBlockItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlockItem.java index 5ee43b43a..05ef58f3f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/block/SimpleBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleBlockItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item.block; +package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleItem.java similarity index 70% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleItem.java index db8b2d12d..59cb1d3ff 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/SimpleItem.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.world.item.Item; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TextureIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/TextureIds.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TextureIds.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/TextureIds.java index e76b05f66..e0fc1e118 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/TextureIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/TextureIds.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractAmountScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractAmountScreen.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractAmountScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractAmountScreen.java index 29c999299..049f9649c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractAmountScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractAmountScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import java.util.Objects; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractSingleAmountScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractSingleAmountScreen.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractSingleAmountScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractSingleAmountScreen.java index 23ec38f2b..c4c00fef9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AbstractSingleAmountScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AbstractSingleAmountScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountOperations.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountOperations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountOperations.java index 0bad40ccf..b11be6def 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountOperations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; import java.util.Optional; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountScreenConfiguration.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountScreenConfiguration.java similarity index 99% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountScreenConfiguration.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountScreenConfiguration.java index 4edfb2087..949b90420 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/AmountScreenConfiguration.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/AmountScreenConfiguration.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DoubleAmountOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/DoubleAmountOperations.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DoubleAmountOperations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/DoubleAmountOperations.java index 962f8185a..b3ac29150 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/DoubleAmountOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/DoubleAmountOperations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/IntegerAmountOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/IntegerAmountOperations.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/IntegerAmountOperations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/IntegerAmountOperations.java index 8630bbabb..d55da228f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/IntegerAmountOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/IntegerAmountOperations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; import java.util.Objects; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/LongAmountOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/LongAmountOperations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java index 35a454944..fc134f6a9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/LongAmountOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; import com.refinedmods.refinedstorage2.platform.common.util.MathHelper; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/PriorityScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/PriorityScreen.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/PriorityScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/PriorityScreen.java index 9c9f6cf6d..ed19a096d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/PriorityScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/PriorityScreen.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/ResourceAmountScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/ResourceAmountScreen.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/ResourceAmountScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/ResourceAmountScreen.java index 95b102ad9..8ee594dba 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/amount/ResourceAmountScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/ResourceAmountScreen.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.amount; +package com.refinedmods.refinedstorage2.platform.common.support.amount; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/package-info.java new file mode 100644 index 000000000..4dcade88b --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.amount; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractResourceContainerMenu.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractResourceContainerMenu.java index 24cfdf0c2..6d8018e6a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractResourceContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractResourceContainerMenu.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSchedulingContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSchedulingContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java index e34412a5e..7d6342e6b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSchedulingContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java @@ -1,14 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractSchedulingNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SchedulingModeType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.SchedulingModeType; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSimpleFilterContainerMenu.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSimpleFilterContainerMenu.java index b736f9b79..93503ee9e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSimpleFilterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSimpleFilterContainerMenu.java @@ -1,12 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.UpgradeSlot; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeSlot; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSingleAmountContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSingleAmountContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java index 25e3988a5..70e5eac2f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/AbstractSingleAmountContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ClientProperty.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ClientProperty.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ClientProperty.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ClientProperty.java index 55ac840b2..f559f76f0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ClientProperty.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ClientProperty.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/DisabledSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/DisabledSlot.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/DisabledSlot.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/DisabledSlot.java index e6e8258af..afd7d3925 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/DisabledSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/DisabledSlot.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import net.minecraft.world.Container; import net.minecraft.world.inventory.Slot; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/ExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ExtendedMenuProvider.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/ExtendedMenuProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ExtendedMenuProvider.java index 6061f0949..95e91f4aa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/ExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ExtendedMenuProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.menu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerPlayer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/MenuOpener.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/MenuOpener.java similarity index 70% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/MenuOpener.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/MenuOpener.java index 6032f83db..2582f6571 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/MenuOpener.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/MenuOpener.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.menu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/Property.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/Property.java similarity index 66% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/Property.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/Property.java index 80a56ada6..d4c0962d6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/Property.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/Property.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import net.minecraft.world.inventory.DataSlot; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyType.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyType.java index b0dc9a5bc..0dd483bb8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import java.util.function.Function; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyTypes.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java index 8c2fb5317..cb377f3d0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/PropertyTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AccessModeSettings; -import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterModeSettings; -import com.refinedmods.refinedstorage2.platform.common.block.entity.RedstoneModeSettings; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SchedulingModeType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorModeSettings; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorModeSettings; +import com.refinedmods.refinedstorage2.platform.common.storage.AccessModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneModeSettings; +import com.refinedmods.refinedstorage2.platform.common.support.SchedulingModeType; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/ResourceInventoryDestination.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java similarity index 64% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/ResourceInventoryDestination.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java index d30945ed6..e1695461e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/ResourceInventoryDestination.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.transfer; - -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceSlot.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceSlot.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceSlot.java index 359a039f3..4cbacd608 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ResourceSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceSlot.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainerType; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainerType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.common.Platform; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ServerProperty.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ServerProperty.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ServerProperty.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ServerProperty.java index 6c3a7d555..84bfd4a3b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/property/ServerProperty.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ServerProperty.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.property; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import java.util.function.Consumer; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferDestination.java similarity index 71% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferDestination.java index ddcc38611..5159ab21d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferDestination.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferDestination.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.transfer; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferManager.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferManager.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java index 091fa489a..16d621aa7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/transfer/TransferManager.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.transfer; - -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import java.util.HashMap; import java.util.LinkedList; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ValidatedSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ValidatedSlot.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ValidatedSlot.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ValidatedSlot.java index a728fd5f5..0b4d78684 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/ValidatedSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ValidatedSlot.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import java.util.function.Predicate; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/package-info.java new file mode 100644 index 000000000..041f84e48 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.containermenu; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BiDirection.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirection.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BiDirection.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirection.java index 264943074..19e1eb8e3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BiDirection.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirection.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.util; +package com.refinedmods.refinedstorage2.platform.common.support.direction; import java.util.Locale; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/BiDirectionType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirectionType.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/BiDirectionType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirectionType.java index c82b89d7b..8faa69294 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/BiDirectionType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/BiDirectionType.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.direction; - -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +package com.refinedmods.refinedstorage2.platform.common.support.direction; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.properties.EnumProperty; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionType.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionType.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionType.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionType.java index 539f34119..c22d56efc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionType.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionType.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.direction; +package com.refinedmods.refinedstorage2.platform.common.support.direction; import net.minecraft.core.Direction; import net.minecraft.util.StringRepresentable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionTypeImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionTypeImpl.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionTypeImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionTypeImpl.java index d4b743913..039d6941b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/direction/DirectionTypeImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/DirectionTypeImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.direction; +package com.refinedmods.refinedstorage2.platform.common.support.direction; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.properties.EnumProperty; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/package-info.java new file mode 100644 index 000000000..a10e7502b --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/direction/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.direction; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityEnergyStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/BlockEntityEnergyStorage.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityEnergyStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/BlockEntityEnergyStorage.java index ddae1cef8..6515f7ffd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/BlockEntityEnergyStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/BlockEntityEnergyStorage.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.network.impl.energy.EnergyStorageImpl; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/CreativeEnergyStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/CreativeEnergyStorage.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/CreativeEnergyStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/CreativeEnergyStorage.java index b9e409319..50563ce2b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/CreativeEnergyStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/CreativeEnergyStorage.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.energy; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/EnergyItemHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyItemHelperImpl.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/EnergyItemHelperImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyItemHelperImpl.java index 8faba40e9..f53a35ea6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/EnergyItemHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyItemHelperImpl.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.EnergyBlockEntity; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractEnergyBlockItem; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractEnergyBlockItem; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; import java.util.List; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunction.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunction.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunction.java index 823c84a73..f5476b195 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunction.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.loot; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.EnergyBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.LootFunctions; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunctionSerializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunctionSerializer.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunctionSerializer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunctionSerializer.java index 3360070dd..bb5dd73a3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/loot/EnergyLootItemFunctionSerializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/EnergyLootItemFunctionSerializer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.loot; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/ItemEnergyStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/ItemEnergyStorage.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/ItemEnergyStorage.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/ItemEnergyStorage.java index a3e8db2ed..97ff327de 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/energy/ItemEnergyStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/ItemEnergyStorage.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.energy; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/package-info.java similarity index 77% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/package-info.java index 372ae8fb0..5b378d7b4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/energy/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.energy; +package com.refinedmods.refinedstorage2.platform.common.support.energy; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/CompositeSlotReferenceProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/CompositeSlotReferenceProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java index 09149ca82..0af728531 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/CompositeSlotReferenceProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReference.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReference.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java index e0c7424fd..5f488f158 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReference.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java similarity index 60% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java index b344b840f..eca2aee05 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java similarity index 74% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java index 9b0b28b6e..ee4493935 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/InventorySlotReferenceProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemHelperImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java index ec9812d66..134992aaa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import java.util.List; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/NetworkItemItemPropertyFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/NetworkItemItemPropertyFunction.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java index abed03a94..8453baa73 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/NetworkItemItemPropertyFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.render; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractNetworkBoundEnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; import javax.annotation.Nullable; @@ -10,7 +10,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; -public class NetworkItemItemPropertyFunction implements ClampedItemPropertyFunction { +public class NetworkBoundItemItemPropertyFunction implements ClampedItemPropertyFunction { public static final ResourceLocation NAME = new ResourceLocation("active"); @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemSessionImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemSessionImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java index e83d8b8e4..f47a33edc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/item/NetworkBoundItemSessionImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.item; +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitter; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.network.node.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java new file mode 100644 index 000000000..ab59fbf17 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/package-info.java new file mode 100644 index 000000000..8a1a70a3c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImpl.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImpl.java index 9eca49ad0..2873e2cfc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImpl.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.registry; +package com.refinedmods.refinedstorage2.platform.common.support.registry; import com.refinedmods.refinedstorage2.api.core.CoreValidations; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import java.util.ArrayList; import java.util.HashMap; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/package-info.java new file mode 100644 index 000000000..24e76b4ea --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/registry/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.registry; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/AbstractFluidRenderer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/AbstractFluidRenderer.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/AbstractFluidRenderer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/AbstractFluidRenderer.java index 091d8b592..1e17d2483 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/model/AbstractFluidRenderer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/AbstractFluidRenderer.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.render.model; - -import com.refinedmods.refinedstorage2.platform.common.render.FluidRenderer; +package com.refinedmods.refinedstorage2.platform.common.support.render; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.BufferBuilder; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/CubeBuilder.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/CubeBuilder.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/CubeBuilder.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/CubeBuilder.java index ec6497625..b173c350e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/CubeBuilder.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/CubeBuilder.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.render; +package com.refinedmods.refinedstorage2.platform.common.support.render; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/FluidRenderer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/FluidRenderer.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/FluidRenderer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/FluidRenderer.java index eb4deace0..e5d76bc35 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/render/FluidRenderer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/FluidRenderer.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.render; +package com.refinedmods.refinedstorage2.platform.common.support.render; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/package-info.java new file mode 100644 index 000000000..37dd8d3ee --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/render/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.render; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/AbstractResourceContainerContainerAdapter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/AbstractResourceContainerContainerAdapter.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java index c12cbbd43..2db9b96e1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/AbstractResourceContainerContainerAdapter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceFactory.java similarity index 61% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceFactory.java index ffe9b8705..499231e91 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceFactory.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceRendering.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceRendering.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java index d004a4336..7f31167d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/FluidResourceRendering.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.common.Platform; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceFactory.java similarity index 60% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceFactory.java index 45ef53d9a..f7c354427 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceFactory.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceRendering.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceRendering.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java index e54703dbc..0bb820b08 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ItemResourceRendering.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ResourceContainerImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ResourceContainerImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java index 944ee6d36..6e052c991 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/resource/ResourceContainerImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.resource; +package com.refinedmods.refinedstorage2.platform.common.support.resource; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.core.CoreValidations; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainerType; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainerType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.common.util.MathHelper; import java.util.ArrayList; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/package-info.java new file mode 100644 index 000000000..c030f3f9f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.resource; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/CompositeClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/CompositeClientTooltipComponent.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/CompositeClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/CompositeClientTooltipComponent.java index e2cfd7afc..87f8c04dd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/CompositeClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/CompositeClientTooltipComponent.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/HelpClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/HelpClientTooltipComponent.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/HelpClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/HelpClientTooltipComponent.java index b80fe9718..1122cac6c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/HelpClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/HelpClientTooltipComponent.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/MouseWithIconClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/MouseWithIconClientTooltipComponent.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/MouseWithIconClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/MouseWithIconClientTooltipComponent.java index a4b5fecf0..659e5eb8f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/MouseWithIconClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/MouseWithIconClientTooltipComponent.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/ResourceClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/ResourceClientTooltipComponent.java similarity index 88% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/ResourceClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/ResourceClientTooltipComponent.java index 686af7f05..bac724911 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/ResourceClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/ResourceClientTooltipComponent.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceRendering; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallText.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallText.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java index ad5451c83..a40378767 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallText.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallTextClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallTextClientTooltipComponent.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallTextClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallTextClientTooltipComponent.java index c138eca15..4de87fadf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/SmallTextClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallTextClientTooltipComponent.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/package-info.java new file mode 100644 index 000000000..3389a4614 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.tooltip; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractSideButtonWidget.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractSideButtonWidget.java index 90f231770..e4208b8fd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractSideButtonWidget.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.screen.TextureIds; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.HelpClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.SmallTextClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.SmallTextClientTooltipComponent; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractYesNoSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractYesNoSideButtonWidget.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractYesNoSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractYesNoSideButtonWidget.java index 1aac2bee5..b04f3faea 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/AbstractYesNoSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/AbstractYesNoSideButtonWidget.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FilterModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FilterModeSideButtonWidget.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FilterModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FilterModeSideButtonWidget.java index 609d1d790..fc79a5875 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FilterModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FilterModeSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FuzzyModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FuzzyModeSideButtonWidget.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FuzzyModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FuzzyModeSideButtonWidget.java index 411ad017e..8c6846f57 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/FuzzyModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/FuzzyModeSideButtonWidget.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/History.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/History.java index 24d951abb..e6225f837 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/History.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/History.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ProgressWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ProgressWidget.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ProgressWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ProgressWidget.java index 1edf356b2..da5fcf18f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ProgressWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ProgressWidget.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import java.util.List; import java.util.function.DoubleSupplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/RedstoneModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/RedstoneModeSideButtonWidget.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/RedstoneModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/RedstoneModeSideButtonWidget.java index 573264ae5..6918d79fb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/RedstoneModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/RedstoneModeSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SchedulingModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SchedulingModeSideButtonWidget.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SchedulingModeSideButtonWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SchedulingModeSideButtonWidget.java index a0cb53f56..f504d48fd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SchedulingModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SchedulingModeSideButtonWidget.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; -import com.refinedmods.refinedstorage2.platform.common.block.entity.SchedulingModeType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.SchedulingModeType; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ScrollbarWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ScrollbarWidget.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ScrollbarWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ScrollbarWidget.java index ed2185644..835d6149c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/ScrollbarWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/ScrollbarWidget.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractWidget; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SearchFieldWidget.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SearchFieldWidget.java index 41e749e31..ca7ed0b72 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/SearchFieldWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/SearchFieldWidget.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/package-info.java new file mode 100644 index 000000000..9d1bfa6d8 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/widget/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.widget; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/BuiltinUpgradeDestinationsImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/BuiltinUpgradeDestinationsImpl.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/BuiltinUpgradeDestinationsImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/BuiltinUpgradeDestinationsImpl.java index 9da555b11..f2dc6bfd5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/BuiltinUpgradeDestinationsImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/BuiltinUpgradeDestinationsImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.upgrade; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.BuiltinUpgradeDestinations; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeDestination; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FortuneUpgradeItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/FortuneUpgradeItem.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FortuneUpgradeItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/FortuneUpgradeItem.java index 81a3d19ab..a46ff32e3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/FortuneUpgradeItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/FortuneUpgradeItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RangeUpgradeItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RangeUpgradeItem.java similarity index 84% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RangeUpgradeItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RangeUpgradeItem.java index afe3894b4..c151a645c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RangeUpgradeItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RangeUpgradeItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/RegulatorUpgradeContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/RegulatorUpgradeContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java index 0e604b5e0..a448a2031 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/RegulatorUpgradeContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java @@ -1,8 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import java.util.function.Consumer; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RegulatorUpgradeItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RegulatorUpgradeItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java index 19ec7a354..fa78d52ce 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/RegulatorUpgradeItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java @@ -1,17 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.RegulatorUpgradeContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Optional; import java.util.OptionalLong; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/RegulatorUpgradeScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeScreen.java similarity index 64% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/RegulatorUpgradeScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeScreen.java index a1fa2e083..eb92ce2d7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/RegulatorUpgradeScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeScreen.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.common.containermenu.RegulatorUpgradeContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.screen.amount.AbstractSingleAmountScreen; +import com.refinedmods.refinedstorage2.platform.common.support.amount.AbstractSingleAmountScreen; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleUpgradeItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/SimpleUpgradeItem.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleUpgradeItem.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/SimpleUpgradeItem.java index acf2d330e..5f35382ef 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/item/SimpleUpgradeItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/SimpleUpgradeItem.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.item; +package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; import java.util.function.LongSupplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java index bd80803be..f64e3f91f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/UpgradeContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeDestination; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeItem; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeRegistry; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; import java.util.OptionalLong; import java.util.Set; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeDestinationClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinationClientTooltipComponent.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeDestinationClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinationClientTooltipComponent.java index 09c69b38f..50171bab5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeDestinationClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinationClientTooltipComponent.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeDestinations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinations.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeDestinations.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinations.java index 0058a6aa9..2897fc7a8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeDestinations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeDestinations.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.upgrade; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeDestination; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeItemClientTooltipComponent.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeItemClientTooltipComponent.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeItemClientTooltipComponent.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeItemClientTooltipComponent.java index d599a03d3..3bd99a92b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/tooltip/UpgradeItemClientTooltipComponent.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeItemClientTooltipComponent.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.tooltip; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeRegistryImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeRegistryImpl.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeRegistryImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeRegistryImpl.java index 85daa579f..a45db1f9a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/upgrade/UpgradeRegistryImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeRegistryImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.upgrade; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeDestination; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeSlot.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeSlot.java index 01cc4a3f6..745daab62 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/slot/UpgradeSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeSlot.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu.slot; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeMapping; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; import java.util.Set; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipe.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipe.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java index 6e0c63e70..474541556 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipe.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.recipe; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.common.content.Items; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipeSerializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipeSerializer.java similarity index 97% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipeSerializer.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipeSerializer.java index f13716600..09a98fa06 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipe/UpgradeWithEnchantedBookRecipeSerializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipeSerializer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.recipe; +package com.refinedmods.refinedstorage2.platform.common.upgrade; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/package-info.java new file mode 100644 index 000000000..0d95fe01c --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.upgrade; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java index 5cc38ecc8..c5164fbd7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.util; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java index dac67542a..880eb27c4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/IdentifierUtil.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.util; -import com.refinedmods.refinedstorage2.platform.api.util.AmountFormatting; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java index c7c04eed0..22af8955c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/PacketUtil.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage2.platform.common.util; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java index a284249d5..d61f68a1e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/BaseWirelessTransmitterRangeModifier.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.common.Platform; public class BaseWirelessTransmitterRangeModifier implements WirelessTransmitterRangeModifier { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java similarity index 80% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java index 377779e3c..9e5ca5785 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CompositeWirelessTransmitterRangeModifier.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import java.util.Comparator; import java.util.PriorityQueue; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java similarity index 73% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java index 4933e6295..19d8ee641 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/CreativeRangeUpgradeWirelessTransmitterRangeModifier.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.common.content.Items; public class CreativeRangeUpgradeWirelessTransmitterRangeModifier implements WirelessTransmitterRangeModifier { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java similarity index 76% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java index 5a2b1b9c0..7fbb9ae87 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/RangeUpgradeWirelessTransmitterRangeModifier.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitterRangeModifier; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.Items; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/WirelessTransmitterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java similarity index 85% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/WirelessTransmitterBlock.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java index 6f069a0d5..7a277460b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/WirelessTransmitterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java @@ -1,14 +1,17 @@ -package com.refinedmods.refinedstorage2.platform.common.block; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.WirelessTransmitterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java similarity index 86% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java index 6b2e78e1d..9daa80de1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -1,16 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitter; +import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/WirelessTransmitterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java similarity index 80% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/WirelessTransmitterContainerMenu.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java index bc6e1de5f..08520712a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/WirelessTransmitterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.containermenu; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; -import com.refinedmods.refinedstorage2.platform.common.block.entity.wirelesstransmitter.WirelessTransmitterBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.ServerProperty; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.UpgradeSlot; import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.internal.upgrade.UpgradeDestinations; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeSlot; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/WirelessTransmitterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterScreen.java similarity index 82% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/WirelessTransmitterScreen.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterScreen.java index f889a4c23..ab60a85dc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/screen/WirelessTransmitterScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterScreen.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.common.screen; +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyTypes; -import com.refinedmods.refinedstorage2.platform.common.screen.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/package-info.java new file mode 100644 index 000000000..131caf83d --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java index 7aaefa6f5..e617e9d33 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/PlatformTestFixtures.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; -import com.refinedmods.refinedstorage2.platform.api.storage.type.StorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.registry.PlatformRegistryImpl; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; +import com.refinedmods.refinedstorage2.platform.common.support.registry.PlatformRegistryImpl; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/SimpleListener.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/SimpleListener.java index 0e86a7f65..3e2a1888a 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/SimpleListener.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/SimpleListener.java @@ -15,8 +15,4 @@ public boolean isChanged() { public int getChanges() { return changes; } - - public void reset() { - changes = 0; - } } diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypesTest.java similarity index 95% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypesTest.java index 0fa853b04..6a3c64e86 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/GridSortingTypesTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSortingTypesTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.grid; +package com.refinedmods.refinedstorage2.platform.common.grid; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; @@ -7,8 +7,8 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridViewBuilder; import com.refinedmods.refinedstorage2.api.grid.view.GridViewBuilderImpl; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.AbstractItemGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.AbstractItemGridResourceFactory; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import java.util.Comparator; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModifiedTest.java similarity index 98% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModifiedTest.java index 07bb62c42..1679ba1e4 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/grid/LastModifiedTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModifiedTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.grid; +package com.refinedmods.refinedstorage2.platform.common.grid.screen; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepositoryTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepositoryTest.java similarity index 95% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepositoryTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepositoryTest.java index a86490f7a..6ea4bc7ec 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/ClientStorageRepositoryTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ClientStorageRepositoryTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.StorageInfo; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageTypeTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java similarity index 94% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageTypeTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java index 88a4f496d..364691703 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/FluidStorageTypeTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -11,11 +11,9 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.SimpleListener; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.LimitedPlatformStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.PlatformStorage; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import net.minecraft.nbt.CompoundTag; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageTypeTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java similarity index 94% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageTypeTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java index 60cba8e9e..666f00a7e 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/type/ItemStorageTypeTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage.type; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -11,11 +11,9 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.SimpleListener; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.LimitedPlatformStorage; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.PlatformStorage; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import net.minecraft.nbt.CompoundTag; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorageTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorageTest.java similarity index 80% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorageTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorageTest.java index 357dd4943..13558e964 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/LimitedPlatformStorageTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorageTest.java @@ -1,10 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.storage.InMemoryStorageImpl; import com.refinedmods.refinedstorage2.api.storage.limited.LimitedStorage; import com.refinedmods.refinedstorage2.api.storage.limited.LimitedStorageImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorageTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorageTest.java similarity index 94% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorageTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorageTest.java index 1b1a3ddec..530a6dd3e 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/PlatformStorageTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorageTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -9,10 +9,9 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.SimpleListener; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import net.minecraft.world.item.Items; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImplTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImplTest.java similarity index 97% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImplTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImplTest.java index 366ce95a3..b0a69ffb8 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/storage/StorageRepositoryImplTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageRepositoryImplTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.storage; +package com.refinedmods.refinedstorage2.platform.common.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -11,10 +11,9 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.PlatformTestFixtures; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.StorageTypes; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImplTest.java similarity index 96% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImplTest.java index 4f615b0e4..af72b8a35 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/internal/registry/PlatformRegistryImplTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/registry/PlatformRegistryImplTest.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.common.internal.registry; +package com.refinedmods.refinedstorage2.platform.common.support.registry; -import com.refinedmods.refinedstorage2.platform.api.registry.PlatformRegistry; +import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import java.util.List; diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/widget/HistoryTest.java similarity index 97% rename from refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java rename to refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/widget/HistoryTest.java index ce50f5e5e..b98e5ca62 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/screen/widget/HistoryTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/widget/HistoryTest.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.screen.widget; +package com.refinedmods.refinedstorage2.platform.common.support.widget; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index f02216b03..046858026 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -1,27 +1,24 @@ package com.refinedmods.refinedstorage2.platform.fabric; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.AbstractClientModInitializer; +import com.refinedmods.refinedstorage2.platform.common.configurationcard.ConfigurationCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.render.ConfigurationCardItemPropertyFunction; -import com.refinedmods.refinedstorage2.platform.common.render.NetworkItemItemPropertyFunction; -import com.refinedmods.refinedstorage2.platform.common.render.entity.StorageMonitorBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.common.render.model.ControllerModelPredicateProvider; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.CompositeClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.HelpClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.ResourceClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.UpgradeDestinationClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.RefinedStorageREIClientPlugin; -import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.ReiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.ReiProxy; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.ResourceClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinationClientTooltipComponent; import com.refinedmods.refinedstorage2.platform.fabric.mixin.ItemPropertiesAccessor; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.ControllerEnergyInfoPacket; @@ -31,9 +28,12 @@ import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.ResourceSlotUpdatePacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.StorageInfoResponsePacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.WirelessTransmitterRangePacket; -import com.refinedmods.refinedstorage2.platform.fabric.render.entity.DiskDriveBlockEntityRendererImpl; -import com.refinedmods.refinedstorage2.platform.fabric.render.model.DiskDriveUnbakedModel; -import com.refinedmods.refinedstorage2.platform.fabric.render.model.EmissiveModelRegistry; +import com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei.RefinedStorageREIClientPlugin; +import com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei.ReiGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei.ReiProxy; +import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.DiskDriveBlockEntityRendererImpl; +import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.DiskDriveUnbakedModel; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.EmissiveModelRegistry; import java.util.List; @@ -354,13 +354,13 @@ private void registerReiGridSynchronizers() { private void registerItemProperties() { ItemProperties.register( Items.INSTANCE.getWirelessGrid(), - NetworkItemItemPropertyFunction.NAME, - new NetworkItemItemPropertyFunction() + NetworkBoundItemItemPropertyFunction.NAME, + new NetworkBoundItemItemPropertyFunction() ); ItemProperties.register( Items.INSTANCE.getCreativeWirelessGrid(), - NetworkItemItemPropertyFunction.NAME, - new NetworkItemItemPropertyFunction() + NetworkBoundItemItemPropertyFunction.NAME, + new NetworkBoundItemItemPropertyFunction() ); ItemProperties.register( Items.INSTANCE.getConfigurationCard(), diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java index 0a1468184..3297bd8e3 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java @@ -2,9 +2,9 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; import com.refinedmods.refinedstorage2.platform.common.content.DefaultEnergyUsage; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridMatrixCloseBehavior; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSize; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSortingTypes; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index ab9396031..9ac6a48fe 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -1,37 +1,31 @@ package com.refinedmods.refinedstorage2.platform.fabric; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.EnergyBlockEntity; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItem; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractModInitializer; -import com.refinedmods.refinedstorage2.platform.common.block.AbstractBaseBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntityTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.CreativeModeTabItems; import com.refinedmods.refinedstorage2.platform.common.content.DirectRegistryCallback; import com.refinedmods.refinedstorage2.platform.common.content.MenuTypeFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.network.node.iface.externalstorage.InterfacePlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfacePlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; -import com.refinedmods.refinedstorage2.platform.fabric.block.entity.FabricDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets.TrinketsSlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets.TrinketsSlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.fabric.internal.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.FluidGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.FluidGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.ItemGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.ItemGridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.exporter.StorageExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.externalstorage.StoragePlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.importer.StorageImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.ResourceContainerFluidStorageAdapter; +import com.refinedmods.refinedstorage2.platform.fabric.exporter.StorageExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.importer.StorageImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridClearPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridRecipeTransferPacket; @@ -45,7 +39,13 @@ import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.SingleAmountChangePacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.StorageInfoRequestPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.UseNetworkBoundItemPacket; -import com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil; +import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.FabricDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage.StoragePlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.fabric.support.energy.EnergyStorageAdapter; +import com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem.TrinketsSlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem.TrinketsSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.fabric.support.resource.ResourceContainerFluidStorageAdapter; +import com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil; import java.util.Arrays; import java.util.HashSet; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java index 273f7e10f..4f7355c7a 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java @@ -4,25 +4,25 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; -import com.refinedmods.refinedstorage2.platform.fabric.containermenu.ContainerTransferDestination; -import com.refinedmods.refinedstorage2.platform.fabric.internal.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.ItemGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.view.FabricFluidGridResourceFactory; -import com.refinedmods.refinedstorage2.platform.fabric.internal.grid.view.FabricItemGridResourceFactory; -import com.refinedmods.refinedstorage2.platform.fabric.menu.MenuOpenerImpl; +import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.grid.view.FabricFluidGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.fabric.grid.view.FabricItemGridResourceFactory; import com.refinedmods.refinedstorage2.platform.fabric.mixin.EditBoxAccessor; import com.refinedmods.refinedstorage2.platform.fabric.mixin.KeyMappingAccessor; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.ClientToServerCommunicationsImpl; import com.refinedmods.refinedstorage2.platform.fabric.packet.s2c.ServerToClientCommunicationsImpl; -import com.refinedmods.refinedstorage2.platform.fabric.render.FluidVariantFluidRenderer; +import com.refinedmods.refinedstorage2.platform.fabric.support.containermenu.ContainerTransferDestination; +import com.refinedmods.refinedstorage2.platform.fabric.support.containermenu.MenuOpenerImpl; +import com.refinedmods.refinedstorage2.platform.fabric.support.energy.EnergyStorageAdapter; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.FluidVariantFluidRenderer; import com.refinedmods.refinedstorage2.platform.fabric.util.SingleStackStorageImpl; import java.util.List; @@ -88,9 +88,9 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.ofFluidVariant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toFluidVariant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toItemVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.ofFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toItemVariant; public final class PlatformImpl extends AbstractPlatform { private static final TagKey WRENCH_TAG = TagKey.create( diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/package-info.java deleted file mode 100644 index 09a391245..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.block.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/package-info.java deleted file mode 100644 index fae104b06..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.containermenu; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/StorageExporterTransferStrategyFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java similarity index 87% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/StorageExporterTransferStrategyFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java index 2a72c1593..114231c7f 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/StorageExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.exporter; +package com.refinedmods.refinedstorage2.platform.fabric.exporter; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.AbstractExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.exporter.ExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.network.node.AbstractFuzzyExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.common.exporter.AbstractFuzzyExporterTransferStrategy; +import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; import java.util.Optional; import java.util.function.Function; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/package-info.java new file mode 100644 index 000000000..8137ac483 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.exporter; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridExtractionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java similarity index 93% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridExtractionStrategy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java index 074b53eec..858cfcbe6 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridExtractionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; @@ -6,12 +6,12 @@ import com.refinedmods.refinedstorage2.api.storage.EmptyActor; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.fabric.util.SingleStackStorageImpl; import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; @@ -24,7 +24,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.Items; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toFluidVariant; public class FluidGridExtractionStrategy implements GridExtractionStrategy { private static final ItemVariant BUCKET_ITEM_VARIANT = ItemVariant.of(Items.BUCKET); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridInsertionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridInsertionStrategy.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridInsertionStrategy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridInsertionStrategy.java index 43f17db9e..13139cb8f 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/FluidGridInsertionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridInsertionStrategy.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; @@ -23,8 +23,8 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.ofFluidVariant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.ofFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toFluidVariant; public class FluidGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridExtractionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridExtractionStrategy.java similarity index 86% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridExtractionStrategy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridExtractionStrategy.java index 919890924..b77050ac4 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridExtractionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridExtractionStrategy.java @@ -1,14 +1,14 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.item.PlayerInventoryStorage; @@ -18,7 +18,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toItemVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toItemVariant; public class ItemGridExtractionStrategy implements GridExtractionStrategy { private final GridOperations gridOperations; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridInsertionStrategy.java similarity index 86% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridInsertionStrategy.java index 90c572e7c..ac9dfce0e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridInsertionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridInsertionStrategy.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; @@ -20,8 +20,8 @@ import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.ofItemVariant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toItemVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.ofItemVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toItemVariant; public class ItemGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridScrollingStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridScrollingStrategy.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridScrollingStrategy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridScrollingStrategy.java index ffcbad1b4..7bfec47f0 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/ItemGridScrollingStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/ItemGridScrollingStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; @@ -6,11 +6,11 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; import net.fabricmc.fabric.api.transfer.v1.item.PlayerInventoryStorage; @@ -20,7 +20,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toItemVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toItemVariant; public class ItemGridScrollingStrategy implements GridScrollingStrategy { private final GridOperations gridOperations; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/package-info.java new file mode 100644 index 000000000..1721763e7 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.grid.strategy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricFluidGridResourceFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricFluidGridResourceFactory.java similarity index 77% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricFluidGridResourceFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricFluidGridResourceFactory.java index 636ee7dcb..7312ea82d 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricFluidGridResourceFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricFluidGridResourceFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.fabric.grid.view; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.AbstractFluidGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.AbstractFluidGridResourceFactory; import java.util.stream.Collectors; @@ -12,7 +12,7 @@ import net.fabricmc.loader.api.metadata.ModMetadata; import net.minecraft.network.chat.Component; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toFluidVariant; public class FabricFluidGridResourceFactory extends AbstractFluidGridResourceFactory { @Override diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricItemGridResourceFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricItemGridResourceFactory.java similarity index 80% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricItemGridResourceFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricItemGridResourceFactory.java index a5ac8ba8a..def6b3975 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/FabricItemGridResourceFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/FabricItemGridResourceFactory.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.fabric.grid.view; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.AbstractItemGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.grid.view.AbstractItemGridResourceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/package-info.java new file mode 100644 index 000000000..130aa66e0 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/view/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.grid.view; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterSource.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterSource.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java index 340380936..cb0f97658 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterSource.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.fabric.importer; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.storage.Actor; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.StorageExtractableStorage; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageExtractableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; import java.util.Collections; import java.util.Iterator; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterTransferStrategyFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterTransferStrategyFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java index a8fb85eee..040a536d7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/StorageImporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.fabric.importer; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategyImpl; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/package-info.java new file mode 100644 index 000000000..35e4bc8c8 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.importer; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/package-info.java deleted file mode 100644 index 27808a300..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java deleted file mode 100644 index 1eda8b6f8..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java deleted file mode 100644 index 5e5ddaadd..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/package-info.java deleted file mode 100644 index f247c4b8b..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/package-info.java deleted file mode 100644 index 2aeaa6802..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.energy; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/package-info.java deleted file mode 100644 index cac05f870..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/package-info.java deleted file mode 100644 index e1ced9814..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/grid/view/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.grid.view; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/package-info.java deleted file mode 100644 index 7952855ae..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/exporter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.exporter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/package-info.java deleted file mode 100644 index a9df68e1c..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.externalstorage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/package-info.java deleted file mode 100644 index aa24c89a2..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/importer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.importer; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/package-info.java deleted file mode 100644 index e52afd15c..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.internal.storage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/package-info.java deleted file mode 100644 index dad60097a..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.menu; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java index 6660f2943..8176bfb04 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.mixin; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; -import com.refinedmods.refinedstorage2.platform.fabric.render.model.EmissiveModelRegistry; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.EmissiveModelRegistry; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/ModMenuIntegration.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/ModMenuApiImpl.java similarity index 79% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/ModMenuIntegration.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/ModMenuApiImpl.java index d0375e056..e9d43d3e1 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/ModMenuIntegration.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/ModMenuApiImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration; +package com.refinedmods.refinedstorage2.platform.fabric.modmenu; import com.refinedmods.refinedstorage2.platform.fabric.ConfigImpl; @@ -9,7 +9,7 @@ import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) -public class ModMenuIntegration implements ModMenuApi { +public class ModMenuApiImpl implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { return parent -> AutoConfig.getConfigScreen(ConfigImpl.class, parent).get(); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/package-info.java new file mode 100644 index 000000000..657a0c060 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/modmenu/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.modmenu; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java index 1d079ed41..fbcb6bcea 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java @@ -4,11 +4,11 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; -import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java index 7e94d5ae5..8660d7e59 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridClearPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java index e3bf37bbb..40e57730e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/CraftingGridRecipeTransferPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.ArrayList; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridExtractPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridExtractPacket.java index 566550c86..b548b2eaa 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridExtractPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridExtractPacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import net.fabricmc.fabric.api.networking.v1.PacketSender; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridInsertPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridInsertPacket.java index a398baf28..642ac2cc6 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridInsertPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridInsertPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridScrollPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridScrollPacket.java index 22ffc8bd6..c67e5d2f1 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridScrollPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/GridScrollPacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import net.fabricmc.fabric.api.networking.v1.PacketSender; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/PropertyChangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/PropertyChangePacket.java index d4f5b95e0..bce12abfd 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/PropertyChangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/PropertyChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceFilterSlotChangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceFilterSlotChangePacket.java index 3fd763202..3e1329cf1 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceFilterSlotChangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceFilterSlotChangePacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotAmountChangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotAmountChangePacket.java index 177e449e8..0eb3f38b2 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotAmountChangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotAmountChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotChangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotChangePacket.java index fa036d7ea..f2f9b011e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotChangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ResourceSlotChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/SingleAmountChangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/SingleAmountChangePacket.java index 46f42f452..5559cde29 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/SingleAmountChangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/SingleAmountChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java index 11396275e..650328a26 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.c2s; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ControllerEnergyInfoPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ControllerEnergyInfoPacket.java index 0ccd53bd3..5ea8ef168 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ControllerEnergyInfoPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ControllerEnergyInfoPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerContainerMenu; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.PacketSender; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridClearPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridClearPacket.java index 0394fdb16..dd2aae2e6 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridClearPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridClearPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.PacketSender; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java index 24fc5cb03..7b0dfcab5 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/GridUpdatePacket.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ResourceSlotUpdatePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ResourceSlotUpdatePacket.java index 891f2db91..572eb8a41 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ResourceSlotUpdatePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ResourceSlotUpdatePacket.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import java.util.function.Consumer; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java index cdb516b4e..83eed775e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java @@ -3,9 +3,9 @@ import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/StorageInfoResponsePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/StorageInfoResponsePacket.java index 880f1adbc..a1e9f1558 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/StorageInfoResponsePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/StorageInfoResponsePacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.ClientStorageRepository; +import com.refinedmods.refinedstorage2.platform.common.storage.ClientStorageRepository; import java.util.UUID; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/WirelessTransmitterRangePacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/WirelessTransmitterRangePacket.java index 71916e1a2..37f9ea822 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/WirelessTransmitterRangePacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/WirelessTransmitterRangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterContainerMenu; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.PacketSender; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java similarity index 95% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java index 399e111bb..cb9c244da 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/CraftingGridTransferHandler.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import java.awt.Color; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/DraggableStackVisitorImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java similarity index 91% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/DraggableStackVisitorImpl.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java index 40d134b1e..702308fae 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/DraggableStackVisitorImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ExclusionZonesProviderImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java similarity index 77% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ExclusionZonesProviderImpl.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java index 64b295ae6..5b43aa5b2 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ExclusionZonesProviderImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import java.util.Collection; import java.util.stream.Collectors; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java similarity index 82% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java index 660d56625..66bfa1c28 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridFocusedStackProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java similarity index 74% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java index 16d8a582b..81a254742 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java similarity index 90% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java index 6f31fae28..882f0c41a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/MissingIngredients.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java similarity index 93% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java index 789a3d5a7..414b61b6a 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.Tags; -import com.refinedmods.refinedstorage2.platform.common.internal.item.EnergyItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; import java.util.function.Supplier; import java.util.stream.Collectors; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiGridSynchronizer.java similarity index 89% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiGridSynchronizer.java index 73ceb2b97..1fcd30c3c 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiGridSynchronizer.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiGridSynchronizer.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiProxy.java similarity index 88% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiProxy.java index c4595058d..444926a43 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ReiProxy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ReiProxy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java similarity index 87% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceFocusedStackProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java index 20d95e041..6242ff055 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceFocusedStackProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java similarity index 79% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceIngredientConverter.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java index 518941d07..775595391 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/package-info.java new file mode 100644 index 000000000..54b746da3 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/package-info.java deleted file mode 100644 index e3c2297a8..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.render.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/package-info.java deleted file mode 100644 index 4590fd75b..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/package-info.java deleted file mode 100644 index de4685a33..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/package-info.java deleted file mode 100644 index 95ba54b5a..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.render.model; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/package-info.java deleted file mode 100644 index a293ce12d..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.render; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageExtractableStorage.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java similarity index 92% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageExtractableStorage.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java index 641df5751..4099bc4ad 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageExtractableStorage.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java @@ -1,9 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.storage; +package com.refinedmods.refinedstorage2.platform.fabric.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.fabric.util.FabricStorageUtil; import java.util.function.Function; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageInsertableStorage.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java similarity index 92% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageInsertableStorage.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java index ad4e95df2..b4a87ea0e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/StorageInsertableStorage.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java @@ -1,9 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.storage; +package com.refinedmods.refinedstorage2.platform.fabric.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.fabric.util.FabricStorageUtil; import java.util.function.Function; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/DiskDriveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/DiskDriveBakedModel.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java index 039a3351a..7370f26e7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked; +package com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.DiskDriveBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; -import com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform.QuadRotator; -import com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform.QuadTranslator; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.QuadRotator; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.QuadTranslator; import java.util.EnumMap; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/DiskDriveBlockEntityRendererImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java similarity index 78% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/DiskDriveBlockEntityRendererImpl.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java index 68c9ac3ce..b19d5faad 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/entity/DiskDriveBlockEntityRendererImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.entity; +package com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.render.entity.AbstractDiskDriveBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.fabric.block.entity.FabricDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntityRenderer; import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.VertexFormat; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/DiskDriveUnbakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveUnbakedModel.java similarity index 92% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/DiskDriveUnbakedModel.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveUnbakedModel.java index 21cb2df54..176c7fa6c 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/DiskDriveUnbakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveUnbakedModel.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model; - -import com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.DiskDriveBakedModel; +package com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive; import java.util.Collection; import java.util.Objects; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/FabricDiskDriveBlockEntity.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/FabricDiskDriveBlockEntity.java similarity index 75% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/FabricDiskDriveBlockEntity.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/FabricDiskDriveBlockEntity.java index 6b0f2825e..99903d92d 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/block/entity/FabricDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/FabricDiskDriveBlockEntity.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.block.entity; +package com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/package-info.java new file mode 100644 index 000000000..a2af34b2c --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StorageExternalStorageProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StorageExternalStorageProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java index d78223cf2..277b67258 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StorageExternalStorageProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.StorageExtractableStorage; -import com.refinedmods.refinedstorage2.platform.fabric.internal.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageExtractableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; import java.util.Collections; import java.util.Iterator; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StoragePlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StoragePlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java index 520b560b8..f832107ba 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/network/node/externalstorage/StoragePlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; import java.util.Optional; import java.util.function.Function; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/package-info.java new file mode 100644 index 000000000..45aebfffc --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/package-info.java new file mode 100644 index 000000000..a7a6f90d6 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.storage; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/ContainerTransferDestination.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/ContainerTransferDestination.java similarity index 85% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/ContainerTransferDestination.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/ContainerTransferDestination.java index 38af9e26c..2baa0cc84 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/containermenu/ContainerTransferDestination.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/ContainerTransferDestination.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.containermenu; +package com.refinedmods.refinedstorage2.platform.fabric.support.containermenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferDestination; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferDestination; import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/FabricExtendedMenuProviderAdapter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java similarity index 87% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/FabricExtendedMenuProviderAdapter.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java index 57db09ff0..8dfe8ee38 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/FabricExtendedMenuProviderAdapter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.menu; +package com.refinedmods.refinedstorage2.platform.fabric.support.containermenu; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/MenuOpenerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/MenuOpenerImpl.java similarity index 64% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/MenuOpenerImpl.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/MenuOpenerImpl.java index 6c8c2851e..0f4c5f790 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/menu/MenuOpenerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/MenuOpenerImpl.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.menu; +package com.refinedmods.refinedstorage2.platform.fabric.support.containermenu; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; -import com.refinedmods.refinedstorage2.platform.common.menu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/package-info.java new file mode 100644 index 000000000..eb5ed88eb --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.containermenu; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/EnergyStorageAdapter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/EnergyStorageAdapter.java similarity index 96% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/EnergyStorageAdapter.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/EnergyStorageAdapter.java index 4441d5559..2d51867f3 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/energy/EnergyStorageAdapter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/EnergyStorageAdapter.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.energy; +package com.refinedmods.refinedstorage2.platform.fabric.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/package-info.java new file mode 100644 index 000000000..0daf46400 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/energy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.energy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReference.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java similarity index 82% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReference.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java index 9eafb71b1..ee4daca22 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReference.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets; +package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java similarity index 61% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java index 54f3aed7c..10f64caa2 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets; +package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java similarity index 84% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java index 515659b10..b3949200c 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/trinkets/TrinketsSlotReferenceProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.trinkets; +package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java new file mode 100644 index 000000000..722ce173d --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/FluidVariantFluidRenderer.java similarity index 88% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/FluidVariantFluidRenderer.java index 85d9db524..063b62e4b 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/FluidVariantFluidRenderer.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/FluidVariantFluidRenderer.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.render.model.AbstractFluidRenderer; -import com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.support.render.AbstractFluidRenderer; +import com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil; import java.util.HashMap; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/EmissiveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/EmissiveBakedModel.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java index dd7aeb7d9..a8643f9c0 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/EmissiveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked; - -import com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform.EmissiveTransform; +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/EmissiveModelRegistry.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/EmissiveModelRegistry.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java index 0e45068b4..9d4767b85 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/EmissiveModelRegistry.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java @@ -1,6 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model; - -import com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.EmissiveBakedModel; +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/EmissiveTransform.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java similarity index 95% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/EmissiveTransform.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java index d5599cb5a..7d8db916e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/EmissiveTransform.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform; +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.model.SpriteFinder; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadRotator.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java similarity index 92% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadRotator.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java index b6342c01f..aa31a48d5 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadRotator.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform; +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadTranslator.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadTranslator.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java index b8ae0df07..f920a597b 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/render/model/baked/transform/QuadTranslator.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.render.model.baked.transform; +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java new file mode 100644 index 000000000..68ceeffaa --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/package-info.java new file mode 100644 index 000000000..ce917d398 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.render; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/ResourceContainerFluidStorageAdapter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/ResourceContainerFluidStorageAdapter.java similarity index 88% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/ResourceContainerFluidStorageAdapter.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/ResourceContainerFluidStorageAdapter.java index 1e1486889..24fdc375e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/ResourceContainerFluidStorageAdapter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/ResourceContainerFluidStorageAdapter.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.storage; +package com.refinedmods.refinedstorage2.platform.fabric.support.resource; import com.refinedmods.refinedstorage2.api.core.Action; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.ArrayList; import java.util.Iterator; @@ -17,8 +17,8 @@ import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; import net.fabricmc.fabric.api.transfer.v1.transaction.base.SnapshotParticipant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.ofFluidVariant; -import static com.refinedmods.refinedstorage2.platform.fabric.util.VariantUtil.toFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.ofFluidVariant; +import static com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil.toFluidVariant; public class ResourceContainerFluidStorageAdapter extends SnapshotParticipant implements Storage { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/VariantUtil.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/VariantUtil.java similarity index 77% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/VariantUtil.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/VariantUtil.java index 11d567a3d..2713c50e9 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/VariantUtil.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/VariantUtil.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.fabric.util; +package com.refinedmods.refinedstorage2.platform.fabric.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/package-info.java new file mode 100644 index 000000000..5aef742c2 --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/resource/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.fabric.support.resource; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/FabricStorageUtil.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java similarity index 71% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/FabricStorageUtil.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java index 61aa45b6d..1b4b89692 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/internal/storage/FabricStorageUtil.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.fabric.internal.storage; +package com.refinedmods.refinedstorage2.platform.fabric.util; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; import net.fabricmc.fabric.api.transfer.v1.storage.StorageView; -final class FabricStorageUtil { +public final class FabricStorageUtil { private FabricStorageUtil() { } - static long getCurrentAmount(final Storage storage, final T resource) { + public static long getCurrentAmount(final Storage storage, final T resource) { long amount = 0; final Iterable> views = storage.nonEmptyViews(); for (final StorageView view : views) { diff --git a/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json b/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json index db29ddc6a..8b04bc9c4 100644 --- a/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage2-platform-fabric/src/main/resources/fabric.mod.json @@ -23,13 +23,13 @@ "com.refinedmods.refinedstorage2.platform.fabric.ClientModInitializerImpl" ], "modmenu": [ - "com.refinedmods.refinedstorage2.platform.fabric.integration.ModMenuIntegration" + "com.refinedmods.refinedstorage2.platform.fabric.modmenu.ModMenuApiImpl" ], "jei_mod_plugin": [ - "com.refinedmods.refinedstorage2.platform.common.integration.recipemod.jei.RefinedStorageJeiModPlugin" + "com.refinedmods.refinedstorage2.platform.common.recipemod.jei.RefinedStorageJeiModPlugin" ], "rei_client": [ - "com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei.RefinedStorageREIClientPlugin" + "com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei.RefinedStorageREIClientPlugin" ] }, "custom": { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java index 860151376..3901fbe7b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java @@ -1,27 +1,27 @@ package com.refinedmods.refinedstorage2.platform.forge; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractUpgradeItem; -import com.refinedmods.refinedstorage2.platform.api.item.HelpTooltipComponent; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.AbstractClientModInitializer; +import com.refinedmods.refinedstorage2.platform.common.configurationcard.ConfigurationCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.render.ConfigurationCardItemPropertyFunction; -import com.refinedmods.refinedstorage2.platform.common.render.NetworkItemItemPropertyFunction; -import com.refinedmods.refinedstorage2.platform.common.render.entity.StorageMonitorBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.common.render.model.ControllerModelPredicateProvider; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.CompositeClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.HelpClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.ResourceClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.common.screen.tooltip.UpgradeDestinationClientTooltipComponent; -import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.RefinedStorageREIClientPlugin; -import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.ReiGridSynchronizer; -import com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei.ReiProxy; -import com.refinedmods.refinedstorage2.platform.forge.render.entity.DiskDriveBlockEntityRendererImpl; -import com.refinedmods.refinedstorage2.platform.forge.render.model.DiskDriveGeometryLoader; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; +import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; +import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.support.tooltip.ResourceClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; +import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinationClientTooltipComponent; +import com.refinedmods.refinedstorage2.platform.forge.recipemod.rei.RefinedStorageREIClientPlugin; +import com.refinedmods.refinedstorage2.platform.forge.recipemod.rei.ReiGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.forge.recipemod.rei.ReiProxy; +import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.DiskDriveBlockEntityRendererImpl; +import com.refinedmods.refinedstorage2.platform.forge.support.render.model.DiskDriveGeometryLoader; import java.util.List; @@ -209,13 +209,13 @@ private static CompositeClientTooltipComponent createRegulatorUpgradeClientT private static void registerItemProperties() { ItemProperties.register( Items.INSTANCE.getWirelessGrid(), - NetworkItemItemPropertyFunction.NAME, - new NetworkItemItemPropertyFunction() + NetworkBoundItemItemPropertyFunction.NAME, + new NetworkBoundItemItemPropertyFunction() ); ItemProperties.register( Items.INSTANCE.getCreativeWirelessGrid(), - NetworkItemItemPropertyFunction.NAME, - new NetworkItemItemPropertyFunction() + NetworkBoundItemItemPropertyFunction.NAME, + new NetworkBoundItemItemPropertyFunction() ); ItemProperties.register( Items.INSTANCE.getConfigurationCard(), diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index b8ca777b6..842a3e945 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -3,9 +3,9 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridSortingDirection; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.content.DefaultEnergyUsage; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.CraftingGridMatrixCloseBehavior; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSize; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.GridSortingTypes; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridMatrixCloseBehavior; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSize; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSortingTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index 3ebba0e32..5e81c2fa3 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -2,39 +2,39 @@ import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.blockentity.EnergyBlockEntity; -import com.refinedmods.refinedstorage2.platform.api.item.EnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItem; import com.refinedmods.refinedstorage2.platform.common.AbstractModInitializer; -import com.refinedmods.refinedstorage2.platform.common.block.AbstractBaseBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.block.entity.iface.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntityTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.CreativeModeTabItems; import com.refinedmods.refinedstorage2.platform.common.content.DirectRegistryCallback; import com.refinedmods.refinedstorage2.platform.common.content.MenuTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.RegistryCallback; -import com.refinedmods.refinedstorage2.platform.common.internal.network.node.iface.externalstorage.InterfacePlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.common.item.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.item.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridItem; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.iface.InterfacePlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; +import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; -import com.refinedmods.refinedstorage2.platform.forge.block.entity.ForgeDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.forge.integration.curios.CuriosSlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.forge.integration.curios.CuriosSlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.forge.internal.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.FluidGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.FluidGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.ItemGridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.ItemGridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.exporter.FluidHandlerExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.exporter.ItemHandlerExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage.FluidHandlerPlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage.ItemHandlerPlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer.FluidHandlerImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer.ItemHandlerImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ResourceContainerFluidHandlerAdapter; +import com.refinedmods.refinedstorage2.platform.forge.exporter.FluidHandlerExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.forge.exporter.ItemHandlerExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.forge.externalstorage.FluidHandlerPlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.forge.externalstorage.ItemHandlerPlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.FluidGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.FluidGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.ItemGridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.ItemGridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.forge.importer.FluidHandlerImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.forge.importer.ItemHandlerImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; +import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.ForgeDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.forge.support.energy.EnergyStorageAdapter; +import com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem.CuriosSlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem.CuriosSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.forge.support.resource.ResourceContainerFluidHandlerAdapter; import java.util.Arrays; import java.util.HashSet; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java index 29213daac..207d223e2 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java @@ -4,24 +4,24 @@ import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; -import com.refinedmods.refinedstorage2.platform.forge.containermenu.ContainerTransferDestination; -import com.refinedmods.refinedstorage2.platform.forge.internal.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.ItemGridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.view.ForgeFluidGridResourceFactory; -import com.refinedmods.refinedstorage2.platform.forge.internal.grid.view.ForgeItemGridResourceFactory; -import com.refinedmods.refinedstorage2.platform.forge.menu.MenuOpenerImpl; +import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.ItemGridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.forge.grid.view.ForgeFluidGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.forge.grid.view.ForgeItemGridResourceFactory; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; import com.refinedmods.refinedstorage2.platform.forge.packet.c2s.ClientToServerCommunicationsImpl; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.ServerToClientCommunicationsImpl; -import com.refinedmods.refinedstorage2.platform.forge.render.FluidStackFluidRenderer; +import com.refinedmods.refinedstorage2.platform.forge.support.containermenu.ContainerTransferDestination; +import com.refinedmods.refinedstorage2.platform.forge.support.containermenu.MenuOpenerImpl; +import com.refinedmods.refinedstorage2.platform.forge.support.energy.EnergyStorageAdapter; +import com.refinedmods.refinedstorage2.platform.forge.support.render.FluidStackFluidRenderer; import java.util.ArrayList; import java.util.List; @@ -82,8 +82,8 @@ import net.minecraftforge.items.wrapper.InvWrapper; import net.minecraftforge.registries.ForgeRegistries; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.ofFluidStack; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.ofFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public final class PlatformImpl extends AbstractPlatform { private static final TagKey WRENCH_TAG = TagKey.create( diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/package-info.java deleted file mode 100644 index 7f72f478b..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.block.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/package-info.java deleted file mode 100644 index 526d4e5d1..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.containermenu; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index a726d4e1e..89ce5c99a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage2.platform.forge.datagen; -import com.refinedmods.refinedstorage2.platform.common.block.grid.AbstractGridBlock; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridBlock; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java index 2a4249ef0..880f37c2e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java @@ -1,18 +1,18 @@ package com.refinedmods.refinedstorage2.platform.forge.datagen; -import com.refinedmods.refinedstorage2.platform.common.block.AbstractConstructorDestructorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.CableBlockSupport; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerEnergyType; -import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; -import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; -import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; -import com.refinedmods.refinedstorage2.platform.common.block.grid.AbstractGridBlock; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.AbstractConstructorDestructorBlock; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlock; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerEnergyType; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlock; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlock; import java.util.EnumMap; import java.util.Map; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java index cb5fcb142..f1edd6f3d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -1,20 +1,20 @@ package com.refinedmods.refinedstorage2.platform.forge.datagen; -import com.refinedmods.refinedstorage2.platform.common.block.CableBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ConstructorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; -import com.refinedmods.refinedstorage2.platform.common.block.DestructorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; -import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; -import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; -import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; -import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.ConstructorBlock; +import com.refinedmods.refinedstorage2.platform.common.constructordestructor.DestructorBlock; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.ColorMap; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerBlock; +import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlock; +import com.refinedmods.refinedstorage2.platform.common.exporter.ExporterBlock; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridBlock; +import com.refinedmods.refinedstorage2.platform.common.grid.GridBlock; +import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.CableBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlock; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java index c250309a8..bcdcbe1cb 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.datagen.loot; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.loot.EnergyLootItemFunction; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyLootItemFunction; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java index 0b04c869b..0bfdc61ab 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.type.ItemStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import java.util.Arrays; import java.util.Collection; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/FluidHandlerExporterTransferStrategyFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/FluidHandlerExporterTransferStrategyFactory.java similarity index 72% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/FluidHandlerExporterTransferStrategyFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/FluidHandlerExporterTransferStrategyFactory.java index 98cb6752b..f56dd7a1d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/FluidHandlerExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/FluidHandlerExporterTransferStrategyFactory.java @@ -1,18 +1,18 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.exporter; +package com.refinedmods.refinedstorage2.platform.forge.exporter; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.AbstractExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.exporter.ExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.network.node.AbstractFuzzyExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.FluidHandlerInsertableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.common.exporter.AbstractFuzzyExporterTransferStrategy; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.FluidHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/ItemHandlerExporterTransferStrategyFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/ItemHandlerExporterTransferStrategyFactory.java similarity index 73% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/ItemHandlerExporterTransferStrategyFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/ItemHandlerExporterTransferStrategyFactory.java index c4fd6e416..69d9421dc 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/ItemHandlerExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/ItemHandlerExporterTransferStrategyFactory.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.exporter; +package com.refinedmods.refinedstorage2.platform.forge.exporter; import com.refinedmods.refinedstorage2.api.network.impl.node.exporter.AbstractExporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.exporter.ExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.ExporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.exporter.ExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.network.node.AbstractFuzzyExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.common.exporter.AbstractFuzzyExporterTransferStrategy; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/package-info.java new file mode 100644 index 000000000..b6d6cf5d7 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/exporter/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.exporter; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerExternalStorageProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java similarity index 75% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerExternalStorageProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java index 5410da75d..73cda19e1 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerExternalStorageProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.forge.externalstorage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -6,11 +6,11 @@ import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.FluidHandlerExtractableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.FluidHandlerInsertableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.forge.storage.FluidHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.FluidHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; import java.util.Iterator; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java similarity index 71% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java index 4caab3e4c..297ee315c 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerPlatformExternalStorageProviderFactory.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.forge.externalstorage; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerExternalStorageProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java similarity index 75% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerExternalStorageProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java index 877f3dcff..a3050eeaa 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerExternalStorageProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.forge.externalstorage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; @@ -6,11 +6,11 @@ import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerExtractableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; import java.util.Iterator; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java similarity index 71% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java index 2e181684d..37da61f22 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerPlatformExternalStorageProviderFactory.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage; +package com.refinedmods.refinedstorage2.platform.forge.externalstorage; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; -import com.refinedmods.refinedstorage2.platform.api.network.node.externalstorage.PlatformExternalStorageProviderFactory; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.api.storage.externalstorage.PlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/package-info.java new file mode 100644 index 000000000..304720869 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.externalstorage; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/CursorStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java similarity index 97% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/CursorStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java index 7ad3735a3..44bb70867 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/CursorStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid; import javax.annotation.Nonnull; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java similarity index 77% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/package-info.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java index a04ae9025..aa9f355ec 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/package-info.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.menu; +package com.refinedmods.refinedstorage2.platform.forge.grid; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridExtractionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridExtractionStrategy.java similarity index 90% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridExtractionStrategy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridExtractionStrategy.java index 16becd7e7..07a6ea211 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridExtractionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridExtractionStrategy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; @@ -7,12 +7,12 @@ import com.refinedmods.refinedstorage2.api.storage.EmptyActor; import com.refinedmods.refinedstorage2.api.storage.Storage; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; @@ -26,8 +26,8 @@ import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.wrapper.PlayerMainInvWrapper; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidAction; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidAction; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class FluidGridExtractionStrategy implements GridExtractionStrategy { private static final ItemResource BUCKET_ITEM_RESOURCE = new ItemResource(Items.BUCKET, null); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridInsertionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridInsertionStrategy.java similarity index 80% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridInsertionStrategy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridInsertionStrategy.java index 18d394ed9..2c06a5603 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/FluidGridInsertionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/FluidGridInsertionStrategy.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; @@ -18,9 +18,9 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandlerItem; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.ofFluidStack; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidAction; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.ofFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidAction; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class FluidGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu menu; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridExtractionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java similarity index 75% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridExtractionStrategy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java index ccf65d8b9..2581da9ee 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridExtractionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java @@ -1,16 +1,17 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java similarity index 78% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java index 90125ebf8..946c32e03 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridInsertionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java @@ -1,15 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -18,7 +19,7 @@ import net.minecraftforge.items.wrapper.InvWrapper; import net.minecraftforge.items.wrapper.RangedWrapper; -import static com.refinedmods.refinedstorage2.platform.api.resource.ItemResource.ofItemStack; +import static com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource.ofItemStack; public class ItemGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridScrollingStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java similarity index 82% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridScrollingStrategy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java index a0a4579fe..7956592ed 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/ItemGridScrollingStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java @@ -1,19 +1,20 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.api.grid.operations.GridOperations; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerExtractableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/package-info.java new file mode 100644 index 000000000..a993a0085 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeFluidGridResourceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeFluidGridResourceFactory.java similarity index 67% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeFluidGridResourceFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeFluidGridResourceFactory.java index 666acd7fe..ef83d4c66 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeFluidGridResourceFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeFluidGridResourceFactory.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.forge.grid.view; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.AbstractFluidGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.AbstractFluidGridResourceFactory; import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fml.ModList; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class ForgeFluidGridResourceFactory extends AbstractFluidGridResourceFactory { @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeItemGridResourceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeItemGridResourceFactory.java similarity index 77% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeItemGridResourceFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeItemGridResourceFactory.java index 481321992..2b26546e8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/ForgeItemGridResourceFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/ForgeItemGridResourceFactory.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.grid.view; +package com.refinedmods.refinedstorage2.platform.forge.grid.view; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.AbstractItemGridResourceFactory; +import com.refinedmods.refinedstorage2.platform.common.grid.view.AbstractItemGridResourceFactory; import java.util.Objects; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/package-info.java new file mode 100644 index 000000000..9558fc998 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/view/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.grid.view; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterSource.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java similarity index 74% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterSource.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java index 5a8c63d1a..472957791 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterSource.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.forge.importer; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.FluidHandlerExtractableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.FluidHandlerInsertableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.forge.storage.FluidHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.FluidHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; import java.util.Iterator; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterTransferStrategyFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterTransferStrategyFactory.java similarity index 73% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterTransferStrategyFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterTransferStrategyFactory.java index c23b0a57e..2dfd7152f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/FluidHandlerImporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterTransferStrategyFactory.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.forge.importer; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategyImpl; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterSource.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java similarity index 74% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterSource.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java index c1cef9f04..01d0976f9 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterSource.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.forge.importer; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinates; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerExtractableStorage; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.ItemHandlerInsertableStorage; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; +import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; import java.util.Iterator; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterTransferStrategyFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterTransferStrategyFactory.java similarity index 71% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterTransferStrategyFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterTransferStrategyFactory.java index d0091d49f..deefb2463 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/ItemHandlerImporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterTransferStrategyFactory.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer; +package com.refinedmods.refinedstorage2.platform.forge.importer; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategy; import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterTransferStrategyImpl; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.network.node.importer.ImporterTransferStrategyFactory; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.importer.ImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.internal.storage.InteractionCoordinatesImpl; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinatesImpl; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/package-info.java new file mode 100644 index 000000000..6ca708383 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.importer; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/package-info.java deleted file mode 100644 index 9fa3e224b..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration.curios; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/package-info.java deleted file mode 100644 index ee57bb50f..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java deleted file mode 100644 index 59a81cce8..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java deleted file mode 100644 index 79cff5cdb..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/package-info.java deleted file mode 100644 index 599227a34..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/package-info.java deleted file mode 100644 index a2f9c5394..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/grid/view/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.grid.view; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/package-info.java deleted file mode 100644 index 6efda9a28..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/exporter/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.exporter; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/package-info.java deleted file mode 100644 index 419a7449c..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/externalstorage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.externalstorage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/package-info.java deleted file mode 100644 index ef97578ad..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/network/node/importer/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.network.node.importer; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/package-info.java deleted file mode 100644 index 2c9213700..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java index 75df46c38..cfeb372bb 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java @@ -4,11 +4,11 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.property.PropertyType; -import com.refinedmods.refinedstorage2.platform.common.packet.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java index 559dbff80..ce1c0161b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridClearPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java index 88ff45f22..2916db592 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/CraftingGridRecipeTransferPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.ArrayList; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridExtractPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridExtractPacket.java index 2a3d73130..27ab57c38 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridExtractPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridExtractPacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.grid.GridExtractionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridInsertPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridInsertPacket.java index 628caf98b..244cd205a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridInsertPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridInsertPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridScrollPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridScrollPacket.java index 941bfd7dc..44a8a7130 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridScrollPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/GridScrollPacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; -import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollingStrategy; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridScrollingStrategy; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/PropertyChangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/PropertyChangePacket.java index 13866cbda..199f204d8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/PropertyChangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/PropertyChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceFilterSlotChangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceFilterSlotChangePacket.java index 2ca12f2fe..a46a439a9 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceFilterSlotChangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceFilterSlotChangePacket.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import java.util.Objects; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotAmountChangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotAmountChangePacket.java index 699831bef..9244a94f6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotAmountChangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotAmountChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotChangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotChangePacket.java index d782daa85..f4766cc0f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotChangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ResourceSlotChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/SingleAmountChangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/SingleAmountChangePacket.java index 12f94fb29..a7615cd73 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/SingleAmountChangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/SingleAmountChangePacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java index 9eeb6fe31..5dd27d807 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.c2s; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.item.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.item.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java index 8afed8890..ee4ad1efe 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.ControllerContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.controller.ControllerContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java index 9eeda92dd..02de45cc0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java index d55cbe7c8..fff4a3de5 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.AbstractGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java index 161c8ec3a..3c5ea01ad 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java index e96402395..c402dd972 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java @@ -3,9 +3,9 @@ import com.refinedmods.refinedstorage2.api.storage.StorageInfo; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.packet.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; import java.util.UUID; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java index c58f8a6ac..5af643104 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.ClientStorageRepository; +import com.refinedmods.refinedstorage2.platform.common.storage.ClientStorageRepository; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.UUID; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java index d751be18a..80f4699bb 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; +import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterContainerMenu; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java similarity index 95% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java index 5d4d6b534..ff8380499 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/CraftingGridTransferHandler.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.containermenu.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; import java.awt.Color; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/DraggableStackVisitorImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java similarity index 91% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/DraggableStackVisitorImpl.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java index e864f80ab..948155167 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/DraggableStackVisitorImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.slot.ResourceSlot; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ExclusionZonesProviderImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java similarity index 77% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ExclusionZonesProviderImpl.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java index d29c1eefb..3e8393962 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ExclusionZonesProviderImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import java.util.Collection; import java.util.stream.Collectors; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java similarity index 82% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java index d58b0ec7c..1ba8708f6 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridFocusedStackProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.grid.view.GridResource; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.grid.AbstractGridScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java similarity index 74% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java index a7d29fdd1..6aa88e0d9 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.FluidGridResource; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.grid.view.FluidGridResource; +import com.refinedmods.refinedstorage2.platform.common.grid.view.ItemGridResource; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java index 4aea2a1f1..f05de9d6f 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/MissingIngredients.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java similarity index 93% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java index 52aa07a34..6f21f360a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.Tags; -import com.refinedmods.refinedstorage2.platform.common.internal.item.EnergyItemHelperImpl; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; +import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; import java.util.function.Supplier; import java.util.stream.Collectors; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiGridSynchronizer.java similarity index 89% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiGridSynchronizer.java index 47043a7c0..e3cea565a 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiGridSynchronizer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiGridSynchronizer.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; -import com.refinedmods.refinedstorage2.platform.common.internal.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiProxy.java similarity index 88% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiProxy.java index 20ce8216a..9195e3df8 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ReiProxy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ReiProxy.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java similarity index 87% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceFocusedStackProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java index c424fc3da..fb8be1ed5 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceFocusedStackProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.screen.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java similarity index 79% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceIngredientConverter.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java index 38d302f15..337aafe1e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.fabric.integration.recipemod.rei; +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; -import com.refinedmods.refinedstorage2.platform.api.integration.recipemod.IngredientConverter; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.recipemod.IngredientConverter; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/package-info.java new file mode 100644 index 000000000..a157b3201 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.recipemod.rei; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/package-info.java deleted file mode 100644 index dc054a6b7..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.render.entity; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/package-info.java deleted file mode 100644 index d1971c8a0..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.render.model.baked; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/package-info.java deleted file mode 100644 index 56dc98908..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.render.model; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/package-info.java deleted file mode 100644 index d154d43d1..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.render; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerExtractableStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerExtractableStorage.java similarity index 72% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerExtractableStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerExtractableStorage.java index 46c580072..ea15717c6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerExtractableStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerExtractableStorage.java @@ -1,15 +1,15 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import net.minecraftforge.fluids.FluidStack; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidAction; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidAction; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class FluidHandlerExtractableStorage implements ExtractableStorage { private final InteractionCoordinates interactionCoordinates; @@ -27,7 +27,7 @@ public long extract(final FluidResource resource, final long amount, final Actio final long correctedAmount = amountOverride.overrideAmount( resource, amount, - () -> HandlerUtil.getCurrentAmount(fluidHandler, resource) + () -> ForgeHandlerUtil.getCurrentAmount(fluidHandler, resource) ); if (correctedAmount == 0) { return 0L; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerInsertableStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerInsertableStorage.java similarity index 77% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerInsertableStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerInsertableStorage.java index ccad67f37..152f07317 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/FluidHandlerInsertableStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/FluidHandlerInsertableStorage.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidAction; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidAction; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class FluidHandlerInsertableStorage implements InsertableStorage { private final InteractionCoordinates interactionCoordinates; @@ -30,7 +30,7 @@ public long insert(final FluidResource resource, final long amount, final Action final long correctedAmount = amountOverride.overrideAmount( resource, amount, - () -> HandlerUtil.getCurrentAmount(fluidHandler, resource) + () -> ForgeHandlerUtil.getCurrentAmount(fluidHandler, resource) ); if (correctedAmount == 0) { return 0L; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/HandlerUtil.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ForgeHandlerUtil.java similarity index 76% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/HandlerUtil.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ForgeHandlerUtil.java index 2d78fa4d2..515b84658 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/HandlerUtil.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ForgeHandlerUtil.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import net.minecraft.world.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.IItemHandler; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.isSame; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.isSame; -final class HandlerUtil { - private HandlerUtil() { +final class ForgeHandlerUtil { + private ForgeHandlerUtil() { } static long getCurrentAmount(final IItemHandler itemHandler, final ItemStack stack) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinates.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinates.java similarity index 91% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinates.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinates.java index 796fcfc66..21b9690e9 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinates.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinates.java @@ -1,8 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import java.util.Collections; import java.util.Iterator; @@ -15,8 +15,8 @@ import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.IItemHandler; -import static com.refinedmods.refinedstorage2.platform.api.resource.ItemResource.ofItemStack; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.ofFluidStack; +import static com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource.ofItemStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.ofFluidStack; public interface InteractionCoordinates { default LazyOptional getItemHandler() { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinatesImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinatesImpl.java similarity index 95% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinatesImpl.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinatesImpl.java index b100db73b..fc22d8bc0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/InteractionCoordinatesImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/InteractionCoordinatesImpl.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerExtractableStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerExtractableStorage.java similarity index 87% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerExtractableStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerExtractableStorage.java index 8ac1b2116..8a362a8d7 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerExtractableStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerExtractableStorage.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.IItemHandler; @@ -26,7 +26,7 @@ public long extract(final ItemResource resource, final long amount, final Action final long correctedAmount = amountOverride.overrideAmount( resource, amount, - () -> HandlerUtil.getCurrentAmount(itemHandler, toExtractStack) + () -> ForgeHandlerUtil.getCurrentAmount(itemHandler, toExtractStack) ); if (correctedAmount == 0) { return 0L; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerInsertableStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerInsertableStorage.java similarity index 85% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerInsertableStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerInsertableStorage.java index 64355fda9..5c0bbac8f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ItemHandlerInsertableStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/ItemHandlerInsertableStorage.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.storage; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.network.node.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.IItemHandler; @@ -28,7 +28,7 @@ public long insert(final ItemResource resource, final long amount, final Action final long correctedAmount = amountOverride.overrideAmount( resource, amount, - () -> HandlerUtil.getCurrentAmount(itemHandler, resource.toItemStack()) + () -> ForgeHandlerUtil.getCurrentAmount(itemHandler, resource.toItemStack()) ); if (correctedAmount == 0) { return 0L; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/DiskDriveBlockEntityRendererImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java similarity index 75% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/DiskDriveBlockEntityRendererImpl.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java index 1681528d4..dd9daf228 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/entity/DiskDriveBlockEntityRendererImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBlockEntityRendererImpl.java @@ -1,9 +1,8 @@ -package com.refinedmods.refinedstorage2.platform.forge.render.entity; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.render.entity.AbstractDiskDriveBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.forge.block.entity.ForgeDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntityRenderer; import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.mojang.blaze3d.vertex.VertexFormat; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/ForgeDiskDriveBlockEntity.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/ForgeDiskDriveBlockEntity.java similarity index 83% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/ForgeDiskDriveBlockEntity.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/ForgeDiskDriveBlockEntity.java index 3ed78ff2d..9b76198f2 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/block/entity/ForgeDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/ForgeDiskDriveBlockEntity.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.block.entity; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; import javax.annotation.Nonnull; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/package-info.java new file mode 100644 index 000000000..85c0f7486 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/package-info.java new file mode 100644 index 000000000..64a1e40c2 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.storage; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/ContainerTransferDestination.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/ContainerTransferDestination.java similarity index 74% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/ContainerTransferDestination.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/ContainerTransferDestination.java index 7740bba7c..949780b95 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/containermenu/ContainerTransferDestination.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/ContainerTransferDestination.java @@ -1,6 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.forge.containermenu; +package com.refinedmods.refinedstorage2.platform.forge.support.containermenu; -import com.refinedmods.refinedstorage2.platform.common.containermenu.transfer.TransferDestination; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferDestination; import net.minecraft.world.Container; import net.minecraft.world.item.ItemStack; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/MenuOpenerImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/MenuOpenerImpl.java similarity index 70% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/MenuOpenerImpl.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/MenuOpenerImpl.java index 08ba1c50e..5e979946e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/menu/MenuOpenerImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/MenuOpenerImpl.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.menu; +package com.refinedmods.refinedstorage2.platform.forge.support.containermenu; -import com.refinedmods.refinedstorage2.platform.common.menu.ExtendedMenuProvider; -import com.refinedmods.refinedstorage2.platform.common.menu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/package-info.java new file mode 100644 index 000000000..7cd95f468 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/containermenu/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.containermenu; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/EnergyStorageAdapter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/EnergyStorageAdapter.java similarity index 94% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/EnergyStorageAdapter.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/EnergyStorageAdapter.java index 77edd7796..18ec4d73f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/energy/EnergyStorageAdapter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/EnergyStorageAdapter.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.energy; +package com.refinedmods.refinedstorage2.platform.forge.support.energy; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/package-info.java new file mode 100644 index 000000000..08446aa01 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/energy/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.energy; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReference.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java similarity index 81% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReference.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java index ab5589eaf..b29fd1dfb 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReference.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.curios; +package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java similarity index 60% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java index 5cc8274e8..cba5c96fa 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.curios; +package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java similarity index 82% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java index a9a7bcb2b..caa100fba 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/curios/CuriosSlotReferenceProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.integration.curios; +package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.item.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java new file mode 100644 index 000000000..3fd560cb4 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/FluidStackFluidRenderer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/FluidStackFluidRenderer.java similarity index 92% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/FluidStackFluidRenderer.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/FluidStackFluidRenderer.java index 64bf8246e..0a798ccc7 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/FluidStackFluidRenderer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/FluidStackFluidRenderer.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.render; +package com.refinedmods.refinedstorage2.platform.forge.support.render; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.render.model.AbstractFluidRenderer; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.common.support.render.AbstractFluidRenderer; import java.util.Collections; import java.util.HashMap; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java similarity index 94% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveBakedModel.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java index f9904b3ad..37e25515f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java @@ -1,11 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.forge.render.model.baked; +package com.refinedmods.refinedstorage2.platform.forge.support.render.model; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; -import com.refinedmods.refinedstorage2.platform.common.block.DiskDriveBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.diskdrive.AbstractDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; -import com.refinedmods.refinedstorage2.platform.forge.block.entity.ForgeDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.ForgeDiskDriveBlockEntity; import java.util.ArrayList; import java.util.Arrays; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveGeometryLoader.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java similarity index 86% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveGeometryLoader.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java index e5e6d8b09..19427f196 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveGeometryLoader.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.render.model; +package com.refinedmods.refinedstorage2.platform.forge.support.render.model; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveItemBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java similarity index 97% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveItemBakedModel.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java index 4817af872..81f542709 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/baked/DiskDriveItemBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.render.model.baked; +package com.refinedmods.refinedstorage2.platform.forge.support.render.model; import java.util.ArrayList; import java.util.EnumMap; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveUnbakedGeometry.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java similarity index 95% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveUnbakedGeometry.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java index 429aeabc8..6ba531032 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/render/model/DiskDriveUnbakedGeometry.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java @@ -1,7 +1,6 @@ -package com.refinedmods.refinedstorage2.platform.forge.render.model; +package com.refinedmods.refinedstorage2.platform.forge.support.render.model; -import com.refinedmods.refinedstorage2.platform.common.util.BiDirection; -import com.refinedmods.refinedstorage2.platform.forge.render.model.baked.DiskDriveBakedModel; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; import java.util.Objects; import java.util.function.BiFunction; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java new file mode 100644 index 000000000..bc506577a --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.render.model; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/package-info.java new file mode 100644 index 000000000..fbbef2d45 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.render; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ResourceContainerFluidHandlerAdapter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/ResourceContainerFluidHandlerAdapter.java similarity index 79% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ResourceContainerFluidHandlerAdapter.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/ResourceContainerFluidHandlerAdapter.java index 1c7b6639c..8c79a48ad 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/internal/storage/ResourceContainerFluidHandlerAdapter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/ResourceContainerFluidHandlerAdapter.java @@ -1,18 +1,18 @@ -package com.refinedmods.refinedstorage2.platform.forge.internal.storage; +package com.refinedmods.refinedstorage2.platform.forge.support.resource; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceAmountTemplate; -import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; +import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import javax.annotation.Nullable; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.ofFluidStack; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toAction; -import static com.refinedmods.refinedstorage2.platform.forge.util.VariantUtil.toFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.ofFluidStack; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toAction; +import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.toFluidStack; public class ResourceContainerFluidHandlerAdapter implements IFluidHandler { private final ResourceContainer container; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/VariantUtil.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/VariantUtil.java similarity index 90% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/VariantUtil.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/VariantUtil.java index a6f6e7076..2e8fc5d99 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/VariantUtil.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/VariantUtil.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.forge.util; +package com.refinedmods.refinedstorage2.platform.forge.support.resource; import com.refinedmods.refinedstorage2.api.core.Action; -import com.refinedmods.refinedstorage2.platform.api.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import java.util.Objects; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/package-info.java new file mode 100644 index 000000000..48edca2fd --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/resource/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.forge.support.resource; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/package-info.java deleted file mode 100644 index e327f7d72..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/util/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.util; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; From dc0224f4cf2c7dd4e9b3854bd25379384a873042 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Wed, 1 Nov 2023 01:50:59 +0100 Subject: [PATCH 07/24] refactor: make more classes package-private An added benefit of partitioning everything by feature. --- .../platform/common/ContainedFluid.java | 9 ------- .../platform/common/Platform.java | 4 +++ .../platform/common/PlatformApiImpl.java | 4 +-- .../AbstractItemConstructorStrategy.java | 4 +-- .../BlockBreakDestructorStrategy.java | 4 +-- .../CompositeConstructorStrategy.java | 4 +-- .../CompositeDestructorStrategy.java | 4 +-- .../ConstructorContainerMenu.java | 5 ++-- .../ConstructorDestructorPropertyTypes.java | 18 +++++++++++++ .../ConstructorDropItemsSideButtonWidget.java | 4 +-- .../ConstructorScreen.java | 2 +- .../DestructorContainerMenu.java | 4 +-- ...DestructorPickupItemsSideButtonWidget.java | 4 +-- .../DestructorScreen.java | 2 +- .../FluidBreakDestructorStrategy.java | 4 +-- .../ItemDropConstructorStrategy.java | 4 +-- .../ItemPickupDestructorStrategy.java | 4 +-- .../CreativeControllerBlockItem.java | 4 +-- .../common/detector/DetectorAmount.java | 9 ------- .../detector/DetectorContainerMenu.java | 4 +-- .../common/detector/DetectorModeSettings.java | 2 +- .../DetectorModeSideButtonWidget.java | 4 +-- .../detector/DetectorPropertyTypes.java | 17 ++++++++++++ .../common/detector/DetectorScreen.java | 2 +- .../detector/FuzzyDetectorAmountStrategy.java | 4 +-- .../common/grid/ClientCraftingGridSource.java | 4 +-- .../grid/CraftingGridRefillContext.java | 2 +- .../grid/CraftingGridRefillContextImpl.java | 4 +-- .../common/grid/CraftingGridSource.java | 2 +- .../common/grid/CraftingGridSourceImpl.java | 4 +-- .../common/grid/GridExtendedMenuProvider.java | 8 +++--- .../SnapshotCraftingGridRefillContext.java | 4 +-- .../platform/common/grid/WirelessGrid.java | 4 +-- .../WirelessGridExtendedMenuProvider.java | 10 +++---- .../common/grid/WirelessGridOperations.java | 8 +++--- .../screen/AutoSelectedSideButtonWidget.java | 4 +-- .../common/grid/screen/LastModified.java | 4 +-- .../grid/screen/SizeSideButtonWidget.java | 4 +-- .../SortingDirectionSideButtonWidget.java | 4 +-- .../screen/SortingTypeSideButtonWidget.java | 4 +-- .../StorageChannelTypeSideButtonWidget.java | 4 +-- .../SynchronizationSideButtonWidget.java | 4 +-- .../screen/hint/FluidGridInsertionHint.java | 3 +-- .../iface/ExportedResourcesContainer.java | 4 +-- ...InterfaceProxyExternalStorageProvider.java | 8 +++--- .../common/networking/CableBlock.java | 1 + .../recipemod/jei/ClickableIngredient.java | 4 +-- .../CraftingGridRecipeTransferHandler.java | 3 +-- .../ExclusionZonesGuiContainerHandler.java | 2 +- .../recipemod/jei/GhostIngredientHandler.java | 4 +-- .../jei/GridGuiContainerHandler.java | 4 +-- .../jei/GridResourceIngredientConverter.java | 4 +-- .../recipemod/jei/JeiGridSynchronizer.java | 4 +-- .../jei/MissingItemRecipeTransferError.java | 4 +-- .../jei/ResourceGuiContainerHandler.java | 6 ++--- .../jei/ResourceIngredientConverter.java | 4 +-- .../storage/AbstractStorageContainerMenu.java | 8 +++--- .../common/storage/AbstractStorageScreen.java | 4 +-- .../common/storage/AccessModeSettings.java | 6 ++--- .../storage/LimitedPlatformStorage.java | 10 +++---- .../common/storage/PlatformStorage.java | 10 +++---- .../common/storage/StoragePropertyTypes.java | 21 +++++++++++++++ .../common/storage/StorageTooltipHelper.java | 16 +++++------ .../platform/common/storage/StorageTypes.java | 8 ++++-- .../AbstractDiskDriveBlockEntity.java | 12 +++------ .../diskdrive/DiskDriveBlockEntityTicker.java | 4 +-- .../storage/diskdrive/DiskDriveInventory.java | 4 +-- .../EmptyStorageDiskInfoAccessor.java | 2 +- .../diskdrive/StorageDiskInfoAccessor.java | 2 +- .../StorageDiskInfoAccessorImpl.java | 4 +-- .../ExternalStorageScreen.java | 5 ++-- .../storageblock/AbstractStorageBlock.java | 2 +- .../AbstractStorageBlockBlockEntity.java | 2 +- .../AbstractStorageBlockScreen.java | 2 +- .../StorageBlockLootItemFunction.java | 2 +- .../FluidStorageMonitorInsertionStrategy.java | 11 ++++---- .../AbstractDirectionalCableBlock.java | 1 - .../common/support/CableBlockSupport.java | 1 - .../CableShapeCacheKey.java | 2 +- .../NetworkNodeContainerBlockEntityImpl.java | 8 ++++++ .../support/amount/LongAmountOperations.java | 11 ++++---- .../support/containermenu/PropertyTypes.java | 27 +++---------------- .../resource/ResourceContainerImpl.java | 4 +-- .../UpgradeWithEnchantedBookRecipe.java | 10 +++---- .../platform/common/util/LevelUtil.java | 20 -------------- .../util/{MathHelper.java => MathUtil.java} | 4 +-- ...TickHandler.java => ServerEventQueue.java} | 6 ++--- .../common/storage/FluidStorageTypeTest.java | 3 ++- .../common/storage/ItemStorageTypeTest.java | 3 ++- .../fabric/ClientModInitializerImpl.java | 2 +- .../platform/fabric/ModInitializerImpl.java | 4 +-- .../platform/fabric/PlatformImpl.java | 7 +++-- .../strategy/FluidGridExtractionStrategy.java | 8 +++--- .../mixin/AbstractModelBakerImplMixin.java | 2 +- .../diskdrive/DiskDriveBakedModel.java | 4 +-- .../{model => }/EmissiveBakedModel.java | 6 ++--- .../{model => }/EmissiveModelRegistry.java | 2 +- .../render/{model => }/EmissiveTransform.java | 6 ++--- .../render/{model => }/QuadRotator.java | 2 +- .../render/{model => }/QuadTranslator.java | 2 +- .../support/render/model/package-info.java | 7 ----- ...mpl.java => SimpleSingleStackStorage.java} | 8 +++--- .../platform/forge/ClientModInitializer.java | 2 +- .../platform/forge/ModInitializer.java | 4 +-- .../platform/forge/PlatformImpl.java | 1 - .../diskdrive}/DiskDriveBakedModel.java | 3 +-- .../diskdrive}/DiskDriveGeometryLoader.java | 2 +- .../diskdrive}/DiskDriveItemBakedModel.java | 2 +- .../diskdrive}/DiskDriveUnbakedGeometry.java | 2 +- .../support/render/model/package-info.java | 7 ----- 110 files changed, 286 insertions(+), 295 deletions(-) delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDestructorPropertyTypes.java delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorPropertyTypes.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StoragePropertyTypes.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/{networking => support}/CableShapeCacheKey.java (94%) delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/LevelUtil.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/{MathHelper.java => MathUtil.java} (78%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/{TickHandler.java => ServerEventQueue.java} (79%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/{model => }/EmissiveBakedModel.java (90%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/{model => }/EmissiveModelRegistry.java (99%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/{model => }/EmissiveTransform.java (91%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/{model => }/QuadRotator.java (99%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/{model => }/QuadTranslator.java (98%) delete mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/{SingleStackStorageImpl.java => SimpleSingleStackStorage.java} (63%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{support/render/model => storage/diskdrive}/DiskDriveBakedModel.java (98%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{support/render/model => storage/diskdrive}/DiskDriveGeometryLoader.java (86%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{support/render/model => storage/diskdrive}/DiskDriveItemBakedModel.java (97%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/{support/render/model => storage/diskdrive}/DiskDriveUnbakedGeometry.java (98%) delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java deleted file mode 100644 index 8844f28b7..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/ContainedFluid.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common; - -import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; -import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; - -import net.minecraft.world.item.ItemStack; - -public record ContainedFluid(ItemStack remainderContainer, ResourceAmount fluid) { -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java index 2a26f87b5..63efa0135 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; +import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; @@ -119,4 +120,7 @@ List processTooltipComponents( void renderTooltip(GuiGraphics graphics, List components, int x, int y); Optional getEnergyStorage(ItemStack stack); + + record ContainedFluid(ItemStack remainderContainer, ResourceAmount fluid) { + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index e8d5c4f34..62a42f9dc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -72,7 +72,7 @@ import com.refinedmods.refinedstorage2.platform.common.upgrade.BuiltinUpgradeDestinationsImpl; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; -import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; +import com.refinedmods.refinedstorage2.platform.common.util.ServerEventQueue; import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.CompositeWirelessTransmitterRangeModifier; import java.util.ArrayList; @@ -292,7 +292,7 @@ public void requestNetworkNodeInitialization(final NetworkNodeContainer containe final Level level, final Runnable callback) { final LevelConnectionProvider connectionProvider = new LevelConnectionProvider(level); - TickHandler.runWhenReady(() -> { + ServerEventQueue.queue(() -> { networkBuilder.initialize(container, connectionProvider); callback.run(); }); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java index 9764fad8b..fe58bd497 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/AbstractItemConstructorStrategy.java @@ -15,12 +15,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -public abstract class AbstractItemConstructorStrategy implements ConstructorStrategy { +abstract class AbstractItemConstructorStrategy implements ConstructorStrategy { protected final ServerLevel level; protected final BlockPos pos; protected final Direction direction; - protected AbstractItemConstructorStrategy(final ServerLevel level, final BlockPos pos, final Direction direction) { + AbstractItemConstructorStrategy(final ServerLevel level, final BlockPos pos, final Direction direction) { this.level = level; this.pos = pos; this.direction = direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java index efd701758..b5c9d79c2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/BlockBreakDestructorStrategy.java @@ -24,13 +24,13 @@ import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.state.BlockState; -public class BlockBreakDestructorStrategy implements DestructorStrategy { +class BlockBreakDestructorStrategy implements DestructorStrategy { private final ServerLevel level; private final BlockPos pos; private final Direction direction; private final ItemStack tool; - public BlockBreakDestructorStrategy( + BlockBreakDestructorStrategy( final ServerLevel level, final BlockPos pos, final Direction direction, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java index a0b19c148..0b6ef3b36 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeConstructorStrategy.java @@ -9,10 +9,10 @@ import net.minecraft.world.entity.player.Player; -public class CompositeConstructorStrategy implements ConstructorStrategy { +class CompositeConstructorStrategy implements ConstructorStrategy { private final List strategies; - public CompositeConstructorStrategy(final List strategies) { + CompositeConstructorStrategy(final List strategies) { this.strategies = Collections.unmodifiableList(strategies); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java index 448725d9a..1bc13264c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/CompositeDestructorStrategy.java @@ -11,10 +11,10 @@ import net.minecraft.world.entity.player.Player; -public class CompositeDestructorStrategy implements DestructorStrategy { +class CompositeDestructorStrategy implements DestructorStrategy { private final List strategies; - public CompositeDestructorStrategy(final List strategies) { + CompositeDestructorStrategy(final List strategies) { this.strategies = Collections.unmodifiableList(strategies); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java index 5c353e667..6239e1679 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java @@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage2.platform.common.content.Menus; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSchedulingContainerMenu; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; -import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; @@ -49,14 +48,14 @@ public ConstructorContainerMenu(final int syncId, @Override protected void registerClientProperties() { super.registerClientProperties(); - registerProperty(new ClientProperty<>(PropertyTypes.CONSTRUCTOR_DROP_ITEMS, false)); + registerProperty(new ClientProperty<>(ConstructorDestructorPropertyTypes.DROP_ITEMS, false)); } @Override protected void registerServerProperties(final ConstructorBlockEntity blockEntity) { super.registerServerProperties(blockEntity); registerProperty(new ServerProperty<>( - PropertyTypes.CONSTRUCTOR_DROP_ITEMS, + ConstructorDestructorPropertyTypes.DROP_ITEMS, blockEntity::isDropItems, blockEntity::setDropItems )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDestructorPropertyTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDestructorPropertyTypes.java new file mode 100644 index 000000000..916ddb1bc --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDestructorPropertyTypes.java @@ -0,0 +1,18 @@ +package com.refinedmods.refinedstorage2.platform.common.constructordestructor; + +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +final class ConstructorDestructorPropertyTypes { + static final PropertyType PICKUP_ITEMS = PropertyTypes.createBooleanProperty( + createIdentifier("pickup_items") + ); + static final PropertyType DROP_ITEMS = PropertyTypes.createBooleanProperty( + createIdentifier("drop_items") + ); + + private ConstructorDestructorPropertyTypes() { + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java index bb0351593..7efb78943 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorDropItemsSideButtonWidget.java @@ -5,8 +5,8 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class ConstructorDropItemsSideButtonWidget extends AbstractYesNoSideButtonWidget { - public ConstructorDropItemsSideButtonWidget(final ClientProperty property) { +class ConstructorDropItemsSideButtonWidget extends AbstractYesNoSideButtonWidget { + ConstructorDropItemsSideButtonWidget(final ClientProperty property) { super(property, createTranslation("gui", "constructor.drop_items")); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java index 7929d28b5..ece31fd5d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorScreen.java @@ -24,7 +24,7 @@ protected void init() { )); addSideButton(new SchedulingModeSideButtonWidget(getMenu().getProperty(PropertyTypes.SCHEDULING_MODE))); addSideButton(new ConstructorDropItemsSideButtonWidget( - getMenu().getProperty(PropertyTypes.CONSTRUCTOR_DROP_ITEMS) + getMenu().getProperty(ConstructorDestructorPropertyTypes.DROP_ITEMS) )); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java index 6ea56146f..b478ee670 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java @@ -52,7 +52,7 @@ public DestructorContainerMenu(final int syncId, protected void registerClientProperties() { registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); registerProperty(new ClientProperty<>(PropertyTypes.FILTER_MODE, FilterMode.BLOCK)); - registerProperty(new ClientProperty<>(PropertyTypes.DESTRUCTOR_PICKUP_ITEMS, false)); + registerProperty(new ClientProperty<>(ConstructorDestructorPropertyTypes.PICKUP_ITEMS, false)); } @Override @@ -68,7 +68,7 @@ protected void registerServerProperties(final DestructorBlockEntity blockEntity) blockEntity::setFilterMode )); registerProperty(new ServerProperty<>( - PropertyTypes.DESTRUCTOR_PICKUP_ITEMS, + ConstructorDestructorPropertyTypes.PICKUP_ITEMS, blockEntity::isPickupItems, blockEntity::setPickupItems )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java index 56fd53f66..e46532f87 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorPickupItemsSideButtonWidget.java @@ -5,8 +5,8 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class DestructorPickupItemsSideButtonWidget extends AbstractYesNoSideButtonWidget { - public DestructorPickupItemsSideButtonWidget(final ClientProperty property) { +class DestructorPickupItemsSideButtonWidget extends AbstractYesNoSideButtonWidget { + DestructorPickupItemsSideButtonWidget(final ClientProperty property) { super(property, createTranslation("gui", "destructor.pickup_items")); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java index de4b64039..c2accdb21 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorScreen.java @@ -23,7 +23,7 @@ protected void init() { createTranslation("gui", "destructor.filter_mode.block.help") )); addSideButton(new DestructorPickupItemsSideButtonWidget( - getMenu().getProperty(PropertyTypes.DESTRUCTOR_PICKUP_ITEMS) + getMenu().getProperty(ConstructorDestructorPropertyTypes.PICKUP_ITEMS) )); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java index 5db002d5e..5472817f0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/FluidBreakDestructorStrategy.java @@ -23,11 +23,11 @@ import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.material.Fluid; -public class FluidBreakDestructorStrategy implements DestructorStrategy { +class FluidBreakDestructorStrategy implements DestructorStrategy { private final ServerLevel level; private final BlockPos pos; - public FluidBreakDestructorStrategy(final ServerLevel level, final BlockPos pos) { + FluidBreakDestructorStrategy(final ServerLevel level, final BlockPos pos) { this.level = level; this.pos = pos; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java index e2a855891..d80763679 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemDropConstructorStrategy.java @@ -11,10 +11,10 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -public class ItemDropConstructorStrategy extends AbstractItemConstructorStrategy { +class ItemDropConstructorStrategy extends AbstractItemConstructorStrategy { private final long amount; - public ItemDropConstructorStrategy( + ItemDropConstructorStrategy( final ServerLevel level, final BlockPos pos, final Direction direction, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java index aedccbee2..5eb87f603 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ItemPickupDestructorStrategy.java @@ -20,11 +20,11 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.AABB; -public class ItemPickupDestructorStrategy implements DestructorStrategy { +class ItemPickupDestructorStrategy implements DestructorStrategy { private final ServerLevel level; private final BlockPos pos; - public ItemPickupDestructorStrategy(final ServerLevel level, final BlockPos pos) { + ItemPickupDestructorStrategy(final ServerLevel level, final BlockPos pos) { this.level = level; this.pos = pos; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java index 20ba2efea..6315648cf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/CreativeControllerBlockItem.java @@ -8,8 +8,8 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class CreativeControllerBlockItem extends NamedBlockItem { - public CreativeControllerBlockItem(final Block block, final Component name) { +class CreativeControllerBlockItem extends NamedBlockItem { + CreativeControllerBlockItem(final Block block, final Component name) { super(block, new Item.Properties().stacksTo(1), name, createTranslation("item", "creative_controller.help")); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java deleted file mode 100644 index 2860f141a..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorAmount.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.detector; - -public interface DetectorAmount { - long getAmount(); - - void setAmount(long amount); - - void changeAmount(long amount); -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java index 550068f5d..e360e6b4d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java @@ -26,7 +26,7 @@ public class DetectorContainerMenu extends AbstractSingleAmountContainerMenu { public DetectorContainerMenu(final int syncId, final Inventory playerInventory, final FriendlyByteBuf buf) { super(Menus.INSTANCE.getDetector(), syncId, playerInventory, buf, FILTER_HELP); registerProperty(new ClientProperty<>(PropertyTypes.FUZZY_MODE, false)); - registerProperty(new ClientProperty<>(PropertyTypes.DETECTOR_MODE, DetectorMode.EQUAL)); + registerProperty(new ClientProperty<>(DetectorPropertyTypes.MODE, DetectorMode.EQUAL)); } public DetectorContainerMenu(final int syncId, @@ -41,7 +41,7 @@ public DetectorContainerMenu(final int syncId, detector::setFuzzyMode )); registerProperty(new ServerProperty<>( - PropertyTypes.DETECTOR_MODE, + DetectorPropertyTypes.MODE, detector::getMode, detector::setMode )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java index 7a3f72c5a..158a0e55c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; -public final class DetectorModeSettings { +final class DetectorModeSettings { private static final int UNDER = 0; private static final int EQUAL = 1; private static final int ABOVE = 2; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java index 78b1cd534..d2dd7292f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSideButtonWidget.java @@ -8,7 +8,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class DetectorModeSideButtonWidget extends AbstractSideButtonWidget { +class DetectorModeSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "detector.mode"); private static final MutableComponent SUBTEXT_EQUAL = createTranslation("gui", "detector.mode.equal"); private static final MutableComponent SUBTEXT_ABOVE = createTranslation("gui", "detector.mode.above"); @@ -16,7 +16,7 @@ public class DetectorModeSideButtonWidget extends AbstractSideButtonWidget { private final ClientProperty property; - public DetectorModeSideButtonWidget(final ClientProperty property) { + DetectorModeSideButtonWidget(final ClientProperty property) { super(createPressAction(property)); this.property = property; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorPropertyTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorPropertyTypes.java new file mode 100644 index 000000000..e38d66f83 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorPropertyTypes.java @@ -0,0 +1,17 @@ +package com.refinedmods.refinedstorage2.platform.common.detector; + +import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +final class DetectorPropertyTypes { + static final PropertyType MODE = new PropertyType<>( + createIdentifier("detector_mode"), + DetectorModeSettings::getDetectorMode, + DetectorModeSettings::getDetectorMode + ); + + private DetectorPropertyTypes() { + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java index 1861821ec..b58ac5c46 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorScreen.java @@ -19,6 +19,6 @@ protected void init() { getMenu().getProperty(PropertyTypes.FUZZY_MODE), FuzzyModeSideButtonWidget.Type.GENERIC )); - addSideButton(new DetectorModeSideButtonWidget(getMenu().getProperty(PropertyTypes.DETECTOR_MODE))); + addSideButton(new DetectorModeSideButtonWidget(getMenu().getProperty(DetectorPropertyTypes.MODE))); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java index 0b404b412..9372be618 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/FuzzyDetectorAmountStrategy.java @@ -8,10 +8,10 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannel; -public class FuzzyDetectorAmountStrategy extends AbstractDetectorAmountStrategy { +class FuzzyDetectorAmountStrategy extends AbstractDetectorAmountStrategy { private final DetectorAmountStrategy fallback; - public FuzzyDetectorAmountStrategy(final DetectorAmountStrategy fallback) { + FuzzyDetectorAmountStrategy(final DetectorAmountStrategy fallback) { this.fallback = fallback; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java index 10029c993..00e270207 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/ClientCraftingGridSource.java @@ -10,11 +10,11 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; -public class ClientCraftingGridSource implements CraftingGridSource { +class ClientCraftingGridSource implements CraftingGridSource { private final CraftingMatrix craftingMatrix; private final ResultContainer craftingResult; - public ClientCraftingGridSource() { + ClientCraftingGridSource() { this.craftingMatrix = new CraftingMatrix(null); this.craftingResult = new ResultContainer(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java index b9243666a..58cf18369 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContext.java @@ -4,7 +4,7 @@ import net.minecraft.world.entity.player.Player; -public interface CraftingGridRefillContext extends AutoCloseable { +interface CraftingGridRefillContext extends AutoCloseable { boolean extract(ItemResource resource, Player player); @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java index c35aef55f..5a4f68993 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java @@ -4,10 +4,10 @@ import net.minecraft.world.entity.player.Player; -public class CraftingGridRefillContextImpl implements CraftingGridRefillContext { +class CraftingGridRefillContextImpl implements CraftingGridRefillContext { private final CraftingGridBlockEntity blockEntity; - public CraftingGridRefillContextImpl(final CraftingGridBlockEntity blockEntity) { + CraftingGridRefillContextImpl(final CraftingGridBlockEntity blockEntity) { this.blockEntity = blockEntity; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java index d801f4c7b..9b463fa97 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSource.java @@ -9,7 +9,7 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; -public interface CraftingGridSource { +interface CraftingGridSource { CraftingMatrix getCraftingMatrix(); ResultContainer getCraftingResult(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java index 28da566e9..ce82ffa5d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java @@ -15,10 +15,10 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; -public class CraftingGridSourceImpl implements CraftingGridSource { +class CraftingGridSourceImpl implements CraftingGridSource { private final CraftingGridBlockEntity blockEntity; - public CraftingGridSourceImpl(final CraftingGridBlockEntity blockEntity) { + CraftingGridSourceImpl(final CraftingGridBlockEntity blockEntity) { this.blockEntity = blockEntity; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java index d4d1d9bc3..c29c3e4d0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridExtendedMenuProvider.java @@ -20,14 +20,14 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -public class GridExtendedMenuProvider implements ExtendedMenuProvider { +class GridExtendedMenuProvider implements ExtendedMenuProvider { private final Grid grid; private final PlatformRegistry> storageChannelTypeRegistry; private final MenuProvider menuProvider; - public GridExtendedMenuProvider(final Grid grid, - final PlatformRegistry> storageChannelTypeRegistry, - final MenuProvider menuProvider) { + GridExtendedMenuProvider(final Grid grid, + final PlatformRegistry> storageChannelTypeRegistry, + final MenuProvider menuProvider) { this.grid = grid; this.storageChannelTypeRegistry = storageChannelTypeRegistry; this.menuProvider = menuProvider; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java index 11bfb33bc..63a260e41 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/SnapshotCraftingGridRefillContext.java @@ -10,13 +10,13 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -public class SnapshotCraftingGridRefillContext implements CraftingGridRefillContext { +class SnapshotCraftingGridRefillContext implements CraftingGridRefillContext { private final PlayerActor playerActor; private final CraftingGridBlockEntity blockEntity; private final ResourceList available = new ResourceListImpl<>(); private final ResourceList used = new ResourceListImpl<>(); - public SnapshotCraftingGridRefillContext( + SnapshotCraftingGridRefillContext( final Player player, final CraftingGridBlockEntity blockEntity, final CraftingMatrix craftingMatrix diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java index 844609ef9..900ca43c3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java @@ -27,11 +27,11 @@ import java.util.List; import java.util.Optional; -public class WirelessGrid implements Grid { +class WirelessGrid implements Grid { private final NetworkBoundItemSession session; private final GridWatchers watchers; - public WirelessGrid(final NetworkBoundItemSession session) { + WirelessGrid(final NetworkBoundItemSession session) { this.session = session; this.watchers = new GridWatchers(PlatformApi.INSTANCE.getStorageChannelTypeRegistry().getAll()); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java index b9879eb82..f963bb0e1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java @@ -15,13 +15,13 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -public class WirelessGridExtendedMenuProvider extends GridExtendedMenuProvider { +class WirelessGridExtendedMenuProvider extends GridExtendedMenuProvider { private final SlotReference slotReference; - public WirelessGridExtendedMenuProvider(final Grid grid, - final PlatformRegistry> - storageChannelTypeRegistry, - final SlotReference slotReference) { + WirelessGridExtendedMenuProvider(final Grid grid, + final PlatformRegistry> + storageChannelTypeRegistry, + final SlotReference slotReference) { super(grid, storageChannelTypeRegistry, new MenuProvider() { @Override public Component getDisplayName() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java index 72a53107e..614d55002 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java @@ -9,14 +9,14 @@ import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; import com.refinedmods.refinedstorage2.platform.common.Platform; -public class WirelessGridOperations implements GridOperations { +class WirelessGridOperations implements GridOperations { private final GridOperations delegate; private final NetworkBoundItemSession session; private final GridWatchers watchers; - public WirelessGridOperations(final GridOperations delegate, - final NetworkBoundItemSession session, - final GridWatchers watchers) { + WirelessGridOperations(final GridOperations delegate, + final NetworkBoundItemSession session, + final GridWatchers watchers) { this.delegate = delegate; this.session = session; this.watchers = watchers; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java index 294fa9653..22111201f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AutoSelectedSideButtonWidget.java @@ -10,13 +10,13 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.YES; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class AutoSelectedSideButtonWidget extends AbstractSideButtonWidget { +class AutoSelectedSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.auto_selected"); private static final Component HELP = createTranslation("gui", "grid.auto_selected.help"); private final AbstractGridContainerMenu menu; - public AutoSelectedSideButtonWidget(final AbstractGridContainerMenu menu) { + AutoSelectedSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java index 4d3f3fc45..21f7f5e54 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/LastModified.java @@ -8,7 +8,7 @@ record LastModified(Type type, long amount) { private static final long WEEK = DAY * 7; private static final long YEAR = DAY * 365; - public enum Type { + enum Type { SECOND, MINUTE, HOUR, @@ -17,7 +17,7 @@ public enum Type { YEAR } - public static LastModified calculate(final long time, final long now) { + static LastModified calculate(final long time, final long now) { final long diff = now - time; final LastModified lastModified; if (diff < MINUTE) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java index c69a792bd..957c0b467 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SizeSideButtonWidget.java @@ -7,7 +7,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class SizeSideButtonWidget extends AbstractSideButtonWidget { +class SizeSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.size"); private static final MutableComponent SUBTEXT_STRETCH = createTranslation("gui", "grid.size.stretch"); @@ -18,7 +18,7 @@ public class SizeSideButtonWidget extends AbstractSideButtonWidget { private final AbstractGridContainerMenu menu; - public SizeSideButtonWidget(final AbstractGridContainerMenu menu) { + SizeSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java index 1ef307191..64f266587 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingDirectionSideButtonWidget.java @@ -8,7 +8,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class SortingDirectionSideButtonWidget extends AbstractSideButtonWidget { +class SortingDirectionSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.sorting.direction"); private static final MutableComponent SUBTEXT_ASCENDING = createTranslation("gui", "grid.sorting.direction.ascending"); @@ -17,7 +17,7 @@ public class SortingDirectionSideButtonWidget extends AbstractSideButtonWidget { private final AbstractGridContainerMenu menu; - public SortingDirectionSideButtonWidget(final AbstractGridContainerMenu menu) { + SortingDirectionSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java index 92ea334e6..6a033271a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SortingTypeSideButtonWidget.java @@ -8,7 +8,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class SortingTypeSideButtonWidget extends AbstractSideButtonWidget { +class SortingTypeSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.sorting.type"); private static final MutableComponent SUBTEXT_QUANTITY = createTranslation("gui", "grid.sorting.type.quantity"); private static final MutableComponent SUBTEXT_NAME = createTranslation("gui", "grid.sorting.type.name"); @@ -18,7 +18,7 @@ public class SortingTypeSideButtonWidget extends AbstractSideButtonWidget { private final AbstractGridContainerMenu menu; - public SortingTypeSideButtonWidget(final AbstractGridContainerMenu menu) { + SortingTypeSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java index 68f89df4e..9b07d055f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/StorageChannelTypeSideButtonWidget.java @@ -11,14 +11,14 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class StorageChannelTypeSideButtonWidget extends AbstractSideButtonWidget { +class StorageChannelTypeSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.storage_channel_type"); private static final MutableComponent SUBTEXT_ALL = createTranslation("gui", "grid.storage_channel_type.all"); private static final Component HELP = createTranslation("gui", "grid.storage_channel_type.help"); private final AbstractGridContainerMenu menu; - public StorageChannelTypeSideButtonWidget(final AbstractGridContainerMenu menu) { + StorageChannelTypeSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java index b4517f120..08fb36f9b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/SynchronizationSideButtonWidget.java @@ -9,12 +9,12 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class SynchronizationSideButtonWidget extends AbstractSideButtonWidget { +class SynchronizationSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "grid.synchronizer"); private final AbstractGridContainerMenu menu; - public SynchronizationSideButtonWidget(final AbstractGridContainerMenu menu) { + SynchronizationSideButtonWidget(final AbstractGridContainerMenu menu) { super(createPressAction(menu)); this.menu = menu; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java index 9b512c7ec..c679eb6c2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.grid.screen.hint; import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; -import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; @@ -16,7 +15,7 @@ public Optional getHint(final ItemStack carried) { return Platform.INSTANCE.getContainedFluid(carried).map(this::createComponent); } - private MouseWithIconClientTooltipComponent createComponent(final ContainedFluid result) { + private MouseWithIconClientTooltipComponent createComponent(final Platform.ContainedFluid result) { return new MouseWithIconClientTooltipComponent( MouseWithIconClientTooltipComponent.Type.RIGHT, (graphics, x, y) -> Platform.INSTANCE.getFluidRenderer().render( diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java index 2953ae747..ef5f8f323 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java @@ -18,10 +18,10 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; -public class ExportedResourcesContainer extends ResourceContainerImpl implements InterfaceExportState { +class ExportedResourcesContainer extends ResourceContainerImpl implements InterfaceExportState { private final FilterWithFuzzyMode filter; - public ExportedResourcesContainer(final int size, final FilterWithFuzzyMode filter) { + ExportedResourcesContainer(final int size, final FilterWithFuzzyMode filter) { super( size, ResourceContainerType.CONTAINER, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java index c7b5cb50e..afcb72f4c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java @@ -16,14 +16,14 @@ import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; -public class InterfaceProxyExternalStorageProvider implements InterfaceExternalStorageProvider { +class InterfaceProxyExternalStorageProvider implements InterfaceExternalStorageProvider { private final Level level; private final BlockPos pos; private final StorageChannelType storageChannelType; - public InterfaceProxyExternalStorageProvider(final Level level, - final BlockPos pos, - final StorageChannelType storageChannelType) { + InterfaceProxyExternalStorageProvider(final Level level, + final BlockPos pos, + final StorageChannelType storageChannelType) { this.level = level; this.pos = pos; this.storageChannelType = storageChannelType; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java index 73a7ece1c..12aba856e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport; +import com.refinedmods.refinedstorage2.platform.common.support.CableShapeCacheKey; import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java index 0515e2f36..b686450c9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ClickableIngredient.java @@ -4,11 +4,11 @@ import mezz.jei.api.runtime.IClickableIngredient; import net.minecraft.client.renderer.Rect2i; -public class ClickableIngredient implements IClickableIngredient { +class ClickableIngredient implements IClickableIngredient { private final ITypedIngredient ingredient; private final Rect2i area; - public ClickableIngredient(final ITypedIngredient ingredient, final int x, final int y) { + ClickableIngredient(final ITypedIngredient ingredient, final int x, final int y) { this.ingredient = ingredient; area = new Rect2i(x, y, 16, 16); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java index 7e8c7ae80..90fba8272 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/CraftingGridRecipeTransferHandler.java @@ -22,8 +22,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; -public class CraftingGridRecipeTransferHandler - implements IRecipeTransferHandler { +class CraftingGridRecipeTransferHandler implements IRecipeTransferHandler { @Override public Class getContainerClass() { return CraftingGridContainerMenu.class; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java index d2028311a..4f16d153a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ExclusionZonesGuiContainerHandler.java @@ -7,7 +7,7 @@ import mezz.jei.api.gui.handlers.IGuiContainerHandler; import net.minecraft.client.renderer.Rect2i; -public class ExclusionZonesGuiContainerHandler implements IGuiContainerHandler> { +class ExclusionZonesGuiContainerHandler implements IGuiContainerHandler> { @Override public List getGuiExtraAreas(final AbstractBaseScreen screen) { return screen.getExclusionZones(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java index 9f38ce57f..3fc979898 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GhostIngredientHandler.java @@ -17,10 +17,10 @@ import net.minecraft.client.renderer.Rect2i; @SuppressWarnings("rawtypes") -public class GhostIngredientHandler implements IGhostIngredientHandler { +class GhostIngredientHandler implements IGhostIngredientHandler { private final IngredientConverter ingredientConverter; - public GhostIngredientHandler(final IngredientConverter ingredientConverter) { + GhostIngredientHandler(final IngredientConverter ingredientConverter) { this.ingredientConverter = ingredientConverter; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java index cd6bc3f46..8c7963508 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridGuiContainerHandler.java @@ -12,11 +12,11 @@ import mezz.jei.api.runtime.IClickableIngredient; import mezz.jei.api.runtime.IIngredientManager; -public class GridGuiContainerHandler implements IGuiContainerHandler> { +class GridGuiContainerHandler implements IGuiContainerHandler> { private final IngredientConverter converter; private final IIngredientManager ingredientManager; - public GridGuiContainerHandler(final IngredientConverter converter, final IIngredientManager ingredientManager) { + GridGuiContainerHandler(final IngredientConverter converter, final IIngredientManager ingredientManager) { this.converter = converter; this.ingredientManager = ingredientManager; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java index 11a44d600..3cde9afa4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/GridResourceIngredientConverter.java @@ -9,10 +9,10 @@ import mezz.jei.api.helpers.IPlatformFluidHelper; -public class GridResourceIngredientConverter implements IngredientConverter { +class GridResourceIngredientConverter implements IngredientConverter { private final IPlatformFluidHelper fluidHelper; - public GridResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { + GridResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { this.fluidHelper = fluidHelper; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java index d34c68f3b..828bf95a6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/JeiGridSynchronizer.java @@ -9,7 +9,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; -public class JeiGridSynchronizer extends AbstractGridSynchronizer { +class JeiGridSynchronizer extends AbstractGridSynchronizer { private static final MutableComponent TITLE = createTranslation("gui", "grid.synchronizer.jei"); private static final MutableComponent TITLE_TWO_WAY = createTranslation("gui", "grid.synchronizer.jei.two_way"); private static final Component HELP = createTranslation("gui", "grid.synchronizer.jei.help"); @@ -18,7 +18,7 @@ public class JeiGridSynchronizer extends AbstractGridSynchronizer { private final JeiProxy jeiProxy; private final boolean twoWay; - public JeiGridSynchronizer(final JeiProxy jeiProxy, final boolean twoWay) { + JeiGridSynchronizer(final JeiProxy jeiProxy, final boolean twoWay) { this.jeiProxy = jeiProxy; this.twoWay = twoWay; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java index ffa54ae69..698f0a00e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/MissingItemRecipeTransferError.java @@ -14,7 +14,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.util.FormattedCharSequence; -public class MissingItemRecipeTransferError implements IRecipeTransferError { +class MissingItemRecipeTransferError implements IRecipeTransferError { private static final Color COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); private static final List MISSING_MESSAGE = List.of( Component.translatable("jei.tooltip.transfer").getVisualOrderText(), @@ -24,7 +24,7 @@ public class MissingItemRecipeTransferError implements IRecipeTransferError { private final List slotsWithMissingItems; - public MissingItemRecipeTransferError(final List slotsWithMissingItems) { + MissingItemRecipeTransferError(final List slotsWithMissingItems) { this.slotsWithMissingItems = slotsWithMissingItems; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java index 6ffe564cd..5a45963ce 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceGuiContainerHandler.java @@ -13,12 +13,12 @@ import mezz.jei.api.runtime.IClickableIngredient; import mezz.jei.api.runtime.IIngredientManager; -public class ResourceGuiContainerHandler implements IGuiContainerHandler> { +class ResourceGuiContainerHandler implements IGuiContainerHandler> { private final IngredientConverter converter; private final IIngredientManager ingredientManager; - public ResourceGuiContainerHandler(final IngredientConverter converter, - final IIngredientManager ingredientManager) { + ResourceGuiContainerHandler(final IngredientConverter converter, + final IIngredientManager ingredientManager) { this.converter = converter; this.ingredientManager = ingredientManager; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java index cc39906b1..c4b6fd31d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/recipemod/jei/ResourceIngredientConverter.java @@ -12,10 +12,10 @@ import mezz.jei.api.helpers.IPlatformFluidHelper; import net.minecraft.world.item.ItemStack; -public class ResourceIngredientConverter implements IngredientConverter { +class ResourceIngredientConverter implements IngredientConverter { private final IPlatformFluidHelper fluidHelper; - public ResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { + ResourceIngredientConverter(final IPlatformFluidHelper fluidHelper) { this.fluidHelper = fluidHelper; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java index b8384a624..e6950e8c3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java @@ -14,10 +14,10 @@ public abstract class AbstractStorageContainerMenu extends AbstractResourceContainerMenu { protected AbstractStorageContainerMenu(final MenuType type, final int syncId) { super(type, syncId); - registerProperty(new ClientProperty<>(PropertyTypes.PRIORITY, 0)); + registerProperty(new ClientProperty<>(StoragePropertyTypes.PRIORITY, 0)); registerProperty(new ClientProperty<>(PropertyTypes.FILTER_MODE, FilterMode.BLOCK)); registerProperty(new ClientProperty<>(PropertyTypes.FUZZY_MODE, false)); - registerProperty(new ClientProperty<>(PropertyTypes.ACCESS_MODE, AccessMode.INSERT_EXTRACT)); + registerProperty(new ClientProperty<>(StoragePropertyTypes.ACCESS_MODE, AccessMode.INSERT_EXTRACT)); registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); } @@ -27,7 +27,7 @@ protected AbstractStorageContainerMenu(final MenuType type, final StorageConfigurationContainer configContainer) { super(type, syncId, player); registerProperty(new ServerProperty<>( - PropertyTypes.PRIORITY, + StoragePropertyTypes.PRIORITY, configContainer::getPriority, configContainer::setPriority )); @@ -42,7 +42,7 @@ protected AbstractStorageContainerMenu(final MenuType type, configContainer::setFuzzyMode )); registerProperty(new ServerProperty<>( - PropertyTypes.ACCESS_MODE, + StoragePropertyTypes.ACCESS_MODE, configContainer::getAccessMode, configContainer::setAccessMode )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java index 9d626c462..63a6e7a76 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageScreen.java @@ -70,9 +70,9 @@ protected void init() { getMenu().getProperty(PropertyTypes.FUZZY_MODE), FuzzyModeSideButtonWidget.Type.STORAGE )); - addSideButton(new AccessModeSideButtonWidget(getMenu().getProperty(PropertyTypes.ACCESS_MODE))); + addSideButton(new AccessModeSideButtonWidget(getMenu().getProperty(StoragePropertyTypes.ACCESS_MODE))); addSideButton(new PrioritySideButtonWidget( - getMenu().getProperty(PropertyTypes.PRIORITY), + getMenu().getProperty(StoragePropertyTypes.PRIORITY), playerInventory, this )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java index 200ffa503..1672f1fe7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AccessModeSettings.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.storage.AccessMode; -public class AccessModeSettings { +class AccessModeSettings { private static final int INSERT_EXTRACT = 0; private static final int INSERT = 1; private static final int EXTRACT = 2; @@ -10,7 +10,7 @@ public class AccessModeSettings { private AccessModeSettings() { } - public static AccessMode getAccessMode(final int accessMode) { + static AccessMode getAccessMode(final int accessMode) { return switch (accessMode) { case INSERT_EXTRACT -> AccessMode.INSERT_EXTRACT; case INSERT -> AccessMode.INSERT; @@ -19,7 +19,7 @@ public static AccessMode getAccessMode(final int accessMode) { }; } - public static int getAccessMode(final AccessMode accessMode) { + static int getAccessMode(final AccessMode accessMode) { return switch (accessMode) { case INSERT_EXTRACT -> INSERT_EXTRACT; case INSERT -> INSERT; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java index b058703b5..763883d98 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/LimitedPlatformStorage.java @@ -5,13 +5,13 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageRepository; import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; -public class LimitedPlatformStorage extends PlatformStorage implements LimitedStorage { +class LimitedPlatformStorage extends PlatformStorage implements LimitedStorage { private final LimitedStorageImpl limitedStorage; - public LimitedPlatformStorage(final LimitedStorageImpl delegate, - final StorageType type, - final TrackedStorageRepository trackingRepository, - final Runnable listener) { + LimitedPlatformStorage(final LimitedStorageImpl delegate, + final StorageType type, + final TrackedStorageRepository trackingRepository, + final Runnable listener) { super(delegate, type, trackingRepository, listener); this.limitedStorage = delegate; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java index 218213516..13fe5a0c2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java @@ -15,15 +15,15 @@ import java.util.Optional; import javax.annotation.Nullable; -public class PlatformStorage extends AbstractProxyStorage implements SerializableStorage, TrackedStorage { +class PlatformStorage extends AbstractProxyStorage implements SerializableStorage, TrackedStorage { private final StorageType type; private final TrackedStorageRepository trackingRepository; private final Runnable listener; - public PlatformStorage(final Storage delegate, - final StorageType type, - final TrackedStorageRepository trackingRepository, - final Runnable listener) { + PlatformStorage(final Storage delegate, + final StorageType type, + final TrackedStorageRepository trackingRepository, + final Runnable listener) { super(delegate); this.type = type; this.trackingRepository = trackingRepository; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StoragePropertyTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StoragePropertyTypes.java new file mode 100644 index 000000000..b083228b5 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StoragePropertyTypes.java @@ -0,0 +1,21 @@ +package com.refinedmods.refinedstorage2.platform.common.storage; + +import com.refinedmods.refinedstorage2.api.storage.AccessMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public final class StoragePropertyTypes { + public static final PropertyType PRIORITY = PropertyTypes.createIntegerProperty( + createIdentifier("priority") + ); + public static final PropertyType ACCESS_MODE = new PropertyType<>( + createIdentifier("access_mode"), + AccessModeSettings::getAccessMode, + AccessModeSettings::getAccessMode + ); + + private StoragePropertyTypes() { + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java index c725062c6..8b7334c2b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTooltipHelper.java @@ -8,13 +8,13 @@ import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; -public final class StorageTooltipHelper { +final class StorageTooltipHelper { private StorageTooltipHelper() { } - public static void addAmountStoredWithoutCapacity(final List tooltip, - final long stored, - final LongFunction quantityFormatter) { + static void addAmountStoredWithoutCapacity(final List tooltip, + final long stored, + final LongFunction quantityFormatter) { tooltip.add(PlatformApi.INSTANCE.createTranslation( "misc", "stored", @@ -22,10 +22,10 @@ public static void addAmountStoredWithoutCapacity(final List tooltip, ).withStyle(ChatFormatting.GRAY)); } - public static void addAmountStoredWithCapacity(final List tooltip, - final long stored, - final long capacity, - final LongFunction quantityFormatter) { + static void addAmountStoredWithCapacity(final List tooltip, + final long stored, + final long capacity, + final LongFunction quantityFormatter) { if (capacity <= 0) { addAmountStoredWithoutCapacity(tooltip, stored, quantityFormatter); return; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java index 8e8f4791c..98cf8a896 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/StorageTypes.java @@ -1,8 +1,12 @@ package com.refinedmods.refinedstorage2.platform.common.storage; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; + public final class StorageTypes { - public static final ItemStorageType ITEM = new ItemStorageType(); - public static final FluidStorageType FLUID = new FluidStorageType(); + public static final StorageType ITEM = new ItemStorageType(); + public static final StorageType FLUID = new FluidStorageType(); private StorageTypes() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index bcd434e8a..290bcd5a7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -15,7 +15,6 @@ import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.util.ContainerUtil; -import com.refinedmods.refinedstorage2.platform.common.util.LevelUtil; import javax.annotation.Nullable; @@ -147,7 +146,7 @@ public void activenessChanged(final BlockState state, final boolean newActive, @Nullable final BooleanProperty activenessProperty) { super.activenessChanged(state, newActive, activenessProperty); - LevelUtil.updateBlock(level, worldPosition, getBlockState()); + updateBlock(); } @Override @@ -185,7 +184,7 @@ public SimpleContainer getDiskInventory() { void onDiskChanged(final int slot) { getNode().onStorageChanged(slot); - LevelUtil.updateBlock(level, worldPosition, this.getBlockState()); + updateBlock(); setChanged(); } @@ -199,16 +198,14 @@ protected void onNetworkInNodeInitialized() { super.onNetworkInNodeInitialized(); // It's important to sync here as the initial update packet might have failed as the network // could possibly be not initialized yet. - LevelUtil.updateBlock(level, worldPosition, this.getBlockState()); + updateBlock(); } private void fromClientTag(final CompoundTag tag) { if (!tag.contains(TAG_STATES)) { return; } - final ListTag statesList = tag.getList(TAG_STATES, Tag.TAG_BYTE); - driveState = MultiStorageState.of( statesList.size(), idx -> { @@ -220,12 +217,11 @@ private void fromClientTag(final CompoundTag tag) { return values[ordinal]; } ); - onDriveStateUpdated(); } protected void onDriveStateUpdated() { - LevelUtil.updateBlock(level, worldPosition, getBlockState()); + updateBlock(); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java index 3f51d4099..1b1ee6d54 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java @@ -9,11 +9,11 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public class DiskDriveBlockEntityTicker +class DiskDriveBlockEntityTicker extends NetworkNodeBlockEntityTicker { @SuppressWarnings("unchecked") - public DiskDriveBlockEntityTicker() { + DiskDriveBlockEntityTicker() { super(() -> (BlockEntityType) BlockEntities.INSTANCE.getDiskDrive()); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java index c75713926..e92a26296 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java @@ -11,12 +11,12 @@ import net.minecraft.world.SimpleContainer; import net.minecraft.world.item.ItemStack; -public class DiskDriveInventory extends SimpleContainer implements MultiStorageProvider { +class DiskDriveInventory extends SimpleContainer implements MultiStorageProvider { private final AbstractDiskDriveBlockEntity diskDrive; @Nullable private StorageRepository storageRepository; - public DiskDriveInventory(final AbstractDiskDriveBlockEntity diskDrive, final int diskCount) { + DiskDriveInventory(final AbstractDiskDriveBlockEntity diskDrive, final int diskCount) { super(diskCount); this.diskDrive = diskDrive; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java index 233d885c7..b43cde2a9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/EmptyStorageDiskInfoAccessor.java @@ -6,7 +6,7 @@ import net.minecraft.world.item.ItemStack; -public class EmptyStorageDiskInfoAccessor implements StorageDiskInfoAccessor { +class EmptyStorageDiskInfoAccessor implements StorageDiskInfoAccessor { @Override public Optional getInfo(final ItemStack stack) { return Optional.empty(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java index 757508dbd..8e0c09bc4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessor.java @@ -6,6 +6,6 @@ import net.minecraft.world.item.ItemStack; -public interface StorageDiskInfoAccessor { +interface StorageDiskInfoAccessor { Optional getInfo(ItemStack stack); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java index 0d658bd0c..b7b49b413 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/StorageDiskInfoAccessorImpl.java @@ -8,10 +8,10 @@ import net.minecraft.world.item.ItemStack; -public class StorageDiskInfoAccessorImpl implements StorageDiskInfoAccessor { +class StorageDiskInfoAccessorImpl implements StorageDiskInfoAccessor { private final StorageRepository storageRepository; - public StorageDiskInfoAccessorImpl(final StorageRepository storageRepository) { + StorageDiskInfoAccessorImpl(final StorageRepository storageRepository) { this.storageRepository = storageRepository; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java index 2e7af6c22..8409b7575 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageScreen.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.platform.common.storage.AbstractStorageScreen; import com.refinedmods.refinedstorage2.platform.common.storage.AccessModeSideButtonWidget; import com.refinedmods.refinedstorage2.platform.common.storage.PrioritySideButtonWidget; +import com.refinedmods.refinedstorage2.platform.common.storage.StoragePropertyTypes; import com.refinedmods.refinedstorage2.platform.common.support.AbstractFilterScreen; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage2.platform.common.support.widget.FilterModeSideButtonWidget; @@ -33,9 +34,9 @@ protected void init() { getMenu().getProperty(PropertyTypes.FUZZY_MODE), FuzzyModeSideButtonWidget.Type.STORAGE )); - addSideButton(new AccessModeSideButtonWidget(getMenu().getProperty(PropertyTypes.ACCESS_MODE))); + addSideButton(new AccessModeSideButtonWidget(getMenu().getProperty(StoragePropertyTypes.ACCESS_MODE))); addSideButton(new PrioritySideButtonWidget( - getMenu().getProperty(PropertyTypes.PRIORITY), + getMenu().getProperty(StoragePropertyTypes.PRIORITY), playerInventory, this )); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java index dc4ce5c33..517bad963 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public abstract class AbstractStorageBlock> extends AbstractBaseBlock +abstract class AbstractStorageBlock> extends AbstractBaseBlock implements EntityBlock { private final AbstractBlockEntityTicker ticker; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java index 86e969796..14b6994a0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java @@ -26,7 +26,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbstractStorageBlockBlockEntity +abstract class AbstractStorageBlockBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity> implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractStorageBlockBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java index 601f328ff..e27f88ae4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockScreen.java @@ -8,7 +8,7 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; -public abstract class AbstractStorageBlockScreen extends AbstractStorageScreen { +abstract class AbstractStorageBlockScreen extends AbstractStorageScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/storage.png"); protected AbstractStorageBlockScreen(final AbstractStorageBlockContainerMenu menu, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java index 61c494ad0..ad13e1200 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/StorageBlockLootItemFunction.java @@ -14,7 +14,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class StorageBlockLootItemFunction implements LootItemFunction { +class StorageBlockLootItemFunction implements LootItemFunction { private static final Logger LOGGER = LoggerFactory.getLogger(StorageBlockLootItemFunction.class); @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java index 95d0a164c..3f7319673 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/FluidStorageMonitorInsertionStrategy.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannel; import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; @@ -36,10 +35,10 @@ public Optional insert( } @Nullable - private ContainedFluid tryInsert(final Actor actor, - final FluidResource configuredResource, - final ContainedFluid result, - final StorageChannel storageChannel) { + private Platform.ContainedFluid tryInsert(final Actor actor, + final FluidResource configuredResource, + final Platform.ContainedFluid result, + final StorageChannel storageChannel) { final ResourceAmount fluid = result.fluid(); if (!fluid.getResource().equals(configuredResource)) { return null; @@ -55,7 +54,7 @@ private ContainedFluid tryInsert(final Actor actor, } private ItemStack doInsert(final Actor actor, - final ContainedFluid extracted, + final Platform.ContainedFluid extracted, final StorageChannel storageChannel) { final ResourceAmount fluid = extracted.fluid(); storageChannel.insert( diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java index a4da093fe..314996d70 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; -import com.refinedmods.refinedstorage2.platform.common.networking.CableShapeCacheKey; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java index 09bd61a98..542cf7735 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.support; import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.common.networking.CableShapeCacheKey; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableShapeCacheKey.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableShapeCacheKey.java index 890108d10..10408a62c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableShapeCacheKey.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableShapeCacheKey.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.networking; +package com.refinedmods.refinedstorage2.platform.common.support; import net.minecraft.world.level.block.state.BlockState; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java index 271dba1cf..02bb2234e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java @@ -9,6 +9,7 @@ import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -123,4 +124,11 @@ protected final Direction getDirection() { } return directionalBlock.extractDirection(blockState); } + + protected final void updateBlock() { + if (level == null) { + return; + } + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java index fc134f6a9..ce89ca131 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/amount/LongAmountOperations.java @@ -1,11 +1,12 @@ package com.refinedmods.refinedstorage2.platform.common.support.amount; -import com.refinedmods.refinedstorage2.platform.common.util.MathHelper; +import com.refinedmods.refinedstorage2.platform.common.util.MathUtil; -import java.util.Objects; import java.util.Optional; import javax.annotation.Nullable; +import static java.util.Objects.requireNonNullElse; + public class LongAmountOperations implements AmountOperations { public static final AmountOperations INSTANCE = new LongAmountOperations(); @@ -40,10 +41,10 @@ public Long changeAmount(final Long current, final int delta, @Nullable final Long minAmount, @Nullable final Long maxAmount) { - return MathHelper.clamp( + return MathUtil.clamp( current + delta, - Objects.requireNonNullElse(minAmount, Long.MIN_VALUE), - Objects.requireNonNullElse(maxAmount, Long.MAX_VALUE) + requireNonNullElse(minAmount, Long.MIN_VALUE), + requireNonNullElse(maxAmount, Long.MAX_VALUE) ); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java index cb377f3d0..11c6f1aad 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/PropertyTypes.java @@ -1,10 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.api.core.filter.FilterMode; -import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; -import com.refinedmods.refinedstorage2.api.storage.AccessMode; -import com.refinedmods.refinedstorage2.platform.common.detector.DetectorModeSettings; -import com.refinedmods.refinedstorage2.platform.common.storage.AccessModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; import com.refinedmods.refinedstorage2.platform.common.support.RedstoneModeSettings; @@ -27,35 +23,18 @@ public final class PropertyTypes { FilterModeSettings::getFilterMode ); - public static final PropertyType PRIORITY = integer(createIdentifier("priority")); - - public static final PropertyType ACCESS_MODE = new PropertyType<>( - createIdentifier("access_mode"), - AccessModeSettings::getAccessMode, - AccessModeSettings::getAccessMode - ); - public static final PropertyType SCHEDULING_MODE = new PropertyType<>( createIdentifier("scheduling_mode"), SchedulingModeType::getId, SchedulingModeType::getById ); - public static final PropertyType FUZZY_MODE = bool(createIdentifier("fuzzy_mode")); - - public static final PropertyType DETECTOR_MODE = new PropertyType<>( - createIdentifier("detector_mode"), - DetectorModeSettings::getDetectorMode, - DetectorModeSettings::getDetectorMode - ); - - public static final PropertyType DESTRUCTOR_PICKUP_ITEMS = bool(createIdentifier("pickup_items")); - public static final PropertyType CONSTRUCTOR_DROP_ITEMS = bool(createIdentifier("drop_items")); + public static final PropertyType FUZZY_MODE = createBooleanProperty(createIdentifier("fuzzy_mode")); private PropertyTypes() { } - private static PropertyType bool(final ResourceLocation id) { + public static PropertyType createBooleanProperty(final ResourceLocation id) { return new PropertyType<>( id, value -> Boolean.TRUE.equals(value) ? 1 : 0, @@ -63,7 +42,7 @@ private static PropertyType bool(final ResourceLocation id) { ); } - private static PropertyType integer(final ResourceLocation id) { + public static PropertyType createIntegerProperty(final ResourceLocation id) { return new PropertyType<>( id, value -> value, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java index 6e052c991..1c2113b26 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ResourceContainerImpl.java @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainerType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; -import com.refinedmods.refinedstorage2.platform.common.util.MathHelper; +import com.refinedmods.refinedstorage2.platform.common.util.MathUtil; import java.util.ArrayList; import java.util.Collections; @@ -125,7 +125,7 @@ public void setAmount(final int index, final long amount) { if (resourceAmount == null) { return; } - final long newAmount = MathHelper.clamp(amount, 0, getMaxAmount(resourceAmount)); + final long newAmount = MathUtil.clamp(amount, 0, getMaxAmount(resourceAmount)); if (newAmount == 0) { remove(index); } else { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java index 474541556..1a8779bd5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java @@ -22,14 +22,14 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; -public class UpgradeWithEnchantedBookRecipe extends ShapedRecipe { +class UpgradeWithEnchantedBookRecipe extends ShapedRecipe { private final EnchantmentInstance enchantment; private final ItemStack theResult; - public UpgradeWithEnchantedBookRecipe(final ResourceLocation recipeId, - final Enchantment enchantment, - final int enchantmentLevel, - final ItemStack theResult) { + UpgradeWithEnchantedBookRecipe(final ResourceLocation recipeId, + final Enchantment enchantment, + final int enchantmentLevel, + final ItemStack theResult) { super(recipeId, "", CraftingBookCategory.MISC, 3, 3, NonNullList.of( Ingredient.EMPTY, Ingredient.of(new ItemStack(Items.INSTANCE.getQuartzEnrichedIron())), diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/LevelUtil.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/LevelUtil.java deleted file mode 100644 index eb819c831..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/LevelUtil.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.util; - -import javax.annotation.Nullable; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; - -public final class LevelUtil { - private LevelUtil() { - } - - public static void updateBlock(@Nullable final Level level, final BlockPos pos, final BlockState state) { - if (level == null) { - return; - } - level.sendBlockUpdated(pos, state, state, Block.UPDATE_ALL); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathHelper.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathUtil.java similarity index 78% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathHelper.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathUtil.java index 74a925167..86094c3b6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathHelper.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/MathUtil.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.util; -public final class MathHelper { - private MathHelper() { +public final class MathUtil { + private MathUtil() { } public static long clamp(final long value, final long min, final long max) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/TickHandler.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ServerEventQueue.java similarity index 79% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/TickHandler.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ServerEventQueue.java index 260504fa2..bcee12c97 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/TickHandler.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ServerEventQueue.java @@ -3,10 +3,10 @@ import java.util.ArrayDeque; import java.util.Deque; -public final class TickHandler { +public final class ServerEventQueue { private static final Deque ACTIONS = new ArrayDeque<>(); - private TickHandler() { + private ServerEventQueue() { } public static void runQueuedActions() { @@ -18,7 +18,7 @@ public static void runQueuedActions() { } } - public static void runWhenReady(final Runnable runnable) { + public static void queue(final Runnable runnable) { synchronized (ACTIONS) { ACTIONS.add(runnable); } diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java index 364691703..88a44c6bf 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/FluidStorageTypeTest.java @@ -12,6 +12,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.SimpleListener; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; @@ -26,7 +27,7 @@ @SetupMinecraft class FluidStorageTypeTest { - FluidStorageType sut = StorageTypes.FLUID; + StorageType sut = StorageTypes.FLUID; SimpleListener listener; @BeforeEach diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java index 666f00a7e..79fcf3529 100644 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/storage/ItemStorageTypeTest.java @@ -12,6 +12,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorage; import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedStorageImpl; import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; +import com.refinedmods.refinedstorage2.platform.api.storage.StorageType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.SimpleListener; import com.refinedmods.refinedstorage2.platform.test.SetupMinecraft; @@ -26,7 +27,7 @@ @SetupMinecraft class ItemStorageTypeTest { - ItemStorageType sut = StorageTypes.ITEM; + StorageType sut = StorageTypes.ITEM; SimpleListener listener; @BeforeEach diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 046858026..4de332cb2 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -33,7 +33,7 @@ import com.refinedmods.refinedstorage2.platform.fabric.recipemod.rei.ReiProxy; import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.DiskDriveBlockEntityRendererImpl; import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.DiskDriveUnbakedModel; -import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.EmissiveModelRegistry; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.EmissiveModelRegistry; import java.util.List; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index 9ac6a48fe..871e00be9 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -19,7 +19,7 @@ import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; -import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; +import com.refinedmods.refinedstorage2.platform.common.util.ServerEventQueue; import com.refinedmods.refinedstorage2.platform.fabric.exporter.StorageExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridInsertionStrategy; @@ -357,7 +357,7 @@ public EnergyStorage find(final ItemStack itemStack, final ContainerItemContext } private void registerTickHandler() { - ServerTickEvents.START_SERVER_TICK.register(server -> TickHandler.runQueuedActions()); + ServerTickEvents.START_SERVER_TICK.register(server -> ServerEventQueue.runQueuedActions()); } private void registerSlotReferenceProviders() { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java index 4f7355c7a..346c2dfba 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; -import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; @@ -23,7 +22,7 @@ import com.refinedmods.refinedstorage2.platform.fabric.support.containermenu.MenuOpenerImpl; import com.refinedmods.refinedstorage2.platform.fabric.support.energy.EnergyStorageAdapter; import com.refinedmods.refinedstorage2.platform.fabric.support.render.FluidVariantFluidRenderer; -import com.refinedmods.refinedstorage2.platform.fabric.util.SingleStackStorageImpl; +import com.refinedmods.refinedstorage2.platform.fabric.util.SimpleSingleStackStorage; import java.util.List; import java.util.Optional; @@ -152,7 +151,7 @@ public Optional getContainedFluid(final ItemStack stack) { if (stack.isEmpty()) { return Optional.empty(); } - final SingleStackStorageImpl interceptingStorage = new SingleStackStorageImpl(stack); + final SimpleSingleStackStorage interceptingStorage = new SimpleSingleStackStorage(stack); final Storage storage = FluidStorage.ITEM.find(stack, ContainerItemContext.ofSingleSlot( interceptingStorage )); @@ -181,7 +180,7 @@ public Optional convertJeiIngredientToFluid(final Object ingredie @Override public Optional convertToBucket(final FluidResource fluidResource) { - final SingleStackStorageImpl interceptingStorage = SingleStackStorageImpl.forEmptyBucket(); + final SimpleSingleStackStorage interceptingStorage = SimpleSingleStackStorage.forEmptyBucket(); final Storage destination = FluidStorage.ITEM.find( interceptingStorage.getStack(), ContainerItemContext.ofSingleSlot(interceptingStorage) diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java index 858cfcbe6..1537bfc34 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/grid/strategy/FluidGridExtractionStrategy.java @@ -12,7 +12,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.fabric.util.SingleStackStorageImpl; +import com.refinedmods.refinedstorage2.platform.fabric.util.SimpleSingleStackStorage; import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage; @@ -65,7 +65,7 @@ public boolean onExtract(final PlatformStorageChannelType storageChannelT private void extractWithBucketInStorage(final FluidResource fluidResource, final GridExtractMode mode, final boolean cursor) { - final SingleStackStorageImpl interceptingStorage = SingleStackStorageImpl.forEmptyBucket(); + final SimpleSingleStackStorage interceptingStorage = SimpleSingleStackStorage.forEmptyBucket(); final net.fabricmc.fabric.api.transfer.v1.storage.Storage destination = FluidStorage.ITEM.find( interceptingStorage.getStack(), ContainerItemContext.ofSingleSlot(interceptingStorage) @@ -94,7 +94,7 @@ private void extractWithBucketInInventory(final FluidResource fluidResource, final boolean cursor) { try (Transaction tx = Transaction.openOuter()) { playerInventoryStorage.extract(BUCKET_ITEM_VARIANT, 1, tx); - final SingleStackStorageImpl interceptingStorage = SingleStackStorageImpl.forEmptyBucket(); + final SimpleSingleStackStorage interceptingStorage = SimpleSingleStackStorage.forEmptyBucket(); final net.fabricmc.fabric.api.transfer.v1.storage.Storage dest = FluidStorage.ITEM.find( interceptingStorage.getStack(), ContainerItemContext.ofSingleSlot(interceptingStorage) @@ -123,7 +123,7 @@ private void extractWithBucketInInventory(final FluidResource fluidResource, } } - private boolean insertResultingBucketIntoInventory(final SingleStackStorageImpl interceptingStorage, + private boolean insertResultingBucketIntoInventory(final SimpleSingleStackStorage interceptingStorage, final boolean cursor, final Transaction innerTx) { final net.fabricmc.fabric.api.transfer.v1.storage.Storage relevantStorage = cursor diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java index 8176bfb04..4755550c0 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/mixin/AbstractModelBakerImplMixin.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.mixin; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; -import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.EmissiveModelRegistry; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.EmissiveModelRegistry; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java index 7370f26e7..c1e7c8609 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java @@ -5,8 +5,8 @@ import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; -import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.QuadRotator; -import com.refinedmods.refinedstorage2.platform.fabric.support.render.model.QuadTranslator; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.QuadRotator; +import com.refinedmods.refinedstorage2.platform.fabric.support.render.QuadTranslator; import java.util.EnumMap; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java similarity index 90% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java index a8643f9c0..c7049d6a4 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; import java.util.function.Supplier; @@ -12,10 +12,10 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; -public class EmissiveBakedModel extends ForwardingBakedModel { +class EmissiveBakedModel extends ForwardingBakedModel { private final EmissiveTransform transform; - public EmissiveBakedModel(final BakedModel wrapped, final ResourceLocation emissiveSprite) { + EmissiveBakedModel(final BakedModel wrapped, final ResourceLocation emissiveSprite) { this.wrapped = wrapped; this.transform = new EmissiveTransform(emissiveSprite); } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveModelRegistry.java similarity index 99% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveModelRegistry.java index 9d4767b85..1087b13ae 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveModelRegistry.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveModelRegistry.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveTransform.java similarity index 91% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveTransform.java index 7d8db916e..69a7cad1e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/EmissiveTransform.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveTransform.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.model.SpriteFinder; @@ -9,10 +9,10 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.resources.ResourceLocation; -public class EmissiveTransform implements RenderContext.QuadTransform { +class EmissiveTransform implements RenderContext.QuadTransform { private final ResourceLocation emissiveSprite; - public EmissiveTransform(final ResourceLocation emissiveSprite) { + EmissiveTransform(final ResourceLocation emissiveSprite) { this.emissiveSprite = emissiveSprite; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadRotator.java similarity index 99% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadRotator.java index aa31a48d5..ddad39f6b 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadRotator.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadRotator.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadTranslator.java similarity index 98% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadTranslator.java index f920a597b..92731a2ec 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/QuadTranslator.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/QuadTranslator.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; +package com.refinedmods.refinedstorage2.platform.fabric.support.render; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.render.RenderContext; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java deleted file mode 100644 index 68ceeffaa..000000000 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.support.render.model; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SingleStackStorageImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SimpleSingleStackStorage.java similarity index 63% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SingleStackStorageImpl.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SimpleSingleStackStorage.java index 34289db78..b0a59cd71 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SingleStackStorageImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/SimpleSingleStackStorage.java @@ -4,15 +4,15 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -public final class SingleStackStorageImpl extends SingleStackStorage { +public final class SimpleSingleStackStorage extends SingleStackStorage { private ItemStack stack; - public SingleStackStorageImpl(final ItemStack stack) { + public SimpleSingleStackStorage(final ItemStack stack) { this.stack = stack; } - public static SingleStackStorageImpl forEmptyBucket() { - return new SingleStackStorageImpl(new ItemStack(Items.BUCKET)); + public static SimpleSingleStackStorage forEmptyBucket() { + return new SimpleSingleStackStorage(new ItemStack(Items.BUCKET)); } @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java index 3901fbe7b..942544f68 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java @@ -21,7 +21,7 @@ import com.refinedmods.refinedstorage2.platform.forge.recipemod.rei.ReiGridSynchronizer; import com.refinedmods.refinedstorage2.platform.forge.recipemod.rei.ReiProxy; import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.DiskDriveBlockEntityRendererImpl; -import com.refinedmods.refinedstorage2.platform.forge.support.render.model.DiskDriveGeometryLoader; +import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.DiskDriveGeometryLoader; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index 5e81c2fa3..c37d3f532 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -18,7 +18,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil; -import com.refinedmods.refinedstorage2.platform.common.util.TickHandler; +import com.refinedmods.refinedstorage2.platform.common.util.ServerEventQueue; import com.refinedmods.refinedstorage2.platform.forge.exporter.FluidHandlerExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.forge.exporter.ItemHandlerExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.forge.externalstorage.FluidHandlerPlatformExternalStorageProviderFactory; @@ -398,7 +398,7 @@ public LazyOptional getCapability(final Capability cap, @SubscribeEvent public void onServerTick(final TickEvent.ServerTickEvent e) { if (e.phase == TickEvent.Phase.START) { - TickHandler.runQueuedActions(); + ServerEventQueue.runQueuedActions(); } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java index 207d223e2..460801ed6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; -import com.refinedmods.refinedstorage2.platform.common.ContainedFluid; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java similarity index 98% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java index 37e25515f..039761731 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java @@ -1,11 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.render.model; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageState; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; -import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.ForgeDiskDriveBlockEntity; import java.util.ArrayList; import java.util.Arrays; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveGeometryLoader.java similarity index 86% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveGeometryLoader.java index 19427f196..dd6b3cfd4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveGeometryLoader.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveGeometryLoader.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.render.model; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java similarity index 97% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java index 81f542709..f77461e2f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveItemBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.render.model; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import java.util.ArrayList; import java.util.EnumMap; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java similarity index 98% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java index 6ba531032..9e9b65f3b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/DiskDriveUnbakedGeometry.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.render.model; +package com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java deleted file mode 100644 index bc506577a..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/render/model/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.support.render.model; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; From 60c0863c76f0e109ca088c07de134ebaff0d3ce5 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Wed, 1 Nov 2023 01:59:14 +0100 Subject: [PATCH 08/24] feat: network card --- CHANGELOG.md | 1 + .../common/AbstractModInitializer.java | 2 + .../platform/common/content/ContentIds.java | 1 + .../common/content/CreativeModeTabItems.java | 1 + .../platform/common/content/Items.java | 10 ++ .../common/networking/NetworkCardItem.java | 117 ++++++++++++++++++ .../NetworkCardItemPropertyFunction.java | 24 ++++ .../assets/refinedstorage2/lang/en_us.json | 5 + .../models/item/network_card.json | 17 +++ .../models/item/network_card/active.json | 6 + .../models/item/network_card/inactive.json | 6 + .../textures/item/network_card/active.png | Bin 0 -> 998 bytes .../textures/item/network_card/inactive.png | Bin 0 -> 4852 bytes .../refinedstorage2/recipes/network_card.json | 22 ++++ .../fabric/ClientModInitializerImpl.java | 6 + .../platform/forge/ClientModInitializer.java | 6 + 16 files changed, 224 insertions(+) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItemPropertyFunction.java create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/active.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/inactive.json create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/active.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/inactive.png create mode 100644 refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_card.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e41581516..b0f459f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Configuration Card. It copies device configurations and can transfer upgrades. - Network Receiver +- Network Card ## [2.0.0-milestone.3.1] - 2023-10-30 diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 8fefa1e76..0d26b3a58 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -50,6 +50,7 @@ import com.refinedmods.refinedstorage2.platform.common.importer.ImporterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; import com.refinedmods.refinedstorage2.platform.common.misc.WrenchItem; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItem; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; @@ -330,6 +331,7 @@ private void registerSimpleItems(final RegistryCallback callback) { ContentIds.CONFIGURATION_CARD, ConfigurationCardItem::new )); + Items.INSTANCE.setNetworkCard(callback.register(ContentIds.NETWORK_CARD, NetworkCardItem::new)); } private void registerProcessor(final RegistryCallback callback, final ProcessorItem.Type type) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 22f82f038..291f8bf78 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -50,6 +50,7 @@ public final class ContentIds { public static final ResourceLocation STORAGE_MONITOR = createIdentifier("storage_monitor"); public static final ResourceLocation CONFIGURATION_CARD = createIdentifier("configuration_card"); public static final ResourceLocation NETWORK_RECEIVER = createIdentifier("network_receiver"); + public static final ResourceLocation NETWORK_CARD = createIdentifier("network_card"); private ContentIds() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index cde4fde76..52ca3656b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -97,5 +97,6 @@ private static void appendItems(final Consumer consumer) { consumer.accept(Items.INSTANCE.getWirelessGrid().createAtEnergyCapacity()); itemConsumer.accept(Items.INSTANCE.getCreativeWirelessGrid()); itemConsumer.accept(Items.INSTANCE.getConfigurationCard()); + itemConsumer.accept(Items.INSTANCE.getNetworkCard()); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index 608cd7e32..13fca80df 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -81,6 +81,8 @@ public final class Items { private Supplier creativeWirelessGrid; @Nullable private Supplier configurationCard; + @Nullable + private Supplier networkCard; private Items() { } @@ -372,4 +374,12 @@ public void addNetworkReceiver(final Supplier supplier) { public List> getNetworkReceivers() { return Collections.unmodifiableList(allNetworkReceivers); } + + public Item getNetworkCard() { + return Objects.requireNonNull(networkCard).get(); + } + + public void setNetworkCard(final Supplier supplier) { + this.networkCard = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java new file mode 100644 index 000000000..ae97516bd --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java @@ -0,0 +1,117 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; + +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.tooltip.TooltipComponent; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; + +// TODO: better active texture. +public class NetworkCardItem extends Item { + private static final MutableComponent UNBOUND_HELP = createTranslation("item", "network_card.unbound_help"); + private static final MutableComponent BOUND_HELP = createTranslation("item", "network_card.bound_help"); + + private static final MutableComponent UNBOUND = createTranslation("item", "network_card.unbound") + .withStyle(ChatFormatting.RED); + + private static final String TAG_POS = "pos"; + private static final String TAG_DIMENSION = "dim"; + + public NetworkCardItem() { + super(new Item.Properties().stacksTo(1)); + } + + @Override + public InteractionResult useOn(final UseOnContext ctx) { + if (ctx.getLevel().isClientSide() || ctx.getPlayer() == null) { + return InteractionResult.CONSUME; + } + final BlockPos pos = ctx.getClickedPos(); + final BlockState blockState = ctx.getLevel().getBlockState(pos); + if (!(blockState.getBlock() instanceof NetworkReceiverBlock)) { + return InteractionResult.CONSUME; + } + final CompoundTag tag = new CompoundTag(); + tag.putLong(TAG_POS, pos.asLong()); + tag.putString(TAG_DIMENSION, ctx.getLevel().dimension().location().toString()); + ctx.getItemInHand().setTag(tag); + ctx.getPlayer().sendSystemMessage(createTranslation( + "item", + "network_card.bound", + pos.getX(), + pos.getY(), + pos.getZ() + )); + return InteractionResult.SUCCESS; + } + + @Override + public InteractionResultHolder use(final Level level, final Player player, final InteractionHand hand) { + if (player.isCrouching()) { + if (!level.isClientSide()) { + player.sendSystemMessage(createTranslation("item", "network_card.unbound")); + } + return new InteractionResultHolder<>(InteractionResult.CONSUME, new ItemStack(this)); + } + return super.use(level, player, hand); + } + + @Override + public void appendHoverText(final ItemStack stack, + @Nullable final Level level, + final List lines, + final TooltipFlag flag) { + super.appendHoverText(stack, level, lines, flag); + if (!isActive(stack)) { + lines.add(UNBOUND); + return; + } + final BlockPos pos = getPosition(stack); + if (pos == null) { + return; + } + lines.add(createTranslation( + "item", + "network_card.bound", + pos.getX(), + pos.getY(), + pos.getZ() + ).withStyle(ChatFormatting.GRAY)); + } + + @Nullable + public BlockPos getPosition(final ItemStack stack) { + if (stack.getTag() == null) { + return null; + } + return BlockPos.of(stack.getTag().getLong(TAG_POS)); + } + + @Override + public Optional getTooltipImage(final ItemStack stack) { + return Optional.of(new HelpTooltipComponent(isActive(stack) ? BOUND_HELP : UNBOUND_HELP)); + } + + public boolean isActive(final ItemStack stack) { + return stack.getTag() != null && stack.getTag().contains(TAG_POS) && stack.getTag().contains(TAG_DIMENSION); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItemPropertyFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItemPropertyFunction.java new file mode 100644 index 000000000..f807af445 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItemPropertyFunction.java @@ -0,0 +1,24 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import javax.annotation.Nullable; + +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ClampedItemPropertyFunction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; + +public class NetworkCardItemPropertyFunction implements ClampedItemPropertyFunction { + public static final ResourceLocation NAME = new ResourceLocation("active"); + + @Override + public float unclampedCall(final ItemStack itemStack, + @Nullable final ClientLevel clientLevel, + @Nullable final LivingEntity livingEntity, + final int i) { + if (itemStack.getItem() instanceof NetworkCardItem cardItem) { + return cardItem.isActive(itemStack) ? 1 : 0; + } + return 0; + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index f5a4215a3..b90e3d6b4 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -204,6 +204,11 @@ "item.refinedstorage2.configuration_card.applied_configuration": "Applied configuration.", "item.refinedstorage2.configuration_card.empty_help": "Use on a storage network device while crouching to copy its configuration and upgrades to the card.", "item.refinedstorage2.configuration_card.configured_help": "Use on the destination storage network device while crouching to transfer the configuration and upgrades. Use while crouching to clear.", + "item.refinedstorage2.network_card": "Network Card", + "item.refinedstorage2.network_card.unbound_help": "Use while crouching on a Network Receiver.", + "item.refinedstorage2.network_card.unbound": "Unbound.", + "item.refinedstorage2.network_card.bound_help": "Insert into a Network Transmitter. Use while crouching to clear binding.", + "item.refinedstorage2.network_card.bound": "Bound to %d, %d, %d.", "misc.refinedstorage2.stored": "Stored: %s", "misc.refinedstorage2.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage2.total": "%d total", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card.json new file mode 100644 index 000000000..9138e7731 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card.json @@ -0,0 +1,17 @@ +{ + "parent": "item/generated", + "overrides": [ + { + "predicate": { + "active": 0 + }, + "model": "refinedstorage2:item/network_card/inactive" + }, + { + "predicate": { + "active": 1 + }, + "model": "refinedstorage2:item/network_card/active" + } + ] +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/active.json new file mode 100644 index 000000000..b13105f56 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/active.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage2:item/network_card/active" + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/inactive.json new file mode 100644 index 000000000..0468d834e --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/item/network_card/inactive.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage2:item/network_card/inactive" + } +} diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/active.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/active.png new file mode 100644 index 0000000000000000000000000000000000000000..02edcd3621d12375c8c8466bc74d90075f0d4dd1 GIT binary patch literal 998 zcmVEX>4Tx04R}tkvmAkP!xv$ri!nMgB^-EWT;LSL`5963Pq?8YK2xEOm6yuCJjl7 zi=*ILaPYBMb#QUk)xlK|1Ro%-E>4OrQsTKup+$@bF8AZV=l{9)TtKLonPzp21DbA| zsYG1NWLL$mSM(u(9z-C>%rfRADGA^Dx~E>MyBN>%@B6d*)ttqEfJi*c4AUmwAfDc| z4bJ<-VOEq?;&b9LlP*a7$aTfzH_io@1)do;)2VslFtJ!@W2KE*(bR~ih@+~eQ@)V# zSmnIMSu0mr^Pc>Lp`5<5%ynABNMI35kRU=q6(y8mBSyPUiiH%N$9?=mu3sXTLaq`R zITlcX2HEw4|H1FsTKUNdFDVoUI$s>;V+82h1sXNS`95}>#t9I72Cnp$zfuQgK1r{& zwCE8qunk;Xw=`uBxZD9EPljyDt`wvtk8{ps& z7%foty3f12+voOgPjh}h=Sp&K*d6B#00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru=L-P|96BdcXpR5?0pm$TK~y-)wUbY1l5rTvKd(zH z=}@p>UOg8n2oX{tN`j#B9z}z83astY5Twfj=MP~JILNmSf=mc8c@^y@oecvofkx3q z2qy+s{z*!H9ip}63JUhzo(I04=g*f1jx$tMm8z=B{}y*T9og-67a-ASR7N5Z31B!% z914YGDwRUlbw;BRi9~{*ka#>UT`m{X>GbcNg%EP})mRE4WV6|n&1O@oswy>2lYYNn z{!!d+x1|t5UVA^5^v06mFG#IcTUcl5pg5UKQZAQyxv|cP4-g*1(h3YMmzX|#g4Jrp z?RGO53^qHR&iz9-Fq_SoOeVZuFOKarug}8ib70wn3kDe8Sf|lw(C_y#8jbrC>;n`< zAr^}x*Tdm(FwXzzoX_V827}b=b#z@<768M+ zfajlQJS~+lJlrLl&0;hfvDs{Bnug2eqE@R>tyYzTE*wrax8=Q!yX?Jv!@CCp%ls<< zKA(?5p+KclQGU06p>Xw9RPyN~%d;t4TU)eREp%O{SS%|4{14%9SOx+Cd8{A%9mAO3 UTWG%yqyPW_07*qoM6N<$f*}9C;s5{u literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/inactive.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/item/network_card/inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..1f23b8d5aa351a0d8f118fbb38cdc9144daf7ff3 GIT binary patch literal 4852 zcmeHLdsGu=79U&?h|)zwPHKG&5no3qnMo$EDFJ~56C@aU3COCGWCEjknFk5@!WX51 zx+u1;igaBc_&P{yU5lt_DO)YBFLYJ(sEe!kD8(*XtLU;{0s?l~v-OVe@{-eRiKGKITTD7yPreY9xp$6KopJ5>S6;+LgLjtl z$o|v?lUJYL`|*2)>!!btmX2ZiZ`JOt`2C4V{>C3J#Xb4-X?$staehPnsqaJe2UYx+ ztqp~*)?*iLFJ@jwgK|PYh-x>@+VkhRwN>`bbuV{#Eoi?Q`P|joI^^cCd+c<-Nq>sS zFCM2Dxq9f=RoT+vqM|`5qBB(`%NG;lj(J_Yn)YhnqA8saf+$jqV2ac%#S}yvzr(F z?efW#K<}||B|E{zPHe7LY?BrHvY*|lZRxCjmN{+r#!WhV@ozR8x9pK-p3%;(ubllP zG=Gc~K6QqBFKn{^trtfs=I*Uwp8IE8$H5nu%j)y<<>3uO8z`-zTsmnMZUkNV_YIax9A15gHApD-tF6g zOhonLk#jXQ*IRxx&9p9yY>5N4^e`X_g5FWmpuEzQ@r1@?V3S&tnqoT*W>9w!6dvg` zlbVH;4OUZGv{AxptEpwdv{u5J%~zsIa}1SD%kwN$QeHx`CU2oetYt+;Fv6V#05DKC z5_TH&Ml0czuspZ~`0f^SSg=RMwot-KQ>x$?lZAqDHqJ&7nUl`pvLYC8xJ9cY5~Z=- z5MU)?W!r3Kg2Qn*9Bc=VZL(x>FtJ$7LAe|*7XccGHP>h(oruvo&JEFpA*HMu3vIU1 zCL`>|B-JLnO~PV@yxyB;iGRPz`O^y-#9$VKuf74q$Z8s?Vds^VF3wS zOKXW}8H$NxrDA@JjEiA1L3FG@AQthWMA6YwAz1V=R~W4}(x{mfk=SzL_%ELtCUJvte|||m>A0D;hr6LDhLn^Ad_?#HvsU+ z0joreg(7VxOR~wNm$2L}!EVc*Z6)YIEomdAq>TcgD3?cI7=dER7)o$)0_RRa!LpCO zNlWW;|ChGAT1IzYEjp!YpJI_{RhLIP9jK6R|r-zhthid1Xx{L znrzaTMS+piU81k$bU&p)sdXZh#QBI&&Ep}s03{JMpc4`B)LOn!#24YZpP^e#I-7&E zP*GWcN5B$=RY~=rb$X! zXb^C$#bof%VYPuKC$#cu~&^18UTQTrf z$^+FkK-XI_@K(wL)%Aa)i_!axNEyMeGzWMB%sii=1y7HI)ib6`p-%VvkH;!XfyCb| zPq#wQkm2r+7qq#I3532jg;M6*GQ`WD$xgqU`waX=a9SaaN)|O7Dy=OVNd^|&l4J%y zTBttUc{0NlR#gT2F~)kY%4Y1#Z}lM+F7Hbze$uJUAuM^7%DTTf$Ct4_I`d>)aL^$2 zh-y}(^mhrHlG)CiK0#j|7#ZO#&)r1kf3Tz&Qx{)YUU%?XaY#}9hhdxI6T`<$ghVw% z*2Zq%aIR(BBO-O*h>H*KcY33niXUkVyZ!KtiAcX^`u{W-Q{T@5R zA3tC6hxiGFQWkUQ;57Ee+qq*V4qAJsByMNbt+vnx?zeZjIW?n4z2oa0HEsKa{7J6e zsrwv5rZ#+4-G+UBZ7MYF6DpYDqdz<+xJc$aHg`kZ_@7=a+ka)@oD-v6S*FG(8M7Wg zFQ~iRULg+)GFN9ZKZ*^M4Lg((us&?t_z2o{<6%8}Wmi|;2w{uW= zOQ?&5D_4an(4lwyBH|$E#umquhj)FBFMqYt)Rq$7bPIx3o`fGhC7N0Vj>U^7j-5F- z%)fS7^Nl9B^z{7jF)>%{_!i~&pSFdD6wMNi+U0xfY9#*GX9YLfO7cLSA%!eKS{Xfm G<-Y+1$?tLi literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_card.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_card.json new file mode 100644 index 000000000..05980b01d --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_card.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "EEE", + "PAP", + "EEE" + ], + "key": { + "E": { + "item": "refinedstorage2:quartz_enriched_iron" + }, + "P": { + "item": "minecraft:paper" + }, + "A": { + "item": "refinedstorage2:advanced_processor" + } + }, + "result": { + "item": "refinedstorage2:network_card" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 4de332cb2..74e4a06b7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -12,6 +12,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; @@ -367,5 +368,10 @@ private void registerItemProperties() { ConfigurationCardItemPropertyFunction.NAME, new ConfigurationCardItemPropertyFunction() ); + ItemProperties.register( + Items.INSTANCE.getNetworkCard(), + NetworkCardItemPropertyFunction.NAME, + new NetworkCardItemPropertyFunction() + ); } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java index 942544f68..32ce072c9 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; @@ -222,5 +223,10 @@ private static void registerItemProperties() { ConfigurationCardItemPropertyFunction.NAME, new ConfigurationCardItemPropertyFunction() ); + ItemProperties.register( + Items.INSTANCE.getNetworkCard(), + NetworkCardItemPropertyFunction.NAME, + new NetworkCardItemPropertyFunction() + ); } } From 17a56096be4e0878891830eb96d64de7e751d03b Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 10:38:07 +0100 Subject: [PATCH 09/24] fix: inactive wireless transmitter and network receiver models being emissive --- CHANGELOG.md | 4 + .../block/network_receiver/inactive.json | 2 +- .../block/wireless_transmitter/black.json | 2 +- .../block/wireless_transmitter/blue.json | 2 +- .../block/wireless_transmitter/brown.json | 2 +- .../block/wireless_transmitter/cyan.json | 2 +- .../block/wireless_transmitter/gray.json | 2 +- .../block/wireless_transmitter/green.json | 2 +- .../wireless_transmitter/light_blue.json | 2 +- .../wireless_transmitter/light_gray.json | 2 +- .../block/wireless_transmitter/lime.json | 2 +- .../block/wireless_transmitter/magenta.json | 2 +- .../block/wireless_transmitter/orange.json | 2 +- .../block/wireless_transmitter/pink.json | 2 +- .../block/wireless_transmitter/purple.json | 2 +- .../block/wireless_transmitter/red.json | 2 +- .../block/wireless_transmitter/white.json | 2 +- .../block/wireless_transmitter/yellow.json | 2 +- .../models/block/constructor/active.json | 2 +- .../models/block/constructor/inactive.json | 2 +- .../active.json} | 0 .../inactive.json} | 0 .../models/block/destructor/active.json | 2 +- .../models/block/destructor/inactive.json | 2 +- .../block/wireless_transmitter/active.json | 233 ++++++++++++++++++ .../block/wireless_transmitter/inactive.json | 36 +-- .../forge/datagen/BlockModelProvider.java | 12 +- 27 files changed, 270 insertions(+), 57 deletions(-) rename refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/{constructor_destructor_active.json => constructor_destructor/active.json} (100%) rename refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/{constructor_destructor_inactive.json => constructor_destructor/inactive.json} (100%) create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/active.json diff --git a/CHANGELOG.md b/CHANGELOG.md index b0f459f59..d65be6e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Network Receiver - Network Card +### Fixed + +- Inactive Wireless Transmitter model being emissive. + ## [2.0.0-milestone.3.1] - 2023-10-30 ### Added diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json index 090ddd01a..c89d61d94 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/emissive_all_cutout", + "parent": "refinedstorage2:block/all_cutout", "textures": { "all": "refinedstorage2:block/network_receiver/base", "cutout": "refinedstorage2:block/network_receiver/cutouts/inactive", diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/black.json index e1ff55758..5f82d9540 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/black.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/black.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/black" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/blue.json index 65cfb5050..f0a7c7890 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/blue.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/brown.json index c025eb4ca..d80fa6195 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/brown.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/brown.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/brown" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/cyan.json index 09e3a6d52..bb5ce8442 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/cyan.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/cyan.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/cyan" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/gray.json index 22092dae1..4cb0eb53e 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/gray.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/green.json index fcf5eb934..97c627421 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/green.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/green.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/green" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_blue.json index 4d994ede4..25b97783f 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_blue.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_blue.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/light_blue" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_gray.json index 79d7f8f33..1f3dfe616 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_gray.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/light_gray.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/light_gray" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/lime.json index 18066c311..8a3df2c1c 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/lime.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/lime.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/lime" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/magenta.json index 55e545d09..709cf5525 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/magenta.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/magenta.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/magenta" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/orange.json index 3d53d67e2..f359f9aca 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/orange.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/orange.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/orange" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/pink.json index 2f33a8fe5..f4752b655 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/pink.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/pink.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/pink" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/purple.json index 80c889144..f37c313db 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/purple.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/purple.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/purple" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/red.json index ddd8adffa..6b171dab0 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/red.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/red.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/red" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/white.json index fa1e3b66d..6da437453 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/white.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/white.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/white" } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/yellow.json index fa82c3620..c688136cf 100644 --- a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/yellow.json +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/wireless_transmitter/yellow.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/wireless_transmitter/inactive", + "parent": "refinedstorage2:block/wireless_transmitter/active", "textures": { "cutout": "refinedstorage2:block/wireless_transmitter/cutouts/yellow" } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/active.json index 9b8a907a2..e5811b6b1 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/active.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/active.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/constructor_destructor_active", + "parent": "refinedstorage2:block/constructor_destructor/active", "textures": { "border": "refinedstorage2:block/cable/part_border", "front": "refinedstorage2:block/constructor/front", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/inactive.json index ac9d2a9db..d4f463b18 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/inactive.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor/inactive.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/constructor_destructor_inactive", + "parent": "refinedstorage2:block/constructor_destructor/inactive", "textures": { "border": "refinedstorage2:block/cable/part_border", "front": "refinedstorage2:block/constructor/front", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor_active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor/active.json similarity index 100% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor_active.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor/active.json diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor_inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor/inactive.json similarity index 100% rename from refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor_inactive.json rename to refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/constructor_destructor/inactive.json diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/active.json index f8c2bad42..50442e8c6 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/active.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/active.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/constructor_destructor_active", + "parent": "refinedstorage2:block/constructor_destructor/active", "textures": { "border": "refinedstorage2:block/cable/part_border", "front": "refinedstorage2:block/destructor/front", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/inactive.json index 9278c65b1..85c234671 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/inactive.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/destructor/inactive.json @@ -1,5 +1,5 @@ { - "parent": "refinedstorage2:block/constructor_destructor_inactive", + "parent": "refinedstorage2:block/constructor_destructor/inactive", "textures": { "border": "refinedstorage2:block/cable/part_border", "front": "refinedstorage2:block/destructor/front", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/active.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/active.json new file mode 100644 index 000000000..d0a6a83b2 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/active.json @@ -0,0 +1,233 @@ +{ + "render_type": "cutout", + "parent": "block/cube", + "ambientocclusion": false, + "textures": { + "particle": "refinedstorage2:block/wireless_transmitter/base", + "torch": "refinedstorage2:block/wireless_transmitter/base" + }, + "elements": [ + { + "from": [ + 7, + 0, + 7 + ], + "to": [ + 9, + 10, + 9 + ], + "shade": false, + "faces": { + "down": { + "uv": [ + 7, + 13, + 9, + 15 + ], + "texture": "#torch" + }, + "up": { + "uv": [ + 7, + 6, + 9, + 8 + ], + "texture": "#torch" + } + } + }, + { + "from": [ + 7, + 0, + 0 + ], + "to": [ + 9, + 16, + 16 + ], + "shade": false, + "faces": { + "west": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#torch" + }, + "east": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#torch" + } + } + }, + { + "from": [ + 0, + 0, + 7 + ], + "to": [ + 16, + 16, + 9 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#torch" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#torch" + } + } + }, + { + "from": [ + 7, + 0, + 7 + ], + "to": [ + 9, + 10, + 9 + ], + "shade": false, + "faces": { + "down": { + "uv": [ + 7, + 13, + 9, + 15 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + }, + "up": { + "uv": [ + 7, + 6, + 9, + 8 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + } + } + }, + { + "from": [ + 7, + 0, + 0 + ], + "to": [ + 9, + 16, + 16 + ], + "shade": false, + "faces": { + "west": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + }, + "east": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + } + } + }, + { + "from": [ + 0, + 0, + 7 + ], + "to": [ + 16, + 16, + 9 + ], + "shade": false, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + }, + "south": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#cutout", + "forge_data": { + "block_light": 15, + "sky_light": 15 + } + } + } + } + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/inactive.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/inactive.json index ecfb994fd..4e1f0ad54 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/inactive.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/models/block/wireless_transmitter/inactive.json @@ -127,11 +127,7 @@ 9, 15 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" }, "up": { "uv": [ @@ -140,11 +136,7 @@ 9, 8 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" } } }, @@ -168,11 +160,7 @@ 16, 16 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" }, "east": { "uv": [ @@ -181,11 +169,7 @@ 16, 16 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" } } }, @@ -209,11 +193,7 @@ 16, 16 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" }, "south": { "uv": [ @@ -222,11 +202,7 @@ 16, 16 ], - "texture": "#cutout", - "forge_data": { - "block_light": 15, - "sky_light": 15 - } + "texture": "#cutout" } } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index 89ce5c99a..f63badfca 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -106,23 +106,23 @@ private void registerDetectors() { } private void registerWirelessTransmitters() { - final ResourceLocation parent = createIdentifier("block/wireless_transmitter/inactive"); - Blocks.INSTANCE.getWirelessTransmitter() - .forEach((color, id, block) -> withExistingParent("block/wireless_transmitter/" + color.getName(), parent) + final ResourceLocation parent = createIdentifier("block/wireless_transmitter/active"); + Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> + withExistingParent("block/wireless_transmitter/" + color.getName(), parent) .texture("cutout", createIdentifier("block/wireless_transmitter/cutouts/" + color.getName()))); } private void registerNetworkReceivers() { - final ResourceLocation base = createIdentifier("block/emissive_all_cutout"); + final ResourceLocation emissiveBase = createIdentifier("block/emissive_all_cutout"); final ResourceLocation baseTexture = createIdentifier("block/network_receiver/base"); Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, receiver) -> { final ResourceLocation cutout = createIdentifier("block/network_receiver/cutouts/" + color.getName()); - withExistingParent("block/network_receiver/" + color.getName(), base) + withExistingParent("block/network_receiver/" + color.getName(), emissiveBase) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", cutout); }); - withExistingParent("block/network_receiver/inactive", base) + withExistingParent("block/network_receiver/inactive", createIdentifier("block/all_cutout")) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", createIdentifier("block/network_receiver/cutouts/inactive")); From 2edb8e828e7e6956555fd37c3eb9af0d0310ff64 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 10:43:36 +0100 Subject: [PATCH 10/24] refactor: add network package structure under support --- .../platform/api/PlatformApi.java | 8 ++++---- .../platform/api/PlatformApiProxy.java | 8 ++++---- .../energy/AbstractNetworkBoundEnergyItem.java | 6 +++--- ...bstractNetworkNodeContainerBlockEntity.java | 2 +- .../PlatformNetworkNodeContainer.java | 2 +- .../bounditem}/NetworkBoundItemHelper.java | 2 +- .../bounditem}/NetworkBoundItemSession.java | 2 +- .../bounditem}/SlotReference.java | 2 +- .../bounditem}/SlotReferenceFactory.java | 2 +- .../bounditem}/SlotReferenceProvider.java | 2 +- .../network/bounditem/package-info.java | 7 +++++++ .../package-info.java | 2 +- .../common/AbstractModInitializer.java | 2 +- .../platform/common/PlatformApiImpl.java | 18 +++++++++--------- .../ConstructorBlock.java | 2 +- .../ConstructorBlockEntity.java | 2 +- .../constructordestructor/DestructorBlock.java | 2 +- .../DestructorBlockEntity.java | 2 +- .../platform/common/content/BlockEntities.java | 2 +- .../controller/ControllerBlockEntity.java | 2 +- .../ControllerBlockEntityTicker.java | 2 +- .../common/detector/DetectorBlock.java | 2 +- .../common/detector/DetectorBlockEntity.java | 2 +- .../common/exporter/ExporterBlock.java | 2 +- .../common/exporter/ExporterBlockEntity.java | 2 +- .../common/grid/AbstractGridBlockEntity.java | 2 +- .../common/grid/CraftingGridBlock.java | 2 +- .../platform/common/grid/GridBlock.java | 2 +- .../platform/common/grid/WirelessGrid.java | 2 +- .../common/grid/WirelessGridContainerMenu.java | 2 +- .../grid/WirelessGridExtendedMenuProvider.java | 2 +- .../platform/common/grid/WirelessGridItem.java | 4 ++-- .../common/grid/WirelessGridOperations.java | 2 +- .../platform/common/iface/InterfaceBlock.java | 2 +- .../common/iface/InterfaceBlockEntity.java | 2 +- .../InterfaceProxyExternalStorageProvider.java | 2 +- .../common/importer/ImporterBlock.java | 2 +- .../common/importer/ImporterBlockEntity.java | 2 +- .../platform/common/networking/CableBlock.java | 4 ++-- .../networking/NetworkReceiverBlock.java | 4 ++-- .../AbstractDiskDriveBlockEntity.java | 2 +- .../diskdrive/DiskDriveBlockEntityTicker.java | 2 +- .../externalstorage/ExternalStorageBlock.java | 2 +- .../ExternalStorageBlockEntity.java | 2 +- .../AbstractStorageBlockBlockEntity.java | 2 +- .../storageblock/FluidStorageBlock.java | 2 +- .../storage/storageblock/ItemStorageBlock.java | 2 +- .../storagemonitor/StorageMonitorBlock.java | 2 +- .../StorageMonitorBlockEntity.java | 2 +- .../support/AbstractBaseContainerMenu.java | 2 +- .../common/support/CableBlockSupport.java | 2 +- .../support/ClientToServerCommunications.java | 2 +- .../AbstractSchedulingContainerMenu.java | 2 +- .../AbstractSingleAmountContainerMenu.java | 2 +- ...ractingNetworkNodeContainerBlockEntity.java | 2 +- ...oneModeNetworkNodeContainerBlockEntity.java | 5 ++++- ...edulingNetworkNodeContainerBlockEntity.java | 5 ++++- ...adeableNetworkNodeContainerBlockEntity.java | 3 ++- .../{ => network}/LevelConnectionProvider.java | 4 ++-- .../NetworkNodeBlockEntityTicker.java | 3 ++- .../NetworkNodeContainerBlockEntityImpl.java | 6 ++++-- .../CompositeSlotReferenceProvider.java | 6 +++--- .../bounditem}/InventorySlotReference.java | 6 +++--- .../InventorySlotReferenceFactory.java | 6 +++--- .../InventorySlotReferenceProvider.java | 6 +++--- .../bounditem}/NetworkBoundItemHelperImpl.java | 10 +++++----- .../NetworkBoundItemItemPropertyFunction.java | 2 +- .../NetworkBoundItemSessionImpl.java | 8 ++++---- .../network/bounditem/package-info.java | 7 +++++++ .../package-info.java | 2 +- .../upgrade/RegulatorUpgradeContainerMenu.java | 2 +- .../common/upgrade/RegulatorUpgradeItem.java | 2 +- .../WirelessTransmitterBlock.java | 2 +- .../WirelessTransmitterBlockEntity.java | 2 +- .../fabric/ClientModInitializerImpl.java | 2 +- .../c2s/ClientToServerCommunicationsImpl.java | 2 +- .../packet/c2s/UseNetworkBoundItemPacket.java | 4 ++-- .../TrinketsSlotReference.java | 4 ++-- .../TrinketsSlotReferenceFactory.java | 4 ++-- .../TrinketsSlotReferenceProvider.java | 4 ++-- .../platform/forge/ClientModInitializer.java | 2 +- .../c2s/ClientToServerCommunicationsImpl.java | 2 +- .../packet/c2s/UseNetworkBoundItemPacket.java | 4 ++-- .../networkbounditem/CuriosSlotReference.java | 4 ++-- .../CuriosSlotReferenceFactory.java | 4 ++-- .../CuriosSlotReferenceProvider.java | 4 ++-- 86 files changed, 152 insertions(+), 128 deletions(-) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{ => network}/AbstractNetworkNodeContainerBlockEntity.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{ => network}/PlatformNetworkNodeContainer.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network/bounditem}/NetworkBoundItemHelper.java (98%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network/bounditem}/NetworkBoundItemSession.java (96%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network/bounditem}/SlotReference.java (97%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network/bounditem}/SlotReferenceFactory.java (94%) rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network/bounditem}/SlotReferenceProvider.java (96%) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/package-info.java rename refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/{networkbounditem => network}/package-info.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java (91%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/AbstractSchedulingNetworkNodeContainerBlockEntity.java (90%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/AbstractUpgradeableNetworkNodeContainerBlockEntity.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/LevelConnectionProvider.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/NetworkNodeBlockEntityTicker.java (89%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{ => network}/NetworkNodeContainerBlockEntityImpl.java (93%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/CompositeSlotReferenceProvider.java (96%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/InventorySlotReference.java (94%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/InventorySlotReferenceFactory.java (87%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/InventorySlotReferenceProvider.java (92%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/NetworkBoundItemHelperImpl.java (95%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/NetworkBoundItemItemPropertyFunction.java (98%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network/bounditem}/NetworkBoundItemSessionImpl.java (95%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/package-info.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{networkbounditem => network}/package-info.java (93%) diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java index 01e3a7ff6..ee0c849dc 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApi.java @@ -28,10 +28,10 @@ import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java index 2faae7cc4..b934fa5f6 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/PlatformApiProxy.java @@ -28,10 +28,10 @@ import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java index 6248945fa..16770c32c 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/energy/AbstractNetworkBoundEnergyItem.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.api.support.energy; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java index efc028e34..33d255002 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/AbstractNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support; +package com.refinedmods.refinedstorage2.platform.api.support.network; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java index d94d49501..aa1f9f806 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/PlatformNetworkNodeContainer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support; +package com.refinedmods.refinedstorage2.platform.api.support.network; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemHelper.java similarity index 98% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemHelper.java index 858a95037..04221f338 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemHelper.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemHelper.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; import java.util.List; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemSession.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemSession.java index da6398e83..65508a695 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/NetworkBoundItemSession.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/NetworkBoundItemSession.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; import com.refinedmods.refinedstorage2.api.network.Network; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReference.java similarity index 97% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReference.java index dbac8a01f..2affc8478 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReference.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReference.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; import java.util.Optional; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceFactory.java similarity index 94% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceFactory.java index fcab5a538..3bd695536 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceFactory.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; import net.minecraft.network.FriendlyByteBuf; import org.apiguardian.api.API; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceProvider.java similarity index 96% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceProvider.java index dfbba125b..52bd50a69 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/SlotReferenceProvider.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/SlotReferenceProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; import java.util.List; import java.util.Set; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/package-info.java new file mode 100644 index 000000000..37fef92f0 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/bounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.api.support.network.bounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/package-info.java similarity index 94% rename from refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java rename to refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/package-info.java index 93ac9eb3c..ae0088977 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/networkbounditem/package-info.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.api.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.api.support.network; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 0d26b3a58..da1937bff 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -78,11 +78,11 @@ import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlock; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem; import com.refinedmods.refinedstorage2.platform.common.support.SimpleItem; import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyLootItemFunctionSerializer; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory; import com.refinedmods.refinedstorage2.platform.common.upgrade.FortuneUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.upgrade.RangeUpgradeItem; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index 62a42f9dc..e20fbd662 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -32,10 +32,10 @@ import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorExtractionStrategy; import com.refinedmods.refinedstorage2.platform.api.storagemonitor.StorageMonitorInsertionStrategy; import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; @@ -59,13 +59,13 @@ import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorExtractionStrategy; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorInsertionStrategy; -import com.refinedmods.refinedstorage2.platform.common.support.LevelConnectionProvider; import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; import com.refinedmods.refinedstorage2.platform.common.support.energy.ItemEnergyStorage; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.CompositeSlotReferenceProvider; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReference; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.InventorySlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemHelperImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.LevelConnectionProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.CompositeSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReference; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.NetworkBoundItemHelperImpl; import com.refinedmods.refinedstorage2.platform.common.support.registry.PlatformRegistryImpl; import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceFactory; import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResourceFactory; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java index 89ffe27fe..571c67293 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlock.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java index b741112e1..306f6090e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java @@ -12,7 +12,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.ArrayList; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java index df899e769..87f40f864 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlock.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java index dd28f952a..fb4a7bd29 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java @@ -10,10 +10,10 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractUpgradeableNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractUpgradeableNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index 42b6fc876..bdeba8d02 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -17,7 +17,7 @@ import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.ItemStorageBlockBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntity; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlockEntity; import java.util.EnumMap; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java index cd836c654..118c4d3cf 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java @@ -7,10 +7,10 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.energy.BlockEntityEnergyStorage; import com.refinedmods.refinedstorage2.platform.common.support.energy.CreativeEnergyStorage; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java index 228520546..dfdba5164 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntityTicker.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.controller; import com.refinedmods.refinedstorage2.api.network.impl.node.controller.ControllerNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java index ca8d821ae..bfd2e98d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlock.java @@ -9,9 +9,9 @@ import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java index 8c7b047e4..20e2e8786 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java @@ -9,10 +9,10 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java index 20001c171..2d16dcafd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlock.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java index b28e33526..33de5b919 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java @@ -11,7 +11,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java index 9b70694aa..62954cc71 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java @@ -15,7 +15,7 @@ import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import java.util.List; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java index 77525d83c..a22c8e193 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlock.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java index 6f52dcb9d..55a7c9ca8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridBlock.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java index 900ca43c3..4a0dde26b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGrid.java @@ -18,7 +18,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java index c09545546..0ab2dad74 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.content.Menus; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java index f963bb0e1..eb7c93a64 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridExtendedMenuProvider.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java index 0192cd841..9ceb7db11 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridItem.java @@ -5,8 +5,8 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.Platform; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java index 614d55002..791eddd4d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridOperations.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.grid.GridWatchers; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; import com.refinedmods.refinedstorage2.platform.common.Platform; class WirelessGridOperations implements GridOperations { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java index dadc0732e..80f4de506 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlock.java @@ -4,8 +4,8 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.SimpleBlockItem; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java index ba8206982..a4a8178cd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java @@ -12,10 +12,10 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.HashMap; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java index afcb72f4c..0459cdd26 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceProxyExternalStorageProvider.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.resource.ResourceAmount; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.network.AbstractNetworkNodeContainerBlockEntity; import java.util.Collections; import java.util.Iterator; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java index b033d33fd..06e521f87 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlock.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java index 835401d38..e058971e8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java @@ -11,10 +11,10 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractUpgradeableNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractUpgradeableNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java index 12aba856e..4932e6704 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/CableBlock.java @@ -12,8 +12,8 @@ import com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport; import com.refinedmods.refinedstorage2.platform.common.support.CableShapeCacheKey; import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java index 88d1f01be..34c436b5c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java @@ -8,8 +8,8 @@ import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index 290bcd5a7..4ce31a0b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -9,10 +9,10 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.util.ContainerUtil; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java index 1b1ee6d54..586b361cd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveBlockEntityTicker.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageNetworkNode; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java index f97d1bdf9..ef3f47bc4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlock.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.DirectionalCableBlockShapes; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java index 1e904cec6..54a2ab746 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java @@ -9,9 +9,9 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java index 14b6994a0..32544b061 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java @@ -7,9 +7,9 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java index c8ad7a230..3ffaa23f7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlock.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java index 4badd0804..4e8be0837 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlock.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.entity.BlockEntity; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java index 58deb7001..27a390a44 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlock.java @@ -4,10 +4,10 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java index 215cf30ec..8ab0040c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java @@ -14,9 +14,9 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java index f8fb21c1f..77dfedcef 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseContainerMenu.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.DisabledSlot; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java index 542cf7735..987b285f6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.support; -import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; import java.util.HashMap; import java.util.Map; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java index 5e552171b..a16489164 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ClientToServerCommunications.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage2.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java index 7d6342e6b..fc8b301a9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSchedulingContainerMenu.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; import com.refinedmods.refinedstorage2.platform.common.support.SchedulingModeType; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java index 70e5eac2f..e6c6ccc59 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/AbstractSingleAmountContainerMenu.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.support.containermenu; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java index d3f218009..fb8f6e7f2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java similarity index 91% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java index 7bfc1ebf4..22c3d5c7d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java @@ -1,8 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.configurationcard.ConfigurationCardTarget; import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.support.PlayerAware; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneModeSettings; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractSchedulingNetworkNodeContainerBlockEntity.java similarity index 90% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractSchedulingNetworkNodeContainerBlockEntity.java index 8bf658309..2de3e849b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractSchedulingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractSchedulingNetworkNodeContainerBlockEntity.java @@ -1,8 +1,11 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.task.TaskExecutor; import com.refinedmods.refinedstorage2.api.storage.ResourceTemplate; +import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; +import com.refinedmods.refinedstorage2.platform.common.support.SchedulingMode; +import com.refinedmods.refinedstorage2.platform.common.support.SchedulingModeType; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.resource.ResourceContainerImpl; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractUpgradeableNetworkNodeContainerBlockEntity.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractUpgradeableNetworkNodeContainerBlockEntity.java index ade7a61a2..24c922e1d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractUpgradeableNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractUpgradeableNetworkNodeContainerBlockEntity.java @@ -1,8 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.content.Items; +import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java index 49242561e..6b8ef307e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/LevelConnectionProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java @@ -1,9 +1,9 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.ConnectionProvider; import com.refinedmods.refinedstorage2.api.network.Connections; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; import java.util.ArrayDeque; import java.util.Collections; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeBlockEntityTicker.java similarity index 89% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeBlockEntityTicker.java index bf5506a0f..b2077a117 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeBlockEntityTicker.java @@ -1,6 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java index 02bb2234e..40f3dbe1d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java @@ -1,8 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.support; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.api.support.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.network.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/CompositeSlotReferenceProvider.java similarity index 96% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/CompositeSlotReferenceProvider.java index 0af728531..c955c5157 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/CompositeSlotReferenceProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/CompositeSlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java similarity index 94% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java index 5f488f158..209393b50 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReference.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceFactory.java similarity index 87% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceFactory.java index eca2aee05..98c1b76c8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceFactory.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceProvider.java similarity index 92% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceProvider.java index ee4493935..0bbb50266 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/InventorySlotReferenceProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReferenceProvider.java @@ -1,7 +1,7 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import java.util.ArrayList; import java.util.List; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemHelperImpl.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemHelperImpl.java index 134992aaa..50ee4e1b3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemHelperImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemHelperImpl.java @@ -1,10 +1,10 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.HelpTooltipComponent; -import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemHelper; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemHelper; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import java.util.List; import java.util.Objects; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemItemPropertyFunction.java similarity index 98% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemItemPropertyFunction.java index 8453baa73..5261c73ab 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemItemPropertyFunction.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemItemPropertyFunction.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java similarity index 95% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java index f47a33edc..d215264c3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/NetworkBoundItemSessionImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java @@ -1,12 +1,12 @@ -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; -import com.refinedmods.refinedstorage2.platform.api.support.PlatformNetworkNodeContainer; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/package-info.java new file mode 100644 index 000000000..3b9e35000 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.support.network.bounditem; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/package-info.java similarity index 93% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/package-info.java index ab59fbf17..57bc26862 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/networkbounditem/package-info.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.common.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.common.support.network; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java index a448a2031..eafb336d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.upgrade; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.content.Menus; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java index fa78d52ce..4bf0d3aa9 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeItem.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.upgrade; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.upgrade.AbstractUpgradeItem; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java index 7a277460b..9e3860f68 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlock.java @@ -9,9 +9,9 @@ import com.refinedmods.refinedstorage2.platform.common.support.BlockItemProvider; import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; import com.refinedmods.refinedstorage2.platform.common.support.NamedBlockItem; -import com.refinedmods.refinedstorage2.platform.common.support.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionTypeImpl; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java index 9daa80de1..65da9b06f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -6,8 +6,8 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 74e4a06b7..d0de2fc30 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -14,7 +14,7 @@ import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.NetworkBoundItemItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.ResourceClientTooltipComponent; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java index fbcb6bcea..8ca5e7363 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/ClientToServerCommunicationsImpl.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java index 650328a26..0a32c7fa4 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/c2s/UseNetworkBoundItemPacket.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java index ee4daca22..6097188eb 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java index 10f64caa2..e02996e31 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java index b3949200c..247ec4640 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import java.util.Collections; import java.util.List; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java index 32ce072c9..bfa2b0263 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ClientModInitializer.java @@ -12,7 +12,7 @@ import com.refinedmods.refinedstorage2.platform.common.controller.ControllerModelPredicateProvider; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.storagemonitor.StorageMonitorBlockEntityRenderer; -import com.refinedmods.refinedstorage2.platform.common.support.networkbounditem.NetworkBoundItemItemPropertyFunction; +import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.NetworkBoundItemItemPropertyFunction; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.CompositeClientTooltipComponent; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.HelpClientTooltipComponent; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.ResourceClientTooltipComponent; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java index cfeb372bb..e4139b303 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/ClientToServerCommunicationsImpl.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.grid.GridScrollMode; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyType; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java index 5dd27d807..f13e0139f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/c2s/UseNetworkBoundItemPacket.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.energy.AbstractNetworkBoundEnergyItem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.NetworkBoundItemSession; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java index b29fd1dfb..694e168d4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import java.util.Optional; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java index cba5c96fa..6a8c85b19 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; import net.minecraft.network.FriendlyByteBuf; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java index caa100fba..9101e9158 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.networkbounditem.SlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; +import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; import java.util.Collections; import java.util.List; From 68de9f7315ca90d6b850555229324bd3a9e659fe Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 12:35:11 +0100 Subject: [PATCH 11/24] refactor: make more methods package private --- .../configurationcard/ConfigurationCardItem.java | 2 +- .../ConstructorBlockEntity.java | 6 +++--- .../ConstructorContainerMenu.java | 10 +++++----- .../DestructorContainerMenu.java | 10 +++++----- .../common/controller/ControllerBlockEntity.java | 6 +++--- .../controller/ControllerContainerMenu.java | 12 ++++++------ .../common/detector/DetectorBlockEntity.java | 14 +++++--------- .../common/detector/DetectorContainerMenu.java | 8 ++++---- .../common/detector/DetectorModeSettings.java | 4 ++-- .../common/exporter/ExporterContainerMenu.java | 10 +++++----- .../common/grid/AbstractGridContainerMenu.java | 1 - .../common/grid/CraftingGridBlockEntity.java | 16 ++++++++-------- .../common/grid/CraftingGridContainerMenu.java | 6 +++--- .../grid/CraftingGridRefillContextImpl.java | 2 +- .../common/grid/CraftingGridResultSlot.java | 10 +++++----- .../common/grid/CraftingGridSourceImpl.java | 2 +- .../platform/common/grid/CraftingMatrix.java | 2 +- .../platform/common/grid/GridContainerMenu.java | 2 +- .../common/grid/{screen => }/GridSearchBox.java | 2 +- .../common/grid/WirelessGridContainerMenu.java | 8 ++++---- .../common/grid/screen/AbstractGridScreen.java | 2 +- .../common/grid/screen/CraftingGridScreen.java | 5 +++-- .../common/grid/screen/GridSearchBoxWidget.java | 15 ++++++++------- .../common/iface/ExportedResourcesContainer.java | 2 +- .../common/iface/InterfaceBlockEntity.java | 12 +++++------- .../common/iface/InterfaceContainerMenu.java | 12 ++++++------ .../common/importer/ImporterBlockEntity.java | 8 ++++---- .../common/importer/ImporterContainerMenu.java | 10 +++++----- .../common/networking/NetworkCardItem.java | 2 +- .../storage/AbstractStorageContainerMenu.java | 2 +- .../platform/common/storage/PlatformStorage.java | 2 +- .../diskdrive/AbstractDiskDriveBlockEntity.java | 2 +- .../diskdrive/DiskDriveContainerMenu.java | 12 ++++++------ .../storage/diskdrive/DiskDriveInventory.java | 2 +- .../ExternalStorageBlockEntity.java | 2 +- .../ExternalStorageContainerMenu.java | 8 ++++---- .../externalstorage/ExternalStorageWorkRate.java | 6 +++--- .../AbstractStorageBlockBlockEntity.java | 2 +- .../FluidStorageBlockContainerMenu.java | 8 ++++---- .../ItemStorageBlockContainerMenu.java | 8 ++++---- .../StorageMonitorBlockEntity.java | 2 +- .../StorageMonitorContainerMenu.java | 8 ++++---- ...ker.java => StorageMonitorInsertTracker.java} | 6 +++--- .../upgrade/RegulatorUpgradeContainerMenu.java | 10 +++++----- .../upgrade/UpgradeWithEnchantedBookRecipe.java | 2 +- .../WirelessTransmitterBlockEntity.java | 2 +- .../WirelessTransmitterContainerMenu.java | 10 +++++----- 47 files changed, 145 insertions(+), 150 deletions(-) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/{screen => }/GridSearchBox.java (77%) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/{InsertTracker.java => StorageMonitorInsertTracker.java} (83%) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java index 315b4eae4..c61da30ab 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/configurationcard/ConfigurationCardItem.java @@ -199,7 +199,7 @@ public Optional getTooltipImage(final ItemStack stack) { return Optional.of(new HelpTooltipComponent(isActive(stack) ? CONFIGURED_HELP : EMPTY_HELP)); } - public boolean isActive(final ItemStack stack) { + boolean isActive(final ItemStack stack) { return stack.getTag() != null && stack.getTag().contains(TAG_TYPE); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java index 306f6090e..c97a82d20 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java @@ -111,11 +111,11 @@ public void readConfiguration(final CompoundTag tag) { } } - public boolean isDropItems() { + boolean isDropItems() { return dropItems; } - public void setDropItems(final boolean dropItems) { + void setDropItems(final boolean dropItems) { this.dropItems = dropItems; setChanged(); if (level instanceof ServerLevel serverLevel) { @@ -145,7 +145,7 @@ protected void setTaskExecutor(final TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; } - public record TaskContext(Network network, Player player) { + protected record TaskContext(Network network, Player player) { } private class TaskImpl implements Task { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java index 6239e1679..f27575351 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorContainerMenu.java @@ -29,11 +29,11 @@ public ConstructorContainerMenu(final int syncId, final Inventory playerInventor ); } - public ConstructorContainerMenu(final int syncId, - final Player player, - final ConstructorBlockEntity constructor, - final ResourceContainer resourceContainer, - final UpgradeContainer upgradeContainer) { + ConstructorContainerMenu(final int syncId, + final Player player, + final ConstructorBlockEntity constructor, + final ResourceContainer resourceContainer, + final UpgradeContainer upgradeContainer) { super( Menus.INSTANCE.getConstructor(), syncId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java index b478ee670..847c8af6e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorContainerMenu.java @@ -32,11 +32,11 @@ public DestructorContainerMenu(final int syncId, final Inventory playerInventory ); } - public DestructorContainerMenu(final int syncId, - final Player player, - final DestructorBlockEntity destructor, - final ResourceContainer resourceContainer, - final UpgradeContainer upgradeContainer) { + DestructorContainerMenu(final int syncId, + final Player player, + final DestructorBlockEntity destructor, + final ResourceContainer resourceContainer, + final UpgradeContainer upgradeContainer) { super( Menus.INSTANCE.getDestructor(), syncId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java index 118c4d3cf..1a108b3d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java @@ -61,7 +61,7 @@ private static BlockEntityType getBlockEntityType(final C : BlockEntities.INSTANCE.getController(); } - public void updateEnergyTypeInLevel(final BlockState state) { + void updateEnergyTypeInLevel(final BlockState state) { final ControllerEnergyType currentEnergyType = ControllerEnergyType.ofState(getNode().getState()); final ControllerEnergyType inLevelEnergyType = state.getValue(ControllerBlock.ENERGY_TYPE); @@ -117,11 +117,11 @@ public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByte buf.writeLong(getActualCapacity()); } - public long getActualStored() { + long getActualStored() { return getNode().getActualStored(); } - public long getActualCapacity() { + long getActualCapacity() { return getNode().getActualCapacity(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java index f8beb08ee..dd6f8497a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerContainerMenu.java @@ -38,10 +38,10 @@ public ControllerContainerMenu(final int syncId, final Inventory playerInventory registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); } - public ControllerContainerMenu(final int syncId, - final Inventory playerInventory, - final ControllerBlockEntity controller, - final Player playerEntity) { + ControllerContainerMenu(final int syncId, + final Inventory playerInventory, + final ControllerBlockEntity controller, + final Player playerEntity) { super(Menus.INSTANCE.getController(), syncId); this.controller = controller; @@ -80,11 +80,11 @@ public void setEnergyInfo(final long newStored, final long newCapacity) { this.capacity = newCapacity; } - public long getStored() { + long getStored() { return stored; } - public long getCapacity() { + long getCapacity() { return capacity; } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java index 20e2e8786..ccaf24ae2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java @@ -84,7 +84,7 @@ public void readConfiguration(final CompoundTag tag) { propagateAmount(); } - public void setAmount(final double amount) { + void setAmount(final double amount) { this.amount = amount; propagateAmount(); setChanged(); @@ -99,25 +99,21 @@ private void propagateAmount() { getNode().setAmount(normalizedAmount); } - public double getAmount() { - return amount; - } - - public boolean isFuzzyMode() { + boolean isFuzzyMode() { return filter.isFuzzyMode(); } - public void setFuzzyMode(final boolean fuzzyMode) { + void setFuzzyMode(final boolean fuzzyMode) { filter.setFuzzyMode(fuzzyMode); initialize(); } - public void setMode(final DetectorMode mode) { + void setMode(final DetectorMode mode) { getNode().setMode(mode); setChanged(); } - public DetectorMode getMode() { + DetectorMode getMode() { return getNode().getMode(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java index e360e6b4d..b223acf9f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorContainerMenu.java @@ -29,10 +29,10 @@ public DetectorContainerMenu(final int syncId, final Inventory playerInventory, registerProperty(new ClientProperty<>(DetectorPropertyTypes.MODE, DetectorMode.EQUAL)); } - public DetectorContainerMenu(final int syncId, - final Player player, - final DetectorBlockEntity detector, - final ResourceContainer resourceContainer) { + DetectorContainerMenu(final int syncId, + final Player player, + final DetectorBlockEntity detector, + final ResourceContainer resourceContainer) { super(Menus.INSTANCE.getDetector(), syncId, player, resourceContainer, FILTER_HELP, null); this.detector = detector; registerProperty(new ServerProperty<>( diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java index 158a0e55c..424d61285 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorModeSettings.java @@ -10,7 +10,7 @@ final class DetectorModeSettings { private DetectorModeSettings() { } - public static DetectorMode getDetectorMode(final int detectorMode) { + static DetectorMode getDetectorMode(final int detectorMode) { return switch (detectorMode) { case UNDER -> DetectorMode.UNDER; case EQUAL -> DetectorMode.EQUAL; @@ -19,7 +19,7 @@ public static DetectorMode getDetectorMode(final int detectorMode) { }; } - public static int getDetectorMode(final DetectorMode detectorMode) { + static int getDetectorMode(final DetectorMode detectorMode) { return switch (detectorMode) { case UNDER -> UNDER; case EQUAL -> EQUAL; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java index 41bc668a0..072995098 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterContainerMenu.java @@ -27,11 +27,11 @@ public ExporterContainerMenu(final int syncId, final Inventory playerInventory, ); } - public ExporterContainerMenu(final int syncId, - final Player player, - final ExporterBlockEntity exporter, - final ResourceContainer resourceContainer, - final UpgradeContainer upgradeContainer) { + ExporterContainerMenu(final int syncId, + final Player player, + final ExporterBlockEntity exporter, + final ResourceContainer resourceContainer, + final UpgradeContainer upgradeContainer) { super( Menus.INSTANCE.getExporter(), syncId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java index 5c2817a0d..1b0d3691e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridContainerMenu.java @@ -25,7 +25,6 @@ import com.refinedmods.refinedstorage2.platform.api.support.registry.PlatformRegistry; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.grid.screen.GridSearchBox; import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.grid.strategy.ClientGridScrollingStrategy; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java index 0d4a978c8..bc2381b2f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridBlockEntity.java @@ -81,15 +81,15 @@ private CraftingRecipe loadRecipe(final Level level) { .orElse(null); } - public CraftingMatrix getCraftingMatrix() { + CraftingMatrix getCraftingMatrix() { return craftingMatrix; } - public ResultContainer getCraftingResult() { + ResultContainer getCraftingResult() { return craftingResult; } - public NonNullList getRemainingItems(final Player player) { + NonNullList getRemainingItems(final Player player) { if (level == null || currentRecipe == null) { return NonNullList.create(); } @@ -127,7 +127,7 @@ public void setLevel(final Level level) { setOutputSilently(level); } - public Optional getNetwork() { + Optional getNetwork() { final GridNetworkNode node = getNode(); if (!node.isActive()) { return Optional.empty(); @@ -135,13 +135,13 @@ public Optional getNetwork() { return Optional.ofNullable(node.getNetwork()); } - public Optional> getStorageChannel() { + Optional> getStorageChannel() { return getNetwork().map(network -> network .getComponent(StorageNetworkComponent.class) .getStorageChannel(StorageChannelTypes.ITEM)); } - public ItemStack insert(final ItemStack stack, final Player player) { + ItemStack insert(final ItemStack stack, final Player player) { return getStorageChannel().map(storageChannel -> doInsert(stack, player, storageChannel)).orElse(stack); } @@ -161,10 +161,10 @@ private ItemStack doInsert(final ItemStack stack, return stack.copyWithCount((int) remainder); } - public long extract(final ItemResource resource, final long amount, final Player player) { + long extract(final ItemResource resource, final Player player) { return getStorageChannel().map(storageChannel -> storageChannel.extract( resource, - amount, + 1, Action.EXECUTE, new PlayerActor(player) )).orElse(0L); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java index 88edef327..1c9b31ba5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridContainerMenu.java @@ -45,9 +45,9 @@ public CraftingGridContainerMenu(final int syncId, final Inventory playerInvento registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); } - public CraftingGridContainerMenu(final int syncId, - final Inventory playerInventory, - final CraftingGridBlockEntity grid) { + CraftingGridContainerMenu(final int syncId, + final Inventory playerInventory, + final CraftingGridBlockEntity grid) { super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, grid); this.source = new CraftingGridSourceImpl(grid); this.player = playerInventory.player; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java index 5a4f68993..e3461da2a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridRefillContextImpl.java @@ -13,7 +13,7 @@ class CraftingGridRefillContextImpl implements CraftingGridRefillContext { @Override public boolean extract(final ItemResource resource, final Player player) { - return blockEntity.extract(resource, 1, player) == 1; + return blockEntity.extract(resource, player) == 1; } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java index 76b3cc231..f229f191b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridResultSlot.java @@ -11,13 +11,13 @@ import net.minecraft.world.inventory.ResultSlot; import net.minecraft.world.item.ItemStack; -public class CraftingGridResultSlot extends ResultSlot { +class CraftingGridResultSlot extends ResultSlot { private final CraftingGridSource source; - public CraftingGridResultSlot(final Player player, - final CraftingGridSource source, - final int x, - final int y) { + CraftingGridResultSlot(final Player player, + final CraftingGridSource source, + final int x, + final int y) { super(player, source.getCraftingMatrix(), source.getCraftingResult(), 0, x, y); this.source = source; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java index ce82ffa5d..f98f16e78 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingGridSourceImpl.java @@ -103,7 +103,7 @@ public void transferRecipe(final Player player, final List> r private void doTransferRecipe(final int index, final List sortedPossibilities, final Player player) { for (final ItemResource possibility : sortedPossibilities) { - boolean extracted = blockEntity.extract(possibility, 1, player) == 1; + boolean extracted = blockEntity.extract(possibility, player) == 1; if (!extracted) { extracted = extractFromPlayerInventory(player, possibility); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java index 8302bb3ef..c314072f2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/CraftingMatrix.java @@ -13,7 +13,7 @@ public CraftingMatrix(@Nullable final Runnable listener) { this.listener = listener; } - public void changed() { + void changed() { if (listener != null) { listener.run(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java index 5112a79c4..e2d5eb918 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridContainerMenu.java @@ -16,7 +16,7 @@ public GridContainerMenu(final int syncId, final Inventory playerInventory, fina registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); } - public GridContainerMenu(final int syncId, final Inventory playerInventory, final GridBlockEntity grid) { + GridContainerMenu(final int syncId, final Inventory playerInventory, final GridBlockEntity grid) { super(Menus.INSTANCE.getGrid(), syncId, playerInventory, grid); addSlots(0); registerProperty(new ServerProperty<>( diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSearchBox.java similarity index 77% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSearchBox.java index f0462f29f..b056cd3be 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBox.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/GridSearchBox.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.common.grid.screen; +package com.refinedmods.refinedstorage2.platform.common.grid; import java.util.function.Consumer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java index 0ab2dad74..7ecfa7dfa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/WirelessGridContainerMenu.java @@ -15,10 +15,10 @@ public WirelessGridContainerMenu(final int syncId, final Inventory playerInvento addSlots(0); } - public WirelessGridContainerMenu(final int syncId, - final Inventory playerInventory, - final Grid grid, - final SlotReference slotReference) { + WirelessGridContainerMenu(final int syncId, + final Inventory playerInventory, + final Grid grid, + final SlotReference slotReference) { super(Menus.INSTANCE.getWirelessGrid(), syncId, playerInventory, grid); this.disabledSlot = slotReference; addSlots(0); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java index 1e49eda87..1a7cdb2de 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/AbstractGridScreen.java @@ -61,7 +61,7 @@ public abstract class AbstractGridScreen ex protected final int bottomHeight; @Nullable - protected GridSearchBoxWidget searchField; + GridSearchBoxWidget searchField; @Nullable private ScrollbarWidget scrollbar; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java index e5ef60dfc..247831d43 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/CraftingGridScreen.java @@ -3,7 +3,6 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.KeyMappings; import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridResultSlot; import javax.annotation.Nullable; @@ -16,6 +15,7 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.inventory.Slot; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; @@ -75,7 +75,8 @@ private void renderCraftingMatrixFilteringHighlight(final GuiGraphics graphics, @Override protected void containerTick() { super.containerTick(); - final boolean mayFilterOnCraftingMatrixItems = hoveredSlot instanceof CraftingGridResultSlot + final boolean mayFilterOnCraftingMatrixItems = hoveredSlot != null + && hoveredSlot.container instanceof ResultContainer && hasShiftDown() && hasControlDown(); if (mayFilterOnCraftingMatrixItems && !filteringBasedOnCraftingMatrixItems) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java index 4be049973..2cc65805c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/GridSearchBoxWidget.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.grid.screen; +import com.refinedmods.refinedstorage2.platform.common.grid.GridSearchBox; import com.refinedmods.refinedstorage2.platform.common.support.widget.History; import com.refinedmods.refinedstorage2.platform.common.support.widget.SearchFieldWidget; import com.refinedmods.refinedstorage2.query.lexer.Lexer; @@ -20,16 +21,16 @@ import net.minecraft.network.chat.Style; import net.minecraft.util.FormattedCharSequence; -public class GridSearchBoxWidget extends SearchFieldWidget implements GridSearchBox { +class GridSearchBoxWidget extends SearchFieldWidget implements GridSearchBox { private final Set> listeners = new HashSet<>(); private boolean valid = true; - public GridSearchBoxWidget(final Font textRenderer, - final int x, - final int y, - final int width, - final SyntaxHighlighter syntaxHighlighter, - final History history) { + GridSearchBoxWidget(final Font textRenderer, + final int x, + final int y, + final int width, + final SyntaxHighlighter syntaxHighlighter, + final History history) { super(textRenderer, x, y, width, history); setFormatter((text, firstCharacterIndex) -> format(syntaxHighlighter, text)); setResponder(text -> listeners.forEach(l -> l.accept(text))); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java index ef5f8f323..98606646e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/ExportedResourcesContainer.java @@ -18,7 +18,7 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; -class ExportedResourcesContainer extends ResourceContainerImpl implements InterfaceExportState { +public class ExportedResourcesContainer extends ResourceContainerImpl implements InterfaceExportState { private final FilterWithFuzzyMode filter; ExportedResourcesContainer(final int size, final FilterWithFuzzyMode filter) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java index a4a8178cd..e171acba6 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceBlockEntity.java @@ -81,7 +81,7 @@ private InterfaceExternalStorageProviderImpl createExternalStorageProvide ); } - public static ResourceContainer createFilterContainer() { + static ResourceContainer createFilterContainer() { return new ResourceContainerImpl( EXPORT_SLOTS, ResourceContainerType.FILTER_WITH_AMOUNT, @@ -91,7 +91,7 @@ public static ResourceContainer createFilterContainer() { ); } - public static ExportedResourcesContainer createExportedResourcesContainer(final FilterWithFuzzyMode filter) { + static ExportedResourcesContainer createExportedResourcesContainer(final FilterWithFuzzyMode filter) { return new ExportedResourcesContainer(EXPORT_SLOTS, filter); } @@ -128,11 +128,11 @@ public void readConfiguration(final CompoundTag tag) { filter.load(tag); } - public boolean isFuzzyMode() { + boolean isFuzzyMode() { return filter.isFuzzyMode(); } - public void setFuzzyMode(final boolean fuzzyMode) { + void setFuzzyMode(final boolean fuzzyMode) { filter.setFuzzyMode(fuzzyMode); } @@ -178,9 +178,7 @@ public NonNullList getDrops() { } @SuppressWarnings("unchecked") - public InterfaceExternalStorageProvider getExternalStorageProvider( - final StorageChannelType storageChannelType - ) { + InterfaceExternalStorageProvider getExternalStorageProvider(final StorageChannelType storageChannelType) { return (InterfaceExternalStorageProvider) externalStorageProviders.get(storageChannelType); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java index 481cb023e..5a7250740 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/iface/InterfaceContainerMenu.java @@ -24,12 +24,12 @@ public class InterfaceContainerMenu extends AbstractResourceContainerMenu { private static final int EXPORT_CONFIG_SLOT_Y = 20; private static final int EXPORT_OUTPUT_SLOT_Y = 66; - public InterfaceContainerMenu(final int syncId, - final Player player, - final InterfaceBlockEntity blockEntity, - final ResourceContainer exportConfig, - final ResourceContainer exportedResources, - final Container exportedResourcesAsContainer) { + InterfaceContainerMenu(final int syncId, + final Player player, + final InterfaceBlockEntity blockEntity, + final ResourceContainer exportConfig, + final ResourceContainer exportedResources, + final Container exportedResourcesAsContainer) { super(Menus.INSTANCE.getInterface(), syncId, player); addSlots(player, exportConfig, exportedResources, exportedResourcesAsContainer); registerProperty(new ServerProperty<>( diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java index e058971e8..f7a4f16ad 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java @@ -96,19 +96,19 @@ public void readConfiguration(final CompoundTag tag) { filter.load(tag); } - public boolean isFuzzyMode() { + boolean isFuzzyMode() { return filter.isFuzzyMode(); } - public void setFuzzyMode(final boolean fuzzyMode) { + void setFuzzyMode(final boolean fuzzyMode) { filter.setFuzzyMode(fuzzyMode); } - public FilterMode getFilterMode() { + FilterMode getFilterMode() { return getNode().getFilterMode(); } - public void setFilterMode(final FilterMode mode) { + void setFilterMode(final FilterMode mode) { getNode().setFilterMode(mode); setChanged(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java index 8dace9a94..dbe7f9abc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterContainerMenu.java @@ -32,11 +32,11 @@ public ImporterContainerMenu(final int syncId, final Inventory playerInventory, ); } - public ImporterContainerMenu(final int syncId, - final Player player, - final ImporterBlockEntity importer, - final ResourceContainer resourceContainer, - final UpgradeContainer upgradeContainer) { + ImporterContainerMenu(final int syncId, + final Player player, + final ImporterBlockEntity importer, + final ResourceContainer resourceContainer, + final UpgradeContainer upgradeContainer) { super( Menus.INSTANCE.getImporter(), syncId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java index ae97516bd..e4833d59b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java @@ -111,7 +111,7 @@ public Optional getTooltipImage(final ItemStack stack) { return Optional.of(new HelpTooltipComponent(isActive(stack) ? BOUND_HELP : UNBOUND_HELP)); } - public boolean isActive(final ItemStack stack) { + boolean isActive(final ItemStack stack) { return stack.getTag() != null && stack.getTag().contains(TAG_POS) && stack.getTag().contains(TAG_DIMENSION); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java index e6950e8c3..b453684b8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/AbstractStorageContainerMenu.java @@ -53,7 +53,7 @@ protected AbstractStorageContainerMenu(final MenuType type, )); } - public boolean shouldDisplayFilterModeWarning() { + boolean shouldDisplayFilterModeWarning() { return getProperty(PropertyTypes.FILTER_MODE).getValue() == FilterMode.ALLOW && areAllResourceSlotsEmpty(); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java index 13fe5a0c2..33594de43 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/PlatformStorage.java @@ -30,7 +30,7 @@ class PlatformStorage extends AbstractProxyStorage implements Serializable this.listener = listener; } - public void load(final T resource, final long amount, @Nullable final String changedBy, final long changedAt) { + void load(final T resource, final long amount, @Nullable final String changedBy, final long changedAt) { super.insert(resource, amount, Action.EXECUTE, EmptyActor.INSTANCE); if (changedBy != null && !changedBy.isBlank()) { trackingRepository.update(resource, new PlayerActor(changedBy), changedAt); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index 4ce31a0b5..d8a8ad0e5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -92,7 +92,7 @@ public static boolean hasDisk(final CompoundTag tag, final int slot) { && ContainerUtil.hasItemInSlot(tag.getCompound(TAG_DISK_INVENTORY), slot); } - public void updateDiskStateIfNecessaryInLevel() { + void updateDiskStateIfNecessaryInLevel() { if (!syncRequested) { return; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java index fa170ad51..077ef877a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveContainerMenu.java @@ -50,12 +50,12 @@ public DiskDriveContainerMenu(final int syncId, final Inventory playerInventory, initializeResourceSlots(buf); } - public DiskDriveContainerMenu(final int syncId, - final Player player, - final SimpleContainer diskInventory, - final ResourceContainer resourceContainer, - final StorageConfigurationContainer configContainer, - final StorageDiskInfoAccessor storageInfoAccessor) { + DiskDriveContainerMenu(final int syncId, + final Player player, + final SimpleContainer diskInventory, + final ResourceContainer resourceContainer, + final StorageConfigurationContainer configContainer, + final StorageDiskInfoAccessor storageInfoAccessor) { super(Menus.INSTANCE.getDiskDrive(), syncId, player, configContainer); this.storageInfoAccessor = storageInfoAccessor; addSlots(player, diskInventory, resourceContainer); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java index e92a26296..69903ed5b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/DiskDriveInventory.java @@ -21,7 +21,7 @@ class DiskDriveInventory extends SimpleContainer implements MultiStorageProvider this.diskDrive = diskDrive; } - public void setStorageRepository(@Nullable final StorageRepository storageRepository) { + void setStorageRepository(@Nullable final StorageRepository storageRepository) { this.storageRepository = storageRepository; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java index 54a2ab746..bebb0d294 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java @@ -94,7 +94,7 @@ protected void activenessChanged(final BlockState state, } } - public void loadStorage(final ServerLevel serverLevel) { + void loadStorage(final ServerLevel serverLevel) { final Direction direction = getDirection(); LOGGER.debug("Loading storage for external storage with direction {} @ {}", direction, worldPosition); if (direction == null) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java index cd07f880c..c7ae28af0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageContainerMenu.java @@ -24,10 +24,10 @@ public ExternalStorageContainerMenu(final int syncId, final Inventory playerInve initializeResourceSlots(buf); } - public ExternalStorageContainerMenu(final int syncId, - final Player player, - final ResourceContainer resourceContainer, - final StorageConfigurationContainer configContainer) { + ExternalStorageContainerMenu(final int syncId, + final Player player, + final ResourceContainer resourceContainer, + final StorageConfigurationContainer configContainer) { super(Menus.INSTANCE.getExternalStorage(), syncId, player, configContainer); addSlots(player, resourceContainer); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java index 23cb50b17..9f1f636e3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageWorkRate.java @@ -14,11 +14,11 @@ class ExternalStorageWorkRate { private int idx = 2; // medium private final RateLimiter rateLimiter = RateLimiter.create(RATE_LIMITERS[idx]); - public boolean canDoWork() { + boolean canDoWork() { return rateLimiter.tryAcquire(); } - public void faster() { + void faster() { if (idx + 1 >= RATE_LIMITERS.length) { return; } @@ -26,7 +26,7 @@ public void faster() { updateRate(); } - public void slower() { + void slower() { if (idx - 1 < 0) { return; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java index 32544b061..096ef383c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java @@ -90,7 +90,7 @@ public void setLevel(final Level level) { } } - public void modifyStorageIdAfterAlreadyInitialized(final UUID actualStorageId) { + void modifyStorageIdAfterAlreadyInitialized(final UUID actualStorageId) { LOGGER.debug( "Storage {} got placed through nbt, replacing with actual storage {}", storageId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java index ed6d7eaf4..038e67fe0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockContainerMenu.java @@ -22,10 +22,10 @@ public FluidStorageBlockContainerMenu(final int syncId, ); } - public FluidStorageBlockContainerMenu(final int syncId, - final Player player, - final ResourceContainer resourceContainer, - final StorageConfigurationContainer configContainer) { + FluidStorageBlockContainerMenu(final int syncId, + final Player player, + final ResourceContainer resourceContainer, + final StorageConfigurationContainer configContainer) { super(Menus.INSTANCE.getFluidStorage(), syncId, player, resourceContainer, configContainer); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java index c8279811c..47f29c553 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/ItemStorageBlockContainerMenu.java @@ -20,10 +20,10 @@ public ItemStorageBlockContainerMenu(final int syncId, final Inventory playerInv ); } - public ItemStorageBlockContainerMenu(final int syncId, - final Player player, - final ResourceContainer resourceContainer, - final StorageConfigurationContainer configContainer) { + ItemStorageBlockContainerMenu(final int syncId, + final Player player, + final ResourceContainer resourceContainer, + final StorageConfigurationContainer configContainer) { super(Menus.INSTANCE.getItemStorage(), syncId, player, resourceContainer, configContainer); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java index 8ab0040c7..e1f28e007 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java @@ -51,7 +51,7 @@ public class StorageMonitorBlockEntity extends AbstractRedstoneModeNetworkNodeCo private final FilterWithFuzzyMode filter; private final RateLimiter displayUpdateRateLimiter = RateLimiter.create(0.25); - private final InsertTracker insertTracker = new InsertTracker(); + private final StorageMonitorInsertTracker insertTracker = new StorageMonitorInsertTracker(); private long currentAmount; private boolean currentlyActive; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java index d7e8835eb..356db7d23 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorContainerMenu.java @@ -28,10 +28,10 @@ public StorageMonitorContainerMenu(final int syncId, final Inventory playerInven initializeResourceSlots(buf); } - public StorageMonitorContainerMenu(final int syncId, - final Player player, - final StorageMonitorBlockEntity storageMonitor, - final ResourceContainer resourceContainer) { + StorageMonitorContainerMenu(final int syncId, + final Player player, + final StorageMonitorBlockEntity storageMonitor, + final ResourceContainer resourceContainer) { super(Menus.INSTANCE.getStorageMonitor(), syncId, player); registerProperty(new ServerProperty<>( PropertyTypes.FUZZY_MODE, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorInsertTracker.java similarity index 83% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorInsertTracker.java index 43c617870..61deefca7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/InsertTracker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorInsertTracker.java @@ -10,16 +10,16 @@ import com.mojang.authlib.GameProfile; import net.minecraft.world.item.ItemStack; -class InsertTracker { +class StorageMonitorInsertTracker { private static final long MAX_DELAY = 500; private final Map entries = new HashMap<>(); - public void trackInsertedItem(final GameProfile gameProfile, final ItemStack stack) { + void trackInsertedItem(final GameProfile gameProfile, final ItemStack stack) { entries.put(gameProfile.getId(), new Entry(System.currentTimeMillis(), ItemResource.ofItemStack(stack))); } - public Optional getLastInsertedItem(final GameProfile gameProfile) { + Optional getLastInsertedItem(final GameProfile gameProfile) { final Entry entry = entries.get(gameProfile.getId()); if (entry == null) { return Optional.empty(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java index eafb336d8..076b4f039 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/RegulatorUpgradeContainerMenu.java @@ -25,11 +25,11 @@ public RegulatorUpgradeContainerMenu(final int syncId, final Inventory playerInv super(Menus.INSTANCE.getRegulatorUpgrade(), syncId, playerInventory, buf, FILTER_HELP); } - public RegulatorUpgradeContainerMenu(final int syncId, - final Player player, - final ResourceContainer resourceContainer, - final Consumer amountAcceptor, - final SlotReference slotReference) { + RegulatorUpgradeContainerMenu(final int syncId, + final Player player, + final ResourceContainer resourceContainer, + final Consumer amountAcceptor, + final SlotReference slotReference) { super( Menus.INSTANCE.getRegulatorUpgrade(), syncId, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java index 1a8779bd5..4d0af11d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeWithEnchantedBookRecipe.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; -class UpgradeWithEnchantedBookRecipe extends ShapedRecipe { +public class UpgradeWithEnchantedBookRecipe extends ShapedRecipe { private final EnchantmentInstance enchantment; private final ItemStack theResult; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java index 65da9b06f..085a57029 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -81,7 +81,7 @@ public AbstractContainerMenu createMenu(final int syncId, final Inventory invent return new WirelessTransmitterContainerMenu(syncId, inventory, this, upgradeContainer); } - public int getRange() { + int getRange() { return PlatformApi.INSTANCE.getWirelessTransmitterRangeModifier().modifyRange(upgradeContainer, 0); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java index 08520712a..11f05aadb 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterContainerMenu.java @@ -42,10 +42,10 @@ public WirelessTransmitterContainerMenu(final int syncId, this.player = playerInventory.player; } - public WirelessTransmitterContainerMenu(final int syncId, - final Inventory playerInventory, - final WirelessTransmitterBlockEntity wirelessTransmitter, - final UpgradeContainer upgradeContainer) { + WirelessTransmitterContainerMenu(final int syncId, + final Inventory playerInventory, + final WirelessTransmitterBlockEntity wirelessTransmitter, + final UpgradeContainer upgradeContainer) { super(Menus.INSTANCE.getWirelessTransmitter(), syncId); addSlots(playerInventory, upgradeContainer); registerProperty(new ServerProperty<>( @@ -83,7 +83,7 @@ public void broadcastChanges() { } } - public int getRange() { + int getRange() { return range; } From e3c4298d316a70dffd49480085f66541d3f207e1 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 13:16:28 +0100 Subject: [PATCH 12/24] refactor: move fluid amount formatting to FluidResourceRendering --- .../common/AbstractModInitializer.java | 4 - .../platform/common/AbstractPlatform.java | 9 - .../platform/common/Platform.java | 3 - .../platform/common/PlatformProxy.java | 13 +- .../screen/hint/FluidGridInsertionHint.java | 3 +- .../common/grid/view/FluidGridResource.java | 5 +- .../FluidStorageBlockBlockItem.java | 4 +- .../storageblock/FluidStorageBlockScreen.java | 4 +- .../storagedisk/FluidStorageDiskItem.java | 4 +- .../resource/FluidResourceRendering.java | 31 ++- .../common/util/BucketAmountFormatting.java | 38 ---- .../platform/common/TestPlatform.java | 208 ++++++++++++++++++ .../resource/FluidResourceRenderingTest.java | 47 ++++ .../util/BucketAmountFormattingTest.java | 40 ---- .../platform/fabric/ModInitializerImpl.java | 3 +- .../platform/fabric/PlatformImpl.java | 2 - .../platform/forge/ModInitializer.java | 3 +- .../platform/forge/PlatformImpl.java | 2 - 18 files changed, 303 insertions(+), 120 deletions(-) delete mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java create mode 100644 refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/TestPlatform.java create mode 100644 refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRenderingTest.java delete mode 100644 refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index da1937bff..4ba7fda02 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -155,10 +155,6 @@ public abstract class AbstractModInitializer { private static final String FLUID_REGISTRY_KEY = "fluid"; - protected final void initializePlatform(final Platform platform) { - ((PlatformProxy) Platform.INSTANCE).setPlatform(platform); - } - protected final void initializePlatformApi() { ((PlatformApiProxy) PlatformApi.INSTANCE).setDelegate(new PlatformApiImpl()); registerAdditionalStorageTypes(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java index 4a29e60cf..6f84b85a8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractPlatform.java @@ -5,26 +5,22 @@ import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; public abstract class AbstractPlatform implements Platform { private final ServerToClientCommunications serverToClientCommunications; private final ClientToServerCommunications clientToServerCommunications; private final MenuOpener menuOpener; - private final BucketAmountFormatting bucketAmountFormatting; private final FluidRenderer fluidRenderer; private final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory; protected AbstractPlatform(final ServerToClientCommunications serverToClientCommunications, final ClientToServerCommunications clientToServerCommunications, final MenuOpener menuOpener, - final BucketAmountFormatting bucketAmountFormatting, final FluidRenderer fluidRenderer, final GridInsertionStrategyFactory defaultGridInsertionStrategyFactory) { this.serverToClientCommunications = serverToClientCommunications; this.clientToServerCommunications = clientToServerCommunications; this.menuOpener = menuOpener; - this.bucketAmountFormatting = bucketAmountFormatting; this.fluidRenderer = fluidRenderer; this.defaultGridInsertionStrategyFactory = defaultGridInsertionStrategyFactory; } @@ -44,11 +40,6 @@ public MenuOpener getMenuOpener() { return menuOpener; } - @Override - public BucketAmountFormatting getBucketAmountFormatter() { - return bucketAmountFormatting; - } - @Override public FluidRenderer getFluidRenderer() { return fluidRenderer; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java index 63efa0135..3e332eae3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Platform.java @@ -12,7 +12,6 @@ import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.List; import java.util.Optional; @@ -58,8 +57,6 @@ public interface Platform { TagKey getWrenchTag(); - BucketAmountFormatting getBucketAmountFormatter(); - Config getConfig(); boolean canEditBoxLoseFocus(EditBox editBox); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java index a3ee1bd32..e70c7e17f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformProxy.java @@ -11,7 +11,6 @@ import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; -import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import java.util.List; import java.util.Optional; @@ -48,11 +47,12 @@ public class PlatformProxy implements Platform { @Nullable private Platform platform; - public void setPlatform(final Platform platform) { - if (this.platform != null) { + public static void loadPlatform(final Platform platform) { + final PlatformProxy proxy = (PlatformProxy) Platform.INSTANCE; + if (proxy.platform != null) { throw new IllegalStateException("Platform already set"); } - this.platform = platform; + proxy.platform = platform; } @Override @@ -80,11 +80,6 @@ public TagKey getWrenchTag() { return ensureLoaded().getWrenchTag(); } - @Override - public BucketAmountFormatting getBucketAmountFormatter() { - return ensureLoaded().getBucketAmountFormatter(); - } - @Override public Config getConfig() { return ensureLoaded().getConfig(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java index c679eb6c2..df3771a15 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/screen/hint/FluidGridInsertionHint.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.GridInsertionHint; import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.Optional; @@ -26,7 +27,7 @@ private MouseWithIconClientTooltipComponent createComponent(final Platform.Conta ), result.fluid().getAmount() == Platform.INSTANCE.getBucketAmount() ? null - : Platform.INSTANCE.getBucketAmountFormatter().format(result.fluid().getAmount()) + : FluidResourceRendering.format(result.fluid().getAmount()) ); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java index 05afa5db5..5d9be6361 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/view/FluidGridResource.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; import com.refinedmods.refinedstorage2.platform.common.support.tooltip.MouseWithIconClientTooltipComponent; import java.util.List; @@ -84,12 +85,12 @@ public void render(final GuiGraphics graphics, final int x, final int y) { @Override public String getDisplayedAmount() { - return Platform.INSTANCE.getBucketAmountFormatter().formatWithUnits(getAmount()); + return FluidResourceRendering.formatWithUnits(getAmount()); } @Override public String getAmountInTooltip() { - return Platform.INSTANCE.getBucketAmountFormatter().format(getAmount()); + return FluidResourceRendering.format(getAmount()); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java index 8a08599da..d90c54575 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockBlockItem.java @@ -2,10 +2,10 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerBlockItem; -import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; import java.util.UUID; import javax.annotation.Nullable; @@ -39,7 +39,7 @@ protected boolean hasCapacity() { @Override protected String formatAmount(final long amount) { - return Platform.INSTANCE.getBucketAmountFormatter().format(amount); + return FluidResourceRendering.format(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java index 24306c3b6..0b8cd277a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/FluidStorageBlockScreen.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage2.platform.common.storage.storageblock; -import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; @@ -14,6 +14,6 @@ public FluidStorageBlockScreen(final AbstractStorageBlockContainerMenu menu, @Override protected String formatQuantity(final long qty) { - return Platform.INSTANCE.getBucketAmountFormatter().format(qty); + return FluidResourceRendering.format(qty); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java index 4c752ee4c..c385d496a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storagedisk/FluidStorageDiskItem.java @@ -5,11 +5,11 @@ import com.refinedmods.refinedstorage2.platform.api.storage.AbstractStorageContainerItem; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResourceRendering; import javax.annotation.Nullable; @@ -35,7 +35,7 @@ protected boolean hasCapacity() { @Override protected String formatAmount(final long amount) { - return Platform.INSTANCE.getBucketAmountFormatter().format(amount); + return FluidResourceRendering.format(amount); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java index 7f31167d8..d9df74755 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRendering.java @@ -1,10 +1,14 @@ package com.refinedmods.refinedstorage2.platform.common.support.resource; +import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage2.platform.common.Platform; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.util.List; +import java.util.Locale; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiGraphics; @@ -13,12 +17,17 @@ import net.minecraft.world.level.Level; public class FluidResourceRendering implements ResourceRendering { + private static final DecimalFormat LESS_THAN_1_BUCKET_FORMATTER = + new DecimalFormat("0.#", DecimalFormatSymbols.getInstance(Locale.US)); + private static final DecimalFormat FORMATTER = + new DecimalFormat("#,###.#", DecimalFormatSymbols.getInstance(Locale.US)); + @Override public String getDisplayedAmount(final long amount, final boolean withUnits) { if (!withUnits) { - return Platform.INSTANCE.getBucketAmountFormatter().format(amount); + return format(amount); } - return Platform.INSTANCE.getBucketAmountFormatter().formatWithUnits(amount); + return formatWithUnits(amount); } @Override @@ -44,4 +53,22 @@ public void render(final FluidResource resource, final Level level) { Platform.INSTANCE.getFluidRenderer().render(poseStack, renderTypeBuffer, light, resource); } + + public static String formatWithUnits(final long droplets) { + final double buckets = convertToBuckets(droplets); + if (buckets >= 1) { + return AmountFormatting.formatWithUnits((long) Math.floor(buckets)); + } else { + return LESS_THAN_1_BUCKET_FORMATTER.format(buckets); + } + } + + public static String format(final long droplets) { + final double buckets = convertToBuckets(droplets); + return FORMATTER.format(buckets); + } + + private static double convertToBuckets(final long droplets) { + return droplets / (double) Platform.INSTANCE.getBucketAmount(); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java deleted file mode 100644 index c5164fbd7..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormatting.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.util; - -import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.Locale; - -public final class BucketAmountFormatting { - private static final DecimalFormat LESS_THAN_1_BUCKET_FORMATTER = - new DecimalFormat("0.#", DecimalFormatSymbols.getInstance(Locale.US)); - private static final DecimalFormat FORMATTER = - new DecimalFormat("#,###.#", DecimalFormatSymbols.getInstance(Locale.US)); - - private final long bucketAmount; - - public BucketAmountFormatting(final long bucketAmount) { - this.bucketAmount = bucketAmount; - } - - public String formatWithUnits(final long droplets) { - final double buckets = convertToBuckets(droplets); - if (buckets >= 1) { - return AmountFormatting.formatWithUnits((long) Math.floor(buckets)); - } else { - return LESS_THAN_1_BUCKET_FORMATTER.format(buckets); - } - } - - public String format(final long droplets) { - final double buckets = convertToBuckets(droplets); - return FORMATTER.format(buckets); - } - - private double convertToBuckets(final long droplets) { - return droplets / (double) bucketAmount; - } -} diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/TestPlatform.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/TestPlatform.java new file mode 100644 index 000000000..cde1aed42 --- /dev/null +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/TestPlatform.java @@ -0,0 +1,208 @@ +package com.refinedmods.refinedstorage2.platform.common; + +import com.refinedmods.refinedstorage2.api.core.Action; +import com.refinedmods.refinedstorage2.api.grid.view.GridResourceFactory; +import com.refinedmods.refinedstorage2.api.network.energy.EnergyStorage; +import com.refinedmods.refinedstorage2.platform.api.grid.strategy.GridInsertionStrategyFactory; +import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; +import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; +import com.refinedmods.refinedstorage2.platform.common.support.ClientToServerCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.MenuOpener; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; +import com.refinedmods.refinedstorage2.platform.common.support.render.FluidRenderer; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.client.KeyMapping; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.CraftingContainer; +import net.minecraft.world.inventory.tooltip.TooltipComponent; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; + +public class TestPlatform implements Platform { + private final long bucketAmount; + + public TestPlatform(final long bucketAmount) { + this.bucketAmount = bucketAmount; + } + + @Override + public ServerToClientCommunications getServerToClientCommunications() { + throw new UnsupportedOperationException(); + } + + @Override + public ClientToServerCommunications getClientToServerCommunications() { + throw new UnsupportedOperationException(); + } + + @Override + public MenuOpener getMenuOpener() { + throw new UnsupportedOperationException(); + } + + @Override + public long getBucketAmount() { + return bucketAmount; + } + + @Override + public TagKey getWrenchTag() { + throw new UnsupportedOperationException(); + } + + @Override + public Config getConfig() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean canEditBoxLoseFocus(final EditBox editBox) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isKeyDown(final KeyMapping keyMapping) { + throw new UnsupportedOperationException(); + } + + @Override + public GridResourceFactory getItemGridResourceFactory() { + throw new UnsupportedOperationException(); + } + + @Override + public GridResourceFactory getFluidGridResourceFactory() { + throw new UnsupportedOperationException(); + } + + @Override + public GridInsertionStrategyFactory getDefaultGridInsertionStrategyFactory() { + throw new UnsupportedOperationException(); + } + + @Override + public FluidRenderer getFluidRenderer() { + throw new UnsupportedOperationException(); + } + + @Override + public Optional getContainedFluid(final ItemStack stack) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional convertJeiIngredientToFluid(final Object ingredient) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional convertToBucket(final FluidResource fluidResource) { + throw new UnsupportedOperationException(); + } + + @Override + public TransferManager createTransferManager(final AbstractContainerMenu containerMenu) { + throw new UnsupportedOperationException(); + } + + @Override + public long insertIntoContainer(final Container container, final ItemResource itemResource, final long amount, + final Action action) { + throw new UnsupportedOperationException(); + } + + @Override + public ItemStack getCloneItemStack(final BlockState state, final Level level, final BlockHitResult hitResult, + final Player player) { + throw new UnsupportedOperationException(); + } + + @Override + public NonNullList getRemainingCraftingItems(final Player player, final CraftingRecipe craftingRecipe, + final CraftingContainer container) { + throw new UnsupportedOperationException(); + } + + @Override + public void onItemCrafted(final Player player, final ItemStack craftedStack, final CraftingContainer container) { + throw new UnsupportedOperationException(); + } + + @Override + public Player getFakePlayer(final ServerLevel level, @Nullable final UUID playerId) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean canBreakBlock(final Level level, final BlockPos pos, final BlockState state, final Player player) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean placeBlock(final Level level, final BlockPos pos, final Direction direction, final Player player, + final ItemStack stack) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean placeFluid(final Level level, final BlockPos pos, final Direction direction, final Player player, + final FluidResource fluidResource) { + throw new UnsupportedOperationException(); + } + + @Override + public ItemStack getBlockAsItemStack(final Block block, final BlockState state, final Direction direction, + final BlockGetter level, + final BlockPos pos, final Player player) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional getBucketPickupSound(final LiquidBlock liquidBlock, final BlockState state) { + throw new UnsupportedOperationException(); + } + + @Override + public List processTooltipComponents(final ItemStack stack, final GuiGraphics graphics, + final int mouseX, + final Optional imageComponent, + final List components) { + throw new UnsupportedOperationException(); + } + + @Override + public void renderTooltip(final GuiGraphics graphics, final List components, final int x, + final int y) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional getEnergyStorage(final ItemStack stack) { + throw new UnsupportedOperationException(); + } +} diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRenderingTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRenderingTest.java new file mode 100644 index 000000000..20b210dd4 --- /dev/null +++ b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/support/resource/FluidResourceRenderingTest.java @@ -0,0 +1,47 @@ +package com.refinedmods.refinedstorage2.platform.common.support.resource; + +import com.refinedmods.refinedstorage2.platform.common.PlatformProxy; +import com.refinedmods.refinedstorage2.platform.common.TestPlatform; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class FluidResourceRenderingTest { + private static final long BUCKET_AMOUNT = 1000; + + @BeforeAll + static void setUp() { + PlatformProxy.loadPlatform(new TestPlatform(BUCKET_AMOUNT)); + } + + @Test + void shouldFormatWithUnitsForCompleteBuckets() { + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT)).isEqualTo("1"); + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT * 2)).isEqualTo("2"); + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT * 3)).isEqualTo("3"); + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT * 1000)).isEqualTo("1K"); + } + + @Test + void shouldFormatWithUnitsForPartialBuckets() { + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT + (BUCKET_AMOUNT / 2))).isEqualTo("1"); + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT + 1)).isEqualTo("1"); + } + + @Test + void shouldFormatWithUnitsForLessThan1Bucket() { + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT / 2)).isEqualTo("0.5"); + assertThat(FluidResourceRendering.formatWithUnits(BUCKET_AMOUNT / 3)).isEqualTo("0.3"); + } + + @Test + void shouldFormatWithoutUnits() { + assertThat(FluidResourceRendering.format(BUCKET_AMOUNT)).isEqualTo("1"); + assertThat(FluidResourceRendering.format(BUCKET_AMOUNT + (BUCKET_AMOUNT / 2))).isEqualTo("1.5"); + assertThat(FluidResourceRendering.format(BUCKET_AMOUNT + (BUCKET_AMOUNT / 3))).isEqualTo("1.3"); + assertThat(FluidResourceRendering.format(BUCKET_AMOUNT * 1000)).isEqualTo("1,000"); + assertThat(FluidResourceRendering.format((BUCKET_AMOUNT * 1000) + (BUCKET_AMOUNT / 3))).isEqualTo("1,000.3"); + } +} diff --git a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java b/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java deleted file mode 100644 index ce3321df0..000000000 --- a/refinedstorage2-platform-common/src/test/java/com/refinedmods/refinedstorage2/platform/common/util/BucketAmountFormattingTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.util; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; - -class BucketAmountFormattingTest { - private static final long BUCKET_AMOUNT = 1000; - - private final BucketAmountFormatting sut = new BucketAmountFormatting(BUCKET_AMOUNT); - - @Test - void shouldFormatWithUnitsForCompleteBuckets() { - assertThat(sut.formatWithUnits(BUCKET_AMOUNT)).isEqualTo("1"); - assertThat(sut.formatWithUnits(BUCKET_AMOUNT * 2)).isEqualTo("2"); - assertThat(sut.formatWithUnits(BUCKET_AMOUNT * 3)).isEqualTo("3"); - assertThat(sut.formatWithUnits(BUCKET_AMOUNT * 1000)).isEqualTo("1K"); - } - - @Test - void shouldFormatWithUnitsForPartialBuckets() { - assertThat(sut.formatWithUnits(BUCKET_AMOUNT + (BUCKET_AMOUNT / 2))).isEqualTo("1"); - assertThat(sut.formatWithUnits(BUCKET_AMOUNT + 1)).isEqualTo("1"); - } - - @Test - void shouldFormatWithUnitsForLessThan1Bucket() { - assertThat(sut.formatWithUnits(BUCKET_AMOUNT / 2)).isEqualTo("0.5"); - assertThat(sut.formatWithUnits(BUCKET_AMOUNT / 3)).isEqualTo("0.3"); - } - - @Test - void shouldFormatWithoutUnits() { - assertThat(sut.format(BUCKET_AMOUNT)).isEqualTo("1"); - assertThat(sut.format(BUCKET_AMOUNT + (BUCKET_AMOUNT / 2))).isEqualTo("1.5"); - assertThat(sut.format(BUCKET_AMOUNT + (BUCKET_AMOUNT / 3))).isEqualTo("1.3"); - assertThat(sut.format(BUCKET_AMOUNT * 1000)).isEqualTo("1,000"); - assertThat(sut.format((BUCKET_AMOUNT * 1000) + (BUCKET_AMOUNT / 3))).isEqualTo("1,000.3"); - } -} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index 871e00be9..cc79f2e83 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -6,6 +6,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.resource.FluidResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.AbstractModInitializer; +import com.refinedmods.refinedstorage2.platform.common.PlatformProxy; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntityTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; @@ -99,7 +100,7 @@ public class ModInitializerImpl extends AbstractModInitializer implements ModIni public void onInitialize() { AutoConfig.register(ConfigImpl.class, Toml4jConfigSerializer::new); - initializePlatform(new PlatformImpl()); + PlatformProxy.loadPlatform(new PlatformImpl()); initializePlatformApi(); registerAdditionalGridInsertionStrategyFactories(); registerGridExtractionStrategyFactories(); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java index 346c2dfba..b366bcfb3 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/PlatformImpl.java @@ -9,7 +9,6 @@ import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.fabric.grid.view.FabricFluidGridResourceFactory; @@ -102,7 +101,6 @@ public PlatformImpl() { new ServerToClientCommunicationsImpl(), new ClientToServerCommunicationsImpl(), new MenuOpenerImpl(), - new BucketAmountFormatting(FluidConstants.BUCKET), new FluidVariantFluidRenderer(), ItemGridInsertionStrategy::new ); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index c37d3f532..9dd66a1f4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyBlockEntity; import com.refinedmods.refinedstorage2.platform.api.support.energy.EnergyItem; import com.refinedmods.refinedstorage2.platform.common.AbstractModInitializer; +import com.refinedmods.refinedstorage2.platform.common.PlatformProxy; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntityTypeFactory; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.CreativeModeTabItems; @@ -102,7 +103,7 @@ public class ModInitializer extends AbstractModInitializer { DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, IdentifierUtil.MOD_ID); public ModInitializer() { - initializePlatform(new PlatformImpl(new NetworkManager())); + PlatformProxy.loadPlatform(new PlatformImpl(new NetworkManager())); initializePlatformApi(); registerAdditionalGridInsertionStrategyFactories(); registerGridExtractionStrategyFactories(); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java index 460801ed6..f9b5af568 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/PlatformImpl.java @@ -9,7 +9,6 @@ import com.refinedmods.refinedstorage2.platform.common.AbstractPlatform; import com.refinedmods.refinedstorage2.platform.common.Config; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.TransferManager; -import com.refinedmods.refinedstorage2.platform.common.util.BucketAmountFormatting; import com.refinedmods.refinedstorage2.platform.common.util.CustomBlockPlaceContext; import com.refinedmods.refinedstorage2.platform.forge.grid.strategy.ItemGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.forge.grid.view.ForgeFluidGridResourceFactory; @@ -97,7 +96,6 @@ public PlatformImpl(final NetworkManager networkManager) { new ServerToClientCommunicationsImpl(networkManager), new ClientToServerCommunicationsImpl(networkManager), new MenuOpenerImpl(), - new BucketAmountFormatting(FluidType.BUCKET_VOLUME), new FluidStackFluidRenderer(), ItemGridInsertionStrategy::new ); From 82658d8106f0399bc1fa15db54476c42ac45e37f Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 13:20:09 +0100 Subject: [PATCH 13/24] refactor: move ClientProxy to forge layer --- .../common/support/resource/ItemResourceRendering.java | 8 +++----- .../platform/forge/packet/s2c}/ClientProxy.java | 6 +++--- .../forge/packet/s2c/ControllerEnergyInfoPacket.java | 1 - .../platform/forge/packet/s2c/GridActivePacket.java | 1 - .../platform/forge/packet/s2c/GridClearPacket.java | 1 - .../platform/forge/packet/s2c/GridUpdatePacket.java | 1 - .../forge/packet/s2c/ResourceSlotUpdatePacket.java | 1 - .../forge/packet/s2c/StorageInfoResponsePacket.java | 1 - .../forge/packet/s2c/WirelessTransmitterRangePacket.java | 1 - 9 files changed, 6 insertions(+), 15 deletions(-) rename {refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util => refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c}/ClientProxy.java (67%) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java index 0bb820b08..ed35746d4 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/ItemResourceRendering.java @@ -3,9 +3,7 @@ import com.refinedmods.refinedstorage2.platform.api.support.AmountFormatting; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceRendering; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -50,10 +48,10 @@ public Component getDisplayName(final ItemResource resource) { @Override public List getTooltip(final ItemResource resource) { final Minecraft minecraft = Minecraft.getInstance(); - return ClientProxy.getPlayer().map(player -> getStack(resource).getTooltipLines( - player, + return getStack(resource).getTooltipLines( + minecraft.player, minecraft.options.advancedItemTooltips ? TooltipFlag.ADVANCED : TooltipFlag.NORMAL - )).orElse(Collections.emptyList()); + ); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ClientProxy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ClientProxy.java similarity index 67% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ClientProxy.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ClientProxy.java index 966265f0d..af5d7ba85 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/util/ClientProxy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ClientProxy.java @@ -1,16 +1,16 @@ -package com.refinedmods.refinedstorage2.platform.common.util; +package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import java.util.Optional; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.player.Player; -public final class ClientProxy { +final class ClientProxy { private ClientProxy() { } // This method exists to avoid classloading errors on LocalPlayer. - public static Optional getPlayer() { + static Optional getPlayer() { return Optional.ofNullable(Minecraft.getInstance().player); } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java index ee4ad1efe..4dd6e0bce 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ControllerEnergyInfoPacket.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import com.refinedmods.refinedstorage2.platform.common.controller.ControllerContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridActivePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridActivePacket.java index 01de33bf3..e0b5a0cd6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridActivePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridActivePacket.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import com.refinedmods.refinedstorage2.api.grid.GridWatcher; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java index 02de45cc0..fd6664637 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridClearPacket.java @@ -1,7 +1,6 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java index fff4a3de5..fcb25ae42 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/GridUpdatePacket.java @@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java index 3c5ea01ad..850bb7704 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ResourceSlotUpdatePacket.java @@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.function.Supplier; import javax.annotation.Nullable; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java index 5af643104..3886ec311 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/StorageInfoResponsePacket.java @@ -2,7 +2,6 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.storage.ClientStorageRepository; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import java.util.UUID; import java.util.function.Supplier; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java index 80f4699bb..44ebeb71f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/WirelessTransmitterRangePacket.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; -import com.refinedmods.refinedstorage2.platform.common.util.ClientProxy; import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterContainerMenu; import java.util.function.Supplier; From d0ccbba14d8ac5ed1aa1e62eeb909e44e7f304a2 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 13:21:48 +0100 Subject: [PATCH 14/24] refactor: move FabricStorageUtil to storage package --- .../StorageExporterTransferStrategyFactory.java | 6 +++--- .../fabric/importer/StorageImporterSource.java | 12 ++++++------ ....java => FabricStorageExtractableStorage.java} | 15 +++++++-------- ...e.java => FabricStorageInsertableStorage.java} | 15 +++++++-------- .../{util => storage}/FabricStorageUtil.java | 6 +++--- .../StorageExternalStorageProvider.java | 12 ++++++------ 6 files changed, 32 insertions(+), 34 deletions(-) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/{StorageExtractableStorage.java => FabricStorageExtractableStorage.java} (78%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/{StorageInsertableStorage.java => FabricStorageInsertableStorage.java} (79%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/{util => storage}/FabricStorageUtil.java (71%) diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java index 114231c7f..b89d64aec 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage2.platform.api.upgrade.UpgradeState; import com.refinedmods.refinedstorage2.platform.common.content.Items; import com.refinedmods.refinedstorage2.platform.common.exporter.AbstractFuzzyExporterTransferStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.FabricStorageInsertableStorage; import java.util.Optional; import java.util.function.Function; @@ -46,7 +46,7 @@ public ExporterTransferStrategy create(final ServerLevel level, final UpgradeState upgradeState, final AmountOverride amountOverride, final boolean fuzzyMode) { - final StorageInsertableStorage insertTarget = new StorageInsertableStorage<>( + final FabricStorageInsertableStorage insertTarget = new FabricStorageInsertableStorage<>( lookup, toPlatformMapper, level, @@ -61,7 +61,7 @@ public ExporterTransferStrategy create(final ServerLevel level, } private AbstractExporterTransferStrategy create(final boolean fuzzyMode, - final StorageInsertableStorage insertTarget, + final FabricStorageInsertableStorage insertTarget, final long transferQuota) { if (fuzzyMode) { return new AbstractFuzzyExporterTransferStrategy<>(insertTarget, storageChannelType, transferQuota) { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java index cb0f97658..ca1a2976e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java @@ -4,8 +4,8 @@ import com.refinedmods.refinedstorage2.api.network.node.importer.ImporterSource; import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageExtractableStorage; -import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.FabricStorageExtractableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.FabricStorageInsertableStorage; import java.util.Collections; import java.util.Iterator; @@ -25,8 +25,8 @@ public class StorageImporterSource implements ImporterSource { private final BlockApiCache, Direction> cache; private final Function fromPlatformMapper; - private final StorageInsertableStorage insertTarget; - private final StorageExtractableStorage extractTarget; + private final FabricStorageInsertableStorage insertTarget; + private final FabricStorageExtractableStorage extractTarget; private final Direction direction; public StorageImporterSource(final BlockApiLookup, Direction> lookup, @@ -38,7 +38,7 @@ public StorageImporterSource(final BlockApiLookup, Direction> lookup, final AmountOverride amountOverride) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.fromPlatformMapper = fromPlatformMapper; - this.insertTarget = new StorageInsertableStorage<>( + this.insertTarget = new FabricStorageInsertableStorage<>( lookup, toPlatformMapper, serverLevel, @@ -46,7 +46,7 @@ public StorageImporterSource(final BlockApiLookup, Direction> lookup, direction, AmountOverride.NONE ); - this.extractTarget = new StorageExtractableStorage<>( + this.extractTarget = new FabricStorageExtractableStorage<>( lookup, toPlatformMapper, serverLevel, diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageExtractableStorage.java similarity index 78% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageExtractableStorage.java index 4099bc4ad..d5f1f3b25 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageExtractableStorage.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageExtractableStorage.java @@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.ExtractableStorage; import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.util.FabricStorageUtil; import java.util.function.Function; @@ -16,18 +15,18 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -public class StorageExtractableStorage implements ExtractableStorage { +public class FabricStorageExtractableStorage implements ExtractableStorage { private final BlockApiCache, Direction> cache; private final Function toPlatformMapper; private final Direction direction; private final AmountOverride amountOverride; - public StorageExtractableStorage(final BlockApiLookup, Direction> lookup, - final Function toPlatformMapper, - final ServerLevel serverLevel, - final BlockPos pos, - final Direction direction, - final AmountOverride amountOverride) { + public FabricStorageExtractableStorage(final BlockApiLookup, Direction> lookup, + final Function toPlatformMapper, + final ServerLevel serverLevel, + final BlockPos pos, + final Direction direction, + final AmountOverride amountOverride) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.toPlatformMapper = toPlatformMapper; this.direction = direction; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageInsertableStorage.java similarity index 79% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageInsertableStorage.java index b4a87ea0e..e9bbcf948 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/StorageInsertableStorage.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageInsertableStorage.java @@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.InsertableStorage; import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.util.FabricStorageUtil; import java.util.function.Function; @@ -16,18 +15,18 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -public class StorageInsertableStorage implements InsertableStorage { +public class FabricStorageInsertableStorage implements InsertableStorage { private final BlockApiCache, Direction> cache; private final Function toPlatformMapper; private final Direction direction; private final AmountOverride amountOverride; - public StorageInsertableStorage(final BlockApiLookup, Direction> lookup, - final Function toPlatformMapper, - final ServerLevel serverLevel, - final BlockPos pos, - final Direction direction, - final AmountOverride amountOverride) { + public FabricStorageInsertableStorage(final BlockApiLookup, Direction> lookup, + final Function toPlatformMapper, + final ServerLevel serverLevel, + final BlockPos pos, + final Direction direction, + final AmountOverride amountOverride) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.toPlatformMapper = toPlatformMapper; this.direction = direction; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageUtil.java similarity index 71% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageUtil.java index 1b4b89692..e253caa2c 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/util/FabricStorageUtil.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/FabricStorageUtil.java @@ -1,13 +1,13 @@ -package com.refinedmods.refinedstorage2.platform.fabric.util; +package com.refinedmods.refinedstorage2.platform.fabric.storage; import net.fabricmc.fabric.api.transfer.v1.storage.Storage; import net.fabricmc.fabric.api.transfer.v1.storage.StorageView; -public final class FabricStorageUtil { +final class FabricStorageUtil { private FabricStorageUtil() { } - public static long getCurrentAmount(final Storage storage, final T resource) { + static long getCurrentAmount(final Storage storage, final T resource) { long amount = 0; final Iterable> views = storage.nonEmptyViews(); for (final StorageView view : views) { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java index 277b67258..40d6d6cf0 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java @@ -5,8 +5,8 @@ import com.refinedmods.refinedstorage2.api.storage.Actor; import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; import com.refinedmods.refinedstorage2.platform.api.exporter.AmountOverride; -import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageExtractableStorage; -import com.refinedmods.refinedstorage2.platform.fabric.storage.StorageInsertableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.FabricStorageExtractableStorage; +import com.refinedmods.refinedstorage2.platform.fabric.storage.FabricStorageInsertableStorage; import java.util.Collections; import java.util.Iterator; @@ -26,8 +26,8 @@ public class StorageExternalStorageProvider implements ExternalStorageProvider { private final BlockApiCache, Direction> cache; private final Function fromPlatformMapper; - private final StorageExtractableStorage extractTarget; - private final StorageInsertableStorage insertTarget; + private final FabricStorageExtractableStorage extractTarget; + private final FabricStorageInsertableStorage insertTarget; private final Direction direction; public StorageExternalStorageProvider(final BlockApiLookup, Direction> lookup, @@ -38,7 +38,7 @@ public StorageExternalStorageProvider(final BlockApiLookup, Direction final Direction direction) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.fromPlatformMapper = fromPlatformMapper; - this.extractTarget = new StorageExtractableStorage<>( + this.extractTarget = new FabricStorageExtractableStorage<>( lookup, toPlatformMapper, serverLevel, @@ -46,7 +46,7 @@ public StorageExternalStorageProvider(final BlockApiLookup, Direction direction, AmountOverride.NONE ); - this.insertTarget = new StorageInsertableStorage<>( + this.insertTarget = new FabricStorageInsertableStorage<>( lookup, toPlatformMapper, serverLevel, From d325cae78b1c5b44b1d8609d124801be6264a87a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 13:48:00 +0100 Subject: [PATCH 15/24] refactor: more package private classes in platform modules --- .../common/support/AbstractBaseBlock.java | 3 +- ...Aware.java => PlayerAwareBlockEntity.java} | 2 +- .../ResourceInventoryDestination.java | 3 +- .../containermenu/TransferManager.java | 1 - ...neModeNetworkNodeContainerBlockEntity.java | 4 +- .../bounditem/InventorySlotReference.java | 2 +- .../NetworkBoundItemSessionImpl.java | 2 +- ...ractResourceContainerContainerAdapter.java | 2 +- .../common/support/tooltip/SmallText.java | 16 +++---- .../platform/fabric/ModInitializerImpl.java | 44 ++++++++++--------- ...orageExporterTransferStrategyFactory.java} | 12 ++--- ....java => FabricStorageImporterSource.java} | 16 +++---- ...orageImporterTransferStrategyFactory.java} | 14 +++--- .../rei/CraftingGridTransferHandler.java | 2 +- .../rei/DraggableStackVisitorImpl.java | 4 +- .../rei/ExclusionZonesProviderImpl.java | 2 +- .../rei/GridFocusedStackProvider.java | 4 +- .../rei/GridResourceIngredientConverter.java | 2 +- .../recipemod/rei/MissingIngredients.java | 10 ++--- .../rei/ResourceFocusedStackProvider.java | 4 +- .../rei/ResourceIngredientConverter.java | 2 +- .../diskdrive/DiskDriveBakedModel.java | 8 ++-- ...FabricStorageExternalStorageProvider.java} | 14 +++--- ...atformExternalStorageProviderFactory.java} | 13 +++--- .../FabricExtendedMenuProviderAdapter.java | 4 +- .../bounditem}/TrinketsSlotReference.java | 6 +-- .../TrinketsSlotReferenceFactory.java | 2 +- .../TrinketsSlotReferenceProvider.java | 2 +- .../bounditem}/package-info.java | 2 +- .../support/render/EmissiveBakedModel.java | 1 - .../platform/forge/ModInitializer.java | 4 +- .../FluidHandlerExternalStorageProvider.java | 4 +- .../ItemHandlerExternalStorageProvider.java | 4 +- .../platform/forge/grid/package-info.java | 7 --- .../CursorItemHandler.java} | 6 +-- .../strategy/ItemGridExtractionStrategy.java | 7 ++- .../strategy/ItemGridInsertionStrategy.java | 7 ++- .../strategy/ItemGridScrollingStrategy.java | 7 ++- .../importer/FluidHandlerImporterSource.java | 6 +-- .../importer/ItemHandlerImporterSource.java | 6 +-- .../rei/CraftingGridTransferHandler.java | 2 +- .../rei/DraggableStackVisitorImpl.java | 4 +- .../rei/ExclusionZonesProviderImpl.java | 2 +- .../rei/GridFocusedStackProvider.java | 4 +- .../rei/GridResourceIngredientConverter.java | 2 +- .../recipemod/rei/MissingIngredients.java | 10 ++--- .../rei/ResourceFocusedStackProvider.java | 4 +- .../rei/ResourceIngredientConverter.java | 2 +- .../diskdrive/DiskDriveBakedModel.java | 10 ++--- .../diskdrive/DiskDriveItemBakedModel.java | 10 ++--- .../diskdrive/DiskDriveUnbakedGeometry.java | 3 ++ .../bounditem}/CuriosSlotReference.java | 6 +-- .../CuriosSlotReferenceFactory.java | 2 +- .../CuriosSlotReferenceProvider.java | 2 +- .../bounditem}/package-info.java | 2 +- 55 files changed, 160 insertions(+), 166 deletions(-) rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/{PlayerAware.java => PlayerAwareBlockEntity.java} (75%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/{StorageExporterTransferStrategyFactory.java => FabricStorageExporterTransferStrategyFactory.java} (85%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/{StorageImporterSource.java => FabricStorageImporterSource.java} (83%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/{StorageImporterTransferStrategyFactory.java => FabricStorageImporterTransferStrategyFactory.java} (77%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/{StorageExternalStorageProvider.java => FabricStorageExternalStorageProvider.java} (84%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/{StoragePlatformExternalStorageProviderFactory.java => FabricStoragePlatformExternalStorageProviderFactory.java} (71%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/{networkbounditem => network/bounditem}/TrinketsSlotReference.java (88%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/{networkbounditem => network/bounditem}/TrinketsSlotReferenceFactory.java (97%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/{networkbounditem => network/bounditem}/TrinketsSlotReferenceProvider.java (98%) rename refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/{networkbounditem => network/bounditem}/package-info.java (93%) delete mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/{CursorStorage.java => strategy/CursorItemHandler.java} (93%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/{networkbounditem => network/bounditem}/CuriosSlotReference.java (89%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/{networkbounditem => network/bounditem}/CuriosSlotReferenceFactory.java (97%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/{networkbounditem => network/bounditem}/CuriosSlotReferenceProvider.java (98%) rename refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/{networkbounditem => network/bounditem}/package-info.java (93%) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java index 3b0fa491f..73593a725 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java @@ -121,7 +121,8 @@ public void setPlacedBy(final Level level, @Nullable final LivingEntity entity, final ItemStack stack) { super.setPlacedBy(level, pos, state, entity, stack); - if (entity instanceof Player player && level.getBlockEntity(pos) instanceof PlayerAware playerAware) { + if (entity instanceof Player player + && level.getBlockEntity(pos) instanceof PlayerAwareBlockEntity playerAware) { playerAware.setPlacedBy(player.getGameProfile().getId()); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAwareBlockEntity.java similarity index 75% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAwareBlockEntity.java index 37c2b1d59..930c4f448 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAware.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/PlayerAwareBlockEntity.java @@ -2,6 +2,6 @@ import java.util.UUID; -public interface PlayerAware { +public interface PlayerAwareBlockEntity { void setPlacedBy(UUID playerId); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java index e1695461e..b56d9a12d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/ResourceInventoryDestination.java @@ -2,8 +2,7 @@ import net.minecraft.world.item.ItemStack; -public record ResourceInventoryDestination(AbstractResourceContainerMenu destination) - implements TransferDestination { +record ResourceInventoryDestination(AbstractResourceContainerMenu destination) implements TransferDestination { @Override public ItemStack transfer(final ItemStack stack) { destination.addToResourceSlotIfNotExisting(stack); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java index 16d621aa7..e4239721e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/containermenu/TransferManager.java @@ -22,7 +22,6 @@ public TransferManager(final AbstractContainerMenu containerMenu, this.destinationFactory = destinationFactory; } - public void addTransfer(final Container from, final Container to) { addTransfer( destinationFactory.apply(from), diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java index 22c3d5c7d..49787cd0e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.configurationcard.ConfigurationCardTarget; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.support.PlayerAware; +import com.refinedmods.refinedstorage2.platform.common.support.PlayerAwareBlockEntity; import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; import com.refinedmods.refinedstorage2.platform.common.support.RedstoneModeSettings; @@ -21,7 +21,7 @@ import net.minecraft.world.level.block.state.BlockState; public abstract class AbstractRedstoneModeNetworkNodeContainerBlockEntity - extends NetworkNodeContainerBlockEntityImpl implements PlayerAware, ConfigurationCardTarget { + extends NetworkNodeContainerBlockEntityImpl implements PlayerAwareBlockEntity, ConfigurationCardTarget { private static final String TAG_REDSTONE_MODE = "rm"; private static final String TAG_PLACED_BY_PLAYER_ID = "pbpid"; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java index 209393b50..dfa9b0a6e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/InventorySlotReference.java @@ -14,7 +14,7 @@ public final class InventorySlotReference implements SlotReference { private final int slotIndex; - public InventorySlotReference(final int slotIndex) { + InventorySlotReference(final int slotIndex) { this.slotIndex = slotIndex; } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java index d215264c3..1938c6a66 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java @@ -82,6 +82,6 @@ public void drainEnergy(final long amount) { ); } - public record NetworkReference(ResourceKey dimensionKey, BlockPos pos) { + record NetworkReference(ResourceKey dimensionKey, BlockPos pos) { } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java index 2db9b96e1..7714f7600 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/resource/AbstractResourceContainerContainerAdapter.java @@ -9,7 +9,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -public abstract class AbstractResourceContainerContainerAdapter implements Container { +abstract class AbstractResourceContainerContainerAdapter implements Container { private final ResourceContainer container; protected AbstractResourceContainerContainerAdapter(final ResourceContainer container) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java index a40378767..864a1fffa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/tooltip/SmallText.java @@ -10,17 +10,17 @@ public final class SmallText { private SmallText() { } - public static float getScale() { + static float getScale() { return Minecraft.getInstance().isEnforceUnicode() ? 1F : 0.7F; } - public static void render(final Font font, - final FormattedCharSequence text, - final int x, - final int y, - final float scale, - final Matrix4f pose, - final MultiBufferSource.BufferSource buffer) { + static void render(final Font font, + final FormattedCharSequence text, + final int x, + final int y, + final float scale, + final Matrix4f pose, + final MultiBufferSource.BufferSource buffer) { final Matrix4f scaled = new Matrix4f(pose); scaled.scale(scale, scale, 1); font.drawInBatch( diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index cc79f2e83..fd02a96fe 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -21,12 +21,12 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage2.platform.common.upgrade.RegulatorUpgradeItem; import com.refinedmods.refinedstorage2.platform.common.util.ServerEventQueue; -import com.refinedmods.refinedstorage2.platform.fabric.exporter.StorageExporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.fabric.exporter.FabricStorageExporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.FluidGridInsertionStrategy; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridExtractionStrategy; import com.refinedmods.refinedstorage2.platform.fabric.grid.strategy.ItemGridScrollingStrategy; -import com.refinedmods.refinedstorage2.platform.fabric.importer.StorageImporterTransferStrategyFactory; +import com.refinedmods.refinedstorage2.platform.fabric.importer.FabricStorageImporterTransferStrategyFactory; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridClearPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.CraftingGridRecipeTransferPacket; @@ -41,10 +41,10 @@ import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.StorageInfoRequestPacket; import com.refinedmods.refinedstorage2.platform.fabric.packet.c2s.UseNetworkBoundItemPacket; import com.refinedmods.refinedstorage2.platform.fabric.storage.diskdrive.FabricDiskDriveBlockEntity; -import com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage.StoragePlatformExternalStorageProviderFactory; +import com.refinedmods.refinedstorage2.platform.fabric.storage.externalstorage.FabricStoragePlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.fabric.support.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem.TrinketsSlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem.TrinketsSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem.TrinketsSlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem.TrinketsSlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.fabric.support.resource.ResourceContainerFluidStorageAdapter; import com.refinedmods.refinedstorage2.platform.fabric.support.resource.VariantUtil; @@ -136,7 +136,7 @@ private void registerGridScrollingStrategyFactories() { private void registerImporterTransferStrategyFactories() { PlatformApi.INSTANCE.getImporterTransferStrategyRegistry().register( createIdentifier("item"), - new StorageImporterTransferStrategyFactory<>( + new FabricStorageImporterTransferStrategyFactory<>( ItemStorage.SIDED, StorageChannelTypes.ITEM, VariantUtil::ofItemVariant, @@ -146,7 +146,7 @@ private void registerImporterTransferStrategyFactories() { ); PlatformApi.INSTANCE.getImporterTransferStrategyRegistry().register( createIdentifier("fluid"), - new StorageImporterTransferStrategyFactory<>( + new FabricStorageImporterTransferStrategyFactory<>( FluidStorage.SIDED, StorageChannelTypes.FLUID, VariantUtil::ofFluidVariant, @@ -159,7 +159,7 @@ private void registerImporterTransferStrategyFactories() { private void registerExporterTransferStrategyFactories() { PlatformApi.INSTANCE.getExporterTransferStrategyRegistry().register( createIdentifier("item"), - new StorageExporterTransferStrategyFactory<>( + new FabricStorageExporterTransferStrategyFactory<>( ItemStorage.SIDED, StorageChannelTypes.ITEM, resource -> resource instanceof ItemResource itemResource @@ -171,7 +171,7 @@ private void registerExporterTransferStrategyFactories() { ); PlatformApi.INSTANCE.getExporterTransferStrategyRegistry().register( createIdentifier("fluid"), - new StorageExporterTransferStrategyFactory<>( + new FabricStorageExporterTransferStrategyFactory<>( FluidStorage.SIDED, StorageChannelTypes.FLUID, resource -> resource instanceof FluidResource fluidResource @@ -185,18 +185,20 @@ private void registerExporterTransferStrategyFactories() { private void registerExternalStorageProviderFactories() { PlatformApi.INSTANCE.addExternalStorageProviderFactory(new InterfacePlatformExternalStorageProviderFactory()); - PlatformApi.INSTANCE.addExternalStorageProviderFactory(new StoragePlatformExternalStorageProviderFactory<>( - StorageChannelTypes.ITEM, - ItemStorage.SIDED, - VariantUtil::ofItemVariant, - VariantUtil::toItemVariant - )); - PlatformApi.INSTANCE.addExternalStorageProviderFactory(new StoragePlatformExternalStorageProviderFactory<>( - StorageChannelTypes.FLUID, - FluidStorage.SIDED, - VariantUtil::ofFluidVariant, - VariantUtil::toFluidVariant - )); + PlatformApi.INSTANCE.addExternalStorageProviderFactory( + new FabricStoragePlatformExternalStorageProviderFactory<>( + StorageChannelTypes.ITEM, + ItemStorage.SIDED, + VariantUtil::ofItemVariant, + VariantUtil::toItemVariant + )); + PlatformApi.INSTANCE.addExternalStorageProviderFactory( + new FabricStoragePlatformExternalStorageProviderFactory<>( + StorageChannelTypes.FLUID, + FluidStorage.SIDED, + VariantUtil::ofFluidVariant, + VariantUtil::toFluidVariant + )); } private void registerContent() { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/FabricStorageExporterTransferStrategyFactory.java similarity index 85% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/FabricStorageExporterTransferStrategyFactory.java index b89d64aec..ed5f49a3b 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/StorageExporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/exporter/FabricStorageExporterTransferStrategyFactory.java @@ -20,18 +20,18 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -public class StorageExporterTransferStrategyFactory implements ExporterTransferStrategyFactory { +public class FabricStorageExporterTransferStrategyFactory implements ExporterTransferStrategyFactory { private final BlockApiLookup, Direction> lookup; private final StorageChannelType storageChannelType; private final Function toPlatformMapper; private final Function> mapper; private final long singleAmount; - public StorageExporterTransferStrategyFactory(final BlockApiLookup, Direction> lookup, - final StorageChannelType storageChannelType, - final Function> mapper, - final Function toPlatformMapper, - final long singleAmount) { + public FabricStorageExporterTransferStrategyFactory(final BlockApiLookup, Direction> lookup, + final StorageChannelType storageChannelType, + final Function> mapper, + final Function toPlatformMapper, + final long singleAmount) { this.lookup = lookup; this.storageChannelType = storageChannelType; this.mapper = mapper; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterSource.java similarity index 83% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterSource.java index ca1a2976e..bc34bcad1 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterSource.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterSource.java @@ -22,20 +22,20 @@ import static com.google.common.collect.Iterators.filter; import static com.google.common.collect.Iterators.transform; -public class StorageImporterSource implements ImporterSource { +class FabricStorageImporterSource implements ImporterSource { private final BlockApiCache, Direction> cache; private final Function fromPlatformMapper; private final FabricStorageInsertableStorage insertTarget; private final FabricStorageExtractableStorage extractTarget; private final Direction direction; - public StorageImporterSource(final BlockApiLookup, Direction> lookup, - final Function fromPlatformMapper, - final Function toPlatformMapper, - final ServerLevel serverLevel, - final BlockPos pos, - final Direction direction, - final AmountOverride amountOverride) { + FabricStorageImporterSource(final BlockApiLookup, Direction> lookup, + final Function fromPlatformMapper, + final Function toPlatformMapper, + final ServerLevel serverLevel, + final BlockPos pos, + final Direction direction, + final AmountOverride amountOverride) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.fromPlatformMapper = fromPlatformMapper; this.insertTarget = new FabricStorageInsertableStorage<>( diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterTransferStrategyFactory.java similarity index 77% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterTransferStrategyFactory.java index 040a536d7..4d3ad81be 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/StorageImporterTransferStrategyFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/importer/FabricStorageImporterTransferStrategyFactory.java @@ -17,18 +17,18 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -public class StorageImporterTransferStrategyFactory implements ImporterTransferStrategyFactory { +public class FabricStorageImporterTransferStrategyFactory implements ImporterTransferStrategyFactory { private final BlockApiLookup, Direction> lookup; private final StorageChannelType storageChannelType; private final Function fromPlatformMapper; private final Function toPlatformMapper; private final long singleAmount; - public StorageImporterTransferStrategyFactory(final BlockApiLookup, Direction> lookup, - final StorageChannelType storageChannelType, - final Function fromPlatformMapper, - final Function toPlatformMapper, - final long singleAmount) { + public FabricStorageImporterTransferStrategyFactory(final BlockApiLookup, Direction> lookup, + final StorageChannelType storageChannelType, + final Function fromPlatformMapper, + final Function toPlatformMapper, + final long singleAmount) { this.lookup = lookup; this.storageChannelType = storageChannelType; this.fromPlatformMapper = fromPlatformMapper; @@ -42,7 +42,7 @@ public ImporterTransferStrategy create(final ServerLevel level, final Direction direction, final UpgradeState upgradeState, final AmountOverride amountOverride) { - final ImporterSource source = new StorageImporterSource<>( + final ImporterSource source = new FabricStorageImporterSource<>( lookup, fromPlatformMapper, toPlatformMapper, diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java index cb9c244da..9f79443da 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/CraftingGridTransferHandler.java @@ -22,7 +22,7 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.world.item.ItemStack; -public class CraftingGridTransferHandler implements TransferHandler { +class CraftingGridTransferHandler implements TransferHandler { private static final Color MISSING_COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); private static final CategoryIdentifier CRAFTING = CategoryIdentifier.of("minecraft", "plugins/crafting"); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java index 702308fae..2158f1bbf 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/DraggableStackVisitorImpl.java @@ -19,11 +19,11 @@ import me.shedaniel.rei.api.client.gui.drag.DraggingContext; import net.minecraft.client.gui.screens.Screen; -public class DraggableStackVisitorImpl +class DraggableStackVisitorImpl implements DraggableStackVisitor> { private final IngredientConverter ingredientConverter; - public DraggableStackVisitorImpl(final IngredientConverter ingredientConverter) { + DraggableStackVisitorImpl(final IngredientConverter ingredientConverter) { this.ingredientConverter = ingredientConverter; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java index 5b43aa5b2..822a1532c 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ExclusionZonesProviderImpl.java @@ -8,7 +8,7 @@ import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.registry.screen.ExclusionZonesProvider; -public class ExclusionZonesProviderImpl implements ExclusionZonesProvider> { +class ExclusionZonesProviderImpl implements ExclusionZonesProvider> { @Override public Collection provide(final AbstractBaseScreen screen) { return screen.getExclusionZones().stream() diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java index 66bfa1c28..0809e36cd 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridFocusedStackProvider.java @@ -10,10 +10,10 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import net.minecraft.client.gui.screens.Screen; -public class GridFocusedStackProvider implements FocusedStackProvider { +class GridFocusedStackProvider implements FocusedStackProvider { private final IngredientConverter converter; - public GridFocusedStackProvider(final IngredientConverter converter) { + GridFocusedStackProvider(final IngredientConverter converter) { this.converter = converter; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java index 81a254742..f55b41a25 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/GridResourceIngredientConverter.java @@ -10,7 +10,7 @@ import dev.architectury.fluid.FluidStack; import me.shedaniel.rei.api.common.util.EntryStacks; -public class GridResourceIngredientConverter implements IngredientConverter { +class GridResourceIngredientConverter implements IngredientConverter { @Override public Optional> convertToResource(final Object ingredient) { return Optional.empty(); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java index 882f0c41a..6503aefaa 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/MissingIngredients.java @@ -7,24 +7,24 @@ import it.unimi.dsi.fastutil.ints.IntSet; import me.shedaniel.rei.api.common.entry.EntryIngredient; -public class MissingIngredients { +class MissingIngredients { private final List ingredients = new ArrayList<>(); private final IntSet indices = new IntOpenHashSet(); - public boolean isEmpty() { + boolean isEmpty() { return indices.isEmpty(); } - public void addIngredient(final EntryIngredient ingredient, final int slotIndex) { + void addIngredient(final EntryIngredient ingredient, final int slotIndex) { ingredients.add(ingredient); indices.add(slotIndex); } - public List getIngredients() { + List getIngredients() { return ingredients; } - public boolean isMissing(final int slotIndex) { + boolean isMissing(final int slotIndex) { return indices.contains(slotIndex); } } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java index 6242ff055..e1d68f656 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceFocusedStackProvider.java @@ -10,10 +10,10 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import net.minecraft.client.gui.screens.Screen; -public class ResourceFocusedStackProvider implements FocusedStackProvider { +class ResourceFocusedStackProvider implements FocusedStackProvider { private final IngredientConverter converter; - public ResourceFocusedStackProvider(final IngredientConverter converter) { + ResourceFocusedStackProvider(final IngredientConverter converter) { this.converter = converter; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java index 775595391..4e6debd8c 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/ResourceIngredientConverter.java @@ -12,7 +12,7 @@ import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.world.item.ItemStack; -public class ResourceIngredientConverter implements IngredientConverter { +class ResourceIngredientConverter implements IngredientConverter { @Override public Optional> convertToResource(final Object ingredient) { if (ingredient instanceof FluidStack fluidStack) { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java index c1e7c8609..69fc70142 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/diskdrive/DiskDriveBakedModel.java @@ -24,7 +24,7 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; -public class DiskDriveBakedModel extends ForwardingBakedModel { +class DiskDriveBakedModel extends ForwardingBakedModel { private static final QuadTranslator[] TRANSLATORS = new QuadTranslator[8]; private static final Map ROTATORS = new EnumMap<>(BiDirection.class); @@ -48,9 +48,9 @@ public class DiskDriveBakedModel extends ForwardingBakedModel { private final BakedModel diskModel; private final BakedModel diskInactiveModel; - public DiskDriveBakedModel(final BakedModel baseModel, - final BakedModel diskModel, - final BakedModel diskInactiveModel) { + DiskDriveBakedModel(final BakedModel baseModel, + final BakedModel diskModel, + final BakedModel diskInactiveModel) { this.wrapped = baseModel; this.diskModel = diskModel; this.diskInactiveModel = diskInactiveModel; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStorageExternalStorageProvider.java similarity index 84% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStorageExternalStorageProvider.java index 40d6d6cf0..442949035 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StorageExternalStorageProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStorageExternalStorageProvider.java @@ -23,19 +23,19 @@ import static com.google.common.collect.Iterators.filter; import static com.google.common.collect.Iterators.transform; -public class StorageExternalStorageProvider implements ExternalStorageProvider { +class FabricStorageExternalStorageProvider implements ExternalStorageProvider { private final BlockApiCache, Direction> cache; private final Function fromPlatformMapper; private final FabricStorageExtractableStorage extractTarget; private final FabricStorageInsertableStorage insertTarget; private final Direction direction; - public StorageExternalStorageProvider(final BlockApiLookup, Direction> lookup, - final Function fromPlatformMapper, - final Function toPlatformMapper, - final ServerLevel serverLevel, - final BlockPos pos, - final Direction direction) { + FabricStorageExternalStorageProvider(final BlockApiLookup, Direction> lookup, + final Function fromPlatformMapper, + final Function toPlatformMapper, + final ServerLevel serverLevel, + final BlockPos pos, + final Direction direction) { this.cache = BlockApiCache.create(lookup, serverLevel, pos); this.fromPlatformMapper = fromPlatformMapper; this.extractTarget = new FabricStorageExtractableStorage<>( diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStoragePlatformExternalStorageProviderFactory.java similarity index 71% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStoragePlatformExternalStorageProviderFactory.java index f832107ba..658d676dd 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/StoragePlatformExternalStorageProviderFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/storage/externalstorage/FabricStoragePlatformExternalStorageProviderFactory.java @@ -13,16 +13,17 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; -public class StoragePlatformExternalStorageProviderFactory implements PlatformExternalStorageProviderFactory { +public class FabricStoragePlatformExternalStorageProviderFactory + implements PlatformExternalStorageProviderFactory { private final StorageChannelType theStorageChannelType; private final BlockApiLookup, Direction> lookup; private final Function fromPlatformMapper; private final Function toPlatformMapper; - public StoragePlatformExternalStorageProviderFactory(final StorageChannelType storageChannelType, - final BlockApiLookup, Direction> lookup, - final Function fromPlatformMapper, - final Function toPlatformMapper) { + public FabricStoragePlatformExternalStorageProviderFactory(final StorageChannelType storageChannelType, + final BlockApiLookup, Direction> lookup, + final Function fromPlatformMapper, + final Function toPlatformMapper) { this.theStorageChannelType = storageChannelType; this.lookup = lookup; this.fromPlatformMapper = fromPlatformMapper; @@ -38,7 +39,7 @@ public Optional> create(final ServerLevel level, if (storageChannelType != theStorageChannelType) { return Optional.empty(); } - return Optional.of((ExternalStorageProvider) new StorageExternalStorageProvider<>( + return Optional.of((ExternalStorageProvider) new FabricStorageExternalStorageProvider<>( lookup, fromPlatformMapper, toPlatformMapper, diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java index 8dfe8ee38..5b4cb22d7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/containermenu/FabricExtendedMenuProviderAdapter.java @@ -12,10 +12,10 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -public class FabricExtendedMenuProviderAdapter implements ExtendedScreenHandlerFactory { +class FabricExtendedMenuProviderAdapter implements ExtendedScreenHandlerFactory { private final ExtendedMenuProvider extendedMenuProvider; - public FabricExtendedMenuProviderAdapter(final ExtendedMenuProvider extendedMenuProvider) { + FabricExtendedMenuProviderAdapter(final ExtendedMenuProvider extendedMenuProvider) { this.extendedMenuProvider = extendedMenuProvider; } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReference.java similarity index 88% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReference.java index 6097188eb..dfdf8fe4e 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReference.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReference.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; @@ -10,12 +10,12 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -public class TrinketsSlotReference implements SlotReference { +class TrinketsSlotReference implements SlotReference { private final String groupName; private final String slotName; private final int index; - public TrinketsSlotReference(final String groupName, final String slotName, final int index) { + TrinketsSlotReference(final String groupName, final String slotName, final int index) { this.groupName = groupName; this.slotName = slotName; this.index = index; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceFactory.java similarity index 97% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceFactory.java index e02996e31..074058223 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceFactory.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceProvider.java similarity index 98% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceProvider.java index 247ec4640..8e8f27cac 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/TrinketsSlotReferenceProvider.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/TrinketsSlotReferenceProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/package-info.java similarity index 93% rename from refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java rename to refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/package-info.java index 722ce173d..557bcaf20 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/networkbounditem/package-info.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/network/bounditem/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.fabric.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.fabric.support.network.bounditem; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java index c7049d6a4..ee1845579 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/support/render/EmissiveBakedModel.java @@ -29,7 +29,6 @@ public void emitBlockQuads(final BlockAndTintGetter blockView, context.pushTransform(transform); wrapped.emitBlockQuads(blockView, state, pos, randomSupplier, context); context.popTransform(); - } @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index 9dd66a1f4..261761557 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -33,8 +33,8 @@ import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; import com.refinedmods.refinedstorage2.platform.forge.storage.diskdrive.ForgeDiskDriveBlockEntity; import com.refinedmods.refinedstorage2.platform.forge.support.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem.CuriosSlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem.CuriosSlotReferenceProvider; +import com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem.CuriosSlotReferenceFactory; +import com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem.CuriosSlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.forge.support.resource.ResourceContainerFluidHandlerAdapter; import java.util.Arrays; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java index 73cda19e1..c976243a3 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/FluidHandlerExternalStorageProvider.java @@ -14,12 +14,12 @@ import java.util.Iterator; -public class FluidHandlerExternalStorageProvider implements ExternalStorageProvider { +class FluidHandlerExternalStorageProvider implements ExternalStorageProvider { private final InteractionCoordinates interactionCoordinates; private final InsertableStorage insertTarget; private final ExtractableStorage extractTarget; - public FluidHandlerExternalStorageProvider(final InteractionCoordinates interactionCoordinates) { + FluidHandlerExternalStorageProvider(final InteractionCoordinates interactionCoordinates) { this.interactionCoordinates = interactionCoordinates; this.insertTarget = new FluidHandlerInsertableStorage(interactionCoordinates, AmountOverride.NONE); this.extractTarget = new FluidHandlerExtractableStorage(interactionCoordinates, AmountOverride.NONE); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java index a3050eeaa..0080daa6f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/externalstorage/ItemHandlerExternalStorageProvider.java @@ -14,12 +14,12 @@ import java.util.Iterator; -public class ItemHandlerExternalStorageProvider implements ExternalStorageProvider { +class ItemHandlerExternalStorageProvider implements ExternalStorageProvider { private final InteractionCoordinates interactionCoordinates; private final InsertableStorage insertTarget; private final ExtractableStorage extractTarget; - public ItemHandlerExternalStorageProvider(final InteractionCoordinates interactionCoordinates) { + ItemHandlerExternalStorageProvider(final InteractionCoordinates interactionCoordinates) { this.interactionCoordinates = interactionCoordinates; this.insertTarget = new ItemHandlerInsertableStorage(interactionCoordinates, AmountOverride.NONE); this.extractTarget = new ItemHandlerExtractableStorage(interactionCoordinates, AmountOverride.NONE); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java deleted file mode 100644 index aa9f355ec..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.grid; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/CursorItemHandler.java similarity index 93% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/CursorItemHandler.java index 44bb70867..f20a35695 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/CursorStorage.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/CursorItemHandler.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.grid; +package com.refinedmods.refinedstorage2.platform.forge.grid.strategy; import javax.annotation.Nonnull; @@ -7,10 +7,10 @@ import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemHandlerHelper; -public class CursorStorage implements IItemHandler { +class CursorItemHandler implements IItemHandler { private final AbstractContainerMenu containerMenu; - public CursorStorage(final AbstractContainerMenu containerMenu) { + CursorItemHandler(final AbstractContainerMenu containerMenu) { this.containerMenu = containerMenu; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java index 2581da9ee..0019988ab 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridExtractionStrategy.java @@ -9,7 +9,6 @@ import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; @@ -21,14 +20,14 @@ public class ItemGridExtractionStrategy implements GridExtractionStrategy { private final GridOperations gridOperations; private final PlayerMainInvWrapper playerInventoryStorage; - private final CursorStorage playerCursorStorage; + private final CursorItemHandler playerCursorItemHandler; public ItemGridExtractionStrategy(final AbstractContainerMenu containerMenu, final Player player, final Grid grid) { this.gridOperations = grid.createOperations(StorageChannelTypes.ITEM, new PlayerActor(player)); this.playerInventoryStorage = new PlayerMainInvWrapper(player.getInventory()); - this.playerCursorStorage = new CursorStorage(containerMenu); + this.playerCursorItemHandler = new CursorItemHandler(containerMenu); } @Override @@ -37,7 +36,7 @@ public boolean onExtract(final PlatformStorageChannelType storageChannelT final GridExtractMode extractMode, final boolean cursor) { if (resource instanceof ItemResource itemResource) { - final IItemHandler handler = cursor ? playerCursorStorage : playerInventoryStorage; + final IItemHandler handler = cursor ? playerCursorItemHandler : playerInventoryStorage; gridOperations.extract( itemResource, extractMode, diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java index 946c32e03..f2faa680b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridInsertionStrategy.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; @@ -24,14 +23,14 @@ public class ItemGridInsertionStrategy implements GridInsertionStrategy { private final AbstractContainerMenu containerMenu; private final GridOperations gridOperations; - private final CursorStorage playerCursorStorage; + private final CursorItemHandler playerCursorItemHandler; public ItemGridInsertionStrategy(final AbstractContainerMenu containerMenu, final Player player, final Grid grid) { this.containerMenu = containerMenu; this.gridOperations = grid.createOperations(StorageChannelTypes.ITEM, new PlayerActor(player)); - this.playerCursorStorage = new CursorStorage(containerMenu); + this.playerCursorItemHandler = new CursorItemHandler(containerMenu); } @Override @@ -45,7 +44,7 @@ public boolean onInsert(final GridInsertMode insertMode, final boolean tryAltern itemResource, insertMode, new ItemHandlerExtractableStorage( - InteractionCoordinates.ofItemHandler(playerCursorStorage), + InteractionCoordinates.ofItemHandler(playerCursorItemHandler), AmountOverride.NONE ) ); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java index 7956592ed..f8897e040 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/grid/strategy/ItemGridScrollingStrategy.java @@ -11,7 +11,6 @@ import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; -import com.refinedmods.refinedstorage2.platform.forge.grid.CursorStorage; import com.refinedmods.refinedstorage2.platform.forge.storage.InteractionCoordinates; import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerExtractableStorage; import com.refinedmods.refinedstorage2.platform.forge.storage.ItemHandlerInsertableStorage; @@ -28,7 +27,7 @@ public class ItemGridScrollingStrategy implements GridScrollingStrategy { private final GridOperations gridOperations; private final Inventory playerInventory; private final PlayerMainInvWrapper playerInventoryStorage; - private final CursorStorage playerCursorStorage; + private final CursorItemHandler playerCursorItemHandler; public ItemGridScrollingStrategy(final AbstractContainerMenu containerMenu, final Player player, @@ -36,7 +35,7 @@ public ItemGridScrollingStrategy(final AbstractContainerMenu containerMenu, this.gridOperations = grid.createOperations(StorageChannelTypes.ITEM, new PlayerActor(player)); this.playerInventory = player.getInventory(); this.playerInventoryStorage = new PlayerMainInvWrapper(playerInventory); - this.playerCursorStorage = new CursorStorage(containerMenu); + this.playerCursorItemHandler = new CursorItemHandler(containerMenu); } @Override @@ -51,7 +50,7 @@ public boolean onScroll(final PlatformStorageChannelType storageChannelTy switch (scrollMode) { case GRID_TO_INVENTORY -> handleGridToInventoryScroll(itemResource, playerStorage); case INVENTORY_TO_GRID -> handleInventoryToGridScroll(itemResource, playerStorage); - case GRID_TO_CURSOR -> handleGridToInventoryScroll(itemResource, playerCursorStorage); + case GRID_TO_CURSOR -> handleGridToInventoryScroll(itemResource, playerCursorItemHandler); } return true; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java index 472957791..38db50f8f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/FluidHandlerImporterSource.java @@ -13,13 +13,13 @@ import java.util.Iterator; -public class FluidHandlerImporterSource implements ImporterSource { +class FluidHandlerImporterSource implements ImporterSource { private final InteractionCoordinates interactionCoordinates; private final InsertableStorage insertTarget; private final ExtractableStorage extractTarget; - public FluidHandlerImporterSource(final InteractionCoordinates interactionCoordinates, - final AmountOverride amountOverride) { + FluidHandlerImporterSource(final InteractionCoordinates interactionCoordinates, + final AmountOverride amountOverride) { this.interactionCoordinates = interactionCoordinates; this.insertTarget = new FluidHandlerInsertableStorage(interactionCoordinates, AmountOverride.NONE); this.extractTarget = new FluidHandlerExtractableStorage(interactionCoordinates, amountOverride); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java index 01d0976f9..3f7f61b0f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/importer/ItemHandlerImporterSource.java @@ -13,13 +13,13 @@ import java.util.Iterator; -public class ItemHandlerImporterSource implements ImporterSource { +class ItemHandlerImporterSource implements ImporterSource { private final InteractionCoordinates interactionCoordinates; private final InsertableStorage insertTarget; private final ExtractableStorage extractTarget; - public ItemHandlerImporterSource(final InteractionCoordinates interactionCoordinates, - final AmountOverride amountOverride) { + ItemHandlerImporterSource(final InteractionCoordinates interactionCoordinates, + final AmountOverride amountOverride) { this.interactionCoordinates = interactionCoordinates; this.insertTarget = new ItemHandlerInsertableStorage(interactionCoordinates, AmountOverride.NONE); this.extractTarget = new ItemHandlerExtractableStorage(interactionCoordinates, amountOverride); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java index ff8380499..57ceed741 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/CraftingGridTransferHandler.java @@ -22,7 +22,7 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.world.item.ItemStack; -public class CraftingGridTransferHandler implements TransferHandler { +class CraftingGridTransferHandler implements TransferHandler { private static final Color MISSING_COLOR = new Color(1.0f, 0.0f, 0.0f, 0.4f); private static final CategoryIdentifier CRAFTING = CategoryIdentifier.of("minecraft", "plugins/crafting"); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java index 948155167..58f4215b4 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/DraggableStackVisitorImpl.java @@ -19,11 +19,11 @@ import me.shedaniel.rei.api.client.gui.drag.DraggingContext; import net.minecraft.client.gui.screens.Screen; -public class DraggableStackVisitorImpl +class DraggableStackVisitorImpl implements DraggableStackVisitor> { private final IngredientConverter ingredientConverter; - public DraggableStackVisitorImpl(final IngredientConverter ingredientConverter) { + DraggableStackVisitorImpl(final IngredientConverter ingredientConverter) { this.ingredientConverter = ingredientConverter; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java index 3e8393962..d3b4cde20 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ExclusionZonesProviderImpl.java @@ -8,7 +8,7 @@ import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.registry.screen.ExclusionZonesProvider; -public class ExclusionZonesProviderImpl implements ExclusionZonesProvider> { +class ExclusionZonesProviderImpl implements ExclusionZonesProvider> { @Override public Collection provide(final AbstractBaseScreen screen) { return screen.getExclusionZones().stream() diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java index 1ba8708f6..0ed91efad 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridFocusedStackProvider.java @@ -10,10 +10,10 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import net.minecraft.client.gui.screens.Screen; -public class GridFocusedStackProvider implements FocusedStackProvider { +class GridFocusedStackProvider implements FocusedStackProvider { private final IngredientConverter converter; - public GridFocusedStackProvider(final IngredientConverter converter) { + GridFocusedStackProvider(final IngredientConverter converter) { this.converter = converter; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java index 6aa88e0d9..e83e1b518 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/GridResourceIngredientConverter.java @@ -10,7 +10,7 @@ import dev.architectury.fluid.FluidStack; import me.shedaniel.rei.api.common.util.EntryStacks; -public class GridResourceIngredientConverter implements IngredientConverter { +class GridResourceIngredientConverter implements IngredientConverter { @Override public Optional> convertToResource(final Object ingredient) { return Optional.empty(); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java index f05de9d6f..9f8f5a9f0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/MissingIngredients.java @@ -7,24 +7,24 @@ import it.unimi.dsi.fastutil.ints.IntSet; import me.shedaniel.rei.api.common.entry.EntryIngredient; -public class MissingIngredients { +class MissingIngredients { private final List ingredients = new ArrayList<>(); private final IntSet indices = new IntOpenHashSet(); - public boolean isEmpty() { + boolean isEmpty() { return indices.isEmpty(); } - public void addIngredient(final EntryIngredient ingredient, final int slotIndex) { + void addIngredient(final EntryIngredient ingredient, final int slotIndex) { ingredients.add(ingredient); indices.add(slotIndex); } - public List getIngredients() { + List getIngredients() { return ingredients; } - public boolean isMissing(final int slotIndex) { + boolean isMissing(final int slotIndex) { return indices.contains(slotIndex); } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java index fb8be1ed5..cb2e21ade 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceFocusedStackProvider.java @@ -10,10 +10,10 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import net.minecraft.client.gui.screens.Screen; -public class ResourceFocusedStackProvider implements FocusedStackProvider { +class ResourceFocusedStackProvider implements FocusedStackProvider { private final IngredientConverter converter; - public ResourceFocusedStackProvider(final IngredientConverter converter) { + ResourceFocusedStackProvider(final IngredientConverter converter) { this.converter = converter; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java index 337aafe1e..ce2273584 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/ResourceIngredientConverter.java @@ -12,7 +12,7 @@ import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.world.item.ItemStack; -public class ResourceIngredientConverter implements IngredientConverter { +class ResourceIngredientConverter implements IngredientConverter { @Override public Optional> convertToResource(final Object ingredient) { if (ingredient instanceof FluidStack fluidStack) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java index 039761731..bc889914f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveBakedModel.java @@ -36,7 +36,7 @@ import net.minecraftforge.client.model.data.ModelData; import org.joml.Vector3f; -public class DiskDriveBakedModel extends BakedModelWrapper { +class DiskDriveBakedModel extends BakedModelWrapper { private static final Vector3f[] TRANSLATORS = new Vector3f[8]; static { @@ -64,10 +64,10 @@ public class DiskDriveBakedModel extends BakedModelWrapper { .build(new DiskDriveCacheLoader()); private final Map itemCache = new HashMap<>(); - public DiskDriveBakedModel(final Function baseModelBakery, - final BakedModel baseModel, - final BiFunction diskModelBakery, - final Function diskItemModelBakery) { + DiskDriveBakedModel(final Function baseModelBakery, + final BakedModel baseModel, + final BiFunction diskModelBakery, + final Function diskItemModelBakery) { super(baseModel); this.baseModel = baseModel; this.baseModelBakery = baseModelBakery; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java index f77461e2f..047ae31f8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveItemBakedModel.java @@ -20,7 +20,7 @@ import net.minecraftforge.client.model.BakedModelWrapper; import org.joml.Vector3f; -public class DiskDriveItemBakedModel extends BakedModelWrapper { +class DiskDriveItemBakedModel extends BakedModelWrapper { private final BakedModel baseModel; private final Function diskBakery; private final Vector3f[] translators; @@ -29,10 +29,10 @@ public class DiskDriveItemBakedModel extends BakedModelWrapper { @Nullable private List noSideCache; - public DiskDriveItemBakedModel(final BakedModel baseModel, - final Function diskBakery, - final Vector3f[] translators, - final long disks) { + DiskDriveItemBakedModel(final BakedModel baseModel, + final Function diskBakery, + final Vector3f[] translators, + final long disks) { super(baseModel); this.baseModel = baseModel; this.diskBakery = diskBakery; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java index 9e9b65f3b..16171bb7f 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/storage/diskdrive/DiskDriveUnbakedGeometry.java @@ -27,6 +27,9 @@ public class DiskDriveUnbakedGeometry implements IUnbakedGeometry modelGetter, final IGeometryBakingContext context) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java similarity index 89% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java index 694e168d4..d382c2bcc 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReference.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; @@ -11,11 +11,11 @@ import top.theillusivec4.curios.api.CuriosApi; import top.theillusivec4.curios.api.SlotResult; -public class CuriosSlotReference implements SlotReference { +class CuriosSlotReference implements SlotReference { private final String identifier; private final int index; - public CuriosSlotReference(final String identifier, final int index) { + CuriosSlotReference(final String identifier, final int index) { this.identifier = identifier; this.index = index; } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java similarity index 97% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java index 6a8c85b19..be9e2362b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceFactory.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java similarity index 98% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java index 9101e9158..a0486d21a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/CuriosSlotReferenceProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java @@ -1,4 +1,4 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java similarity index 93% rename from refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java rename to refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java index 3fd560cb4..0f09ee47e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/networkbounditem/package-info.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java @@ -1,6 +1,6 @@ @ParametersAreNonnullByDefault @FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.support.networkbounditem; +package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; From 203f35bce14343b1b5bd323d2f8f2a9f50176b64 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 15:01:13 +0100 Subject: [PATCH 16/24] feat: network node containers can now determine their outgoing connections --- ...stractNetworkNodeContainerBlockEntity.java | 24 ++-- .../api/support/network/ConnectionSink.java | 11 ++ .../network/PlatformNetworkNodeContainer.java | 28 ++--- .../platform/common/PlatformApiImpl.java | 8 +- .../common/detector/DetectorBlockEntity.java | 28 +++-- .../common/support/CableBlockSupport.java | 2 +- ...vider.java => ConnectionProviderImpl.java} | 112 ++++++++---------- .../support/network/ConnectionSinkImpl.java | 32 +++++ .../NetworkNodeContainerBlockEntityImpl.java | 23 ++-- .../WirelessTransmitterBlockEntity.java | 17 ++- 10 files changed, 163 insertions(+), 122 deletions(-) create mode 100644 refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java rename refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/{LevelConnectionProvider.java => ConnectionProviderImpl.java} (64%) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java index 33d255002..39e5fd323 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java @@ -3,16 +3,16 @@ import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import javax.annotation.Nullable; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.world.level.Level; +import net.minecraft.core.GlobalPos; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import org.apiguardian.api.API; +import static java.util.Objects.requireNonNull; + @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.2") public abstract class AbstractNetworkNodeContainerBlockEntity extends BlockEntity implements PlatformNetworkNodeContainer { @@ -63,12 +63,14 @@ public T getNode() { } @Override - public boolean canPerformOutgoingConnection(final Direction direction) { - return true; + public void addOutgoingConnections(final ConnectionSink sink) { + for (final Direction direction : Direction.values()) { + sink.tryConnectInSameDimension(worldPosition.relative(direction), direction.getOpposite()); + } } @Override - public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { + public boolean canAcceptIncomingConnection(final Direction incomingDirection, final BlockState connectingState) { return true; } @@ -77,15 +79,9 @@ public BlockState getContainerBlockState() { return getBlockState(); } - @Nullable - @Override - public Level getContainerLevel() { - return getLevel(); - } - @Override - public BlockPos getContainerPosition() { - return getBlockPos(); + public GlobalPos getContainerPosition() { + return GlobalPos.of(requireNonNull(level).dimension(), worldPosition); } @Override diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java new file mode 100644 index 000000000..e7baa0690 --- /dev/null +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java @@ -0,0 +1,11 @@ +package com.refinedmods.refinedstorage2.platform.api.support.network; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2") +@FunctionalInterface +public interface ConnectionSink { + void tryConnectInSameDimension(BlockPos pos, Direction incomingDirection); +} diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java index aa1f9f806..5ce90b0b2 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/PlatformNetworkNodeContainer.java @@ -2,10 +2,8 @@ import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; -import javax.annotation.Nullable; - -import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.GlobalPos; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import org.apiguardian.api.API; @@ -13,32 +11,28 @@ @API(status = API.Status.STABLE, since = "2.0.0-milestone.2.1") public interface PlatformNetworkNodeContainer extends NetworkNodeContainer { /** - * Returns whether the already discovered node can perform an outgoing connection. - * Changes to this return value won't cause a rebuild of the network state. - * If the return value ever changes, call {@link + * Called when a node is about to be added into the network graph. + * Add outgoing connections here. + * If the outgoing connections ever change, call {@link * com.refinedmods.refinedstorage2.platform.api.PlatformApi#requestNetworkNodeUpdate(NetworkNodeContainer, Level)}. * - * @param direction the outgoing direction - * @return whether the node can perform an outgoing connection + * @param sink the sink that accepts outgoing connections */ - boolean canPerformOutgoingConnection(Direction direction); + void addOutgoingConnections(ConnectionSink sink); /** - * Returns whether the not yet discovered node can accept an incoming connection. + * Returns whether the (not yet discovered) node can accept an incoming connection. * Changes to this return value won't cause a rebuild of the network state. * If the return value ever changes, call {@link * com.refinedmods.refinedstorage2.platform.api.PlatformApi#requestNetworkNodeUpdate(NetworkNodeContainer, Level)}. * - * @param direction the incoming direction - * @param other the state wanting to connect + * @param incomingDirection the incoming direction + * @param connectingState the state wanting to connect * @return whether the node can accept an incoming connection */ - boolean canAcceptIncomingConnection(Direction direction, BlockState other); + boolean canAcceptIncomingConnection(Direction incomingDirection, BlockState connectingState); BlockState getContainerBlockState(); - @Nullable - Level getContainerLevel(); - - BlockPos getContainerPosition(); + GlobalPos getContainerPosition(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java index e20fbd662..442204f50 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/PlatformApiImpl.java @@ -61,7 +61,7 @@ import com.refinedmods.refinedstorage2.platform.common.storagemonitor.CompositeStorageMonitorInsertionStrategy; import com.refinedmods.refinedstorage2.platform.common.support.energy.EnergyItemHelperImpl; import com.refinedmods.refinedstorage2.platform.common.support.energy.ItemEnergyStorage; -import com.refinedmods.refinedstorage2.platform.common.support.network.LevelConnectionProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.ConnectionProviderImpl; import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.CompositeSlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReference; import com.refinedmods.refinedstorage2.platform.common.support.network.bounditem.InventorySlotReferenceFactory; @@ -291,7 +291,7 @@ public BuiltinUpgradeDestinations getBuiltinUpgradeDestinations() { public void requestNetworkNodeInitialization(final NetworkNodeContainer container, final Level level, final Runnable callback) { - final LevelConnectionProvider connectionProvider = new LevelConnectionProvider(level); + final ConnectionProviderImpl connectionProvider = new ConnectionProviderImpl(level); ServerEventQueue.queue(() -> { networkBuilder.initialize(container, connectionProvider); callback.run(); @@ -300,13 +300,13 @@ public void requestNetworkNodeInitialization(final NetworkNodeContainer containe @Override public void requestNetworkNodeRemoval(final NetworkNodeContainer container, final Level level) { - final LevelConnectionProvider connectionProvider = new LevelConnectionProvider(level); + final ConnectionProviderImpl connectionProvider = new ConnectionProviderImpl(level); networkBuilder.remove(container, connectionProvider); } @Override public void requestNetworkNodeUpdate(final NetworkNodeContainer container, final Level level) { - final LevelConnectionProvider connectionProvider = new LevelConnectionProvider(level); + final ConnectionProviderImpl connectionProvider = new ConnectionProviderImpl(level); networkBuilder.update(container, connectionProvider); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java index ccaf24ae2..657415381 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorAmountStrategyImpl; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorMode; import com.refinedmods.refinedstorage2.api.network.impl.node.detector.DetectorNetworkNode; +import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; @@ -152,23 +153,28 @@ public void updateActiveness(final BlockState state, @Nullable final BooleanProp } @Override - public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { - if (!colorsAllowConnecting(other)) { - return false; - } + public void addOutgoingConnections(final ConnectionSink sink) { final Direction myDirection = getDirection(); - if (myDirection != null) { - return myDirection != direction; + if (myDirection == null) { + return; + } + for (final Direction direction : Direction.values()) { + if (direction == myDirection.getOpposite()) { + continue; + } + sink.tryConnectInSameDimension(worldPosition.relative(direction), direction.getOpposite()); } - return true; } @Override - public boolean canPerformOutgoingConnection(final Direction direction) { + public boolean canAcceptIncomingConnection(final Direction incomingDirection, final BlockState connectingState) { + if (!colorsAllowConnecting(connectingState)) { + return false; + } final Direction myDirection = getDirection(); - if (myDirection == null) { - return true; + if (myDirection != null) { + return myDirection != incomingDirection.getOpposite(); } - return myDirection != direction.getOpposite(); + return true; } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java index 987b285f6..94a10fe4d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java @@ -117,6 +117,6 @@ private static boolean hasVisualConnection( if (!(world.getBlockEntity(offsetPos) instanceof PlatformNetworkNodeContainer neighboringContainer)) { return false; } - return neighboringContainer.canAcceptIncomingConnection(direction, blockState); + return neighboringContainer.canAcceptIncomingConnection(direction.getOpposite(), blockState); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java similarity index 64% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java index 6b8ef307e..d8238dfa0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/LevelConnectionProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java @@ -6,19 +6,17 @@ import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; import java.util.ArrayDeque; -import java.util.Collections; +import java.util.ArrayList; import java.util.Comparator; import java.util.HashSet; import java.util.List; -import java.util.Objects; import java.util.Queue; import java.util.Set; import java.util.stream.Collectors; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.resources.ResourceKey; +import net.minecraft.core.GlobalPos; import net.minecraft.server.MinecraftServer; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; @@ -26,12 +24,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class LevelConnectionProvider implements ConnectionProvider { - private static final Logger LOGGER = LoggerFactory.getLogger(LevelConnectionProvider.class); +public class ConnectionProviderImpl implements ConnectionProvider { + private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionProviderImpl.class); private final Level originLevel; - public LevelConnectionProvider(final Level originLevel) { + public ConnectionProviderImpl(final Level originLevel) { this.originLevel = originLevel; } @@ -44,11 +42,11 @@ public Connections findConnections(final NetworkNodeContainer pivot, .collect(Collectors.toSet()); LOGGER.info("Finding connections for pivot {} with {} existing connections", pivot, existingConnections.size()); final ScanState scanState = new ScanState(existingPlatformConnections); - addInitialRequest(pivot, scanState); - ScanRequest currentRequest; + addStartContainer(pivot, scanState); + PlatformNetworkNodeContainer currentContainer; int requests = 0; - while ((currentRequest = scanState.toCheck.poll()) != null) { - visit(scanState, currentRequest); + while ((currentContainer = scanState.toCheck.poll()) != null) { + visit(scanState, new ScanEntry(currentContainer)); requests++; } LOGGER.info( @@ -62,25 +60,11 @@ public Connections findConnections(final NetworkNodeContainer pivot, return scanState.toConnections(); } - private void addInitialRequest(final NetworkNodeContainer pivot, final ScanState scanState) { + private void addStartContainer(final NetworkNodeContainer pivot, final ScanState scanState) { if (!(pivot instanceof PlatformNetworkNodeContainer platformPivot)) { return; } - final Level pivotLevel = platformPivot.getContainerLevel(); - if (pivotLevel == null) { - LOGGER.warn("Pivot level was null for {}", pivot); - return; - } - scanState.toCheck.add(new ScanRequest( - pivotLevel.dimension(), - platformPivot.getContainerPosition() - )); - } - - private void visit(final ScanState state, final ScanRequest request) { - if (getBlockEntity(request.dimension, request.position) instanceof PlatformNetworkNodeContainer container) { - visit(state, new ScanEntry(container, originLevel, request.position)); - } + scanState.toCheck.add(platformPivot); } private void visit(final ScanState state, final ScanEntry entry) { @@ -92,27 +76,38 @@ private void visit(final ScanState state, final ScanEntry entry) { state.newEntries.add(entry); } state.removedEntries.remove(entry); - final Set connections = findConnectionsAt(entry.getContainer()); + final List connections = findConnectionsAt(entry.getContainer()); state.toCheck.addAll(connections); } - private Set findConnectionsAt(final PlatformNetworkNodeContainer from) { - final Level level = from.getContainerLevel(); - if (level == null) { - return Collections.emptySet(); - } - final Set requests = new HashSet<>(); - for (final Direction direction : Direction.values()) { - if (!from.canPerformOutgoingConnection(direction)) { - continue; - } - final BlockPos offsetPos = from.getContainerPosition().relative(direction); - if (getBlockEntity(level, offsetPos) instanceof PlatformNetworkNodeContainer neighborContainer - && neighborContainer.canAcceptIncomingConnection(direction, from.getContainerBlockState())) { - requests.add(new ScanRequest(level.dimension(), offsetPos)); + private List findConnectionsAt(final PlatformNetworkNodeContainer from) { + final ConnectionSinkImpl sink = new ConnectionSinkImpl(from.getContainerPosition()); + from.addOutgoingConnections(sink); + final List connections = new ArrayList<>(); + for (final ConnectionSinkImpl.Connection connection : sink.getConnections()) { + final PlatformNetworkNodeContainer connectionContainer = getConnection(from, connection); + if (connectionContainer != null) { + connections.add(connectionContainer); } } - return requests; + return connections; + } + + @Nullable + private PlatformNetworkNodeContainer getConnection(final PlatformNetworkNodeContainer from, + final ConnectionSinkImpl.Connection connection) { + final BlockEntity connectionBlockEntity = getBlockEntitySafely(connection.pos()); + if (!(connectionBlockEntity instanceof PlatformNetworkNodeContainer connectionContainer)) { + return null; + } + final boolean acceptsIncomingDirection = connectionContainer.canAcceptIncomingConnection( + connection.incomingDirection(), + from.getContainerBlockState() + ); + if (!acceptsIncomingDirection) { + return null; + } + return connectionContainer; } @Override @@ -124,20 +119,20 @@ public List sortDeterministically(final Set dimension, final BlockPos pos) { + private BlockEntity getBlockEntitySafely(final GlobalPos pos) { final MinecraftServer server = originLevel.getServer(); if (server == null) { return null; } - final Level level = server.getLevel(dimension); + final Level level = server.getLevel(pos.dimension()); if (level == null) { return null; } - return getBlockEntity(level, pos); + return getBlockEntitySafely(level, pos.pos()); } @Nullable - private BlockEntity getBlockEntity(final Level level, final BlockPos pos) { + private BlockEntity getBlockEntitySafely(final Level level, final BlockPos pos) { if (!level.isLoaded(pos)) { return null; } @@ -159,7 +154,7 @@ private static class ScanState { private final Set foundEntries = new HashSet<>(); private final Set newEntries = new HashSet<>(); private final Set removedEntries; - private final Queue toCheck = new ArrayDeque<>(); + private final Queue toCheck = new ArrayDeque<>(); ScanState(final Set existingConnections) { this.currentEntries = toScanEntries(existingConnections); @@ -179,23 +174,17 @@ private Set toContainers(final Set entries) { } private static Set toScanEntries(final Set existingConnections) { - return existingConnections.stream().map(container -> new ScanEntry( - container, - Objects.requireNonNull(container.getContainerLevel()), - Objects.requireNonNull(container.getContainerPosition()) - )).collect(Collectors.toSet()); + return existingConnections.stream().map(ScanEntry::new).collect(Collectors.toSet()); } } private static class ScanEntry { private final PlatformNetworkNodeContainer container; - private final ResourceKey dimension; - private final BlockPos position; + private final GlobalPos pos; - ScanEntry(final PlatformNetworkNodeContainer container, final Level dimension, final BlockPos position) { + ScanEntry(final PlatformNetworkNodeContainer container) { this.container = container; - this.dimension = dimension.dimension(); - this.position = position; + this.pos = container.getContainerPosition(); } public PlatformNetworkNodeContainer getContainer() { @@ -211,15 +200,12 @@ public boolean equals(final Object o) { return false; } final ScanEntry that = (ScanEntry) o; - return Objects.equals(dimension, that.dimension) && Objects.equals(position, that.position); + return pos.equals(that.pos); } @Override public int hashCode() { - return Objects.hash(dimension, position); + return pos.hashCode(); } } - - private record ScanRequest(ResourceKey dimension, BlockPos position) { - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java new file mode 100644 index 000000000..36024462d --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java @@ -0,0 +1,32 @@ +package com.refinedmods.refinedstorage2.platform.common.support.network; + +import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; + +import java.util.HashSet; +import java.util.Set; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.GlobalPos; + +class ConnectionSinkImpl implements ConnectionSink { + private final GlobalPos source; + private final Set connections = new HashSet<>(); + + ConnectionSinkImpl(final GlobalPos source) { + this.source = source; + } + + Set getConnections() { + return connections; + } + + @Override + public void tryConnectInSameDimension(final BlockPos pos, final Direction incomingDirection) { + final GlobalPos globalPos = GlobalPos.of(source.dimension(), pos); + connections.add(new Connection(globalPos, incomingDirection)); + } + + record Connection(GlobalPos pos, Direction incomingDirection) { + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java index 40f3dbe1d..a5074ac22 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.support.network.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.ColorableBlock; @@ -77,28 +78,34 @@ public void doWork() { } @Override - public boolean canPerformOutgoingConnection(final Direction direction) { + public void addOutgoingConnections(final ConnectionSink sink) { final Direction myDirection = getDirection(); if (myDirection == null) { - return true; + super.addOutgoingConnections(sink); + return; + } + for (final Direction direction : Direction.values()) { + if (direction == myDirection) { + continue; + } + sink.tryConnectInSameDimension(worldPosition.relative(direction), direction.getOpposite()); } - return myDirection != direction; } @Override - public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { - if (!colorsAllowConnecting(other)) { + public boolean canAcceptIncomingConnection(final Direction incomingDirection, final BlockState connectingState) { + if (!colorsAllowConnecting(connectingState)) { return false; } final Direction myDirection = getDirection(); if (myDirection != null) { - return myDirection != direction.getOpposite(); + return myDirection != incomingDirection; } return true; } - protected final boolean colorsAllowConnecting(final BlockState other) { - if (!(other.getBlock() instanceof ColorableBlock otherColorableBlock)) { + protected final boolean colorsAllowConnecting(final BlockState connectingState) { + if (!(connectingState.getBlock() instanceof ColorableBlock otherColorableBlock)) { return true; } final ColorableBlock colorableBlock = getColor(); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java index 085a57029..ca0f9cfc2 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; import com.refinedmods.refinedstorage2.platform.api.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -61,13 +62,21 @@ public void load(final CompoundTag tag) { } @Override - public boolean canPerformOutgoingConnection(final Direction direction) { - return direction == getDirection(); + public void addOutgoingConnections(final ConnectionSink sink) { + final Direction myDirection = getDirection(); + if (myDirection == null) { + return; + } + sink.tryConnectInSameDimension(worldPosition.relative(myDirection), myDirection.getOpposite()); } @Override - public boolean canAcceptIncomingConnection(final Direction direction, final BlockState other) { - return colorsAllowConnecting(other) && direction.getOpposite() == getDirection(); + public boolean canAcceptIncomingConnection(final Direction incomingDirection, final BlockState connectingState) { + if (!colorsAllowConnecting(connectingState)) { + return false; + } + final Direction myDirection = getDirection(); + return incomingDirection == myDirection; } @Override From 2623f2c8935e090d4cd8dfc5be727d659f38c4b6 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 17:11:34 +0100 Subject: [PATCH 17/24] refactor: provide GraphNetworkComponent as API and allow specifying and querying by container key This transforms GraphNetworkComponent into an interface and introduces the implementation in GraphNetworkComponentImpl. --- .../component/GraphNetworkComponent.java | 38 +++++++ .../node/container/NetworkNodeContainer.java | 18 ++++ .../network/test/NetworkTestFixtures.java | 5 +- .../test/NetworkTestExtensionTest.java | 2 +- .../api/network/impl/NetworkBuilderImpl.java | 2 +- ...nt.java => GraphNetworkComponentImpl.java} | 46 ++++++--- .../impl/AbstractNetworkBuilderImplTest.java | 10 +- .../InitializeNetworkBuilderImplTest.java | 23 +++-- .../impl/RemoveNetworkBuilderImplTest.java | 5 +- .../impl/UpdateNetworkBuilderImplTest.java | 2 +- ...ava => GraphNetworkComponentImplTest.java} | 99 ++++++++++++++++++- .../common/AbstractModInitializer.java | 5 +- .../NetworkBoundItemSessionImpl.java | 2 +- 13 files changed, 217 insertions(+), 40 deletions(-) create mode 100644 refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/component/GraphNetworkComponent.java rename refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/{GraphNetworkComponent.java => GraphNetworkComponentImpl.java} (64%) rename refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/{GraphNetworkComponentTest.java => GraphNetworkComponentImplTest.java} (71%) diff --git a/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/component/GraphNetworkComponent.java b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/component/GraphNetworkComponent.java new file mode 100644 index 000000000..3fd9c1071 --- /dev/null +++ b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/component/GraphNetworkComponent.java @@ -0,0 +1,38 @@ +package com.refinedmods.refinedstorage2.api.network.component; + +import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; + +import java.util.Set; +import javax.annotation.Nullable; + +import org.apiguardian.api.API; + +/** + * Responsible for managing the connected network nodes in a network. + */ +@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2") +public interface GraphNetworkComponent extends NetworkComponent { + /** + * @return all the containers currently present in this graph + */ + Set getContainers(); + + /** + * Retrieves containers by container type. + * It can be queried by exact class type or by interface type. + * + * @param clazz the container class type + * @param the container class type + * @return the containers matching the type + */ + Set getContainers(Class clazz); + + /** + * Retrieves a container by key, defined in {@link NetworkNodeContainer#createKey()}. + * + * @param key the key + * @return the container, or null if not found + */ + @Nullable + NetworkNodeContainer getContainer(Object key); +} diff --git a/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/container/NetworkNodeContainer.java b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/container/NetworkNodeContainer.java index e3302fb26..3f7aaf65d 100644 --- a/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/container/NetworkNodeContainer.java +++ b/refinedstorage2-network-api/src/main/java/com/refinedmods/refinedstorage2/api/network/node/container/NetworkNodeContainer.java @@ -2,6 +2,8 @@ import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; +import javax.annotation.Nullable; + import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.1.0") @@ -9,6 +11,22 @@ public interface NetworkNodeContainer { NetworkNode getNode(); + /** + * If this container needs to be indexed by the network graph, so it can be queried quickly (by key), + * you can return a key here. + * The key must be kept stable, and must stay the same for the lifetime of the container. + * If it changes after adding it into the graph, the container would not be removed from the key index when the + * container is removed! + * The container can be queried by + * {@link com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent#getContainer(Object)}. + * + * @return the key, or null if indexing is not required + */ + @Nullable + default Object createKey() { + return null; + } + /** * The container priority determines the order in which the remainder containers as the result of a network split * are re-initialized with a new network. diff --git a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java index 96ebf89ec..122c7e57c 100644 --- a/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java +++ b/refinedstorage2-network-test/src/main/java/com/refinedmods/refinedstorage2/network/test/NetworkTestFixtures.java @@ -3,10 +3,11 @@ import com.refinedmods.refinedstorage2.api.core.component.ComponentMapFactory; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.component.EnergyNetworkComponentImpl; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.network.impl.component.StorageNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelImpl; import com.refinedmods.refinedstorage2.api.storage.channel.StorageChannelType; @@ -26,7 +27,7 @@ public final class NetworkTestFixtures { ); NETWORK_COMPONENT_MAP_FACTORY.addFactory( GraphNetworkComponent.class, - GraphNetworkComponent::new + GraphNetworkComponentImpl::new ); NETWORK_COMPONENT_MAP_FACTORY.addFactory( StorageNetworkComponent.class, diff --git a/refinedstorage2-network-test/src/test/java/com/refinedmods/refinedstorage2/network/test/NetworkTestExtensionTest.java b/refinedstorage2-network-test/src/test/java/com/refinedmods/refinedstorage2/network/test/NetworkTestExtensionTest.java index c7cb59f11..fdc23d6d2 100644 --- a/refinedstorage2-network-test/src/test/java/com/refinedmods/refinedstorage2/network/test/NetworkTestExtensionTest.java +++ b/refinedstorage2-network-test/src/test/java/com/refinedmods/refinedstorage2/network/test/NetworkTestExtensionTest.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageNetworkNode; import com.refinedmods.refinedstorage2.api.network.impl.node.storage.StorageNetworkNode; diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/NetworkBuilderImpl.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/NetworkBuilderImpl.java index 054282a8f..3d7859e02 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/NetworkBuilderImpl.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/NetworkBuilderImpl.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage2.api.network.Connections; import com.refinedmods.refinedstorage2.api.network.Network; import com.refinedmods.refinedstorage2.api.network.NetworkBuilder; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; diff --git a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImpl.java similarity index 64% rename from refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java rename to refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImpl.java index 18bda8c72..9ce369dc1 100644 --- a/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponent.java +++ b/refinedstorage2-network/src/main/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImpl.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.api.network.impl.component; import com.refinedmods.refinedstorage2.api.network.Network; -import com.refinedmods.refinedstorage2.api.network.component.NetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import java.util.Collections; @@ -9,28 +9,38 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class GraphNetworkComponent implements NetworkComponent { - private static final Logger LOGGER = LoggerFactory.getLogger(GraphNetworkComponent.class); +public class GraphNetworkComponentImpl implements GraphNetworkComponent { + private static final Logger LOGGER = LoggerFactory.getLogger(GraphNetworkComponentImpl.class); private final Network network; private final Set containers = new HashSet<>(); - private final Map, Set> containerIndex = new HashMap<>(); + private final Map, Set> byClassIndex = new HashMap<>(); + private final Map byKeyIndex = new HashMap<>(); - public GraphNetworkComponent(final Network network) { + public GraphNetworkComponentImpl(final Network network) { this.network = network; } + @Override public Set getContainers() { return Collections.unmodifiableSet(containers); } + @Override @SuppressWarnings("unchecked") public Set getContainers(final Class clazz) { - return (Set) Collections.unmodifiableSet(containerIndex.getOrDefault(clazz, Collections.emptySet())); + return (Set) Collections.unmodifiableSet(byClassIndex.getOrDefault(clazz, Collections.emptySet())); + } + + @Override + @Nullable + public NetworkNodeContainer getContainer(final Object key) { + return byKeyIndex.get(key); } @Override @@ -44,10 +54,14 @@ public void onContainerAdded(final NetworkNodeContainer container) { public void onContainerRemoved(final NetworkNodeContainer container) { LOGGER.debug("Container {} removed from network {}", container, network.hashCode()); containers.remove(container); - deleteFromIndex(container); + removeFromIndex(container); } private void addToIndex(final NetworkNodeContainer container) { + final Object key = container.createKey(); + if (key != null) { + byKeyIndex.put(key, container); + } final Class clazz = container.getClass(); addToIndex(clazz, container); for (final Class iface : clazz.getInterfaces()) { @@ -56,23 +70,27 @@ private void addToIndex(final NetworkNodeContainer container) { } private void addToIndex(final Class indexKey, final NetworkNodeContainer container) { - containerIndex.computeIfAbsent(indexKey, k -> new HashSet<>()).add(container); + byClassIndex.computeIfAbsent(indexKey, k -> new HashSet<>()).add(container); } - private void deleteFromIndex(final NetworkNodeContainer container) { + private void removeFromIndex(final NetworkNodeContainer container) { + final Object key = container.createKey(); + if (key != null) { + byKeyIndex.remove(key); + } final Class clazz = container.getClass(); - deleteFromIndex(clazz, container); + removeFromIndex(clazz, container); for (final Class iface : clazz.getInterfaces()) { - deleteFromIndex(iface, container); + removeFromIndex(iface, container); } } - private void deleteFromIndex(final Class indexKey, final NetworkNodeContainer container) { - final Set index = containerIndex.get(indexKey); + private void removeFromIndex(final Class indexKey, final NetworkNodeContainer container) { + final Set index = byClassIndex.get(indexKey); if (index != null) { index.remove(container); if (index.isEmpty()) { - containerIndex.remove(indexKey); + byClassIndex.remove(indexKey); } } } diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/AbstractNetworkBuilderImplTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/AbstractNetworkBuilderImplTest.java index d770b8684..34787628b 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/AbstractNetworkBuilderImplTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/AbstractNetworkBuilderImplTest.java @@ -10,12 +10,14 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.Set; import java.util.function.Function; +import javax.annotation.Nullable; import org.junit.jupiter.api.BeforeEach; +import static java.util.Objects.requireNonNull; + abstract class AbstractNetworkBuilderImplTest { protected NetworkBuilder sut; private ComponentMapFactory componentMapFactory; @@ -30,10 +32,8 @@ void setUp() { sut = new NetworkBuilderImpl(new NetworkFactory(componentMapFactory)); } - protected void clearTracking(final Network network) { - Objects.requireNonNull(network) - .getComponent(InterceptingNetworkComponent.class) - .clear(); + protected void clearTracking(@Nullable final Network network) { + requireNonNull(network).getComponent(InterceptingNetworkComponent.class).clear(); } protected NetworkNodeContainer createContainerWithNetwork() { diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/InitializeNetworkBuilderImplTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/InitializeNetworkBuilderImplTest.java index 3b43bb65b..76f4d1e9a 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/InitializeNetworkBuilderImplTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/InitializeNetworkBuilderImplTest.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.api.network.impl; import com.refinedmods.refinedstorage2.api.network.Network; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import org.junit.jupiter.api.Test; @@ -50,7 +50,8 @@ void shouldFormNetwork() { assertThat(unrelatedContainer.getNode().getNetwork()) .isNotNull() .isNotEqualTo(container.getNode().getNetwork()); - assertThat(unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) + assertThat( + unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) .containsExactly(unrelatedContainer); } @@ -85,7 +86,8 @@ void shouldJoinExistingNetwork() { assertThat(existingContainer1.getNode().getNetwork()).isEqualTo(expectedNetwork); assertThat(existingContainer2.getNode().getNetwork()).isEqualTo(expectedNetwork); assertThat(newContainer.getNode().getNetwork()).isEqualTo(expectedNetwork); - assertThat(expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( + assertThat( + expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( existingContainer1, existingContainer2, newContainer @@ -101,7 +103,8 @@ void shouldJoinExistingNetwork() { assertThat(getNetworkMerges(expectedNetwork)).isEmpty(); assertThat(unrelatedContainer.getNode().getNetwork()).isNotNull().isNotEqualTo(expectedNetwork); - assertThat(unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) + assertThat( + unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) .containsExactly(unrelatedContainer); } @@ -140,7 +143,8 @@ void shouldMergeWithExistingNetworks() { assertThat(existingContainer2.getNode().getNetwork()).isEqualTo(expectedNetwork); assertThat(existingContainer0.getNode().getNetwork()).isEqualTo(expectedNetwork); assertThat(newContainer.getNode().getNetwork()).isEqualTo(expectedNetwork); - assertThat(expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( + assertThat( + expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( existingContainer1, existingContainer2, existingContainer0, @@ -154,7 +158,8 @@ void shouldMergeWithExistingNetworks() { assertThat(getNetworkMerges(expectedNetwork)).isEmpty(); assertThat(unrelatedContainer.getNode().getNetwork()).isNotNull().isNotEqualTo(expectedNetwork); - assertThat(unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) + assertThat( + unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) .containsExactly(unrelatedContainer); } @@ -190,7 +195,8 @@ void shouldFormNetworkIfThereAreNeighborsWithoutNetwork() { assertThat(container2.getNode().getNetwork()).isEqualTo(expectedNetwork); assertThat(container3.getNode().getNetwork()).isEqualTo(expectedNetwork); - assertThat(expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( + assertThat( + expectedNetwork.getComponent(GraphNetworkComponent.class).getContainers()).containsExactlyInAnyOrder( container1, container2, container3 @@ -202,7 +208,8 @@ void shouldFormNetworkIfThereAreNeighborsWithoutNetwork() { assertThat(getAmountRemoved(expectedNetwork)).isZero(); assertThat(unrelatedContainer.getNode().getNetwork()).isNotNull().isNotEqualTo(expectedNetwork); - assertThat(unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) + assertThat( + unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) .containsExactly(unrelatedContainer); } } diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/RemoveNetworkBuilderImplTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/RemoveNetworkBuilderImplTest.java index d5fd697cf..16aeb3b0d 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/RemoveNetworkBuilderImplTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/RemoveNetworkBuilderImplTest.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.api.network.impl; import com.refinedmods.refinedstorage2.api.network.Network; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import java.util.List; @@ -235,7 +235,8 @@ void shouldRemoveNetwork() { assertThat(container.getNode().getNetwork()).isNull(); assertThat(unrelatedContainer.getNode().getNetwork()).isNotNull(); - assertThat(unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) + assertThat( + unrelatedContainer.getNode().getNetwork().getComponent(GraphNetworkComponent.class).getContainers()) .containsExactlyInAnyOrder(unrelatedContainer); assertThat(network).isNotNull(); diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/UpdateNetworkBuilderImplTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/UpdateNetworkBuilderImplTest.java index 403d91033..deba09825 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/UpdateNetworkBuilderImplTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/UpdateNetworkBuilderImplTest.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.api.network.impl; import com.refinedmods.refinedstorage2.api.network.Network; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.container.NetworkNodeContainer; import java.util.Set; diff --git a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentTest.java b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImplTest.java similarity index 71% rename from refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentTest.java rename to refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImplTest.java index dc9b2ab61..901e04bb8 100644 --- a/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentTest.java +++ b/refinedstorage2-network/src/test/java/com/refinedmods/refinedstorage2/api/network/impl/component/GraphNetworkComponentImplTest.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage2.api.network.impl.component; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.NetworkImpl; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; @@ -13,12 +14,12 @@ import static org.assertj.core.api.Assertions.assertThat; -class GraphNetworkComponentTest { +class GraphNetworkComponentImplTest { GraphNetworkComponent sut; @BeforeEach void setUp() { - sut = new GraphNetworkComponent(new NetworkImpl(NetworkTestFixtures.NETWORK_COMPONENT_MAP_FACTORY)); + sut = new GraphNetworkComponentImpl(new NetworkImpl(NetworkTestFixtures.NETWORK_COMPONENT_MAP_FACTORY)); } @Test @@ -51,7 +52,7 @@ void shouldRemoveContainer() { } @Test - void shouldNotRetrieveContainersByClassThatDontExist() { + void shouldNotRetrieveContainersByClassThatDoesNotExist() { // Act final Set containers = sut.getContainers(NetworkNodeContainer1.class); @@ -191,6 +192,98 @@ void shouldRemoveMultipleContainersAndRetrieveByInterface() { assertThat(containers).isEmpty(); } + @Test + void shouldNotRetrieveContainerByIndexThatDoesNotExist() { + // Arrange + sut.onContainerAdded(() -> new SimpleNetworkNode(0)); + + // Act + final NetworkNodeContainer container = sut.getContainer("does not exist"); + + // Assert + assertThat(container).isNull(); + } + + @Test + void shouldRetrieveContainerByIndex() { + // Arrange + final NetworkNodeContainer container1 = new NetworkNodeContainer() { + @Override + public NetworkNode getNode() { + return new SimpleNetworkNode(0); + } + + @Override + public Object createKey() { + return "key0"; + } + }; + + final NetworkNodeContainer container2 = new NetworkNodeContainer() { + @Override + public NetworkNode getNode() { + return new SimpleNetworkNode(0); + } + + @Override + public Object createKey() { + return "key1"; + } + }; + + sut.onContainerAdded(container1); + sut.onContainerAdded(container2); + + // Act + final NetworkNodeContainer foundContainer1 = sut.getContainer("key0"); + final NetworkNodeContainer foundContainer2 = sut.getContainer("key1"); + + // Assert + assertThat(foundContainer1).isEqualTo(container1); + assertThat(foundContainer2).isEqualTo(container2); + } + + @Test + void shouldRemoveContainerWithKey() { + // Arrange + final NetworkNodeContainer container1 = new NetworkNodeContainer() { + @Override + public NetworkNode getNode() { + return new SimpleNetworkNode(0); + } + + @Override + public Object createKey() { + return "key0"; + } + }; + + final NetworkNodeContainer container2 = new NetworkNodeContainer() { + @Override + public NetworkNode getNode() { + return new SimpleNetworkNode(0); + } + + @Override + public Object createKey() { + return "key1"; + } + }; + + sut.onContainerAdded(container1); + sut.onContainerAdded(container2); + + // Act + sut.onContainerRemoved(container2); + + // Assert + final NetworkNodeContainer foundContainer1 = sut.getContainer("key0"); + final NetworkNodeContainer foundContainer2 = sut.getContainer("key1"); + + assertThat(foundContainer1).isEqualTo(container1); + assertThat(foundContainer2).isNull(); + } + private static class NetworkNodeContainer1 implements NetworkNodeContainer, BothImplements { @Override public NetworkNode getNode() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 4ba7fda02..2a48a9695 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -1,9 +1,10 @@ package com.refinedmods.refinedstorage2.platform.common; import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.component.StorageNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.component.EnergyNetworkComponentImpl; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.network.impl.component.StorageNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; @@ -219,7 +220,7 @@ private void registerNetworkComponents() { ); PlatformApi.INSTANCE.getNetworkComponentMapFactory().addFactory( GraphNetworkComponent.class, - GraphNetworkComponent::new + GraphNetworkComponentImpl::new ); PlatformApi.INSTANCE.getNetworkComponentMapFactory().addFactory( StorageNetworkComponent.class, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java index 1938c6a66..a1ffad1c5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/bounditem/NetworkBoundItemSessionImpl.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage2.api.core.Action; import com.refinedmods.refinedstorage2.api.network.Network; -import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.NetworkNode; import com.refinedmods.refinedstorage2.platform.api.support.network.PlatformNetworkNodeContainer; import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.NetworkBoundItemSession; From 7fa22d04e30ac61e5ffeffcbccabce8d1163a714 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 17:43:50 +0100 Subject: [PATCH 18/24] fix: update network node activeness independently from the block state activeness Previously, we would keep a cached "last active" value and update based on that. When it changed, we would update the node activeness and propagate the block state change. However, this setup breaks when the network node disconnects while the chunk is unloading. How so? When the chunk unloads, it would update this "last active" value to "false", update the network node activeness, and update the block state. However, the block state updating would fail as the chunk is currently unloading. That means that when the network node disconnected, activeness goes to "false", but the block state would stay "true". Until now, this wasn't really an issue as we can safely assume that the network node would become active again as the chunk loads. However, now we are adding wireless networking with the network transmitter and network receiver. If a chunk with a network receiver unloads, the network connection would disconnect. If we rejoin the chunk, the activeness on the block state would be "true", but there is no network connection! It would only move the block state to activeness "false" when a change occurs in the activeness, as we only update the block state activeness when the network node activeness changes. This change makes it so that we (still) update the network node activeness, but, now are also allowed to update the block state later if we rejoin a chunk to make it consistent. This can cause a flicker at startup as the network boots up. At startup, it detects that the block state is still active, however, the network is not initialized yet. It would send a block state update to become inactive and then another block state update to become active again as the network is initialized. This wasn't an issue previously as the cached "last active" was "false" at startup. Since activeness was also "false" at startup, it wouldn't detect a change. If the node goes to active a bit later, it would update the activeness in the node, but a block state update wouldn't be necessary as it was active already. This essentially eliminated the "initialization" block state update. Overall, this change makes sure that activeness is always consistent with the block state representation, even at startup, as a consequence. This fixes the network receiver bug mentioned above, but will also solve general possible block state inconsistency. --- .../AbstractDiskDriveBlockEntity.java | 7 +-- .../ExternalStorageBlockEntity.java | 7 +-- .../NetworkNodeContainerBlockEntityImpl.java | 44 ++++++++++--------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index d8a8ad0e5..75682714b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -39,7 +39,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -142,10 +141,8 @@ private void initialize(final Level level) { } @Override - public void activenessChanged(final BlockState state, - final boolean newActive, - @Nullable final BooleanProperty activenessProperty) { - super.activenessChanged(state, newActive, activenessProperty); + public void activenessChanged(final boolean newActive) { + super.activenessChanged(newActive); updateBlock(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java index bebb0d294..3831f0ff8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java @@ -29,7 +29,6 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -83,10 +82,8 @@ public void setBlockState(final BlockState newBlockState) { } @Override - protected void activenessChanged(final BlockState state, - final boolean newActive, - @Nullable final BooleanProperty activenessProperty) { - super.activenessChanged(state, newActive, activenessProperty); + protected void activenessChanged(final boolean newActive) { + super.activenessChanged(newActive); if (!initialized && level instanceof ServerLevel serverLevel) { LOGGER.debug("Triggering initial load of external storage {}", worldPosition); loadStorage(serverLevel); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java index a5074ac22..5c197b496 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java @@ -24,7 +24,6 @@ public class NetworkNodeContainerBlockEntityImpl private static final Logger LOGGER = LoggerFactory.getLogger(NetworkNodeContainerBlockEntityImpl.class); private final RateLimiter activenessChangeRateLimiter = RateLimiter.create(1); - private boolean lastActive; public NetworkNodeContainerBlockEntityImpl(final BlockEntityType type, final BlockPos pos, @@ -41,34 +40,37 @@ && getNode().getNetwork() != null && getNode().getNetwork().getComponent(EnergyNetworkComponent.class).getStored() >= energyUsage; } - public void updateActiveness(final BlockState state, - @Nullable final BooleanProperty activenessProperty) { + public void updateActiveness(final BlockState state, @Nullable final BooleanProperty activenessProperty) { final boolean newActive = isActive(); - if (newActive != lastActive && activenessChangeRateLimiter.tryAcquire()) { - LOGGER.debug("Activeness change for node at {}: {} -> {}", getBlockPos(), lastActive, newActive); - this.lastActive = newActive; - activenessChanged(state, newActive, activenessProperty); + final boolean nodeActivenessNeedsUpdate = newActive != getNode().isActive(); + final boolean blockStateActivenessNeedsUpdate = activenessProperty != null + && state.getValue(activenessProperty) != newActive; + final boolean activenessNeedsUpdate = nodeActivenessNeedsUpdate || blockStateActivenessNeedsUpdate; + if (activenessNeedsUpdate && activenessChangeRateLimiter.tryAcquire()) { + if (nodeActivenessNeedsUpdate) { + activenessChanged(newActive); + } + if (blockStateActivenessNeedsUpdate) { + updateActivenessBlockState(state, activenessProperty, newActive); + } } } - protected void activenessChanged(final BlockState state, - final boolean newActive, - @Nullable final BooleanProperty activenessProperty) { + protected void activenessChanged(final boolean newActive) { + LOGGER.info("Activeness change for node at {}: {} -> {}", getBlockPos(), getNode().isActive(), newActive); getNode().setActive(newActive); - - final boolean needToUpdateBlockState = activenessProperty != null - && state.getValue(activenessProperty) != newActive; - - if (needToUpdateBlockState) { - LOGGER.debug("Sending block update for block at {} due to state change to {}", getBlockPos(), newActive); - updateActivenessState(state, activenessProperty, newActive); - } } - private void updateActivenessState(final BlockState state, - final BooleanProperty activenessProperty, - final boolean active) { + private void updateActivenessBlockState(final BlockState state, + final BooleanProperty activenessProperty, + final boolean active) { if (level != null) { + LOGGER.info( + "Sending block update at {} due to activeness change: {} -> {}", + getBlockPos(), + state.getValue(activenessProperty), + active + ); level.setBlockAndUpdate(getBlockPos(), state.setValue(activenessProperty, active)); } } From cb071db1e58d415e44537d7b00686badb58808ba Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Wed, 1 Nov 2023 13:03:14 +0100 Subject: [PATCH 19/24] feat: network transmitter The network transmitter now has an indicator on the block state whether the connection with the receiver is active. With not enough energy, it's inactive. Without network card or without connection, it's in errored state. Otherwise, it's in active state. The network transmitter will actively retry to reconnect if the connection is lost (for example due to chunk unloading). --- CHANGELOG.md | 6 + .../api/support/network/ConnectionSink.java | 4 +- .../black_network_transmitter.json | 13 + .../blockstates/blue_network_transmitter.json | 13 + .../brown_network_transmitter.json | 13 + .../blockstates/cyan_network_transmitter.json | 13 + .../blockstates/gray_network_transmitter.json | 13 + .../green_network_transmitter.json | 13 + .../light_gray_network_transmitter.json | 13 + .../blockstates/lime_network_transmitter.json | 13 + .../magenta_network_transmitter.json | 13 + .../blockstates/network_transmitter.json | 13 + .../orange_network_transmitter.json | 13 + .../blockstates/pink_network_transmitter.json | 13 + .../purple_network_transmitter.json | 13 + .../blockstates/red_network_transmitter.json | 13 + .../white_network_transmitter.json | 13 + .../yellow_network_transmitter.json | 13 + .../block/network_transmitter/black.json | 8 + .../block/network_transmitter/blue.json | 8 + .../block/network_transmitter/brown.json | 8 + .../block/network_transmitter/cyan.json | 8 + .../block/network_transmitter/error.json | 8 + .../block/network_transmitter/gray.json | 8 + .../block/network_transmitter/green.json | 8 + .../block/network_transmitter/inactive.json | 8 + .../block/network_transmitter/light_blue.json | 8 + .../block/network_transmitter/light_gray.json | 8 + .../block/network_transmitter/lime.json | 8 + .../block/network_transmitter/magenta.json | 8 + .../block/network_transmitter/orange.json | 8 + .../block/network_transmitter/pink.json | 8 + .../block/network_transmitter/purple.json | 8 + .../models/block/network_transmitter/red.json | 8 + .../block/network_transmitter/white.json | 8 + .../block/network_transmitter/yellow.json | 8 + .../item/black_network_transmitter.json | 6 + .../models/item/blue_network_transmitter.json | 6 + .../item/brown_network_transmitter.json | 6 + .../models/item/cyan_network_transmitter.json | 6 + .../models/item/gray_network_transmitter.json | 6 + .../item/green_network_transmitter.json | 6 + .../item/light_gray_network_transmitter.json | 6 + .../models/item/lime_network_transmitter.json | 6 + .../item/magenta_network_transmitter.json | 6 + .../models/item/network_transmitter.json | 6 + .../item/orange_network_transmitter.json | 6 + .../models/item/pink_network_transmitter.json | 6 + .../item/purple_network_transmitter.json | 6 + .../models/item/red_network_transmitter.json | 6 + .../item/white_network_transmitter.json | 6 + .../item/yellow_network_transmitter.json | 6 + .../coloring/black_network_transmitter.json | 33 +++ .../coloring/blue_network_transmitter.json | 33 +++ .../coloring/brown_network_transmitter.json | 33 +++ .../coloring/cyan_network_transmitter.json | 33 +++ .../coloring/gray_network_transmitter.json | 33 +++ .../coloring/green_network_transmitter.json | 33 +++ .../light_blue_network_transmitter.json | 33 +++ .../light_gray_network_transmitter.json | 33 +++ .../coloring/lime_network_transmitter.json | 33 +++ .../coloring/magenta_network_transmitter.json | 33 +++ .../coloring/orange_network_transmitter.json | 33 +++ .../coloring/pink_network_transmitter.json | 33 +++ .../coloring/purple_network_transmitter.json | 33 +++ .../coloring/red_network_transmitter.json | 33 +++ .../coloring/white_network_transmitter.json | 33 +++ .../coloring/yellow_network_transmitter.json | 33 +++ .../blocks/black_network_transmitter.json | 20 ++ .../blocks/blue_network_transmitter.json | 20 ++ .../blocks/brown_network_transmitter.json | 20 ++ .../blocks/cyan_network_transmitter.json | 20 ++ .../blocks/gray_network_transmitter.json | 20 ++ .../blocks/green_network_transmitter.json | 20 ++ .../light_gray_network_transmitter.json | 20 ++ .../blocks/lime_network_transmitter.json | 20 ++ .../blocks/magenta_network_transmitter.json | 20 ++ .../blocks/network_transmitter.json | 20 ++ .../blocks/orange_network_transmitter.json | 20 ++ .../blocks/pink_network_transmitter.json | 20 ++ .../blocks/purple_network_transmitter.json | 20 ++ .../blocks/red_network_transmitter.json | 20 ++ .../blocks/white_network_transmitter.json | 20 ++ .../blocks/yellow_network_transmitter.json | 20 ++ .../coloring/black_network_transmitter.json | 15 ++ .../coloring/blue_network_transmitter.json | 15 ++ .../coloring/brown_network_transmitter.json | 15 ++ .../coloring/cyan_network_transmitter.json | 15 ++ .../coloring/gray_network_transmitter.json | 15 ++ .../coloring/green_network_transmitter.json | 15 ++ .../light_blue_network_transmitter.json | 15 ++ .../light_gray_network_transmitter.json | 15 ++ .../coloring/lime_network_transmitter.json | 15 ++ .../coloring/magenta_network_transmitter.json | 15 ++ .../coloring/orange_network_transmitter.json | 15 ++ .../coloring/pink_network_transmitter.json | 15 ++ .../coloring/purple_network_transmitter.json | 15 ++ .../coloring/red_network_transmitter.json | 15 ++ .../coloring/white_network_transmitter.json | 15 ++ .../coloring/yellow_network_transmitter.json | 15 ++ .../tags/items/network_transmitters.json | 20 ++ .../common/AbstractClientModInitializer.java | 2 + .../common/AbstractModInitializer.java | 24 +- .../platform/common/Config.java | 2 + .../common/content/BlockEntities.java | 22 +- .../platform/common/content/Blocks.java | 11 + .../platform/common/content/ContentIds.java | 1 + .../platform/common/content/ContentNames.java | 1 + .../common/content/CreativeModeTabItems.java | 1 + .../common/content/DefaultEnergyUsage.java | 1 + .../platform/common/content/Items.java | 11 +- .../common/content/MenuTypeFactory.java | 1 + .../platform/common/content/Menus.java | 11 + .../platform/common/content/Tags.java | 1 + .../controller/ControllerBlockEntity.java | 21 +- .../common/networking/NetworkCardItem.java | 52 ++-- .../networking/NetworkReceiverBlock.java | 12 +- .../NetworkReceiverBlockEntity.java | 28 +++ .../common/networking/NetworkReceiverKey.java | 35 +++ .../networking/NetworkTransmitterBlock.java | 66 ++++++ .../NetworkTransmitterBlockEntity.java | 222 ++++++++++++++++++ .../NetworkTransmitterBlockEntityTicker.java | 25 ++ .../NetworkTransmitterContainerMenu.java | 98 ++++++++ .../networking/NetworkTransmitterScreen.java | 48 ++++ .../networking/NetworkTransmitterState.java | 20 ++ .../networking/NetworkTransmitterStatus.java | 13 + .../support/ServerToClientCommunications.java | 3 + .../network/ConnectionProviderImpl.java | 3 + .../support/network/ConnectionSinkImpl.java | 8 +- .../common/upgrade/UpgradeContainer.java | 3 +- .../assets/refinedstorage2/lang/en_us.json | 11 +- .../block/network_transmitter/base.png | Bin 0 -> 701 bytes .../network_transmitter/cutouts/black.png | Bin 0 -> 2958 bytes .../network_transmitter/cutouts/blue.png | Bin 0 -> 2975 bytes .../network_transmitter/cutouts/brown.png | Bin 0 -> 2976 bytes .../network_transmitter/cutouts/cyan.png | Bin 0 -> 2984 bytes .../network_transmitter/cutouts/error.png | Bin 0 -> 622 bytes .../network_transmitter/cutouts/gray.png | Bin 0 -> 2967 bytes .../network_transmitter/cutouts/green.png | Bin 0 -> 2986 bytes .../network_transmitter/cutouts/inactive.png | Bin 0 -> 270 bytes .../cutouts/light_blue.png | Bin 0 -> 342 bytes .../cutouts/light_gray.png | Bin 0 -> 2961 bytes .../network_transmitter/cutouts/lime.png | Bin 0 -> 2983 bytes .../network_transmitter/cutouts/magenta.png | Bin 0 -> 2976 bytes .../network_transmitter/cutouts/orange.png | Bin 0 -> 2951 bytes .../network_transmitter/cutouts/pink.png | Bin 0 -> 2933 bytes .../network_transmitter/cutouts/purple.png | Bin 0 -> 2982 bytes .../block/network_transmitter/cutouts/red.png | Bin 0 -> 2966 bytes .../network_transmitter/cutouts/white.png | Bin 0 -> 2950 bytes .../network_transmitter/cutouts/yellow.png | Bin 0 -> 2960 bytes .../textures/gui/network_transmitter.png | Bin 0 -> 1899 bytes .../advancements/no_cables_required.json | 34 +++ .../recipes/network_transmitter.json | 31 +++ .../fabric/ClientModInitializerImpl.java | 26 ++ .../platform/fabric/ConfigImpl.java | 10 + .../platform/fabric/packet/PacketIds.java | 1 + .../s2c/NetworkTransmitterStatusPacket.java | 28 +++ .../s2c/ServerToClientCommunicationsImpl.java | 9 + .../rei/RefinedStorageREIClientPlugin.java | 6 + .../platform/forge/ConfigImpl.java | 11 + .../forge/datagen/BlockModelProvider.java | 21 ++ .../forge/datagen/BlockStateProvider.java | 20 ++ .../forge/datagen/ItemModelProvider.java | 13 + .../forge/datagen/loot/BlockDropProvider.java | 2 + .../forge/datagen/loot/LootTableProvider.java | 6 +- .../recipe/RecoloringRecipeProvider.java | 3 + .../forge/datagen/tag/ItemTagGenerator.java | 5 + .../platform/forge/packet/NetworkManager.java | 8 + .../s2c/NetworkTransmitterStatusPacket.java | 43 ++++ .../s2c/ServerToClientCommunicationsImpl.java | 6 + .../rei/RefinedStorageREIClientPlugin.java | 6 + 171 files changed, 2548 insertions(+), 64 deletions(-) create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/black.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/blue.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/brown.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/cyan.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/error.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/gray.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/green.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/inactive.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_blue.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_gray.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/lime.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/magenta.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/orange.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/pink.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/purple.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/red.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/white.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/yellow.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_transmitter.json create mode 100644 refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_transmitters.json create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlockEntity.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlock.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntityTicker.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterContainerMenu.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterState.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterStatus.java create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/base.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/black.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/blue.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/brown.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/cyan.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/error.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/gray.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/green.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/inactive.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_blue.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_gray.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/lime.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/magenta.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/orange.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/pink.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/purple.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/red.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/white.png create mode 100644 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/yellow.png create mode 100755 refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/gui/network_transmitter.png create mode 100644 refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/advancements/no_cables_required.json create mode 100644 refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_transmitter.json create mode 100644 refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/NetworkTransmitterStatusPacket.java create mode 100644 refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/NetworkTransmitterStatusPacket.java diff --git a/CHANGELOG.md b/CHANGELOG.md index d65be6e46..28a9b5fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Configuration Card. It copies device configurations and can transfer upgrades. - Network Receiver - Network Card +- Network Transmitter + +### Changed + +- The Network Transmitter now goes into an "errored" state if there is no connection (anymore) with the Network Receiver (due to chunk unloading for example). +- The Network Transmitter will actively try to reconnect with the Network Receiver if connection is lost. ### Fixed diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java index e7baa0690..b8094e38f 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/ConnectionSink.java @@ -2,10 +2,12 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.GlobalPos; import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2") -@FunctionalInterface public interface ConnectionSink { + void tryConnect(GlobalPos pos); + void tryConnectInSameDimension(BlockPos pos, Direction incomingDirection); } diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_transmitter.json new file mode 100644 index 000000000..c85efd707 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/black" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_transmitter.json new file mode 100644 index 000000000..26d0a4788 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/blue" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_transmitter.json new file mode 100644 index 000000000..7308e85d6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/brown" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_transmitter.json new file mode 100644 index 000000000..7c93cab21 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/cyan" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_transmitter.json new file mode 100644 index 000000000..004f915c9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/gray" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_transmitter.json new file mode 100644 index 000000000..ed8ae4451 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/green" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_transmitter.json new file mode 100644 index 000000000..6bef823bb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/light_gray" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_transmitter.json new file mode 100644 index 000000000..6962c78ff --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/lime" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_transmitter.json new file mode 100644 index 000000000..a9cfe5a30 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/magenta" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_transmitter.json new file mode 100644 index 000000000..49484a53f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/light_blue" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_transmitter.json new file mode 100644 index 000000000..46030998b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/orange" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_transmitter.json new file mode 100644 index 000000000..5c7009994 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/pink" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_transmitter.json new file mode 100644 index 000000000..d1def1e5b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/purple" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_transmitter.json new file mode 100644 index 000000000..efaf94767 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/red" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_transmitter.json new file mode 100644 index 000000000..3019869df --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/white" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_transmitter.json new file mode 100644 index 000000000..e18ebc477 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_transmitter.json @@ -0,0 +1,13 @@ +{ + "variants": { + "state=active": { + "model": "refinedstorage2:block/network_transmitter/yellow" + }, + "state=error": { + "model": "refinedstorage2:block/network_transmitter/error" + }, + "state=inactive": { + "model": "refinedstorage2:block/network_transmitter/inactive" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/black.json new file mode 100644 index 000000000..0f8886928 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/black.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/black", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/blue.json new file mode 100644 index 000000000..6ce433dea --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/blue", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/brown.json new file mode 100644 index 000000000..d59d72fe1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/brown.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/brown", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/cyan.json new file mode 100644 index 000000000..edb07ae19 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/cyan.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/cyan", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/error.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/error.json new file mode 100644 index 000000000..bde24ffc1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/error.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/error", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/gray.json new file mode 100644 index 000000000..e2a9d7adb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/gray", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/green.json new file mode 100644 index 000000000..2a02cc52e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/green.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/green", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/inactive.json new file mode 100644 index 000000000..3d57239b5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/inactive.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/inactive", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_blue.json new file mode 100644 index 000000000..af0723908 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/light_blue", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_gray.json new file mode 100644 index 000000000..b6c0f2ad4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/light_gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/light_gray", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/lime.json new file mode 100644 index 000000000..40dcbaff2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/lime.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/lime", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/magenta.json new file mode 100644 index 000000000..6026f8131 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/magenta.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/magenta", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/orange.json new file mode 100644 index 000000000..4a982bb88 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/orange.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/orange", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/pink.json new file mode 100644 index 000000000..6789f6949 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/pink.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/pink", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/purple.json new file mode 100644 index 000000000..7963ee4fc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/purple.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/purple", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/red.json new file mode 100644 index 000000000..47c6d2a06 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/red.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/red", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/white.json new file mode 100644 index 000000000..c534f78e2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/white.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/white", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/yellow.json new file mode 100644 index 000000000..3054b74fd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_transmitter/yellow.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_transmitter/base", + "cutout": "refinedstorage2:block/network_transmitter/cutouts/yellow", + "particle": "refinedstorage2:block/network_transmitter/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_transmitter.json new file mode 100644 index 000000000..8a95bdad0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_transmitter.json new file mode 100644 index 000000000..5d4bcba6f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_transmitter.json new file mode 100644 index 000000000..b4b236ff4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_transmitter.json new file mode 100644 index 000000000..b6d2d901e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_transmitter.json new file mode 100644 index 000000000..044b5ed1e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_transmitter.json new file mode 100644 index 000000000..7def81806 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_transmitter.json new file mode 100644 index 000000000..79961be77 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_transmitter.json new file mode 100644 index 000000000..d82a2cba6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_transmitter.json new file mode 100644 index 000000000..f3f93d427 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_transmitter.json new file mode 100644 index 000000000..a81a65c0f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_transmitter.json new file mode 100644 index 000000000..5272d4ab9 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_transmitter.json new file mode 100644 index 000000000..d78d47f94 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_transmitter.json new file mode 100644 index 000000000..ddad1fd12 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_transmitter.json new file mode 100644 index 000000000..969a2ee85 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_transmitter.json new file mode 100644 index 000000000..8596e093f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_transmitter.json new file mode 100644 index 000000000..6c4c3dcfd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_transmitter.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_transmitter/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_transmitter/cutouts/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_transmitter.json new file mode 100644 index 000000000..d62881c05 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_transmitter.json new file mode 100644 index 000000000..5fb93f8d0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_transmitter.json new file mode 100644 index 000000000..f8472f93e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_transmitter.json new file mode 100644 index 000000000..212262dfe --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_transmitter.json new file mode 100644 index 000000000..003794319 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_transmitter.json new file mode 100644 index 000000000..5944c16a4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_transmitter.json new file mode 100644 index 000000000..f194d254d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_transmitter.json new file mode 100644 index 000000000..691df5431 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_transmitter.json new file mode 100644 index 000000000..27e675c29 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_transmitter.json new file mode 100644 index 000000000..6cdba8303 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_transmitter.json new file mode 100644 index 000000000..bcf7a5a24 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_transmitter.json new file mode 100644 index 000000000..cbb5dbab7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_transmitter.json new file mode 100644 index 000000000..aba85fa45 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_transmitter.json new file mode 100644 index 000000000..178e31944 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_transmitter.json new file mode 100644 index 000000000..e173f3582 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_transmitter.json new file mode 100644 index 000000000..68a1b2078 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_transmitter.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_transmitters": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_transmitters" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_network_transmitter" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_transmitters", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_network_transmitter" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_transmitter.json new file mode 100644 index 000000000..f925deda4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:black_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/black_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_transmitter.json new file mode 100644 index 000000000..44656ecfa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:blue_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/blue_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_transmitter.json new file mode 100644 index 000000000..4e548e328 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:brown_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/brown_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_transmitter.json new file mode 100644 index 000000000..f92f09225 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:cyan_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/cyan_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_transmitter.json new file mode 100644 index 000000000..b4ad2b8f3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:gray_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/gray_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_transmitter.json new file mode 100644 index 000000000..954149bde --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:green_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/green_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_transmitter.json new file mode 100644 index 000000000..48e4801ea --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_gray_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/light_gray_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_transmitter.json new file mode 100644 index 000000000..eed497cfa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:lime_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/lime_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_transmitter.json new file mode 100644 index 000000000..15777c802 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:magenta_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/magenta_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_transmitter.json new file mode 100644 index 000000000..80d86c15b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_transmitter.json new file mode 100644 index 000000000..5bab22f68 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:orange_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/orange_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_transmitter.json new file mode 100644 index 000000000..70c0580c8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:pink_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/pink_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_transmitter.json new file mode 100644 index 000000000..71e632a40 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:purple_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/purple_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_transmitter.json new file mode 100644 index 000000000..d891359c3 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:red_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/red_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_transmitter.json new file mode 100644 index 000000000..4c1bdc48a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:white_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/white_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_transmitter.json new file mode 100644 index 000000000..14549c329 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_transmitter.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:yellow_network_transmitter" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/yellow_network_transmitter" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_transmitter.json new file mode 100644 index 000000000..36b859db6 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_transmitter.json new file mode 100644 index 000000000..a4e2bd0a0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_transmitter.json new file mode 100644 index 000000000..e7c68912d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_transmitter.json new file mode 100644 index 000000000..f84a9cfba --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_transmitter.json new file mode 100644 index 000000000..70a07df91 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:gray_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_transmitter.json new file mode 100644 index 000000000..df1b74eb0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_transmitter.json new file mode 100644 index 000000000..b1479d3a7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_transmitter.json new file mode 100644 index 000000000..f47ee6865 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_transmitter.json new file mode 100644 index 000000000..695ac7837 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_transmitter.json new file mode 100644 index 000000000..83e87448e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_transmitter.json new file mode 100644 index 000000000..2a883881c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_transmitter.json new file mode 100644 index 000000000..45cca06c1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_transmitter.json new file mode 100644 index 000000000..936c7bb9a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_transmitter.json new file mode 100644 index 000000000..c0640bffb --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_transmitter.json new file mode 100644 index 000000000..c793b5352 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_transmitter.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_transmitter.json new file mode 100644 index 000000000..6b0da48b5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_transmitter.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_transmitters" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_network_transmitter" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_transmitters.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_transmitters.json new file mode 100644 index 000000000..5e6f46c32 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_transmitters.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_network_transmitter", + "refinedstorage2:orange_network_transmitter", + "refinedstorage2:magenta_network_transmitter", + "refinedstorage2:network_transmitter", + "refinedstorage2:yellow_network_transmitter", + "refinedstorage2:lime_network_transmitter", + "refinedstorage2:pink_network_transmitter", + "refinedstorage2:gray_network_transmitter", + "refinedstorage2:light_gray_network_transmitter", + "refinedstorage2:cyan_network_transmitter", + "refinedstorage2:purple_network_transmitter", + "refinedstorage2:blue_network_transmitter", + "refinedstorage2:brown_network_transmitter", + "refinedstorage2:green_network_transmitter", + "refinedstorage2:red_network_transmitter", + "refinedstorage2:black_network_transmitter" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java index 0e872f7cb..1cbb0567b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractClientModInitializer.java @@ -18,6 +18,7 @@ import com.refinedmods.refinedstorage2.platform.common.grid.screen.hint.FluidGridInsertionHint; import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceScreen; import com.refinedmods.refinedstorage2.platform.common.importer.ImporterScreen; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterScreen; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveScreen; import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageScreen; import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockScreen; @@ -57,6 +58,7 @@ protected static void registerScreens(final ScreenRegistration registration) { registration.register(Menus.INSTANCE.getRegulatorUpgrade(), RegulatorUpgradeScreen::new); registration.register(Menus.INSTANCE.getWirelessTransmitter(), WirelessTransmitterScreen::new); registration.register(Menus.INSTANCE.getStorageMonitor(), StorageMonitorScreen::new); + registration.register(Menus.INSTANCE.getNetworkTransmitter(), NetworkTransmitterScreen::new); } protected static void registerAlternativeGridHints() { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 2a48a9695..a7db7f229 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -52,6 +52,9 @@ import com.refinedmods.refinedstorage2.platform.common.misc.ProcessorItem; import com.refinedmods.refinedstorage2.platform.common.misc.WrenchItem; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkCardItem; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.StorageTypes; @@ -133,6 +136,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.ITEM_STORAGE_BLOCK; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.MACHINE_CASING; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.NETWORK_RECEIVER; +import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.NETWORK_TRANSMITTER; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.PROCESSOR_BINDING; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON_BLOCK; @@ -274,6 +278,7 @@ protected final void registerBlocks( Blocks.INSTANCE.getWirelessTransmitter().registerBlocks(callback); Blocks.INSTANCE.setStorageMonitor(callback.register(STORAGE_MONITOR, StorageMonitorBlock::new)); Blocks.INSTANCE.getNetworkReceiver().registerBlocks(callback); + Blocks.INSTANCE.getNetworkTransmitter().registerBlocks(callback); } protected final void registerItems( @@ -296,6 +301,7 @@ protected final void registerItems( Blocks.INSTANCE.getDestructor().registerItems(callback, Items.INSTANCE::addDestructor); Blocks.INSTANCE.getWirelessTransmitter().registerItems(callback, Items.INSTANCE::addWirelessTransmitter); Blocks.INSTANCE.getNetworkReceiver().registerItems(callback, Items.INSTANCE::addNetworkReceiver); + Blocks.INSTANCE.getNetworkTransmitter().registerItems(callback, Items.INSTANCE::addNetworkTransmitter); registerStorageItems(callback); registerUpgrades(callback, regulatorUpgradeItemSupplier); Items.INSTANCE.setWirelessGrid(callback.register(WIRELESS_GRID, wirelessGridItemSupplier)); @@ -573,12 +579,14 @@ protected final void registerBlockEntities( )); BlockEntities.INSTANCE.setNetworkReceiver(callback.register( NETWORK_RECEIVER, - () -> typeFactory.create((pos, state) -> new NetworkNodeContainerBlockEntityImpl<>( - BlockEntities.INSTANCE.getNetworkReceiver(), - pos, - state, - new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) - ), Blocks.INSTANCE.getNetworkReceiver().toArray()) + () -> typeFactory.create(NetworkReceiverBlockEntity::new, Blocks.INSTANCE.getNetworkReceiver().toArray()) + )); + BlockEntities.INSTANCE.setNetworkTransmitter(callback.register( + NETWORK_TRANSMITTER, + () -> typeFactory.create( + NetworkTransmitterBlockEntity::new, + Blocks.INSTANCE.getNetworkTransmitter().toArray() + ) )); } @@ -652,6 +660,10 @@ protected final void registerMenus(final RegistryCallback> callback, STORAGE_MONITOR, () -> menuTypeFactory.create(StorageMonitorContainerMenu::new) )); + Menus.INSTANCE.setNetworkTransmitter(callback.register( + NETWORK_TRANSMITTER, + () -> menuTypeFactory.create(NetworkTransmitterContainerMenu::new) + )); } protected final void registerLootFunctions(final RegistryCallback callback) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java index 25635fec4..8e20884c5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java @@ -48,6 +48,8 @@ public interface Config { SimpleEnergyUsageEntry getNetworkReceiver(); + SimpleEnergyUsageEntry getNetworkTransmitter(); + interface SimpleEnergyUsageEntry { long getEnergyUsage(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index bdeba8d02..e6ba28b83 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -10,6 +10,8 @@ import com.refinedmods.refinedstorage2.platform.common.grid.GridBlockEntity; import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceBlockEntity; import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterBlockEntity; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.AbstractDiskDriveBlockEntity; @@ -66,7 +68,9 @@ public final class BlockEntities { @Nullable private Supplier> storageMonitor; @Nullable - private Supplier>> networkReceiver; + private Supplier> networkReceiver; + @Nullable + private Supplier> networkTransmitter; private BlockEntities() { } @@ -211,13 +215,21 @@ public void setStorageMonitor(final Supplier> getNetworkReceiver() { + public BlockEntityType getNetworkReceiver() { return Objects.requireNonNull(networkReceiver).get(); } - public void setNetworkReceiver( - final Supplier>> supplier - ) { + public void setNetworkReceiver(final Supplier> supplier) { this.networkReceiver = supplier; } + + public BlockEntityType getNetworkTransmitter() { + return Objects.requireNonNull(networkTransmitter).get(); + } + + public void setNetworkTransmitter( + final Supplier> supplier + ) { + this.networkTransmitter = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java index d8c8ac8ea..a4697c046 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java @@ -13,6 +13,7 @@ import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.networking.CableBlock; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveBlock; @@ -124,6 +125,12 @@ public final class Blocks { ContentNames.NETWORK_RECEIVER, COLOR ); + private final BlockColorMap networkTransmitter = new BlockColorMap<>( + NetworkTransmitterBlock::new, + ContentIds.NETWORK_TRANSMITTER, + ContentNames.NETWORK_TRANSMITTER, + COLOR + ); @Nullable private Supplier quartzEnrichedIronBlock; @@ -251,4 +258,8 @@ public StorageMonitorBlock getStorageMonitor() { public BlockColorMap getNetworkReceiver() { return networkReceiver; } + + public BlockColorMap getNetworkTransmitter() { + return networkTransmitter; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 291f8bf78..60a9b1567 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -51,6 +51,7 @@ public final class ContentIds { public static final ResourceLocation CONFIGURATION_CARD = createIdentifier("configuration_card"); public static final ResourceLocation NETWORK_RECEIVER = createIdentifier("network_receiver"); public static final ResourceLocation NETWORK_CARD = createIdentifier("network_card"); + public static final ResourceLocation NETWORK_TRANSMITTER = createIdentifier("network_transmitter"); private ContentIds() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java index 32a2e65d8..f5a5b4e1a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java @@ -23,6 +23,7 @@ public final class ContentNames { public static final MutableComponent INTERFACE = createTranslation("block", "interface"); public static final MutableComponent DISK_DRIVE = createTranslation("block", "disk_drive"); public static final MutableComponent NETWORK_RECEIVER = createTranslation("block", "network_receiver"); + public static final MutableComponent NETWORK_TRANSMITTER = createTranslation("block", "network_transmitter"); private ContentNames() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index 52ca3656b..cce630748 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -47,6 +47,7 @@ private static void appendBlocks(final Consumer consumer) { itemConsumer.accept(Blocks.INSTANCE.getMachineCasing()); itemConsumer.accept(Blocks.INSTANCE.getQuartzEnrichedIronBlock()); itemConsumer.accept(Blocks.INSTANCE.getStorageMonitor()); + Items.INSTANCE.getNetworkTransmitters().stream().map(Supplier::get).forEach(itemConsumer); Items.INSTANCE.getNetworkReceivers().stream().map(Supplier::get).forEach(itemConsumer); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java index 733a39e42..041f44474 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java @@ -15,6 +15,7 @@ public final class DefaultEnergyUsage { public static final long DISK_DRIVE_PER_DISK = 4; public static final long STORAGE_MONITOR = 4; public static final long NETWORK_RECEIVER = 8; + public static final long NETWORK_TRANSMITTER = 32; public static final long CONTROLLER_CAPACITY = 1000; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index 13fca80df..019ed46b0 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -40,6 +40,7 @@ public final class Items { private final List> allConstructors = new ArrayList<>(); private final List> allWirelessTransmitters = new ArrayList<>(); private final List> allNetworkReceivers = new ArrayList<>(); + private final List> allNetworkTransmitters = new ArrayList<>(); @Nullable private Supplier quartzEnrichedIron; @Nullable @@ -374,7 +375,15 @@ public void addNetworkReceiver(final Supplier supplier) { public List> getNetworkReceivers() { return Collections.unmodifiableList(allNetworkReceivers); } - + + public void addNetworkTransmitter(final Supplier supplier) { + allNetworkTransmitters.add(supplier); + } + + public List> getNetworkTransmitters() { + return Collections.unmodifiableList(allNetworkTransmitters); + } + public Item getNetworkCard() { return Objects.requireNonNull(networkCard).get(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/MenuTypeFactory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/MenuTypeFactory.java index 4cc4029e7..901b772ec 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/MenuTypeFactory.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/MenuTypeFactory.java @@ -9,6 +9,7 @@ public interface MenuTypeFactory { MenuType create(MenuSupplier supplier); + @FunctionalInterface interface MenuSupplier { T create(int syncId, Inventory playerInventory, FriendlyByteBuf data); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java index c859f54f9..d737dcb21 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Menus.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.grid.WirelessGridContainerMenu; import com.refinedmods.refinedstorage2.platform.common.iface.InterfaceContainerMenu; import com.refinedmods.refinedstorage2.platform.common.importer.ImporterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.storage.diskdrive.DiskDriveContainerMenu; import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageContainerMenu; import com.refinedmods.refinedstorage2.platform.common.storage.storageblock.FluidStorageBlockContainerMenu; @@ -61,6 +62,8 @@ public final class Menus { private Supplier> wirelessTransmitter; @Nullable private Supplier> storageMonitor; + @Nullable + private Supplier> networkTransmitter; private Menus() { } @@ -200,4 +203,12 @@ public MenuType getStorageMonitor() { public void setStorageMonitor(final Supplier> supplier) { this.storageMonitor = supplier; } + + public MenuType getNetworkTransmitter() { + return Objects.requireNonNull(networkTransmitter).get(); + } + + public void setNetworkTransmitter(final Supplier> supplier) { + this.networkTransmitter = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java index cc62023c7..be33cae1e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java @@ -22,6 +22,7 @@ public final class Tags { public static final TagKey DESTRUCTORS = createTag("destructors"); public static final TagKey WIRELESS_TRANSMITTERS = createTag("wireless_transmitters"); public static final TagKey NETWORK_RECEIVERS = createTag("network_receivers"); + public static final TagKey NETWORK_TRANSMITTERS = createTag("network_transmitters"); private Tags() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java index 1a108b3d8..b7e8d79ed 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/controller/ControllerBlockEntity.java @@ -61,24 +61,17 @@ private static BlockEntityType getBlockEntityType(final C : BlockEntities.INSTANCE.getController(); } - void updateEnergyTypeInLevel(final BlockState state) { - final ControllerEnergyType currentEnergyType = ControllerEnergyType.ofState(getNode().getState()); - final ControllerEnergyType inLevelEnergyType = state.getValue(ControllerBlock.ENERGY_TYPE); - - if (currentEnergyType != inLevelEnergyType && energyStateChangeRateLimiter.tryAcquire()) { + public void updateEnergyTypeInLevel(final BlockState state) { + final ControllerEnergyType currentEnergyType = state.getValue(ControllerBlock.ENERGY_TYPE); + final ControllerEnergyType newEnergyType = ControllerEnergyType.ofState(getNode().getState()); + if (newEnergyType != currentEnergyType && level != null && energyStateChangeRateLimiter.tryAcquire()) { LOGGER.debug( "Energy type state change for controller at {}: {} -> {}", getBlockPos(), - inLevelEnergyType, - currentEnergyType + currentEnergyType, + newEnergyType ); - updateEnergyTypeInLevel(state, currentEnergyType); - } - } - - private void updateEnergyTypeInLevel(final BlockState state, final ControllerEnergyType energyType) { - if (level != null) { - level.setBlockAndUpdate(getBlockPos(), state.setValue(ControllerBlock.ENERGY_TYPE, energyType)); + level.setBlockAndUpdate(getBlockPos(), state.setValue(ControllerBlock.ENERGY_TYPE, newEnergyType)); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java index e4833d59b..825ede85c 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardItem.java @@ -8,9 +8,13 @@ import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; +import net.minecraft.core.GlobalPos; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; @@ -23,6 +27,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import static com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverKey.getDimensionName; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; // TODO: better active texture. @@ -52,16 +57,18 @@ public InteractionResult useOn(final UseOnContext ctx) { } final CompoundTag tag = new CompoundTag(); tag.putLong(TAG_POS, pos.asLong()); - tag.putString(TAG_DIMENSION, ctx.getLevel().dimension().location().toString()); + final ResourceKey dimension = ctx.getLevel().dimension(); + tag.putString(TAG_DIMENSION, dimension.location().toString()); ctx.getItemInHand().setTag(tag); ctx.getPlayer().sendSystemMessage(createTranslation( "item", "network_card.bound", pos.getX(), pos.getY(), - pos.getZ() + pos.getZ(), + getDimensionName(dimension).withStyle(ChatFormatting.YELLOW) )); - return InteractionResult.SUCCESS; + return InteractionResult.CONSUME; } @Override @@ -81,29 +88,36 @@ public void appendHoverText(final ItemStack stack, final List lines, final TooltipFlag flag) { super.appendHoverText(stack, level, lines, flag); - if (!isActive(stack)) { - lines.add(UNBOUND); - return; - } - final BlockPos pos = getPosition(stack); - if (pos == null) { - return; - } - lines.add(createTranslation( + getLocation(stack).ifPresentOrElse(location -> lines.add(createTranslation( "item", "network_card.bound", - pos.getX(), - pos.getY(), - pos.getZ() - ).withStyle(ChatFormatting.GRAY)); + location.pos().getX(), + location.pos().getY(), + location.pos().getZ(), + getDimensionName(location.dimension()).withStyle(ChatFormatting.YELLOW) + ).withStyle(ChatFormatting.GRAY)), () -> lines.add(UNBOUND)); } @Nullable - public BlockPos getPosition(final ItemStack stack) { - if (stack.getTag() == null) { + private ResourceKey getDimension(final String dimensionKey) { + final ResourceLocation name = ResourceLocation.tryParse(dimensionKey); + if (name == null) { return null; } - return BlockPos.of(stack.getTag().getLong(TAG_POS)); + return ResourceKey.create(Registries.DIMENSION, name); + } + + Optional getLocation(final ItemStack stack) { + final CompoundTag tag = stack.getTag(); + if (tag == null) { + return Optional.empty(); + } + final ResourceKey dimension = getDimension(tag.getString(TAG_DIMENSION)); + if (dimension == null) { + return Optional.empty(); + } + final BlockPos pos = BlockPos.of(tag.getLong(TAG_POS)); + return Optional.of(GlobalPos.of(dimension, pos)); } @Override diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java index 34c436b5c..4bb7ea7c3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlock.java @@ -1,7 +1,5 @@ package com.refinedmods.refinedstorage2.platform.common.networking; -import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -9,7 +7,6 @@ import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; -import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; import javax.annotation.Nullable; @@ -29,7 +26,7 @@ public class NetworkReceiverBlock extends AbstractColoredBlock implements EntityBlock { public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); - private static final AbstractBlockEntityTicker> TICKER = + private static final AbstractBlockEntityTicker TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getNetworkReceiver, ACTIVE); public NetworkReceiverBlock(final DyeColor color, final MutableComponent name) { @@ -55,12 +52,7 @@ public BlockColorMap getBlockColorMap() { @Nullable @Override public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { - return new NetworkNodeContainerBlockEntityImpl<>( - BlockEntities.INSTANCE.getNetworkReceiver(), - pos, - state, - new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) - ); + return new NetworkReceiverBlockEntity(pos, state); } @Nullable diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlockEntity.java new file mode 100644 index 000000000..920d77dc4 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverBlockEntity.java @@ -0,0 +1,28 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeContainerBlockEntityImpl; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.state.BlockState; + +public class NetworkReceiverBlockEntity extends NetworkNodeContainerBlockEntityImpl { + public NetworkReceiverBlockEntity(final BlockPos pos, final BlockState state) { + super( + BlockEntities.INSTANCE.getNetworkReceiver(), + pos, + state, + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) + ); + } + + @Nullable + @Override + public Object createKey() { + return new NetworkReceiverKey(getContainerPosition()); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java new file mode 100644 index 000000000..447079c36 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java @@ -0,0 +1,35 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.GlobalPos; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.level.Level; + +record NetworkReceiverKey(GlobalPos pos) { + int getDistance(final BlockPos from) { + return (int) Math.sqrt( + Math.pow(from.getX() - pos.pos().getX(), 2) + + Math.pow(from.getY() - pos.pos().getY(), 2) + + Math.pow(from.getZ() - pos.pos().getZ(), 2) + ); + } + + MutableComponent getDimensionName() { + return getDimensionName(pos.dimension()); + } + + static MutableComponent getDimensionName(final ResourceKey dimension) { + if (dimension == Level.OVERWORLD) { + return Component.literal("Overworld"); + } else if (dimension == Level.END) { + return Component.literal("The End"); + } else if (dimension == Level.NETHER) { + return Component.literal("The Nether"); + } + return Component.translatable( + "dimension.%s.%s".formatted(dimension.location().getNamespace(), dimension.location().getPath()) + ); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlock.java new file mode 100644 index 000000000..95798f579 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlock.java @@ -0,0 +1,66 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractColoredBlock; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.EnumProperty; + +public class NetworkTransmitterBlock extends AbstractColoredBlock implements EntityBlock { + public static final EnumProperty STATE = EnumProperty.create( + "state", + NetworkTransmitterState.class + ); + + private static final AbstractBlockEntityTicker TICKER = + new NetworkTransmitterBlockEntityTicker(); + + public NetworkTransmitterBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.PROPERTIES, color, name); + } + + @Override + protected BlockState getDefaultState() { + return super.getDefaultState().setValue(STATE, NetworkTransmitterState.INACTIVE); + } + + @Override + protected void createBlockStateDefinition(final StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(STATE); + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getNetworkTransmitter(); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(final BlockPos blockPos, final BlockState blockState) { + return new NetworkTransmitterBlockEntity(blockPos, blockState); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java new file mode 100644 index 000000000..826600d74 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java @@ -0,0 +1,222 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.api.network.Network; +import com.refinedmods.refinedstorage2.api.network.component.GraphNetworkComponent; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; +import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; + +import javax.annotation.Nullable; + +import com.google.common.util.concurrent.RateLimiter; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.Container; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.BlockState; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createTranslation; + +// TODO: better error texture and better active texture with animation? Reuse controller textures? +public class NetworkTransmitterBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity + implements ExtendedMenuProvider, BlockEntityWithDrops { + private static final Logger LOGGER = LoggerFactory.getLogger(NetworkTransmitterBlockEntity.class); + + private static final NetworkTransmitterStatus INACTIVE = NetworkTransmitterStatus.message( + createTranslation("gui", "network_transmitter.status.inactive") + ); + private static final NetworkTransmitterStatus MISSING_NETWORK_CARD = NetworkTransmitterStatus.error( + createTranslation("gui", "network_transmitter.status.missing_network_card").withStyle(ChatFormatting.DARK_RED) + ); + private static final NetworkTransmitterStatus RECEIVER_UNREACHABLE = NetworkTransmitterStatus.error( + createTranslation("gui", "network_transmitter.status.receiver_unreachable").withStyle(ChatFormatting.DARK_RED) + ); + + private static final String TAG_NETWORK_CARD_INVENTORY = "nc"; + + private final SimpleContainer networkCardInventory = new SimpleContainer(1) { + @Override + public boolean canPlaceItem(final int slot, final ItemStack stack) { + return stack.getItem() instanceof NetworkCardItem networkCardItem && networkCardItem.isActive(stack); + } + }; + private final RateLimiter stateChangeRateLimiter = RateLimiter.create(1); + private final RateLimiter networkRebuildRetryRateLimiter = RateLimiter.create(1 / 5D); + + @Nullable + private NetworkReceiverKey receiverKey; + + public NetworkTransmitterBlockEntity(final BlockPos pos, final BlockState state) { + super(BlockEntities.INSTANCE.getNetworkTransmitter(), pos, state, new SimpleNetworkNode( + Platform.INSTANCE.getConfig().getNetworkTransmitter().getEnergyUsage() + )); + networkCardInventory.addListener(container -> { + setChanged(); + updateReceiverLocation(); + if (level != null) { + LOGGER.info("Network card was changed at {}, sending network update", worldPosition); + PlatformApi.INSTANCE.requestNetworkNodeUpdate(this, level); + } + }); + } + + @Override + protected void activenessChanged(final boolean newActive) { + super.activenessChanged(newActive); + if (level == null) { + return; + } + PlatformApi.INSTANCE.requestNetworkNodeUpdate(this, level); + } + + public void updateStateInLevel(final BlockState state) { + final NetworkTransmitterState currentState = state.getValue(NetworkTransmitterBlock.STATE); + final NetworkTransmitterState newState = getState(); + if (currentState != newState && level != null && stateChangeRateLimiter.tryAcquire()) { + LOGGER.info("Updating network transmitter at {} from {} to {}", worldPosition, currentState, newState); + level.setBlockAndUpdate(worldPosition, state.setValue(NetworkTransmitterBlock.STATE, newState)); + } + } + + private NetworkTransmitterState getState() { + if (!isActive()) { + return NetworkTransmitterState.INACTIVE; + } + if (receiverKey == null) { + return NetworkTransmitterState.ERROR; + } + final Network network = getNode().getNetwork(); + if (network == null) { + return NetworkTransmitterState.ERROR; + } + final boolean receiverFound = isReceiverFoundInNetwork(network, receiverKey); + return receiverFound ? NetworkTransmitterState.ACTIVE : NetworkTransmitterState.ERROR; + } + + NetworkTransmitterStatus getStatus() { + final Network network = getNode().getNetwork(); + if (!isActive() || network == null || level == null) { + return INACTIVE; + } + if (receiverKey == null) { + return MISSING_NETWORK_CARD; + } + final boolean receiverFound = isReceiverFoundInNetwork(network, receiverKey); + if (!receiverFound) { + return RECEIVER_UNREACHABLE; + } + final boolean showDistance = level.dimension() == receiverKey.pos().dimension(); + final MutableComponent message = showDistance ? createTranslation( + "gui", + "network_transmitter.status.transmitting", + receiverKey.getDistance(worldPosition)) : receiverKey.getDimensionName(); + return NetworkTransmitterStatus.message(message); + } + + @Override + public void doWork() { + super.doWork(); + if (!isActive() || getNode().getNetwork() == null || receiverKey == null) { + return; + } + final boolean receiverFound = isReceiverFoundInNetwork(getNode().getNetwork(), receiverKey); + if (!receiverFound && networkRebuildRetryRateLimiter.tryAcquire()) { + tryReconnectingWithReceiver(); + } + } + + private void tryReconnectingWithReceiver() { + if (level == null) { + return; + } + LOGGER.info( + "Receiver {} was not found in network for transmitter at {}, retrying and sending network update", + receiverKey, + worldPosition + ); + PlatformApi.INSTANCE.requestNetworkNodeUpdate(this, level); + } + + private static boolean isReceiverFoundInNetwork(final Network network, final NetworkReceiverKey key) { + return network.getComponent(GraphNetworkComponent.class).getContainer(key) != null; + } + + Container getNetworkCardInventory() { + return networkCardInventory; + } + + @Override + public void saveAdditional(final CompoundTag tag) { + super.saveAdditional(tag); + tag.put(TAG_NETWORK_CARD_INVENTORY, networkCardInventory.createTag()); + } + + @Override + public void load(final CompoundTag tag) { + super.load(tag); + if (tag.contains(TAG_NETWORK_CARD_INVENTORY)) { + networkCardInventory.fromTag(tag.getList(TAG_NETWORK_CARD_INVENTORY, Tag.TAG_COMPOUND)); + } + updateReceiverLocation(); + } + + private void updateReceiverLocation() { + final ItemStack stack = networkCardInventory.getItem(0); + if (stack.isEmpty()) { + receiverKey = null; + } else if (stack.getItem() instanceof NetworkCardItem cardItem) { + receiverKey = cardItem.getLocation(stack).map(NetworkReceiverKey::new).orElse(null); + } + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new NetworkTransmitterContainerMenu(syncId, inventory, this); + } + + @Override + public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { + final NetworkTransmitterStatus status = getStatus(); + buf.writeBoolean(status.error()); + buf.writeComponent(status.message()); + } + + @Override + public Component getDisplayName() { + return ContentNames.NETWORK_TRANSMITTER; + } + + @Override + public NonNullList getDrops() { + return NonNullList.of(ItemStack.EMPTY, networkCardInventory.getItem(0)); + } + + @Override + public void addOutgoingConnections(final ConnectionSink sink) { + super.addOutgoingConnections(sink); + if (receiverKey != null && isActive()) { + sink.tryConnect(receiverKey.pos()); + } + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntityTicker.java new file mode 100644 index 000000000..dde4d9e96 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntityTicker.java @@ -0,0 +1,25 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.support.network.NetworkNodeBlockEntityTicker; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +public class NetworkTransmitterBlockEntityTicker + extends NetworkNodeBlockEntityTicker { + NetworkTransmitterBlockEntityTicker() { + super(BlockEntities.INSTANCE::getNetworkTransmitter); + } + + @Override + public void tick(final Level level, + final BlockPos pos, + final BlockState state, + final NetworkTransmitterBlockEntity blockEntity) { + super.tick(level, pos, state, blockEntity); + blockEntity.updateStateInLevel(state); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterContainerMenu.java new file mode 100644 index 000000000..812c6083b --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterContainerMenu.java @@ -0,0 +1,98 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.content.Menus; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.support.RedstoneMode; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ServerProperty; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ValidatedSlot; + +import javax.annotation.Nullable; + +import com.google.common.util.concurrent.RateLimiter; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.Container; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; + +public class NetworkTransmitterContainerMenu extends AbstractBaseContainerMenu { + @Nullable + private final NetworkTransmitterBlockEntity blockEntity; + private final Player player; + private final RateLimiter statusUpdateRateLimiter = RateLimiter.create(2); + private NetworkTransmitterStatus status; + + NetworkTransmitterContainerMenu(final int syncId, + final Inventory playerInventory, + final NetworkTransmitterBlockEntity blockEntity) { + super(Menus.INSTANCE.getNetworkTransmitter(), syncId); + registerProperty(new ServerProperty<>( + PropertyTypes.REDSTONE_MODE, + blockEntity::getRedstoneMode, + blockEntity::setRedstoneMode + )); + this.blockEntity = blockEntity; + this.player = playerInventory.player; + this.status = blockEntity.getStatus(); + addSlots(playerInventory, blockEntity.getNetworkCardInventory()); + } + + public NetworkTransmitterContainerMenu(final int syncId, + final Inventory playerInventory, + final FriendlyByteBuf buf) { + super(Menus.INSTANCE.getNetworkTransmitter(), syncId); + registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); + this.blockEntity = null; + this.player = playerInventory.player; + this.status = new NetworkTransmitterStatus(buf.readBoolean(), buf.readComponent()); + addSlots(playerInventory, new SimpleContainer(1)); + } + + @Override + public void broadcastChanges() { + super.broadcastChanges(); + if (blockEntity == null || !(player instanceof ServerPlayer serverPlayer)) { + return; + } + if (!statusUpdateRateLimiter.tryAcquire()) { + return; + } + final NetworkTransmitterStatus newStatus = blockEntity.getStatus(); + if (newStatus.message().equals(status.message())) { + return; + } + updateStatus(serverPlayer, newStatus); + } + + private void updateStatus(final ServerPlayer serverPlayer, final NetworkTransmitterStatus newStatus) { + this.status = newStatus; + Platform.INSTANCE.getServerToClientCommunications().sendNetworkTransmitterStatus( + serverPlayer, + newStatus + ); + } + + private void addSlots(final Inventory playerInventory, final Container networkCardInventory) { + addPlayerInventory(playerInventory, 8, 55); + addSlot(new ValidatedSlot( + networkCardInventory, + 0, + 8, + 20, + stack -> stack.getItem() instanceof NetworkCardItem networkCardItem && networkCardItem.isActive(stack) + )); + transferManager.addBiTransfer(playerInventory, networkCardInventory); + } + + NetworkTransmitterStatus getStatus() { + return status; + } + + public void setStatus(final NetworkTransmitterStatus status) { + this.status = status; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java new file mode 100644 index 000000000..b3790ec10 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java @@ -0,0 +1,48 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage2.platform.common.support.TextureIds; +import com.refinedmods.refinedstorage2.platform.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage2.platform.common.support.widget.RedstoneModeSideButtonWidget; + +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; + +public class NetworkTransmitterScreen extends AbstractBaseScreen { + private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/network_transmitter.png"); + + public NetworkTransmitterScreen(final NetworkTransmitterContainerMenu menu, + final Inventory playerInventory, + final Component text) { + super(menu, playerInventory, text); + this.inventoryLabelY = 42; + this.imageWidth = 176; + this.imageHeight = 137; + } + + @Override + protected void init() { + super.init(); + addSideButton(new RedstoneModeSideButtonWidget(getMenu().getProperty(PropertyTypes.REDSTONE_MODE))); + } + + @Override + protected ResourceLocation getTexture() { + return TEXTURE; + } + + @Override + protected void renderLabels(final GuiGraphics graphics, final int mouseX, final int mouseY) { + super.renderLabels(graphics, mouseX, mouseY); + final NetworkTransmitterStatus status = getMenu().getStatus(); + final int displayTextX = 51; + if (status.error()) { + graphics.blit(TextureIds.ICONS, displayTextX, 23, 246, 148, 10, 10); + } + graphics.drawString(font, status.message(), displayTextX + (status.error() ? (10 + 4) : 0), 25, 4210752, false); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterState.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterState.java new file mode 100644 index 000000000..f8ce3cc2f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterState.java @@ -0,0 +1,20 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import net.minecraft.util.StringRepresentable; + +public enum NetworkTransmitterState implements StringRepresentable { + ACTIVE("active"), + ERROR("error"), + INACTIVE("inactive"); + + private final String name; + + NetworkTransmitterState(final String name) { + this.name = name; + } + + @Override + public String getSerializedName() { + return name; + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterStatus.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterStatus.java new file mode 100644 index 000000000..4fc4aa4ed --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterStatus.java @@ -0,0 +1,13 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import net.minecraft.network.chat.Component; + +public record NetworkTransmitterStatus(boolean error, Component message) { + static NetworkTransmitterStatus error(final Component message) { + return new NetworkTransmitterStatus(true, message); + } + + static NetworkTransmitterStatus message(final Component message) { + return new NetworkTransmitterStatus(false, message); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java index 3ebb2ec52..2aab8e7b1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/ServerToClientCommunications.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage2.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterStatus; import java.util.UUID; import javax.annotation.Nullable; @@ -30,4 +31,6 @@ void sendResourceSlotUpdate(ServerPlayer player, int slotIndex); void sendStorageInfoResponse(ServerPlayer player, UUID id, StorageInfo storageInfo); + + void sendNetworkTransmitterStatus(ServerPlayer player, NetworkTransmitterStatus status); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java index d8238dfa0..cd33c72e3 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionProviderImpl.java @@ -100,6 +100,9 @@ private PlatformNetworkNodeContainer getConnection(final PlatformNetworkNodeCont if (!(connectionBlockEntity instanceof PlatformNetworkNodeContainer connectionContainer)) { return null; } + if (connection.incomingDirection() == null) { + return connectionContainer; + } final boolean acceptsIncomingDirection = connectionContainer.canAcceptIncomingConnection( connection.incomingDirection(), from.getContainerBlockState() diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java index 36024462d..e75182f34 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/ConnectionSinkImpl.java @@ -4,6 +4,7 @@ import java.util.HashSet; import java.util.Set; +import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -21,12 +22,17 @@ Set getConnections() { return connections; } + @Override + public void tryConnect(final GlobalPos pos) { + connections.add(new Connection(pos, null)); + } + @Override public void tryConnectInSameDimension(final BlockPos pos, final Direction incomingDirection) { final GlobalPos globalPos = GlobalPos.of(source.dimension(), pos); connections.add(new Connection(globalPos, incomingDirection)); } - record Connection(GlobalPos pos, Direction incomingDirection) { + record Connection(GlobalPos pos, @Nullable Direction incomingDirection) { } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java index f64e3f91f..d7c0833fe 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/upgrade/UpgradeContainer.java @@ -26,8 +26,7 @@ public class UpgradeContainer extends SimpleContainer implements UpgradeState { private final UpgradeRegistry registry; private final Object2IntMap index = new Object2IntOpenHashMap<>(); - public UpgradeContainer(final UpgradeDestination destination, - final UpgradeRegistry registry) { + public UpgradeContainer(final UpgradeDestination destination, final UpgradeRegistry registry) { this(destination, registry, () -> { }); } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index b90e3d6b4..6d4759f1a 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -29,6 +29,7 @@ "block.refinedstorage2.wireless_transmitter": "Wireless Transmitter", "block.refinedstorage2.storage_monitor": "Storage Monitor", "block.refinedstorage2.network_receiver": "Network Receiver", + "block.refinedstorage2.network_transmitter": "Network Transmitter", "gui.refinedstorage2.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage2.disk_drive.disks": "Disks", "gui.refinedstorage2.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -132,6 +133,10 @@ "gui.refinedstorage2.filter_slot.right_click_for": "Right click for", "gui.refinedstorage2.filter_slot.click_to_clear": "Click to clear", "gui.refinedstorage2.regulator_upgrade.filter_help": "The resource that should be regulated in the target.", + "gui.refinedstorage2.network_transmitter.status.inactive": "Inactive", + "gui.refinedstorage2.network_transmitter.status.missing_network_card": "Missing Network Card", + "gui.refinedstorage2.network_transmitter.status.transmitting": "%d block(s)", + "gui.refinedstorage2.network_transmitter.status.receiver_unreachable": "Unreachable", "item.refinedstorage2.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage2.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage2.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -208,7 +213,7 @@ "item.refinedstorage2.network_card.unbound_help": "Use while crouching on a Network Receiver.", "item.refinedstorage2.network_card.unbound": "Unbound.", "item.refinedstorage2.network_card.bound_help": "Insert into a Network Transmitter. Use while crouching to clear binding.", - "item.refinedstorage2.network_card.bound": "Bound to %d, %d, %d.", + "item.refinedstorage2.network_card.bound": "Bound to %d, %d, %d in %s.", "misc.refinedstorage2.stored": "Stored: %s", "misc.refinedstorage2.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage2.total": "%d total", @@ -343,5 +348,7 @@ "advancements.refinedstorage2.wireless": "Wireless", "advancements.refinedstorage2.wireless.description": "Access your resources wirelessly with a Wireless Grid.", "advancements.refinedstorage2.better_than_a_barrel": "Better than a barrel", - "advancements.refinedstorage2.better_than_a_barrel.description": "Craft a Storage Monitor to view, insert or extract resources in a storage network" + "advancements.refinedstorage2.better_than_a_barrel.description": "Craft a Storage Monitor to view, insert or extract resources in a storage network", + "advancements.refinedstorage2.no_cables_required": "No cables required", + "advancements.refinedstorage2.no_cables_required.description": "Add extra components to your network without using cables by using a Network Transmitter, Network Receiver and Network Card" } diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/base.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/base.png new file mode 100644 index 0000000000000000000000000000000000000000..9e4f2df055631673dd373c566b8d6be18d860866 GIT binary patch literal 701 zcmV;u0z&Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00J#ZL_t(IPfb%>i?LA{^@q52K8~}PVHnJa zoDbtngG6$nTqu&%T!@P)l8edzd*)lKUVZ9mzwfr!+Rs|+c~v%>P3(5N7>!2J>-Azb zn^_KrgL?*pf%{lZCX;BjTE6RaI`qfv{Gq5gZ5vB%jZ-L;e8*Fz0eP zNvG42NF-R%Xq5Hx@c5kDACU%q!b9U2Gi#bS}`YPF&tAV*>(0DGg+;DK;BOb;OAcs$Z|)ONci z`1|{t6N(v##bO+3dH~ZfWnQmWLZQ%OXrLE!0*L@B&xjjyz)?m^qtQs9zgDYCrBb0B z=={F`etUb9Y&J_Ey2WQe0vJ>%6bOdfkOQ3x7;$AX8G>;$CK2z95w3y>X}}KTbyBe4j^D*8}Ri&A{h2On(F`clvbB?^L4L3}8s+6q!1tmo`4iA|bN?ZDj5 z|DFHxo&W#OIXtwZe@*AQPLAW&3=U+6>AQ>Ft8S;yhb~`*^tC!1*cEf!9o_8i;AW29 z%W<6*FF%@$=C<1?D5oF}9FnS)LyG3O&0A_AMEgj>JEY+G8R6omp9#E&Gs1|TlXGD& zDS89@BeHYW=al0d#zF8Q%t%LsM7HvMM9lEBv?$-a!x!wmAH zxgowchzM__WD&`-!kbnK7@B6tn|MW5WJ%T~poqY*Wz7aA-@F8BEyAunoZZ&6MgKBF zF-byOlB(5es;Z`fs2~B$vLsoN6h)*6F`n=fSQGtteM>`@#3=H@#0z|$X@pKNmShC# zX(NPk*jDSuO`0fSQVoU@NXaauIuN5aE*y(Wb>kRGq(sWZPhyG%Z7gLemutfpRa-8% z(Q(o@PCaVIwkSHzPlQAoCUGzpA<{QaEv|1l7AM1Gj+zxrr||aVuoxskTnv^Vp)FoO zMdGeg~Od(e*)=p!d^YKGxx5Qv!QNVH7N5G@7jq6`#_6aWm_ z!L9k(0FAMvV)GmIg#$!&v{%E{beU)laz%hFON5rDiI$_KMK`UaHSC%wjg6MJrz4M+ zI4sTA%DloLPLxhn8%wQZ`N zx(Zo+WdzV19A&9m8fy%iicBvFuxC@gYZ>{R_!-}$6e|MH^2M&(-$`2+b->VdRd0?D zc{NfR&3crzxZwy5zdoZb*|ku@IvJ}_d%%ln&P_CX%}!Ejew94FUX(UOjSvvaPC^%` zG3+g}z$>G&F~3?Ql&tGyZ37kuZc>F2=_yc#m#qqEDd%H2etp-0sR0=nM073H5Ot!- zqND1jXrwLV$f`mJFk7Kt>$++Kjh0cXhHk|5CatIl{Q{wzkR;rAFp#*i>LQ1hmt}|$ zXbP(~Riw$Rsfuixma%9si#CLt91IHlaT3i-tPn5mjm;yv|Zr;M|;a=+{(J)wZ(Fi7fE6Vghm^X{@o!O|JeqU z+t}LFH(q&*j;Yf=Z#W{*S$RU8wtdxARNXLio%gN#Pcteey1nQ&j+(T`Sg)9ub%5X_(a#C z!c_L$Eo+Zns$4pKp|U;m$`|R8Ll^pS*Q3W)=`U3O-1GhGkE}iY-~-&-8&Y36clT}0 zo}8UN@$75g-E->rrnA|N2WQvK?tbt6H@ZLSEdDTS{U-kM%^&xjy7JtmkJo>F`S?i3 z3Z>ww}q#{UaB95Bzjx^_CM)m8Z`HzVBe1H Jhgd<*;30I+C+?Z?!CJm*`1lr zOuJi1F+mL)5loanfFb_SNJJAM#uzaukv}G=AsFL>1fRrcLZS)yAmF|G>Q-CYpiD9| z_wn6x&OPTl=iaA#dphU0E^3X%V)MJZ(tYf|fWIws*th++tBC#P`dtHIEH>{J{?3Z+ zJJ1%3wGKJi{-{5*-ojonj)-T|c)92^bS$=fW!Xn~3ylPu<{dXBUU>JoC^#e~ZqhPx z#_ynmPS@6eZrs|F#ap*vlZY!<2+PYB6HufP63WGb8(QU*SdnY7HXoKmp#q7vq{P)+ zq0pb{6*|0t3VK`ySe6yRFyl~9By{;+L6H?%k~Ik`0P2>Uu%IE-9+7DaNY3g@udC@| zy_7f@MZP6TrBW$gQsZ8bm!N5ylB`II0vG~>qi%%CzzrAIC8TMH1ILdX&lR{tWP8I= zN@SK+w@~yOV%@OjCgw1yjC={kWxk~fkl+T+9}Wr?fT0+h6EU@EGu zXojv6Xw=uIJv_`w#n)H!i+GsHXhg$;kf5Y$n1Ip*0!f-MK~lj6kd*{B3{9gpRO`|< z1P)7aRA`pUts+cfjwW>#6C0?+pdd+@RVK9gMT*KHxzSp!*+_?Kt%4&|lF~xBx&_SHNr_k+ zb|wk%%v@O&TNl)4>o}OHq_g{-W z=TOBBP4}ky5W9@=X5$vfI*ofIby?m9?3UO$@Ao^|4f9NQdUZDW?8)a(J$ho*txq0b z*1i7n{R?0IbjJ(vvHdGv^S(RMa%I&^y%}Xu{@CWF1DV2yYd*R7^&HX89&X<^F#Eah59RhezQ1Spk^bA?KXmcTS7YaYShC@p)9tg*UFtbD{Nk*g z(laZ|PAvA>D=k0X(f8Ju+R>}+c-!8Co%>Srhb}(#_U_=F_ul+y|C(R&haQkl41E6Q fir_-&%B+W4?;9&Fyu62Bp}W`iq~BQc$d11O3zpLZ literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/brown.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/brown.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4d506cb954fc2abf2c4d23dc5565543e69d142 GIT binary patch literal 2976 zcmcImduSX*7{9cd+S5Y8Dq=ymTT7#MZg=**ORgp68WZ(uOs;K;qR#Hj-mSgc-R^F3 zm;6hsTA}d@edKj*0xp(Qg!BDNo>-DY8Uo3-*3Lh zZ@%xFd2n#kjmy$krcv}Ev&4vY@t3#6QS-yuEFSs0vU5P_snEf;!i{cxo-et~HeFYuciJS-zAc zp(O~_YBf`pGeJ}oplO={kTaJB}}NHP=Fbcg;WP(r;Q6oqjKFib_7x;72+o`#lkk0vXsxa;j^l(RNCk` z**Hc$YQ{DzIxdWdL>MA*Fd8{z;~2HLy5(4$43Q~n7BHQ{+mpjmkOXlln1h72cm@@T z=gwh}NoGJv&6@+tByDJD^+p6GK~xBWaw~TRTfT7;%t&0U|j?W9lj^zeX1<{4` zDyT?=&@a}l<@45nA1BCn$UrX3Q&%&dhb_sCUG=ZBD$%y z=H~)ulqD6L->5GfI8;Y_H7tS+!!$GlAmXaPFccXeY{MCOO zmE~b`aD=65d9*R8OCr4l$evC4wt3`J;?2HCDVBJS<%?CfKTKN}bwE>9S#6FFdNooW z$$6BuxZwyTvp%CP*)~(cIvJ}_tKW-h&W$&F%`n-~{3?4~y(lf@G(vD#b`s1thrL-A zcwtmF)K*J`l697>ZNTEdO{yp&Jw?j!yj3C0<$R3B&h9$Y6(~ZD0N0c?pb|v{wyf$v zGfc-8Wr+}|w?aSDb=iW7CCRNCIv3ZQv^pi^7YW^j1peHEK}gjc#dd+D5fiwIVgeHp z44~uKk`5u!p*>qLvo?hD9E=nAV_OZ38 zZ@kuQyKX3uh{ zPQ$cwQ)`GG#@J{36i9#C=Sbqyx{c^5v41~-^o04%K(41?JaX`feELIi#eHjEJ@ioW z!exa+yD}Gi{X@R{G5uI(a^EvAg053r|9oXUlYYIl=-$b%{>ZO?{HgA~T-QtK)R!+m znv@P3u=9>1lb`)~;vii7sq*t49Pag28cQah^w;g`>R2i4zUtJ9!|-&ccx3b2zwEgr zEi6fWqV4-`@Z)1^_`Uv)&pU3r$++|RZ|NZS)32R9*NiM*TG?5h;2wVK!0zH3Cr{q9 zc<0Fve*5b{ANl>GcLq*xx$xco?=MfkHg^yYy~%+1>W8 zXfRPp;Dl*;`i&2zUBs-4 z%yCWI-E4o{pV?p|zmR~~cSxdC2q>E4Rr)@?K<@QbO6TO}|;QB=BWOJd_gJm_xol z)5Ev>A>oaLEFxJ}c+*M%L(>fT5nhoMS(0@LC?YUyS+jx3S1*Bj3vtfwO?Om%(Z7^1 z7{`GvNyTC@QB)ItI3NMbvLsoN6h)*6F&gz^SQ5RcrDh>bA{4qo?D`(hEJDX0j#C1S zv@(T4P&eyERhlSaQV9kUNXTqTWgtd%TreEw%g!;9NS+jk7e^Ee>R8HBCR2w`YPL|Q zqoa7;2#u&Zw@J}ab~GSTFNyr&5Rr8w)MHC6uqf^&M}z(pB-Fbn zP!YSiDIBt%2~bjUr+~7aIyA7`Ljq$z%=&)5rk$QzY`g*z3cqr*>tVkbwX%s<2aq(3 zNlIWs66K_*%2`FRWnk;zVVQo&6=;S^6T=ubf-Q>AD!^6@TTv!}eeC8&r-fo<=lrk$ z>B6}MI6$Pp8z_6rWb7_4ilK){S2`uoP!q0;Z2|}}%_I;Zq*65{;#KGEM(@_a@J!6e|MH^kSF&_tDZt12A-5)vN72 zZi(dk(=KH#ssv&*_H3Eh!zvleP`lHOsOCniwWg13uYToSzMPacM3pHZrcQ!|YO_1Z z0?&-firL~Ip=8}ewG~+8=i(v^N!tKrc-pLxrV2iSBR3Bnm>Q6QLByP;8lp}#naWZ( zMI&h;M^+U=fLWXRjiIYH&}>Dm<h+$CG+_(;t7KHzJGRXHvNZ25(0EUomq$G?|LN4?RJPd-oi^|z0jd-}a zKh+bGk9~f;{7gw2CZXG)fkrR&5cq%5-?WOGSvCCM7fE6Vgi0BZ{$3#}|LF>o9c*pN z8?QZCEtshW=}v6Z(mqYG$G}2{W9lNb3`YbyOHZgYEASo#y;z(K>AZZM-q?bZAedvV|%W>Lr<7Lbfw#}$(K*OcD`v=+k&r-pMCJ$ zwT=4@eKc>;k4HXv@y^S4Zyl0w%azY}?fY);(?^%zw`kkzxuHW>y;H@VKWXQebfm9# zv~r8PbKg22?{9g}-Tl-U9v-rH-iB9QvA>L$A9!NPtKWS6VZQZ&doG+^=6-QZTX@Fj z-fi1#?fvcj70>FNylvshqf0NMJ+F+txnQ;jcL&e+{Aym@bo#BW%XXhRF!%nIv&YUY zKm6IQ6C8Kp@%60+clq9*zyI_4;`!2%(}ljnXI{E6>-ImkAN*j=qvX?g|D}AF**xde i#^+XC`K7p%d-ClK53OoG`6@e0cdhGAAAana7ybf$&dvt_ literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/error.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/error.png new file mode 100644 index 0000000000000000000000000000000000000000..0ad29042bf539eb347ca7a881eac8c3fae120602 GIT binary patch literal 622 zcmV-!0+IcRP)EX>4Tx04R}tkvmAkP!xv$ri!8!hjtKg$WWcEh>AFB6^c+H)C#RSnB4RQO&XFE z7e~Rh;NWAi>fqw6tAnc`2tGhuU7QqMq{MTRLW>v=9PY<|&wn`gTtKLonPzp21DbA| zsYG1NWLL$mSM(x)Fy)xcEMrcRlJJeMd#a>mnzI-X5Q%4*VcNtS#M7I$ z!FiuJ!ius=d`>)S(tyN|Tvt4P<6LlA;5{Q|IyFxmAr=d5th6yJni}yGaa7fG>MvwG zRyl8R*2-1ZoRhyWl+#z1xlTER1QxLb2_h6!Q9>CuVsz@HSV+-*+{ZuY`XzEH(i|qi@Or;ai|*&D&e^9;XjLns$}E0S*p< zkplHz_jz}B``-SoY3}a_GVGd000McNliru=L-Q710(^reboQ}0BcD^K~y-)-I6;BfItjH-;NgI z`9#FR!&!Pl3*Fc#g1GAkw%G@PK!$`211af*b;4pA7aFv}Y6k)qU|hr6To{VDSyz9K zUI4wY^24#pol6AZ_j-%&^sWBAkO7ZT_P}f~`5#ekge5m@0}*2yg?I9B5&!@I07*qo IM6N<$f>nACiU0rr literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/gray.png new file mode 100644 index 0000000000000000000000000000000000000000..ce07261501edeb3036423e3aac4f23dd8d83bdd6 GIT binary patch literal 2967 zcmcImZHN_B7#E%lvUBYqP@}BN|AG}ww|3eSLbKR}m7+w!Y-Gd3oEq#Rj7jf^N zTElTm_WH$vbfB=)CSf^)-O!<#YB>Tl$8FhKjW8LZDeurBKgbDxp1&yYzMB(v>jk+G zb<$zKdtXfZ_w6c@eIvwjg{@EVTdFn~DAN@4)p99F>}pP^*|nj~x+Q_HLDG?&(7_z? z1BG6`GmI&3WMq-ZvchMr3^Fv$kT>&+tjLnAOGpusVauA0vV7wwfVbH7?7sZ=hA;Ta z3Bzd`*^*SLR5BGc6UIXlvMfuI6-iM07V_^f8j z8ClcV7<4U^$;jv%y# zXM`g4y*V7Rkr_~0_2+=Hkrp(vJ7bE|FfN8+si~dbCO2L|8HL}t+Yj8Zl5AoNZ%m+h zoYI`Yge1zQsLDk}v1MfI=m{AbavfR#X}UPY?O+S=MFrV_*W?-C(Dl9Xd7&<`y)Z6g z*f_t8ho}?#*1n(=+t)^XNB7IH-pt|1Z=c+!&Xhp(pAkAHCNL_Q->DDrYmZOA?q?B4yLHd=GoYX z6vw4@tBjQk7CmYjDsdfAb+c47U0`JaA$aJnrD{mcI>2h$Z)aEv<3i{{%vFJByKRGc zpo&?3l|QGEsfSYvx*Eq39)Bmd~lxe>EY)CA404MJkyI^^WP7p3kVpxuIi2c zUcX9919=~!meh$D?IVLTM_46e8ESX?321J-QEU3?-bSnB^R=Y3F{v+sFm+N_XmtCt zZ1BQDSvOl5rVy;VsJ0GELNBf0n05?7gy+o)X)f{!9=khrl+}=o3@Un-YJfmNmX4}t zMZ>g+BdZFfDBE26ozztuX||#^bLd{EH^NGWaWF*T5R!y@UyQ7q3S^TjTArtiuBT;1 zOT$!zE{lMiP1ST}TgBxusDJ0{k=)Mq zrgre!v(mEr1$lDlhiR-+-55f)eN>9F{Xr7pO6D>U~uR6NN+0Ze0 zZR)C!Idrl2=1TRolM@p^boJyXzg}^4^^PN}-+%e~H~TA-=Vjs2<2mkh`GpV_`mdcL zFYccD^qEb2xcAPS`C#L5{>ZoIHh=im&25=Q-^tZ=`;Wi+&Vj|BT(`~FKlV?(z4+j& zLpQgqys;zSee%fKtLBO;x7IHE{@k+P#xHF6`O6c7BZn9LsNr8LQyh2tixtP0bAMf^ z{Brwpb^I6|?0atY=RaLqbNKA_3s2I|^v5p0am{=MO~qUPxKTOqz@CqGUcB|y?>pJm OxuGl8~oU0zvg}B z{dnem-#eUfB`^9?hUw^B!gm- z=2;>Em;y5FmLwC3rYf$4^aEC*IhvX_iqS-{LGj&^XiB=ND3idx?K;CVLTzk1epo_u z;oK4`5Fzji6>GVinf0O=d6;A~X`Z^8bY0s_X`-S?76F770f3gG0EANn7>4AeWXI8w zY}Myyd_2ICip{Uqm+fP!qp=#MERmFILj<6XQvhlT2FQRKa0rGPB(kIHT3y?Q(4{4g ziW9XmuWYK(At_D9wgqHcCm>}jA}~aYJyhF}6;akL%Hg=(HoxeHIp3z7%RI+c+obBL ztBBQCnip$>JuFp=1JyxYg7gwZ_N>W!XONGJ@Aq6vvBYyMU(AaAF50@N1DdMJYHd94 zmPxTE<5Je5sv|V~%8ZJncd~?aGFG8xyBpD*8?N=5F0!TeRdl&ZQJM%>L%=LMiOtuB z-69bz+ZhZk`5(ZQB|NjHUUsp zRFJ}00+waTNY}7st29e5Uxz6h!hakL_Ps$8PDrc(g@|sXB#hF$6Z$0%1wqlpmFf}( zJ-fC)H42i8eQvz{OiP+gLU%$AOtjK)f%_Nj&6shs>xTdPA_?q(P;CRk-#bM0KT~CL z9b22q#%oU13uc>xbSE}xYoDRn+oFLrOIK-&*DN5atUQrw03x$Hoft~ zFLMr${yKK4<>RvW+HH@$_wb5-uMCEx&g3(BTia?%exaYX1jk4#cOk+jm8)H~w_4!?@73 pxb)PSaEX27;`52KZ;t)mBy_A-zZ$)?hn=RgYdbP;t$FB?zW_LE*AxH% literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/inactive.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..d86c8677a4d8ff4faa5cfd144bd58073f5314c0b GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJtM=93Yk-Zit0RF978Ppmrjc2I-tPAV%yDs<+r>+Y3r1P=~*9=Rd^iFW(iExUJ+7s zjwvjEq0o{kOSY=*Enm5n@96IpUmTXQYuWBOdVh}g3HR4Krv#-%Xq7)OxSPUdBP!%x z%T$%zv)DxWM)unuJq65D<$&r{FRafIP7heA@G^Es$UNnTj7Ph!AJ9&!ECITN!PC{x JWt~$(698E-UNZmy literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..d069dbfbc6134b332c1b638369e0ba39d377079b GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJwr2>%=KS^ijH}@IEGmGFYUMGI^-bGTC8O)Eh_Ep$fCHmi{svbd-weOAIQH_)e+(p z^zCsyr?BFp@5ed4YFv^A-AA{7{_)IkgH*%*gjAoxQm52+0Z+aQg?YUy zwzcNI<6fc>E19%IJ)AD@xac8nvFq7#Y1^w?+c(OqeG->_+;!=R!^heM8wxHKZ<3ez z#q@Kj`^VSZrmqD%bzX!yJf0ft9SYW-uyjdcoWUpNFXfC;vyFkqo|Pq literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/light_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..da38b659e1ae1918461bcb30687aa47ce9881071 GIT binary patch literal 2961 zcmcguYlsz993N9^+maqaND&UB(2AZr=bU-mJA*fI_o}4Ox4V2ETNvIl`!pQN&q@JkdTeQ6;J`lOw6UwgN9-6gAmd7c07 z{9oty|DW^1@V2eXd++a+Bx(83U}1#6?-qB@t^B#_>UF|jw?~7!6G^&bg}9eUZyi}F zNxggh(r7wbe9U&kYKG9zVVQb0;%G_Qu(2KycbuiN!^(b;SEkQ=s>nXgE4z#$EJg!t z%pcqrvmN`kmE3*fu0@rN56c_sHdjz(DUs{dN|4y~ywcEX^KUV%Dslsoj^~w4!k|1_ z9F_;dn8{`a0vAFoXRQn}b=`#PWehP?p`juSkZD8RMp?OaDco92J$t0ErDco%<(08C zjciq|)oPiVmI>psiY&`gAyzR4908K4ASHDWB&*vR3M_GBKT7>DkcCF#gcE6A;hr`_ zs74*NLDEVSPncRKk%}@?@W%y!Zb|A!g-R=5zk6R z>U;AT6p~p`R`=(D3P}eV*#j{nX&9Hnu+rwvaN9Q-qYRe&cKHDfYsp#>cxwVHkd);W zK_mckK!YWWZHR0Gt%LjnHlamMO-fSI4YoMGgprM~jkB}BA@#kf1)x+gi*U?!GI}06%7{kCcTnCV>t^r3U9?0Pwq|`tja&TMQ_SokoPAc76 zg;$ho^jOZ+T0?+kpNVjhg(i`}rlgSRg3fN2<-(HbB2>#Q#O3+jiR)P+YG@K>||7F4f}H}@ZwV0 zR9hQkJXtqjZ4;J+URonD+f?QmUa%_E`J7M4R72@Iw~;Aln`m^sUJ zpoSSkoSXBxuGvVpvDU7kf8u&ew>w6HGUJ<&s@y~{#KZ>9nLsD53p~Vw$>p#I9Ap}f zu9=u(&YHgmGiO8ikArc;V3NgM#EM8v_(sa&B(HdJSd~c>ReZNmUFu{&Tl-U|Amuca zXWGxaNuwaf|DQ|NA1T;(*X>1L|KpMDxGU%;XlaHjRzfo~sw2 zMRJhu#5Qm33p9I*EZ20h1|XK{0Az^rB!&fu=3&h+`4-?2!Dyi^yxC?iIMhf(*SV=Z z#1CWQvvUgMKb>_5VPY%C(=9edref0AAgN0?=f4gP>C({SK*I9odI{)|=(;o)69V}fu zefK@@e>Zw@=kuheKeObg+`ZCDH@HuF<%w+n^`&}o#e-WfeQ@Q{GU?Y1ZyfDAdhErX zul3hf{P6MTr`CTZoiGkxTO*yUK7bN^&)ent^v}zr{in@0lfkWLSM7iL_m$E2XOAC$ zXZ@p4JCeY2&+KC3pm<@;BWvN+%h$iWkUYDTof}@4JFw9bhvuQp+Y0aX?|JS|!ymv} literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/lime.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/lime.png new file mode 100644 index 0000000000000000000000000000000000000000..15de16c8d4c3209efec4235bddbf3a092a1e5a12 GIT binary patch literal 2983 zcmcImdx#ZP7{9e>X^D~|S%%XXqP6GF`-#_0_pa?icU^XGxDsS%&YZbBc<;>Y%L1M@oH?|hHn z`M&R*SGzi&nm6~Mxrsz#UPpVno4gm$``+2)x$N2vNM3V-_DxYDao<9E-<8;Z@WDi4 zZoixDje9dso5(LDq3v5ZStai3MYs_P)%Mo1&yg*EU^~aj@g}FU$sU4Qfyxw z2PVfAi^XJ7O8Q}r6AZ)Pc##uDKoB4r@?uy5UbMWXA&nyxxC}I1fLZJQ#4FoodEW2*BP1?Y9rI}!vZ7= z=N4cNbAgvDTgzn34ljzKhj2$a#S&MOu4|i;rf7l)6`;#l1H2-OK!<__3?z!8YG|U4 zoZ9@fj|ON`(fO77vVBB!)K|mQRV*V1NkB)s01Q!<0TdAr1Y3rRfH5y3p{8v^=#mnL z`9`hOE1PI^u&zqTwt!@780fZ4lnEAnD7GQVf}~l5!*RQv>*{EX)kiba;8`C^vs_mI{_98eWSQmW%! zZVBgm(=K5xsyL!HN;XZD&`w4x)NFSnl5<1VUekm7t6zDSDHo*)Q6&UKvlH8Fb=aL` zfoDc#MQyPU6S8iRwG~+8J8=<)cx{d_JZ)8QQ#l{O!CSj7XtKZyDh7@rsX)Op4=hR1 zfT|nF;w2GdL92y+v+I&6$fhXOYUp-cuhNS8pqImB6XMw055^D;%Tja)*t%u_nU^)7 zTap2g&g;m)h?Jo|Sum3}ggYDz^1VSEHY8R6Lr6AK97ZYD3H<^CgCOssa&>Woo?YFa z>IKQfJ~Q5arXh;oMXkB8M^hSw97mpZYlxd!%kda!O3hdiPIq!o1XxUYpf-eY$t7^W2jQ+Rp2{ zmo{JhX8Z1KD|Rk=^tYFHv>e*8IcD{4?@ckFE&z{X)`1N>8y6MP0OE&*}e)hLp zg|DA#IyshF_Q@NI6I~b0x1;v+pPfAM*6SZ%d*JH1b^dEhudIGE`snfNqdmz2I57Od l(8ZDPr`+9pq96Zy_|$WqZ9iPzC)1;JM_Xt5$hzmZ{R6m)&?Eo= literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/magenta.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/magenta.png new file mode 100644 index 0000000000000000000000000000000000000000..3505727f5f27fd909ee2a9ba0321cd24d61be463 GIT binary patch literal 2976 zcmcImdu$X%7(aXvgg{D&gy0{pi$RRe?an@L7mio2&}y$Xg?=XyK?(rciUbY z{6{pgDuMX;Loh^xCcaHf5DgkJjgLP-NDMIsQG7p;NF)Xli8^zyUZtfC$|biuJKt}< z$8Wyxn;C9zTRVH^!kLLgVs=Y&rh~p4*nh@!`n>+k--y1h37R)ViNvgV>_08B^XUbN z#LUf3t}E`!wwl;?lgRchk}SFbMJE!=Rult-H<6gLNRQ*C`QP@x$8(OI<~!A_m<<|9 zuhTpfl66CEIXtup8#cdUIk&86QUxxF5m$5zUSt;2d`YiK$81{Qxe_Gal;&44gIrg( zoon<%!f8nnU{RDf-AF=BQ8e*ZP7)TlgB!gm- z=2;>EF$H8XCrPFVO%>iE(t%ipW@&2LC`R>QgW_`%G-YTi>KL$ZJNdy$p*A-2e&`~) zagK|6h!A)^C2QHN+2Tbp@-S)1q;9ktys^A?Af{nRdq6 z;HgnrRy)v3C|MWD+A=Ki^YH)*$*La8@T65COyqoo`Y-M})DuL%K0LI&rGKP|hG!hpcJ4mr8%s|gdgvwT!G;q*Z$35q z+a(=y&;9z!x!;eT8QFK>qf>v}b>-X+{KEdW?&aa@-#v4}?VNGohmX%C-XA`Hul?YGXXjk;+1V%DrFZW55I+1@>k;#&ZF~1zJ$U!0 zZ*QDF?ZBH$-cA2mJl=W!_S4;qXU*}x33vaJee8(27K2?|&hA_P<^1R0>3nkI!PN^- hu2`ISYUq>hmk+jXZCcp6m))UTn%Xk2t-j~}e*l;2)(HRr literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/orange.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/orange.png new file mode 100644 index 0000000000000000000000000000000000000000..d1891b6b05dfbd7f3046c675adc622bebf47c28f GIT binary patch literal 2951 zcmcImUu+ab7(WCI7Hdd|3Bd}R<)t8VyR(09M~;fUVw-qS+cUHp6J~d2?>5}+F1y>_ zl@KL_Ks5S5&=`#-3Zg_~A9xgm7=nq$7zjRKqT$h)7$x#xA`f-u{`D#?ZBRDZfAjt3 z`}3Rc`(|Dp-t|m(*ZQthD%CwSm>Xg5HT+)nAbW1SHG|pfp>S|KPNi0_<@d7GyYH<_ zrMmWeg|TET|15HXN*a^Ers-NGWaw0CTVE~2&OVw5HZ6L7R{Z1KMN#lbR@|fK<$Tyr zOWxpth>jlERd5dMb1WkEZ5OuH5K~a02^MOVvLB;bR;=qq?3)iuqELq<`?BH=ZcrG@ z4-5T4L!L-uQ&@@BdDk!odOR_FO1waGI8iJt5z!$hiYzGrbR%D(w zLa2mowSL^Bi4i8%a45mF%tNXJiPOe~6H&QtoH!CK(+c&Im|*Pht$7PTxugvZQGY~n5=4a{D7SKFxaFImz_cRt?(uvQRO8J&@a6=X!wJob zJduE$0jgY36eL5W!zX0+Avd6TmYM`7xD#wKd_jRo(U4-y0SCl$rxt}02f0C1!EE8Y z3NBJ9^owY8(qrOPsFdgmHKp7Ldre*2CHn0OQ)R-d2qQE5zaWkf!QCz*HZFl6c6369E zt=ucZG`cins1C7#N=yneM1#PBHh<{EQZ=ZWHsf&CZhue?qI^IY=c*|1)kaJ`a~1RY z%8IZ#IL1@8Jkc056`5TUXCk$=U`i4&0=QBf6u=7+$n0q=lT1@#NiIho%N)Xt4CLR0HT#lYy=3CNMIV zW6P>SDKuN5-|4!FAgdv@RYUjUdXrYCg#99An~)^ldoZeNDKw+%fEYFbs;X(gCOQO; zt>_s=wiQj&<_l)thH#&QaRPsmMjeS2;s~>iltyt@bfcgm;4mzEPQALMNuMt|Rw`j&KtsCB1EcbblBz{0>v;pbg9is7{YcRQ!uT6d9 zMf3H7rRE^pi4kka)6y*eUU?%!SSDgn51_x1*4GU zPd*UPiZ5T>eeKf9=V~{vobLbd^B++xDdgPUBHT}?I!lm(J#g#o5 zkCqN?Irhut3pd_BT-eyxJ6d?>`tl9MGiTB1zaBn&C2bt~?RsryqjP(Ubo}ZAudVoY v-S5YyKkGU9=c=n4-rRrtVBtpm^0H6A&wTWA&)ci{QF&-!S8n?0y@&q+2J62< literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/pink.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/pink.png new file mode 100644 index 0000000000000000000000000000000000000000..4747663ab1f4b7f2303af4c945e05248ae1140af GIT binary patch literal 2933 zcmcguYiJxr96wv@Beqam1!<+-Y(*?Ow=?^?+ofknbEygR(vX}qK`PG8%;uKf?QC{8 zxl8dwsUWRT5K5`2h<@l7KUnj`JZV!hh<5cR7t@3|U>iHM% zNu_$G{o+J2QP}SiUQJ`lODtWlh60^R?dhwBm>gz_QesnnkW;^Z<4slZX-++86<{G8 zU}b;kNW{jEj1< z3Zu#ZkCqcxQ1~<_V9>e1#-*#7k0< z_}&TzrDO?|)%_KqQqqBj?m)zF!lNSRl{R-q+rB9}O6$r42mOHZTD)5Z-de!&IAJ+e z5(&U8Fkn&FU5H!@JqX1BHlYPUO^OrT4R!>+s3X^au4yd+bLx9@t3oMpJswrD*f_t6 zr%gKAQ!@jR?V$Gh zJSQ`fRC0Z@z9=U`M`t%&jC9>{YzUZ#A+S8t0a<1lVw8oXWLnVHy|%UkkuORdSGu)I zuc*-Iv8-(nS^@^mFp#At0uCz4heaL3L`J40a=2)BfLC}_;8f(?P!+k`u23&r#j?I~ zstBPmIU%W9nQ2aDbSQorlFycWauxZa_|d=@Db`g*^2Ke~9~Z4lIAB|rVYTK*{W_~m zX#2q!|K{>||7JP5aAi@Y+(@ zR9h=Ek*w>mwh4>5m(*~?`lm#OSFH+dCFf&2dwthY#zcaE40w)V1B;mulng5a?5smd z(9jt}nRe*cx^B40bakU$LpS1jE3KrAgDEBsAx*vUU~K9cg8vp^)X4xyOu=icQ-HH1 zt7mMCJSbRm?LI8q5dPy}2oGji)J3ciM_3%BEQ)ig7xAis!?5C$Ms;bk0d1X6oq|*n zt}M2n6_Z9;~*61T)tbDKAc8|JIS`Tk<|_$HotMkzK;O;Z^!=TQoZ!q%>MJ|(fg|FV~{@X@H+-Vj$3#)`!{i~A6m|F z3kID`f7GAeW+AT_gV@WGSh?s^G{?1WDEkoYCJ~<{Imb;3KYess;2oS4cIs(4?YEJ< z(=i&5zR|7>8r_XdENpm~Z!KF?L6Jm|FBc1LXqA&fMXyEQ*{~$=6-cx@DQsc}`Tled z-{u8`H)67gWLe?kW(*jbX2=inimb?ztV=)$_|5~#HR+g5LCOU)MjN(%WX z@-0a!l}fRa8uNmj1WePEWJOXGks`!!#EoECbi>tk4Ji_$!0{u;b9tr_X1$>(DNs+V zAr$?FS~slGLg-DNE^e13snNVzGe^ zqxNCyQ7yJ9(P3u9CsHp7y`cb+_F-yqb=|Qr>LugU%wjr)HzxaeFY>~?Hw_65@gyoD z$DYO@lT3n=vNH{oNg7b!Y6}RAyddLwg?jGv)P3U>5L5WII~^B$rEnb!yf%TPU__Dv zOC(WFh^m}X6iWt{4%W-`MXo~AG&M1d;6$)V@fihJib;Qyz#ew&kr|;FS+*AxAze79 z2y;a8-CV_5I&F2jVFX=7I#Wr3x*BsFY{e0l<2Z{&6KO!Sv4+H~Y3L$W6&yz@Ap{%s z`6&+#v7}=2tM!FFM0GS)!%|hMPD4;6wql4H(V&=s$QBc3B4KKn0EAIpTX*2l5{HF} zTA5dvYP3nhpsKQ>isM8~VCtF)vh1c~Q`LYP&r%M@?Y4OZFGzcsa;^$ITWyP~r>;U) zUr7Pf2K!m67KW;WaYd$=1lYYMADBTtF5d1slww8TS-w~m`+c-^Q3niNSM}O>k5eXv z{**&m3#*P$GAlDGl7Yz**2!3fS{+VEb8e*8Yx>Aw?XBSOm7=sDs)m4Ab`mVqhMg%E zcy?4))t2&vl68x$t-?ajj!G~fn{t%l8LL8?&iN1y-`aH$*MJNRBHE^Eh&s_^F{|ov z(MXsmE2|12AYKpsX4h2%JJeUT(~K&Z9>>8~B4`kksWxrMDw zW#hG`>IJjSLAn!Lw6)LB>@hHrk&WvjG>xnXbXJ~FH$|x0imDrij%>&>nrZX?X|rcJ zRH0$Qxv4%x4`b}LaSEg#jdLV%Y260&lsNbC9}dtH=Ecs`rc7f0g_q7OKC`iT-`HdK z4D5Y-{_V?_9w;w-;VNi-@pHfViIpAs`%mmY`Qh_(-}!RKjvp_d{^R{`wtfHR8hc9% zY1(DIy6(c(W1rmisrhr~cis11d0^w=r#?78@2-}Sr~9s6|NY~>%}bls|8{Nkc=yUx zoU-c4MK>19M^Bu%vV8l+!Qwow<;dl(_l{gT*!1kt^MF6qe!Okxie0bGDP7w$r+eSk z^F1q$|I&Tx-1@T|*T3hak~{eF;Adma=-V~F?mc^{_r7CyUOvYy%#B@I_ipkHbOXzN?)FW5=Cv%M>IZ1b*X{seYI&Vm2{ literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/red.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/red.png new file mode 100644 index 0000000000000000000000000000000000000000..129e1093cafd7b482842d19c2cbffbfe06b0286e GIT binary patch literal 2966 zcmcguUyRg581I1+h43$iaFD3AJP1m+o&MWx!$Qv6JN6P6j$_RoQIu&r-K*@jrS0AB zArhk|icw+&UJOw}L}EZ=q8JTEObo%O@ZkBT$wi(FFA&dX@tfW5-k#iX7g3vZI-U8= z_vbg?_styY-?nw>;|<2ZdiULg>By?sahofG{bD#QVX!Pm&B||O0JjXuAjfav96uv2GxRC2)fCz zo8KRjo%^>Ht^Io~-R8DzW;fLg5Ktj8W^0wQ7a6rISC?x*pAHKgTZhDZvs@Qd$PN|y z*=|21tdQWtOTP<8L5|-=AZA&0!QXyU(0T#8ez*3>mg3lkH*I4jl#gRW=$)o25CJXt_;I3`(+ z1`;o3cv&n;k|82PMURTm5gX6~gr<#S+z!?OUzCs`ONN}82KH^&8JiPoTZZF@6$~5a zR&a?3fmf<)D-?`AFN(2ek-l7(15;D3Ya5bonk1b;d>V-gZ%T^AXOQafq9UdV(K4bV zWt!`AzBNLFimq?um+f01qqQ3b2$Su!tn;RVMczb;%3}g4AgY=q69<{5E;XfX4_!!c zTyB?2t+GL)Lo%9d*(MLt2%oVP#OuhUjcV(%g5}!@qV{P z%0oF9Sc@8lXzeq*rq9qyMl;mNyAj0PSW;_tl6^_9?6UQwG_cih!J^SgY%UpgXV~ER zQP~h%9VS55ZKAdTi+m@p;*fNefZ;i_LYU3?2#?<0bd*+*h%~}Gx~%akQ6QvbHO*@o z-7-a4A_S$IuHS09Y#_yurw-#`3*U61D|afI|!iDG8%2=Y)QR#X(SZt$KC|qn@3dPpyPx zW1pQWKeLi%lhAF8fp#q|6WD)I-<%OQziRluZ<0VS2#qoz{Jlan{&Ni`d+FZP4_;%Y zT7c#mgK!cXP}=7x_BPTj%}hgy*EN$zDoszU>O7VmNmeyYwH!<%no9HUwAj-as?*SR zZ)y&~WsG)Pw?O!5-6M$yc^kqlvGeHAQMh4#-XhqL6rygG0v-+j= zufB7s`?&|!^xnOu^SAfTA4#n~`FVbMN9oszKfgP3@?cN#*x(->A5VCnynp7ARVxp? z{?=smm2Z~5IsUA)W8n{HPaWQI;hM2z&0WX8ypX+dFgUo1qD==Wb= zIk^lid;02+`tHou{Gk==CbnCvJFYzR?J4)CwcU9)*z)_e>Q@WK-YuNiIDYvldUNjU M*_Qk0u{|&T1)TuH82|tP literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/white.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/white.png new file mode 100644 index 0000000000000000000000000000000000000000..8cc85ea011fc5d000fc7708e5badfedc5788b03f GIT binary patch literal 2950 zcmcguU1%It6rNIA(n_SIg;uR}oW5x7-MM%Ec4z2X(rju{-8Q7FNf5<5Gk3CMcIQrJ zX0w}!wuoTGKSUp@E#iyyj}}o7u~e%Mf}lkZ@u7l(Na$0n7SV@L@7=#_G-*Qp8JNF& zzI)EO=YHqh^W@-xJG-2Uqo%wFrl{?S+vuG_@#Rl>_B zwhF@f3BNFsjO6dO99m9cm)ay%D~Aj%2)p;xLhOu_M6}76A7rK3GapN$?`EZ8JrDC? zFDd%{(-Ao|eW2h>k2|I-?YTqTU9*^iGD)ylE0==Us%53RUWBmY zNPbZ4r4bR06a)^0ikLQ2$j~$c?h+NKKpE;XQUEe6s97j2HZO@;i(Jnd%I#~~Vt-kw zm?WVk%hhT%RaH|o8k3P}nle;mMF9)};;A6PH4wx*S{iaBb|ODad>V*cBerQJ$x6)A z#uCb5TWt_G!^8q6*KjDK6y!^)16`+$3oB8nZrpWbQX*v%Br(IHHkL&xpKrq#Ra-8% z(Q(o@$vkSVZBcYwm@F484}&=xNU zMdEu)803-#P*U@kfO1J28d|*(!3m8Dl$KiD8Ep9`Dk!Chw+{P(ORMp1eBsRrB!?4{ zl{k?A%m5V@6vcwb($VdZeZU4Z'*1b2c>hA$|{Ldb&p0x)%bZ)#bn>sTI*%9w4O zU&doZ4ui3}wS3+h2;u|>4jIU0CFW|%_gza-RibMU0|adYsJ3Q;jAGcpP&{ZVI#zVe zYt7G5r@~3a=Qr}pr4G~4-VMva9>kie1KY_EfD}ywreYU> zVxC`F2{i{tI8{rP#$Z~3?2-|GHszzs$mhlP1U?I~B8i+YR^9#~R=Su2hOVo6b9~UR zk@Tvx zD+^^qZM8^Pu&%<|1}vstQpFMJ8DkM%HY?<%oR9J3)m=wv4MAiO;F+ocbfQ6Et9lw3 z8Pl<$st|%0o0f82wUEZ>-O8bBalNVADdJ#^utP|eu6;2M%QO!Woh2Gkfu?FMFg>UP z?5P?@j&S zwHB)dE9D?Ni7i&zmnrrxG9ANCGYXsRz(DL20XEi6fK^XXb;Hmd4|7IyZS7kpKVy literal 0 HcmV?d00001 diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/yellow.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_transmitter/cutouts/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..106584585301cfaaa15cd4f5084ab6000fd0c845 GIT binary patch literal 2960 zcmcguYlsz99G^|8)D|?YR1l{T!pONZXWlb;Gu^wkt6p8McXO>ic;?KRyVKq~GtSKJ zy(^Rw5{Q&heK51apdtt%gg)fj(nF0R3nHSRKJ+pwda#5PsGW0PdpCF8#U2B5=FB<2 z^M9S+|9{TDp3Qf)&s{o~VVL&ru1t=6=hOGvt4X_j>>?zeIbqlKm|^BEq;DH@=g=}B8 zhwTU=%xWo-N1`aPx|sr+qG;kORuUyq5LE$4JkTsrv4GCjAC72?9M{Ta*4K5BzckmM zB%vh;<#IVymQz7g5P)f#f+z`+#1jM`5BmwM@P53aAt8ff6nSCd1wKn9LOU2t(j2k0 z=0YiKiuL1qm`K2c3Je915~)j7po5yYa4;%Xl{-klMO?yu5)&+FVo8*;*(Q8av87TI z9VeYb#G<-ylcMANaEOH*j)TDn;m#qVaYe(hILYDh(9B>tfj1Y2{Xr7M{lOGLXiiTE zMdG*0~6Q^HVHm20ZXF9n*a_R&mEo?>LAMvq7oz< z=apaq3!z`AYRhJ=Za+?-k8pP;%@I>mp66Hy8lvGUHm^&n#_PIb@DM2qF9C=p#g$wG zg2wtxfCee4==xfIIRPRvn!91?hDKIHk(Uu5jizAUMmppT$#DTRk>(gmL)wX@DUzlVDwjwKZ5AxJemCcx{11c-pKGrZPT;Lzg!l=n4>lhI!YNHD1Mv$lJ22 z^O|8ITa+b?f!=WaQqyG%D3&BQa_CA-uZI=&L%)E@AtZ2D?hH~~LJ!^MB^{7NQx!x~ zL(+L$*O4k2079Fv^wNEpv>^P)&Y-{_!chycLKs1Ekm4v#b8ZxrSQv&y4^^{E81kL^ z`P58EHVN4A@-t=792|Kq9B9?jG=cpW^-asTnN`F8eUk)wL8z4h;qMiq_MfRmay{Lf z>cMMGRtsjzL2?pXq_j^{>>WS~x~;1`G&P$CDoszQnmm+UNmeyYMJ}X_rqY6cTI?x@ zs$pokH#LUHWsG*4w?OjKyhmc6jws>7;`LZSN zo!%GkfByUP2Xc!}blNYkw>Rv#sWkHVtQ+Qh^x2tTcfNV#;F1IHwvFr_S@gkcrS>~} zU-)M9#Df=@4c1S$FI+HkZqvukOJhBIS6%h+{N2~Qm7BfiyQB9WIotNY0s8 z*Bv}|ardc{xBPtk%=ES4z)+>iz|hdl!0_`w zkbcR)P-?)y@G60U!Dy(Fq9&nVFdk*Um6Jxz6zBF~g^q3_sp8{Qt@D|1ZP;|J~i) z$BrHQ{~u`EC>RZap%em_jxLe`WulTGzhGbj9?5_q_&YnW++g4=@Q5sCVBp&e!i?^} zC#(euN|d-plmzFem6RtIr7{#GX6BXX<)xM=nCKbm876DZ@n&FP+Un`z7*Y}U_SWsJ z+YS=0iCca7S615{`S{y@g_fmum`8rk%=s5LTwhdjI7Z`B`>lo#Cg(3(oP9g{*-H~Y zR;J4y^Z$Rj5%+-SgN0YSb8(|+!)pEs3``scYR$bF7+C~RxfaZOD(`;$BU~P)df;Q| z?ixK7fd$$Q|No0s*)!f{-Nm$K{=V%F<_+!bPuD-ae4O!4ZO#9u|6Xt3Z(py=)X9+l z{$A~`4?q8X|1Q6f;rw6Ezv>@0eLd{Xtn>BXpS_H`>i@m-clZu8k>|mWFQPr-bL$_S z(_)cO2D##Q-ZY@26d1zg6;QbgoEY{=Y%WdNZZ$uI`GeMnOPTrVK!pup)!*;x098AH z{Nd2>f4|b^?UR!j?(NPI-FG{2`#P(YY!5tlhx{ blockMap) { @@ -149,6 +151,9 @@ private void registerEmissiveModels() { Blocks.INSTANCE.getNetworkReceiver().forEach( (color, id, block) -> registerEmissiveNetworkReceiverModels(color, id) ); + Blocks.INSTANCE.getNetworkTransmitter().forEach( + (color, id, block) -> registerEmissiveNetworkTransmitterModels(color, id) + ); } private void registerEmissiveControllerModels(final DyeColor color) { @@ -241,6 +246,23 @@ private void registerEmissiveNetworkReceiverModels(final DyeColor color, final R ); } + private void registerEmissiveNetworkTransmitterModels(final DyeColor color, final ResourceLocation id) { + // Block + EmissiveModelRegistry.INSTANCE.register( + createIdentifier("block/network_transmitter/" + color.getName()), + createIdentifier("block/network_transmitter/cutouts/" + color.getName()) + ); + EmissiveModelRegistry.INSTANCE.register( + createIdentifier("block/network_transmitter/error"), + createIdentifier("block/network_transmitter/cutouts/error") + ); + // Item + EmissiveModelRegistry.INSTANCE.register( + id, + createIdentifier("block/network_transmitter/cutouts/" + color.getName()) + ); + } + private void registerPackets() { ClientPlayNetworking.registerGlobalReceiver(PacketIds.STORAGE_INFO_RESPONSE, new StorageInfoResponsePacket()); ClientPlayNetworking.registerGlobalReceiver(PacketIds.GRID_UPDATE, new GridUpdatePacket()); @@ -252,6 +274,10 @@ private void registerPackets() { new WirelessTransmitterRangePacket() ); ClientPlayNetworking.registerGlobalReceiver(PacketIds.RESOURCE_SLOT_UPDATE, new ResourceSlotUpdatePacket()); + ClientPlayNetworking.registerGlobalReceiver( + PacketIds.NETWORK_TRANSMITTER_STATUS, + new NetworkTransmitterStatusPacket() + ); } private void registerBlockEntityRenderers() { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java index 3297bd8e3..df268b19a 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java @@ -80,6 +80,11 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage2.p DefaultEnergyUsage.NETWORK_RECEIVER ); + @ConfigEntry.Gui.CollapsibleObject + private SimpleEnergyUsageEntryImpl networkTransmitter = new SimpleEnergyUsageEntryImpl( + DefaultEnergyUsage.NETWORK_TRANSMITTER + ); + public static ConfigImpl get() { return AutoConfig.getConfigHolder(ConfigImpl.class).getConfig(); } @@ -179,6 +184,11 @@ public SimpleEnergyUsageEntry getNetworkReceiver() { return networkReceiver; } + @Override + public SimpleEnergyUsageEntry getNetworkTransmitter() { + return networkTransmitter; + } + private static class GridEntryImpl implements GridEntry { private boolean largeFont = false; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java index c0a02ea47..0484186f9 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/PacketIds.java @@ -25,6 +25,7 @@ public final class PacketIds { public static final ResourceLocation RESOURCE_SLOT_AMOUNT_CHANGE = createIdentifier("resource_slot_amount_change"); public static final ResourceLocation SINGLE_AMOUNT_CHANGE = createIdentifier("detector_amount_change"); public static final ResourceLocation USE_NETWORK_BOUND_ITEM = createIdentifier("use_network_bound_item"); + public static final ResourceLocation NETWORK_TRANSMITTER_STATUS = createIdentifier("network_transmitter_status"); private PacketIds() { } diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/NetworkTransmitterStatusPacket.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/NetworkTransmitterStatusPacket.java new file mode 100644 index 000000000..f174071cd --- /dev/null +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/NetworkTransmitterStatusPacket.java @@ -0,0 +1,28 @@ +package com.refinedmods.refinedstorage2.platform.fabric.packet.s2c; + +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterStatus; + +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; +import net.fabricmc.fabric.api.networking.v1.PacketSender; +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.ClientPacketListener; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; + +public class NetworkTransmitterStatusPacket implements ClientPlayNetworking.PlayChannelHandler { + @Override + public void receive(final Minecraft client, + final ClientPacketListener handler, + final FriendlyByteBuf buf, + final PacketSender responseSender) { + final boolean error = buf.readBoolean(); + final Component message = buf.readComponent(); + + client.execute(() -> { + if (client.player.containerMenu instanceof NetworkTransmitterContainerMenu containerMenu) { + containerMenu.setStatus(new NetworkTransmitterStatus(error, message)); + } + }); + } +} diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java index 83eed775e..7d4c0bde8 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/packet/s2c/ServerToClientCommunicationsImpl.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterStatus; import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.common.util.PacketUtil; import com.refinedmods.refinedstorage2.platform.fabric.packet.PacketIds; @@ -102,6 +103,14 @@ public void sendStorageInfoResponse(final ServerPlayer player, final UUID id, fi }); } + @Override + public void sendNetworkTransmitterStatus(final ServerPlayer player, final NetworkTransmitterStatus status) { + sendToPlayer(player, PacketIds.NETWORK_TRANSMITTER_STATUS, buf -> { + buf.writeBoolean(status.error()); + buf.writeComponent(status.message()); + }); + } + private static void sendToPlayer(final ServerPlayer playerEntity, final ResourceLocation id, final Consumer bufConsumer) { diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java index 414b61b6a..a1dc1c257 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -89,6 +89,12 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) Tags.WIRELESS_TRANSMITTERS ); groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); + groupItems( + registry, + Blocks.INSTANCE.getNetworkTransmitter(), + ContentIds.NETWORK_TRANSMITTER, + Tags.NETWORK_TRANSMITTERS + ); } @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index 842a3e945..d7a1309fa 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -37,6 +37,7 @@ public class ConfigImpl implements Config { private final WirelessTransmitterEntry wirelessTransmitter; private final SimpleEnergyUsageEntry storageMonitor; private final SimpleEnergyUsageEntry networkReceiver; + private final SimpleEnergyUsageEntry networkTransmitter; public ConfigImpl() { cable = new SimpleEnergyUsageEntryImpl("cable", "Cable", DefaultEnergyUsage.CABLE); @@ -70,6 +71,11 @@ public ConfigImpl() { "Network Receiver", DefaultEnergyUsage.NETWORK_RECEIVER ); + networkTransmitter = new SimpleEnergyUsageEntryImpl( + "networkTransmitter", + "Network Transmitter", + DefaultEnergyUsage.NETWORK_TRANSMITTER + ); spec = builder.build(); } @@ -172,6 +178,11 @@ public SimpleEnergyUsageEntry getNetworkReceiver() { return networkReceiver; } + @Override + public SimpleEnergyUsageEntry getNetworkTransmitter() { + return networkTransmitter; + } + private class SimpleEnergyUsageEntryImpl implements SimpleEnergyUsageEntry { private final ForgeConfigSpec.LongValue energyUsage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index f63badfca..5357e1fdc 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -25,6 +25,7 @@ protected void registerModels() { registerDetectors(); registerWirelessTransmitters(); registerNetworkReceivers(); + registerNetworkTransmitters(); } private void registerCables() { @@ -127,4 +128,24 @@ private void registerNetworkReceivers() { .texture("all", baseTexture) .texture("cutout", createIdentifier("block/network_receiver/cutouts/inactive")); } + + private void registerNetworkTransmitters() { + final ResourceLocation emissiveBase = createIdentifier("block/emissive_all_cutout"); + final ResourceLocation baseTexture = createIdentifier("block/network_transmitter/base"); + Blocks.INSTANCE.getNetworkTransmitter().forEach((color, id, receiver) -> { + final ResourceLocation cutout = createIdentifier("block/network_transmitter/cutouts/" + color.getName()); + withExistingParent("block/network_transmitter/" + color.getName(), emissiveBase) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", cutout); + }); + withExistingParent("block/network_transmitter/inactive", createIdentifier("block/all_cutout")) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", createIdentifier("block/network_transmitter/cutouts/inactive")); + withExistingParent("block/network_transmitter/error", emissiveBase) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", createIdentifier("block/network_transmitter/cutouts/error")); + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java index 880f37c2e..4016e62a1 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java @@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage2.platform.common.detector.DetectorBlock; import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridBlock; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.support.CableBlockSupport; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; @@ -63,6 +64,7 @@ protected void registerStatesAndModels() { registerConstructorDestructors(Blocks.INSTANCE.getConstructor(), "constructor"); registerConstructorDestructors(Blocks.INSTANCE.getDestructor(), "destructor"); registerNetworkReceivers(); + registerNetworkTransmitters(); } private void registerCables() { @@ -275,6 +277,24 @@ private void registerNetworkReceivers() { }); } + private void registerNetworkTransmitters() { + final ModelFile inactive = modelFile(createIdentifier("block/network_transmitter/inactive")); + final ModelFile error = modelFile(createIdentifier("block/network_transmitter/error")); + Blocks.INSTANCE.getNetworkTransmitter().forEach((color, id, block) -> { + final var builder = getVariantBuilder(block.get()); + builder.forAllStates(blockState -> { + final ConfiguredModel.Builder model = ConfiguredModel.builder(); + switch (blockState.getValue(NetworkTransmitterBlock.STATE)) { + case ACTIVE -> + model.modelFile(modelFile(createIdentifier("block/network_transmitter/" + color.getName()))); + case ERROR -> model.modelFile(error); + case INACTIVE -> model.modelFile(inactive); + } + return model.build(); + }); + }); + } + private void addRotation(final ConfiguredModel.Builder model, final Direction direction) { final int rotationX; if (direction.getAxis() == Direction.Axis.Y) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java index f1edd6f3d..da762c9a6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -13,6 +13,7 @@ import com.refinedmods.refinedstorage2.platform.common.importer.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.networking.CableBlock; import com.refinedmods.refinedstorage2.platform.common.networking.NetworkReceiverBlock; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.storage.externalstorage.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.wirelesstransmitter.WirelessTransmitterBlock; @@ -44,6 +45,7 @@ protected void registerModels() { registerDestructors(); registerWirelessTransmitters(); registerNetworkReceivers(); + registerNetworkTransmitters(); } private void registerCables() { @@ -194,6 +196,17 @@ private void registerNetworkReceivers() { )); } + private void registerNetworkTransmitters() { + final ResourceLocation base = createIdentifier("block/network_transmitter/inactive"); + final ColorMap blocks = Blocks.INSTANCE.getNetworkTransmitter(); + blocks.forEach((color, id, block) -> singleTexture( + id.getPath(), + base, + "cutout", + createIdentifier("block/network_transmitter/cutouts/" + color.getName()) + )); + } + private ModelFile modelFile(final ResourceLocation location) { return new ModelFile.ExistingModelFile(location, existingFileHelper); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java index bcdcbe1cb..f561592a7 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java @@ -31,6 +31,7 @@ protected void generate() { Blocks.INSTANCE.getDestructor().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getNetworkTransmitter().forEach((color, id, block) -> dropSelf(block.get())); } @Override @@ -46,6 +47,7 @@ protected Iterable getKnownBlocks() { blocks.addAll(Blocks.INSTANCE.getDestructor().values()); blocks.addAll(Blocks.INSTANCE.getWirelessTransmitter().values()); blocks.addAll(Blocks.INSTANCE.getNetworkReceiver().values()); + blocks.addAll(Blocks.INSTANCE.getNetworkTransmitter().values()); return blocks; } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java index ac0f47cd3..609b24c38 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/LootTableProvider.java @@ -10,9 +10,9 @@ public class LootTableProvider extends net.minecraft.data.loot.LootTableProvider { public LootTableProvider(final PackOutput output) { - super(output, Set.of(), List.of( - new SubProviderEntry(BlockDropProvider::new, - LootContextParamSet.builder().required(EXPLOSION_RADIUS).build()) + super(output, Set.of(), List.of(new SubProviderEntry( + BlockDropProvider::new, + LootContextParamSet.builder().required(EXPLOSION_RADIUS).build()) )); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java index 0ccedf2a8..1e302bc06 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java @@ -60,6 +60,9 @@ protected void buildRecipes(final Consumer provider) { Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> recolorItems(Tags.NETWORK_RECEIVERS, block.get().asItem(), color) .save(provider, createIdentifier("coloring/" + color.getName() + "_network_receiver"))); + Blocks.INSTANCE.getNetworkTransmitter().forEach((color, id, block) -> + recolorItems(Tags.NETWORK_TRANSMITTERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_network_transmitter"))); } private ShapelessRecipeBuilder recolorItems(final TagKey dyeable, final Item result, final DyeColor color) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java index 0bfdc61ab..f93ae1e0b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java @@ -32,6 +32,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.Tags.GRIDS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.IMPORTERS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.NETWORK_RECEIVERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.NETWORK_TRANSMITTERS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.STORAGE_DISKS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.WIRELESS_TRANSMITTERS; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; @@ -104,6 +105,10 @@ protected void addTags(final HolderLookup.Provider provider) { Blocks.INSTANCE.getNetworkReceiver().values().stream() .map(block -> (Supplier) block::asItem) .toList()); + addAllToTag(NETWORK_TRANSMITTERS, + Blocks.INSTANCE.getNetworkTransmitter().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); } private void addAllToTag(final TagKey t, final Collection> items) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java index c93624a61..90d63b97d 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/NetworkManager.java @@ -16,6 +16,7 @@ import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.GridActivePacket; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.GridClearPacket; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.GridUpdatePacket; +import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.NetworkTransmitterStatusPacket; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.ResourceSlotUpdatePacket; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.StorageInfoResponsePacket; import com.refinedmods.refinedstorage2.platform.forge.packet.s2c.WirelessTransmitterRangePacket; @@ -175,6 +176,13 @@ public NetworkManager() { UseNetworkBoundItemPacket::decode, UseNetworkBoundItemPacket::handle ); + handler.registerMessage( + id++, + NetworkTransmitterStatusPacket.class, + NetworkTransmitterStatusPacket::encode, + NetworkTransmitterStatusPacket::decode, + NetworkTransmitterStatusPacket::handle + ); } public void send(final ServerPlayer player, final Object message) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/NetworkTransmitterStatusPacket.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/NetworkTransmitterStatusPacket.java new file mode 100644 index 000000000..400c4a751 --- /dev/null +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/NetworkTransmitterStatusPacket.java @@ -0,0 +1,43 @@ +package com.refinedmods.refinedstorage2.platform.forge.packet.s2c; + +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterContainerMenu; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterStatus; + +import java.util.function.Supplier; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraftforge.network.NetworkEvent; + +public class NetworkTransmitterStatusPacket { + private final boolean error; + private final Component message; + + public NetworkTransmitterStatusPacket(final boolean error, final Component message) { + this.error = error; + this.message = message; + } + + public static NetworkTransmitterStatusPacket decode(final FriendlyByteBuf buf) { + return new NetworkTransmitterStatusPacket(buf.readBoolean(), buf.readComponent()); + } + + public static void encode(final NetworkTransmitterStatusPacket packet, final FriendlyByteBuf buf) { + buf.writeBoolean(packet.error); + buf.writeComponent(packet.message); + } + + public static void handle(final NetworkTransmitterStatusPacket packet, final Supplier ctx) { + ctx.get().enqueueWork(() -> ClientProxy.getPlayer().ifPresent(player -> handle(player, packet))); + ctx.get().setPacketHandled(true); + } + + private static void handle(final Player player, final NetworkTransmitterStatusPacket packet) { + final AbstractContainerMenu menu = player.containerMenu; + if (menu instanceof NetworkTransmitterContainerMenu containerMenu) { + containerMenu.setStatus(new NetworkTransmitterStatus(packet.error, packet.message)); + } + } +} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java index c402dd972..b825e0921 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/packet/s2c/ServerToClientCommunicationsImpl.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ResourceAmountTemplate; +import com.refinedmods.refinedstorage2.platform.common.networking.NetworkTransmitterStatus; import com.refinedmods.refinedstorage2.platform.common.support.ServerToClientCommunications; import com.refinedmods.refinedstorage2.platform.forge.packet.NetworkManager; @@ -85,4 +86,9 @@ public void sendStorageInfoResponse(final ServerPlayer player, final StorageInfo storageInfo) { networkManager.send(player, new StorageInfoResponsePacket(id, storageInfo.stored(), storageInfo.capacity())); } + + @Override + public void sendNetworkTransmitterStatus(final ServerPlayer player, final NetworkTransmitterStatus status) { + networkManager.send(player, new NetworkTransmitterStatusPacket(status.error(), status.message())); + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java index 6f21f360a..55e345c93 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -88,6 +88,12 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) Tags.WIRELESS_TRANSMITTERS ); groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); + groupItems( + registry, + Blocks.INSTANCE.getNetworkTransmitter(), + ContentIds.NETWORK_TRANSMITTER, + Tags.NETWORK_TRANSMITTERS + ); } @Override From 1c2323da6374687ccb3d438e03a9a38ae6ae157a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 19:28:45 +0100 Subject: [PATCH 20/24] fix: network updating twice when activeness changes This bug made it so that every time a network device is placed, it would trigger an extra update after the initial update to connect to an network. This extra update was caused by the fact that the device was going from inactive to active after the connection was made. We now only update the network if the direction has changed, since that is the only component that can influence graph scanning for now. This bug also caused some flickering with the network transmitter in combination with redstone mode. --- CHANGELOG.md | 1 + ...stractNetworkNodeContainerBlockEntity.java | 10 ------- .../ConstructorBlockEntity.java | 7 +++++ .../DestructorBlockEntity.java | 7 +++++ .../common/detector/DetectorBlockEntity.java | 7 +++++ .../common/exporter/ExporterBlockEntity.java | 7 +++++ .../common/grid/AbstractGridBlockEntity.java | 7 +++++ .../common/importer/ImporterBlockEntity.java | 7 +++++ .../AbstractDiskDriveBlockEntity.java | 7 +++++ .../ExternalStorageBlockEntity.java | 7 +++++ .../AbstractStorageBlockBlockEntity.java | 1 + .../StorageMonitorBlockEntity.java | 7 +++++ .../support/AbstractDirectionalBlock.java | 15 +++++++++++ .../NetworkNodeContainerBlockEntityImpl.java | 26 +++++++++++++++++-- .../WirelessTransmitterBlockEntity.java | 7 +++++ 15 files changed, 111 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a9b5fd6..568170468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed - Inactive Wireless Transmitter model being emissive. +- Unneeded network graph updating after placing a network device. ## [2.0.0-milestone.3.1] - 2023-10-30 diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java index 39e5fd323..3de6c3be6 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/support/network/AbstractNetworkNodeContainerBlockEntity.java @@ -47,16 +47,6 @@ public void setRemoved() { PlatformApi.INSTANCE.requestNetworkNodeRemoval(this, level); } - @Override - @SuppressWarnings("deprecation") - public void setBlockState(final BlockState newBlockState) { - super.setBlockState(newBlockState); - if (level == null || level.isClientSide || node.getNetwork() == null) { - return; - } - PlatformApi.INSTANCE.requestNetworkNodeUpdate(this, level); - } - @Override public T getNode() { return node; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java index c97a82d20..335595124 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/ConstructorBlockEntity.java @@ -12,6 +12,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; @@ -145,6 +146,12 @@ protected void setTaskExecutor(final TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; } + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } + protected record TaskContext(Network network, Player player) { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java index fb4a7bd29..61ed09d6f 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/constructordestructor/DestructorBlockEntity.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; @@ -151,4 +152,10 @@ public void postDoWork() { final Player fakePlayer = getFakePlayer(serverLevel); strategy.apply(filter, actor, getNode()::getNetwork, fakePlayer); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java index 657415381..1605f68dd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/detector/DetectorBlockEntity.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractSingleAmountContainerMenu; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; @@ -177,4 +178,10 @@ public boolean canAcceptIncomingConnection(final Direction incomingDirection, fi } return true; } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java index 33de5b919..6c8f755dd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/exporter/ExporterBlockEntity.java @@ -11,6 +11,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractSchedulingNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeDestinations; @@ -116,4 +117,10 @@ private long getAmountStillNeeded(final long amount, final long currentAmount, f } return Math.min(stillNeeding, amount); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java index 62954cc71..ff94c75b5 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/grid/AbstractGridBlockEntity.java @@ -15,6 +15,7 @@ import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; import com.refinedmods.refinedstorage2.platform.api.support.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.common.storage.channel.StorageChannelTypes; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import java.util.List; @@ -81,4 +82,10 @@ public void removeWatcher(final GridWatcher watcher) { public final int getPriority() { return NetworkNodeContainerPriorities.GRID; } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java index f7a4f16ad..3a1a6be11 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/importer/ImporterBlockEntity.java @@ -11,6 +11,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.content.Items; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.FilterModeSettings; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; @@ -158,4 +159,10 @@ private long getAmountStillAvailableForImport(final long amount, } return Math.min(stillAvailableToImport, amount); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java index 75682714b..8e81c6854 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/diskdrive/AbstractDiskDriveBlockEntity.java @@ -9,6 +9,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; @@ -271,4 +272,10 @@ public NonNullList getDrops() { public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { filter.getFilterContainer().writeToUpdatePacket(buf); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java index 3831f0ff8..027a31103 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/externalstorage/ExternalStorageBlockEntity.java @@ -9,6 +9,7 @@ import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; import com.refinedmods.refinedstorage2.platform.common.storage.StorageConfigurationContainerImpl; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; @@ -167,4 +168,10 @@ public Component getDisplayName() { public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { return new ExternalStorageContainerMenu(syncId, player, filter.getFilterContainer(), configContainer); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java index 096ef383c..bcd83af57 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storage/storageblock/AbstractStorageBlockBlockEntity.java @@ -176,4 +176,5 @@ public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByte buf.writeLong(getNode().getCapacity()); filter.getFilterContainer().writeToUpdatePacket(buf); } + } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java index e1f28e007..72f365509 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/storagemonitor/StorageMonitorBlockEntity.java @@ -14,6 +14,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; @@ -322,4 +323,10 @@ private void sendDisplayUpdate(final Level level, final long amount, final boole level.sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL); LOGGER.debug("Sending display update for storage monitor {} with amount {}", worldPosition, amount); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java index cb372c160..b8f86a1c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalBlock.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; +import java.util.Objects; import javax.annotation.Nullable; import net.minecraft.core.Direction; @@ -68,4 +69,18 @@ public Direction extractDirection(@Nullable final BlockState state) { } return getDirectionType().extractDirection(direction); } + + public static boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + if (!(newBlockState.getBlock() instanceof AbstractDirectionalBlock newDirectionalBlock)) { + return true; + } + if (!(oldBlockState.getBlock() instanceof AbstractDirectionalBlock oldDirectionalBlock)) { + return true; + } + return !Objects.equals( + oldDirectionalBlock.getDirection(oldBlockState), + newDirectionalBlock.getDirection(newBlockState) + ); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java index 5c197b496..a3461c809 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/network/NetworkNodeContainerBlockEntityImpl.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.network.AbstractNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.api.support.network.ConnectionSink; import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; @@ -57,7 +58,7 @@ public void updateActiveness(final BlockState state, @Nullable final BooleanProp } protected void activenessChanged(final boolean newActive) { - LOGGER.info("Activeness change for node at {}: {} -> {}", getBlockPos(), getNode().isActive(), newActive); + LOGGER.debug("Activeness change for node at {}: {} -> {}", getBlockPos(), getNode().isActive(), newActive); getNode().setActive(newActive); } @@ -65,7 +66,7 @@ private void updateActivenessBlockState(final BlockState state, final BooleanProperty activenessProperty, final boolean active) { if (level != null) { - LOGGER.info( + LOGGER.debug( "Sending block update at {} due to activeness change: {} -> {}", getBlockPos(), state.getValue(activenessProperty), @@ -142,4 +143,25 @@ protected final void updateBlock() { } level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL); } + + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate( + final BlockState oldBlockState, + final BlockState newBlockState + ) { + return false; + } + + @Override + @SuppressWarnings("deprecation") + public void setBlockState(final BlockState newBlockState) { + final BlockState oldBlockState = getBlockState(); + super.setBlockState(newBlockState); + if (!doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState)) { + return; + } + if (level == null || level.isClientSide || getNode().getNetwork() == null) { + return; + } + PlatformApi.INSTANCE.requestNetworkNodeUpdate(this, level); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java index ca0f9cfc2..003611acc 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -7,6 +7,7 @@ import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.ContentNames; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ExtendedMenuProvider; import com.refinedmods.refinedstorage2.platform.common.support.network.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.upgrade.UpgradeContainer; @@ -125,4 +126,10 @@ public boolean isInRange(final ResourceKey dimension, final Vec3 position ); return distance <= getRange(); } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.doesBlockStateChangeWarrantNetworkNodeUpdate(oldBlockState, newBlockState); + } } From 5d55840f17b87e8047eec24ebe490bdb2dacb43a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 20:26:27 +0100 Subject: [PATCH 21/24] fix: cable blocks not updating connections properly when using wrench --- CHANGELOG.md | 1 + .../common/support/AbstractBaseBlock.java | 93 ++++++++++--------- .../AbstractDirectionalCableBlock.java | 7 ++ .../common/support/CableBlockSupport.java | 18 ++-- .../platform/fabric/ModInitializerImpl.java | 7 +- .../platform/forge/ModInitializer.java | 30 +++--- 6 files changed, 87 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 568170468..6ebe1ad97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Inactive Wireless Transmitter model being emissive. - Unneeded network graph updating after placing a network device. +- Cable blocks not updating connections properly when using wrench. ## [2.0.0-milestone.3.1] - 2023-10-30 diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java index 73593a725..0d61113ab 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractBaseBlock.java @@ -39,13 +39,6 @@ protected BlockState getDefaultState() { return getStateDefinition().any(); } - @SuppressWarnings("deprecation") - private static boolean rotate(final BlockState state, final Level level, final BlockPos pos) { - final BlockState rotated = state.rotate(Rotation.CLOCKWISE_90); - level.setBlockAndUpdate(pos, rotated); - return !state.equals(rotated); - } - @Override @SuppressWarnings("deprecation") public InteractionResult use(final BlockState state, @@ -127,11 +120,11 @@ public void setPlacedBy(final Level level, } } - public static Optional tryUseWrench(final BlockState state, - final Level level, - final BlockHitResult hitResult, - final Player player, - final InteractionHand hand) { + public final Optional tryUseWrench(final BlockState state, + final Level level, + final BlockHitResult hitResult, + final Player player, + final InteractionHand hand) { if (player.isSpectator() || !level.mayInteract(player, hitResult.getBlockPos())) { return Optional.empty(); } @@ -160,33 +153,10 @@ public static Optional tryUseWrench(final BlockState state, return Optional.of(InteractionResult.sidedSuccess(level.isClientSide())); } - public static Optional tryUpdateColor(final BlockState state, - final Level level, - final BlockPos pos, - final Player player, - final InteractionHand hand) { - if (state.getBlock() instanceof ColorableBlock colorableBlock) { - return tryUpdateColor(colorableBlock.getBlockColorMap(), state, level, pos, player, hand); - } - return Optional.empty(); - } - - private static Optional tryUpdateColor(final BlockColorMap blockColorMap, - final BlockState state, - final Level level, - final BlockPos pos, - final Player player, - final InteractionHand hand) { - if (!player.isCrouching()) { - return Optional.empty(); - } - return blockColorMap.updateColor(state, player.getItemInHand(hand), level, pos, player); - } - - private static boolean dismantleOrRotate(final BlockState state, - final Level level, - final BlockHitResult hitResult, - final Player player) { + private boolean dismantleOrRotate(final BlockState state, + final Level level, + final BlockHitResult hitResult, + final Player player) { if (player.isCrouching()) { dismantle(state, level, hitResult, player); return true; @@ -195,14 +165,24 @@ private static boolean dismantleOrRotate(final BlockState state, } } - private static boolean isWrench(final ItemStack item) { + private boolean rotate(final BlockState state, final Level level, final BlockPos pos) { + final BlockState rotated = getRotatedBlockState(state, level, pos); + level.setBlockAndUpdate(pos, rotated); + return !state.equals(rotated); + } + + protected BlockState getRotatedBlockState(final BlockState state, final Level level, final BlockPos pos) { + return state.rotate(Rotation.CLOCKWISE_90); + } + + private boolean isWrench(final ItemStack item) { return item.is(Platform.INSTANCE.getWrenchTag()); } - private static void dismantle(final BlockState state, - final Level level, - final BlockHitResult hitResult, - final Player player) { + private void dismantle(final BlockState state, + final Level level, + final BlockHitResult hitResult, + final Player player) { final ItemStack stack = Platform.INSTANCE.getCloneItemStack(state, level, hitResult, player); final BlockEntity blockEntity = level.getBlockEntity(hitResult.getBlockPos()); if (blockEntity != null) { @@ -219,4 +199,29 @@ private static void dismantle(final BlockState state, stack )); } + + public final Optional tryUpdateColor(final BlockState state, + final Level level, + final BlockPos pos, + final Player player, + final InteractionHand hand) { + if (this instanceof ColorableBlock colorableBlock) { + return tryUpdateColor(colorableBlock.getBlockColorMap(), state, level, pos, player, hand); + } + return Optional.empty(); + } + + private Optional tryUpdateColor( + final BlockColorMap blockColorMap, + final BlockState state, + final Level level, + final BlockPos pos, + final Player player, + final InteractionHand hand + ) { + if (!player.isCrouching()) { + return Optional.empty(); + } + return blockColorMap.updateColor(state, player.getItemInHand(hand), level, pos, player); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java index 314996d70..d75d8310e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/AbstractDirectionalCableBlock.java @@ -12,6 +12,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SimpleWaterloggedBlock; @@ -69,6 +70,12 @@ public BlockState updateShape(final BlockState state, return CableBlockSupport.getState(state, level, pos, getDirection(state)); } + @Override + protected BlockState getRotatedBlockState(final BlockState state, final Level level, final BlockPos pos) { + final BlockState rotated = super.getRotatedBlockState(state, level, pos); + return CableBlockSupport.getState(rotated, level, pos, getDirection(rotated)); + } + @Override @SuppressWarnings("deprecation") public boolean isPathfindable(final BlockState state, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java index 94a10fe4d..d43160251 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/support/CableBlockSupport.java @@ -83,16 +83,16 @@ private static VoxelShape calculateShape(final CableShapeCacheKey cacheKey) { public static BlockState getState( final BlockState currentState, - final LevelAccessor world, + final LevelAccessor level, final BlockPos pos, @Nullable final Direction blacklistedDirection ) { - final boolean north = hasVisualConnection(currentState, world, pos, Direction.NORTH, blacklistedDirection); - final boolean east = hasVisualConnection(currentState, world, pos, Direction.EAST, blacklistedDirection); - final boolean south = hasVisualConnection(currentState, world, pos, Direction.SOUTH, blacklistedDirection); - final boolean west = hasVisualConnection(currentState, world, pos, Direction.WEST, blacklistedDirection); - final boolean up = hasVisualConnection(currentState, world, pos, Direction.UP, blacklistedDirection); - final boolean down = hasVisualConnection(currentState, world, pos, Direction.DOWN, blacklistedDirection); + final boolean north = hasVisualConnection(currentState, level, pos, Direction.NORTH, blacklistedDirection); + final boolean east = hasVisualConnection(currentState, level, pos, Direction.EAST, blacklistedDirection); + final boolean south = hasVisualConnection(currentState, level, pos, Direction.SOUTH, blacklistedDirection); + final boolean west = hasVisualConnection(currentState, level, pos, Direction.WEST, blacklistedDirection); + final boolean up = hasVisualConnection(currentState, level, pos, Direction.UP, blacklistedDirection); + final boolean down = hasVisualConnection(currentState, level, pos, Direction.DOWN, blacklistedDirection); return currentState .setValue(NORTH, north) @@ -105,7 +105,7 @@ public static BlockState getState( private static boolean hasVisualConnection( final BlockState blockState, - final LevelAccessor world, + final LevelAccessor level, final BlockPos pos, final Direction direction, @Nullable final Direction blacklistedDirection @@ -114,7 +114,7 @@ private static boolean hasVisualConnection( return false; } final BlockPos offsetPos = pos.relative(direction); - if (!(world.getBlockEntity(offsetPos) instanceof PlatformNetworkNodeContainer neighboringContainer)) { + if (!(level.getBlockEntity(offsetPos) instanceof PlatformNetworkNodeContainer neighboringContainer)) { return false; } return neighboringContainer.canAcceptIncomingConnection(direction.getOpposite(), blockState); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java index fd02a96fe..df9396002 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ModInitializerImpl.java @@ -376,8 +376,11 @@ private void registerSlotReferenceProviders() { private void registerWrenchingEvent() { UseBlockCallback.EVENT.register((player, level, hand, hitResult) -> { final BlockState state = level.getBlockState(hitResult.getBlockPos()); - return AbstractBaseBlock.tryUseWrench(state, level, hitResult, player, hand) - .or(() -> AbstractBaseBlock.tryUpdateColor(state, level, hitResult.getBlockPos(), player, hand)) + if (!(state.getBlock() instanceof AbstractBaseBlock block)) { + return InteractionResult.PASS; + } + return block.tryUseWrench(state, level, hitResult, player, hand) + .or(() -> block.tryUpdateColor(state, level, hitResult.getBlockPos(), player, hand)) .orElse(InteractionResult.PASS); }); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index 261761557..d7babe29a 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -57,6 +57,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; @@ -290,20 +291,21 @@ public void onRegister(final RegisterEvent e) { @SubscribeEvent public void registerWrenchingEvent(final PlayerInteractEvent.RightClickBlock e) { - final BlockState state = e.getLevel().getBlockState(e.getHitVec().getBlockPos()); - - AbstractBaseBlock.tryUseWrench(state, e.getLevel(), e.getHitVec(), e.getEntity(), e.getHand()) - .or(() -> AbstractBaseBlock.tryUpdateColor( - state, - e.getLevel(), - e.getHitVec().getBlockPos(), - e.getEntity(), - e.getHand() - )) - .ifPresent(result -> { - e.setCanceled(true); - e.setCancellationResult(result); - }); + final Level level = e.getLevel(); + final BlockState state = level.getBlockState(e.getHitVec().getBlockPos()); + if (!(state.getBlock() instanceof AbstractBaseBlock block)) { + return; + } + block.tryUseWrench(state, level, e.getHitVec(), e.getEntity(), e.getHand()).or(() -> block.tryUpdateColor( + state, + level, + e.getHitVec().getBlockPos(), + e.getEntity(), + e.getHand() + )).ifPresent(result -> { + e.setCanceled(true); + e.setCancellationResult(result); + }); } @SubscribeEvent From 4313ca561ef3f68bf6eb841ffd30bc642f6a8a74 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 20:47:18 +0100 Subject: [PATCH 22/24] refactor: move network card inventory to its own class --- .../networking/NetworkCardInventory.java | 30 +++++++++++++++++++ .../NetworkTransmitterBlockEntity.java | 17 ++--------- 2 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardInventory.java diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardInventory.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardInventory.java new file mode 100644 index 000000000..60349cac6 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkCardInventory.java @@ -0,0 +1,30 @@ +package com.refinedmods.refinedstorage2.platform.common.networking; + +import java.util.Optional; + +import net.minecraft.core.GlobalPos; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.item.ItemStack; + +class NetworkCardInventory extends SimpleContainer { + NetworkCardInventory() { + super(1); + } + + @Override + public boolean canPlaceItem(final int slot, final ItemStack stack) { + return stack.getItem() instanceof NetworkCardItem networkCardItem && networkCardItem.isActive(stack); + } + + ItemStack getNetworkCard() { + return getItem(0); + } + + Optional getReceiverLocation() { + final ItemStack stack = getNetworkCard(); + if (stack.getItem() instanceof NetworkCardItem cardItem) { + return cardItem.getLocation(stack); + } + return Optional.empty(); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java index 826600d74..318f7281b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterBlockEntity.java @@ -25,7 +25,6 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.Container; -import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -54,12 +53,7 @@ public class NetworkTransmitterBlockEntity private static final String TAG_NETWORK_CARD_INVENTORY = "nc"; - private final SimpleContainer networkCardInventory = new SimpleContainer(1) { - @Override - public boolean canPlaceItem(final int slot, final ItemStack stack) { - return stack.getItem() instanceof NetworkCardItem networkCardItem && networkCardItem.isActive(stack); - } - }; + private final NetworkCardInventory networkCardInventory = new NetworkCardInventory(); private final RateLimiter stateChangeRateLimiter = RateLimiter.create(1); private final RateLimiter networkRebuildRetryRateLimiter = RateLimiter.create(1 / 5D); @@ -181,12 +175,7 @@ public void load(final CompoundTag tag) { } private void updateReceiverLocation() { - final ItemStack stack = networkCardInventory.getItem(0); - if (stack.isEmpty()) { - receiverKey = null; - } else if (stack.getItem() instanceof NetworkCardItem cardItem) { - receiverKey = cardItem.getLocation(stack).map(NetworkReceiverKey::new).orElse(null); - } + receiverKey = networkCardInventory.getReceiverLocation().map(NetworkReceiverKey::new).orElse(null); } @Nullable @@ -209,7 +198,7 @@ public Component getDisplayName() { @Override public NonNullList getDrops() { - return NonNullList.of(ItemStack.EMPTY, networkCardInventory.getItem(0)); + return NonNullList.of(ItemStack.EMPTY, networkCardInventory.getNetworkCard()); } @Override From f7de1e9a12a5aec3b8be783eda2e86fa93687060 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 21:15:11 +0100 Subject: [PATCH 23/24] fix: some sonar issues --- .../common/networking/NetworkReceiverKey.java | 6 ++--- .../networking/NetworkTransmitterScreen.java | 10 ++++---- .../forge/datagen/BlockModelProvider.java | 24 ++++++++++--------- .../forge/datagen/ItemModelProvider.java | 21 +++++++++------- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java index 447079c36..f13eacf67 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkReceiverKey.java @@ -10,9 +10,9 @@ record NetworkReceiverKey(GlobalPos pos) { int getDistance(final BlockPos from) { return (int) Math.sqrt( - Math.pow(from.getX() - pos.pos().getX(), 2) - + Math.pow(from.getY() - pos.pos().getY(), 2) - + Math.pow(from.getZ() - pos.pos().getZ(), 2) + Math.pow(from.getX() - (double) pos.pos().getX(), 2) + + Math.pow(from.getY() - (double) pos.pos().getY(), 2) + + Math.pow(from.getZ() - (double) pos.pos().getZ(), 2) ); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java index b3790ec10..56b42cc98 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/networking/NetworkTransmitterScreen.java @@ -30,11 +30,6 @@ protected void init() { addSideButton(new RedstoneModeSideButtonWidget(getMenu().getProperty(PropertyTypes.REDSTONE_MODE))); } - @Override - protected ResourceLocation getTexture() { - return TEXTURE; - } - @Override protected void renderLabels(final GuiGraphics graphics, final int mouseX, final int mouseY) { super.renderLabels(graphics, mouseX, mouseY); @@ -45,4 +40,9 @@ protected void renderLabels(final GuiGraphics graphics, final int mouseX, final } graphics.drawString(font, status.message(), displayTextX + (status.error() ? (10 + 4) : 0), 25, 4210752, false); } + + @Override + protected ResourceLocation getTexture() { + return TEXTURE; + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index 5357e1fdc..c30c37371 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -12,6 +12,11 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; public class BlockModelProvider extends net.minecraftforge.client.model.generators.BlockModelProvider { + private static final ResourceLocation EMISSIVE_ALL_CUTOUT = createIdentifier("block/emissive_all_cutout"); + private static final ResourceLocation EMISSIVE_NORTH_CUTOUT = createIdentifier("block/emissive_north_cutout"); + private static final ResourceLocation NORTH_CUTOUT = createIdentifier("block/north_cutout"); + private static final ResourceLocation ALL_CUTOUT = createIdentifier("block/all_cutout"); + public BlockModelProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) { super(output, MOD_ID, existingFileHelper); } @@ -43,12 +48,11 @@ private void registerCables() { } private void registerControllers() { - final ResourceLocation base = createIdentifier("block/emissive_all_cutout"); final ResourceLocation off = createIdentifier("block/controller/off"); final ResourceLocation on = createIdentifier("block/controller/on"); Blocks.INSTANCE.getController().forEach((color, id, controller) -> { final ResourceLocation cutout = createIdentifier("block/controller/cutouts/" + color.getName()); - withExistingParent("block/controller/" + color.getName(), base) + withExistingParent("block/controller/" + color.getName(), EMISSIVE_ALL_CUTOUT) .texture("particle", off) .texture("all", on) .texture("cutout", cutout); @@ -61,7 +65,7 @@ private void registerGrids(final BlockColorMap> b registerEmissiveGrids(name, color.getName(), cutout); }); final ResourceLocation inactiveCutout = createIdentifier("block/" + name + "/cutouts/inactive"); - registerGrids(name, "inactive", inactiveCutout, createIdentifier("block/north_cutout")); + registerGrids(name, "inactive", inactiveCutout, NORTH_CUTOUT); } private void registerGrids(final String name, @@ -86,7 +90,7 @@ private void registerGrids(final String name, } private void registerEmissiveGrids(final String name, final String variantName, final ResourceLocation cutout) { - registerGrids(name, variantName, cutout, createIdentifier("block/emissive_north_cutout")); + registerGrids(name, variantName, cutout, EMISSIVE_NORTH_CUTOUT); } private void registerDetectors() { @@ -114,36 +118,34 @@ private void registerWirelessTransmitters() { } private void registerNetworkReceivers() { - final ResourceLocation emissiveBase = createIdentifier("block/emissive_all_cutout"); final ResourceLocation baseTexture = createIdentifier("block/network_receiver/base"); Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, receiver) -> { final ResourceLocation cutout = createIdentifier("block/network_receiver/cutouts/" + color.getName()); - withExistingParent("block/network_receiver/" + color.getName(), emissiveBase) + withExistingParent("block/network_receiver/" + color.getName(), EMISSIVE_ALL_CUTOUT) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", cutout); }); - withExistingParent("block/network_receiver/inactive", createIdentifier("block/all_cutout")) + withExistingParent("block/network_receiver/inactive", ALL_CUTOUT) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", createIdentifier("block/network_receiver/cutouts/inactive")); } private void registerNetworkTransmitters() { - final ResourceLocation emissiveBase = createIdentifier("block/emissive_all_cutout"); final ResourceLocation baseTexture = createIdentifier("block/network_transmitter/base"); Blocks.INSTANCE.getNetworkTransmitter().forEach((color, id, receiver) -> { final ResourceLocation cutout = createIdentifier("block/network_transmitter/cutouts/" + color.getName()); - withExistingParent("block/network_transmitter/" + color.getName(), emissiveBase) + withExistingParent("block/network_transmitter/" + color.getName(), EMISSIVE_ALL_CUTOUT) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", cutout); }); - withExistingParent("block/network_transmitter/inactive", createIdentifier("block/all_cutout")) + withExistingParent("block/network_transmitter/inactive", ALL_CUTOUT) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", createIdentifier("block/network_transmitter/cutouts/inactive")); - withExistingParent("block/network_transmitter/error", emissiveBase) + withExistingParent("block/network_transmitter/error", EMISSIVE_ALL_CUTOUT) .texture("particle", baseTexture) .texture("all", baseTexture) .texture("cutout", createIdentifier("block/network_transmitter/cutouts/error")); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java index da762c9a6..c7b4af6f0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -26,6 +26,9 @@ import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.createIdentifier; public class ItemModelProvider extends net.minecraftforge.client.model.generators.ItemModelProvider { + private static final String CUTOUT_TEXTURE_KEY = "cutout"; + private static final String CABLE_TEXTURE_KEY = "cable"; + public ItemModelProvider(final PackOutput output, final ExistingFileHelper existingFileHelper) { super(output, MOD_ID, existingFileHelper); } @@ -54,7 +57,7 @@ private void registerCables() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName())) ); } @@ -65,7 +68,7 @@ private void registerExporters() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName()) )); } @@ -76,7 +79,7 @@ private void registerImporters() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName()) )); } @@ -87,7 +90,7 @@ private void registerExternalStorages() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName()) )); } @@ -158,7 +161,7 @@ private void registerConstructors() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName()) )); } @@ -169,7 +172,7 @@ private void registerDestructors() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cable", + CABLE_TEXTURE_KEY, createIdentifier("block/cable/" + color.getName()) )); } @@ -180,7 +183,7 @@ private void registerWirelessTransmitters() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cutout", + CUTOUT_TEXTURE_KEY, createIdentifier("block/wireless_transmitter/cutouts/" + color.getName()) )); } @@ -191,7 +194,7 @@ private void registerNetworkReceivers() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cutout", + CUTOUT_TEXTURE_KEY, createIdentifier("block/network_receiver/cutouts/" + color.getName()) )); } @@ -202,7 +205,7 @@ private void registerNetworkTransmitters() { blocks.forEach((color, id, block) -> singleTexture( id.getPath(), base, - "cutout", + CUTOUT_TEXTURE_KEY, createIdentifier("block/network_transmitter/cutouts/" + color.getName()) )); } From af2f654e06f5d54ace9b942db1901ede5cc77422 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 3 Nov 2023 21:02:41 +0000 Subject: [PATCH 24/24] chore: prepare release vv2.0.0-milestone.3.2 --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ebe1ad97..1d0114b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [v2.0.0-milestone.3.2] - 2023-11-03 + ### Added - Configuration Card. It copies device configurations and can transfer upgrades. @@ -350,9 +352,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - The Wrench now dismantles devices when crouching. - - The Disk Drive in item form now supports rendering of disks that were dismantled. - - In order to retain Controller energy, the Controller must now be dismantled. - - All config and upgrades are transferred to the item. + - The Disk Drive in item form now supports rendering of disks that were dismantled. + - In order to retain Controller energy, the Controller must now be dismantled. + - All config and upgrades are transferred to the item. - You can now use any Wrench from other mods in order to rotate or dismantle. - Item and fluid storage blocks. - Initial advancements. @@ -495,7 +497,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The Grid can now use smooth scrolling. - The Grid now has syntax highlighting for the search query. -[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.3.1...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/vv2.0.0-milestone.3.2...HEAD + +[v2.0.0-milestone.3.2]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.3.1...vv2.0.0-milestone.3.2 [2.0.0-milestone.3.1]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.3.0...v2.0.0-milestone.3.1