127
CHANGELOG-old.md
127
CHANGELOG-old.md
@@ -1,132 +1,5 @@
|
||||
# Refined Storage Changelog
|
||||
|
||||
### 1.8.8
|
||||
|
||||
- Fixed duplication bug and weird behavior in the Crafting Grid matrix (Darkere)
|
||||
|
||||
### 1.8.7
|
||||
|
||||
- Fixed Regulator mode item and fluid counts not saving properly (raoulvdberge)
|
||||
- Fixed Wireless Crafting Monitor not closing properly (raoulvdberge)
|
||||
- Fixed Controller always using energy, even when disabled with redstone (raoulvdberge)
|
||||
- Fixed internal crafting inventory not being returned when Controller is broken (raoulvdberge)
|
||||
- Fixed bug where autocrafting tasks started on the same tick make the wrong assumption about available items and
|
||||
fluids (Darkere)
|
||||
- Fixed bug where the "To craft" amount in the Crafting Preview window is wrong (raoulvdberge)
|
||||
- Fixed bug where non-pattern items are able to be inserted into the Crafter Manager (Darkere)
|
||||
- Fixed performance issue where shapes of cable blocks were constantly being recalculated (raoulvdberge)
|
||||
- Drastically improved shift clicking performance in Crafting Grid (Darkere)
|
||||
- Removed autocrafting engine version from crafting preview screen (raoulvdberge)
|
||||
|
||||
### 1.8.6
|
||||
|
||||
- Fixed Constructor duplication bug (Darkere)
|
||||
|
||||
### 1.8.5
|
||||
|
||||
- Cancelling a crafting task now also unlocks all Crafters related to that task (Darkere)
|
||||
- External Storage will now always show the exact maximum capacity as reported by the attached inventory (Darkere)
|
||||
- Crafters no longer expose their inventory to the side they are facing (Darkere)
|
||||
- Fixed Portable Grid voiding the disk when extracting with full inventory (Darkere)
|
||||
- Fixed Constructor extracting 2 buckets when placing fluid (Darkere)
|
||||
- Fixed Stack Overflow error with regulator upgrades (Darkere)
|
||||
- Fixed visual bug with the Detector not updating its values (Darkere)
|
||||
- Fixed Constructor placing the filtered item instead of the extracted (Darkere)
|
||||
- Fixed duplication bug with filter slots (Darkere)
|
||||
- Fixed shift crafting in a Grid not using the player (Darkere)
|
||||
- Re-added all the language files (TheDirectorX)
|
||||
- Added Japanese translation file (KusozakoAtama10k)
|
||||
- Changed package name to "com.refinedmods.refinedstorage", this is a breaking change for addons (raoulvdberge)
|
||||
- Fixed bug where shift clicking gives too many items (Darkere)
|
||||
|
||||
### 1.8.4
|
||||
|
||||
- Fixed autocrafting Crafting Monitor crash (Darkere)
|
||||
|
||||
### 1.8.3
|
||||
|
||||
- Added a new experimental autocrafting engine that's enabled by default. This should improve autocrafting performance (
|
||||
Darkere)
|
||||
- Wireless Transmitters can now be placed on any block and in any direction (raoulvdberge)
|
||||
- Fixed Exporter not exporting anything when using a Stack Upgrade and there isn't space for 64 items in the inventory (
|
||||
raoulvdberge)
|
||||
- Fixed Controller always using the base usage even when turned off (raoulvdberge)
|
||||
- Added the Regulator Upgrade that can be inserted into a Exporter. This ensures a certain amount of items and fluids is
|
||||
kept in stock in a connected inventory (raoulvdberge)
|
||||
- Fixed severe memory leak in the storage cache (raoulvdberge)
|
||||
- Added debug logging on the server when an expensive operation occurs (raoulvdberge)
|
||||
|
||||
### 1.8.2
|
||||
|
||||
- Add Refined Storage silicon to forge:silicon tag for mod compatibility (jeremiahwinsley)
|
||||
- Update pt_br translation (Arthur-o-b)
|
||||
- Added waterlogging to all cable blocks (Darkere)
|
||||
- Fixed storage block dropping extra processor (Darkere)
|
||||
- Create zh_tw translation (ForFunPenguin)
|
||||
- Re-added zh_cn translation (ppoozl)
|
||||
|
||||
### 1.8.1
|
||||
|
||||
- Port to Minecraft 1.15.2 (raoulvdberge)
|
||||
- The Storage Monitor supports fluids as well now (V1RTUOZ)
|
||||
|
||||
### 1.8
|
||||
|
||||
- Port to Minecraft 1.15 (raoulvdberge)
|
||||
|
||||
### 1.7.3
|
||||
|
||||
- Fixed severe energy update lag introduced by version 1.7.2 (raoulvdberge)
|
||||
|
||||
### 1.7.2
|
||||
|
||||
- Resource packs can now define the font colors that Refined Storage GUIs need to use (raoulvdberge)
|
||||
- Patterns being added or removed from the network are now propagated as well to clients that are watching a Grid (
|
||||
raoulvdberge)
|
||||
- When pressing ESCAPE in the search box on the Grid or Crafter Manager, focus on the search bar will be lost first
|
||||
before closing the GUI immediately. Then on the next ESCAPE press, the GUI will be closed (raoulvdberge)
|
||||
- Fixed crash when loading a network (raoulvdberge, LezChap)
|
||||
- Fixed being able to drain energy from the Refined Storage Controller (raoulvdberge)
|
||||
- Fixed the Grid crashing on a item/fluid update-heavy storage system (raoulvdberge, Darkere, noobanidus)
|
||||
- Fixed the Grid displaying the old quantity when shift clicking an entire stack out (raoulvdberge)
|
||||
- Fixed crash with the Disk Manipulator and using item/fluid filters when inserting into the network (raoulvdberge)
|
||||
- Fixed the network being able to run off 1 FE/t (raoulvdberge)
|
||||
|
||||
### 1.7.1
|
||||
|
||||
- Exact mode for processing patterns no longer exist, you can now define per-slot which item/fluid tags are allowed to
|
||||
be used by autocrafting, by using CTRL + click on the filter slot in the Pattern Grid (raoulvdberge)
|
||||
- The Pattern Grid now switches automatically between crafting pattern and processing pattern mode when using JEI
|
||||
transfer (raoulvdberge)
|
||||
- The Pattern Grid now switches automatically between crafting pattern and processing pattern mode when re-inserting an
|
||||
existing Pattern (raoulvdberge)
|
||||
- Removed migration code for the development builds that were released on Discord (not on CurseForge). If you used the
|
||||
development builds and never used version 1.7 before, first switch to 1.7, open your world, modify a storage disk, and
|
||||
then upgrade to 1.7.1 (raoulvdberge)
|
||||
- Grids now do not sort if you interact with it while holding shift (Darkere)
|
||||
- Fixed Pattern Grid causing world hanging on load (raoulvdberge)
|
||||
- Fixed External Storage not refreshing when the storage is broken or replaced (raoulvdberge)
|
||||
- Fixed delay in block update when placing a cable block (raoulvdberge)
|
||||
- Fixed holder of cable blocks sometimes conflicting with a cable connection while rendering (raoulvdberge)
|
||||
- Fixed being able to move wireless items in inventory when using a keybinding to open (raoulvdberge)
|
||||
- Fixed crash when breaking a Grid, Crafting Monitor, Crafter Manager or Portable Grid when another player is still
|
||||
using it (raoulvdberge)
|
||||
|
||||
### 1.7
|
||||
|
||||
NOTE: This is an alpha release. Bugs may happen. Remember to take backups.
|
||||
|
||||
- Port to Minecraft 1.14 (raoulvdberge)
|
||||
- Removed the Reader and Writer, this will return later in an addon mod (raoulvdberge)
|
||||
- Removed cross dimensional functionality on the Network Transmitter for the moment, this will return later (
|
||||
raoulvdberge)
|
||||
- Removed covers (raoulvdberge)
|
||||
- Fixed the Fluid Grid not having a View type setting (raoulvdberge)
|
||||
- Oredict mode for Patterns has been replaced with "Exact mode" (by default on). When exact mode is off, Refined Storage
|
||||
will use equivalent items or fluids from the Minecraft item/fluid tag system (raoulvdberge)
|
||||
- Grid filtering with "$" now does filtering based on item/fluid tag name instead of oredict name (raoulvdberge)
|
||||
- When binding a network item to a network you can now bind to any network block, not only the Controller (raoulvdberge)
|
||||
|
||||
### 1.6.16
|
||||
|
||||
- Updated Russian translation (Bytegm)
|
||||
|
325
CHANGELOG.md
325
CHANGELOG.md
@@ -7,14 +7,27 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed external storage cache being de-synced from the network cache.
|
||||
- Fixed external storage using an out of date block entity for getting handler.
|
||||
- Fixed inventory slots being reused incorrectly in rare cases in the JEI transfer handler.
|
||||
|
||||
### Changed
|
||||
|
||||
- Increased packet size limit.
|
||||
|
||||
## [v1.11.2] - 2022-12-17
|
||||
|
||||
### Added
|
||||
|
||||
- Available items indicator in JEI now updates while JEI is open
|
||||
- Available items indicator in JEI now updates while JEI is open.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed chained crafters not taking over the name of the root crafter.
|
||||
- Fixed lag when opening JEI in large system
|
||||
- Fixed lag when opening JEI in large systems.
|
||||
- Made Refined Storage more robust against crashes when moving network blocks by unconventional means.
|
||||
|
||||
## [v1.11.1] - 2022-10-30
|
||||
|
||||
@@ -200,7 +213,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
- Fixed wrong alignment for the JEI request autocrafting tooltip.
|
||||
- Fixed mobs getting stuck in Refined Storage cables.
|
||||
- Fixed dismantling storage blocks ignoring stack size.
|
||||
- Fixed Ice and Fire banners breaking with Refined Storage. necauqua)
|
||||
- Fixed Ice and Fire banners breaking with Refined Storage.
|
||||
- Fixed empty keybinding causing GL errors.
|
||||
- Fixed some parts of the Japanese translation.
|
||||
- Fixed rendering issue on blocks when using OptiFine.
|
||||
@@ -387,3 +400,309 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
### Fixed
|
||||
|
||||
- Fixed wrench requiring shift click to rotate blocks.
|
||||
|
||||
## [v1.8.8] - 2020-07-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed duplication bug and weird behavior in the Crafting Grid matrix.
|
||||
|
||||
## [v1.8.7] - 2020-07-11
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Regulator mode item and fluid counts not saving properly.
|
||||
- Fixed Wireless Crafting Monitor not closing properly.
|
||||
- Fixed Controller always using energy, even when disabled with redstone.
|
||||
- Fixed internal crafting inventory not being returned when Controller is broken.
|
||||
- Fixed bug where autocrafting tasks started on the same tick make the wrong assumption about available items and
|
||||
fluids.
|
||||
- Fixed bug where the "To craft" amount in the Crafting Preview window is wrong.
|
||||
- Fixed bug where non-pattern items are able to be inserted into the Crafter Manager (Darkere)
|
||||
- Fixed performance issue where shapes of cable blocks were constantly being recalculated.
|
||||
|
||||
### Changed
|
||||
|
||||
- Drastically improved shift clicking performance in Crafting Grid.
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed autocrafting engine version from crafting preview screen.
|
||||
|
||||
## [v1.8.6-beta] - 2020-06-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Constructor duplication bug.
|
||||
|
||||
## [v1.8.5-beta] - 2020-06-18
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added all the language files.
|
||||
- Japanese translations.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Portable Grid voiding the disk when extracting with full inventory.
|
||||
- Fixed Constructor extracting 2 buckets when placing fluid.
|
||||
- Fixed Stack Overflow error with regulator upgrades.
|
||||
- Fixed visual bug with the Detector not updating its values.
|
||||
- Fixed Constructor placing the filtered item instead of the extracted.
|
||||
- Fixed duplication bug with filter slots.
|
||||
- Fixed shift crafting in a Grid not using the player.
|
||||
- Fixed bug where shift clicking gives too many items.
|
||||
|
||||
### Changed
|
||||
|
||||
- Cancelling a crafting task now also unlocks all Crafters related to that task.
|
||||
- External Storage will now always show the exact maximum capacity as reported by the attached inventory.
|
||||
- Crafters no longer expose their inventory to the side they are facing.
|
||||
- Changed package name to `com.refinedmods.refinedstorage`, this is a breaking change for addons.
|
||||
|
||||
## [v1.8.4-beta] - 2020-05-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed autocrafting Crafting Monitor crash.
|
||||
|
||||
## [v1.8.3-beta] - 2020-04-29
|
||||
|
||||
### Added
|
||||
|
||||
- A new experimental autocrafting engine that's enabled by default. This should improve autocrafting performance.
|
||||
- The Regulator Upgrade that can be inserted into a Exporter. This ensures a certain amount of items and fluids is
|
||||
kept in stock in a connected inventory.
|
||||
- Debug logging on the server when an expensive operation occurs.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Exporter not exporting anything when using a Stack Upgrade and there isn't space for 64 items in the inventory.
|
||||
- Fixed Controller always using the base usage even when turned off.
|
||||
- Fixed severe memory leak in the storage cache.
|
||||
|
||||
### Changed
|
||||
|
||||
- Wireless Transmitters can now be placed on any block and in any direction.
|
||||
|
||||
## [v1.8.2-beta] - 2020-04-25
|
||||
|
||||
### Added
|
||||
|
||||
- Refined Storage silicon is now present in `forge:silicon` tag for mod compatibility.
|
||||
- Waterlogging to all cable blocks.
|
||||
- Create zh_tw translation.
|
||||
- Re-added zh_cn translation.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed storage block dropping extra processor.
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated pt_br translation.
|
||||
|
||||
## [v1.8.1-beta] - 2020-01-30
|
||||
|
||||
### Added
|
||||
|
||||
- Port to Minecraft 1.15.2.
|
||||
- Fluid support for the Storage Monitor.
|
||||
|
||||
## [v1.8.0-beta] - 2020-01-21
|
||||
|
||||
### Added
|
||||
|
||||
- Port to Minecraft 1.15.
|
||||
|
||||
## [v1.7.3-beta] - 2019-12-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed severe energy update lag introduced by version 1.7.2.
|
||||
|
||||
## [v1.7.2-beta] - 2019-12-29
|
||||
|
||||
### Added
|
||||
|
||||
- Resource packs can now define the font colors that Refined Storage GUIs need to use.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed crash when loading a network.
|
||||
- Fixed being able to drain energy from the Refined Storage Controller.
|
||||
- Fixed the Grid crashing on a item/fluid update-heavy storage system.
|
||||
- Fixed the Grid displaying the old quantity when shift clicking an entire stack out.
|
||||
- Fixed crash with the Disk Manipulator and using item/fluid filters when inserting into the network.
|
||||
- Fixed the network being able to run off 1 FE/t.
|
||||
|
||||
### Changed
|
||||
|
||||
- Patterns being added or removed from the network are now propagated as well to clients that are watching a Grid.
|
||||
- When pressing ESCAPE in the search box on the Grid or Crafter Manager, focus on the search bar will be lost first
|
||||
before closing the GUI immediately. Then on the next ESCAPE press, the GUI will be closed.
|
||||
|
||||
## [v1.7.1-alpha] - 2019-11-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Pattern Grid causing world hanging on load.
|
||||
- Fixed External Storage not refreshing when the storage is broken or replaced.
|
||||
- Fixed delay in block update when placing a cable block.
|
||||
- Fixed holder of cable blocks sometimes conflicting with a cable connection while rendering.
|
||||
- Fixed being able to move wireless items in inventory when using a keybinding to open.
|
||||
- Fixed crash when breaking a Grid, Crafting Monitor, Crafter Manager or Portable Grid when another player is still
|
||||
using it.
|
||||
|
||||
### Changed
|
||||
|
||||
- The Pattern Grid now switches automatically between crafting pattern and processing pattern mode when using JEI
|
||||
transfer.
|
||||
- The Pattern Grid now switches automatically between crafting pattern and processing pattern mode when re-inserting an
|
||||
existing Pattern.
|
||||
- Grids now do not sort if you interact with it while holding shift.
|
||||
|
||||
### Removed
|
||||
|
||||
- Exact mode for processing patterns no longer exist, you can now define per-slot which item/fluid tags are allowed to
|
||||
be used by autocrafting, by using CTRL + click on the filter slot in the Pattern Grid.
|
||||
- Removed migration code for the development builds that were released on Discord (not on CurseForge). If you used the
|
||||
development builds and never used version 1.7.0 before, first switch to 1.7.0, open your world, modify a storage disk,
|
||||
and then upgrade to 1.7.1.
|
||||
|
||||
## [v1.7.0-alpha] - 2019-11-02
|
||||
|
||||
### Added
|
||||
|
||||
- Port to Minecraft 1.14.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the Fluid Grid not having a View type setting.
|
||||
|
||||
### Changed
|
||||
|
||||
- Oredict mode for Patterns has been replaced with "Exact mode" (by default on). When exact mode is off, Refined Storage
|
||||
will use equivalent items or fluids from the Minecraft item/fluid tag system.
|
||||
- Grid filtering with "$" now does filtering based on item/fluid tag name instead of oredict name.
|
||||
- When binding a network item to a network you can now bind to any network block, not only the Controller.
|
||||
|
||||
### Removed
|
||||
|
||||
- The Reader and Writer, this will return later in an addon mod.
|
||||
- Cross dimensional functionality on the Network Transmitter for the moment, this will return later.
|
||||
- Covers.
|
||||
|
||||
## [v1.7.0+10] - 2019-10-29
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added oredict mode as "exact mode" (for fluids too!).
|
||||
- Re-added the Crafter Manager.
|
||||
- Re-added the Crafting Monitor.
|
||||
- Re-added the Wireless Crafting Monitor.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the ugly checkboxes
|
||||
- Misc bugfixes and crash fixes.
|
||||
|
||||
## [v1.7.0+9] - 2019-10-28
|
||||
|
||||
### Added
|
||||
|
||||
- Re-add the Crafter and autocrafting.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Misc bugfixes and crash fixes.
|
||||
|
||||
## [v1.7.0+8] - 2019-10-27
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added the Constructor.
|
||||
- Re-added the Destructor.
|
||||
- Re-added the Disk Manipulator.
|
||||
- Re-added the Portable Grid.
|
||||
|
||||
## [v1.7.0+7] - 2019-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed a crash that can happen when opening a world.
|
||||
|
||||
## [v1.7.0+6] - 2019-10-22
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added the Network Transmitter (not cross dimensional yet).
|
||||
- Re-added the Network Receiver.
|
||||
- Re-added the Relay.
|
||||
- Re-added the Detector.
|
||||
- Re-added the Security Manager.
|
||||
- Re-added the Interface.
|
||||
- Re-added the Fluid Interface.
|
||||
- Re-added the Wireless Transmitter.
|
||||
- Re-added the Storage Monitor.
|
||||
- Re-added the Wireless Grid.
|
||||
- Re-added the Wireless Fluid Grid.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Misc bugfixes and crash fixes.
|
||||
|
||||
## [v1.7.0+5] - 2019-10-17
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added the External Storage.
|
||||
- Re-added the Importer.
|
||||
- Re-added the Exporter.
|
||||
|
||||
### Removed
|
||||
|
||||
- Cutting Tool (you may get a Forge warning about that one, it's safe to ignore).
|
||||
- The "compare nbt" side button, replaced it with "exact mode".
|
||||
|
||||
## [v1.7.0+4] - 2019-10-15
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added all the storage blocks.
|
||||
- Re-added JEI integration.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Misc bugfixes and crash fixes.
|
||||
|
||||
## [v1.7.0+3] - 2019-10-12
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added the Crafting Grid.
|
||||
- Re-added the Pattern Grid.
|
||||
- Re-added the Fluid Grid.
|
||||
- Re-added Optifine compatibility.
|
||||
|
||||
## [v1.7.0+2] - 2019-10-10
|
||||
|
||||
### Added
|
||||
|
||||
- More config values.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Misc bugfixes and crash fixes.
|
||||
|
||||
### Removed
|
||||
|
||||
- Free dirt every 10 ticks.
|
||||
|
||||
## [v1.7.0+1] - 2019-10-09
|
||||
|
||||
### Added
|
||||
|
||||
- Re-added the Controller.
|
||||
- Re-added the Disk Drive.
|
||||
- Re-added the Grid.
|
||||
|
@@ -33,7 +33,7 @@ apply plugin: 'maven-publish'
|
||||
|
||||
group = 'com.refinedmods'
|
||||
archivesBaseName = 'refinedstorage'
|
||||
version = '1.11.2'
|
||||
version = '1.11.3'
|
||||
|
||||
if (System.getenv('GITHUB_SHA') != null) {
|
||||
version += '+' + System.getenv('GITHUB_SHA').substring(0, 7)
|
||||
|
@@ -64,6 +64,8 @@ public class FluidExternalStorage implements IExternalStorage<FluidStack> {
|
||||
IFluidHandler fluidHandler = handlerSupplier.get();
|
||||
|
||||
if (fluidHandler != null) {
|
||||
cache.initCache(fluidHandler);
|
||||
|
||||
List<FluidStack> fluids = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < fluidHandler.getTanks(); ++i) {
|
||||
|
@@ -18,13 +18,11 @@ public class FluidExternalStorageCache {
|
||||
return stored;
|
||||
}
|
||||
|
||||
public void update(INetwork network, @Nullable IFluidHandler handler) {
|
||||
if (handler == null) {
|
||||
stored = 0;
|
||||
return;
|
||||
public boolean initCache(IFluidHandler handler) {
|
||||
if (cache != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cache == null) {
|
||||
cache = new ArrayList<>();
|
||||
|
||||
int stored = 0;
|
||||
@@ -35,6 +33,16 @@ public class FluidExternalStorageCache {
|
||||
}
|
||||
this.stored = stored;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void update(INetwork network, @Nullable IFluidHandler handler) {
|
||||
if (handler == null) {
|
||||
stored = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (initCache(handler)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,9 @@ import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStora
|
||||
import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageProvider;
|
||||
import com.refinedmods.refinedstorage.blockentity.FluidInterfaceBlockEntity;
|
||||
import com.refinedmods.refinedstorage.util.LevelUtils;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -21,11 +23,21 @@ public class FluidExternalStorageProvider implements IExternalStorageProvider<Fl
|
||||
@Override
|
||||
public IExternalStorage<FluidStack> provide(IExternalStorageContext context, BlockEntity blockEntity, Direction direction) {
|
||||
return new FluidExternalStorage(context, () -> {
|
||||
if (!blockEntity.getLevel().isLoaded(blockEntity.getBlockPos())) {
|
||||
Level level = blockEntity.getLevel();
|
||||
|
||||
if (level == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return LevelUtils.getFluidHandler(blockEntity, direction.getOpposite());
|
||||
BlockPos blockPos = blockEntity.getBlockPos();
|
||||
|
||||
if (!level.isLoaded(blockPos)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BlockEntity currentBlockEntity = level.getBlockEntity(blockPos);
|
||||
|
||||
return LevelUtils.getFluidHandler(currentBlockEntity, direction.getOpposite());
|
||||
}, blockEntity instanceof FluidInterfaceBlockEntity);
|
||||
}
|
||||
|
||||
|
@@ -68,6 +68,8 @@ public class ItemExternalStorage implements IExternalStorage<ItemStack> {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
cache.initCache(handler);
|
||||
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < handler.getSlots(); ++i) {
|
||||
|
@@ -17,13 +17,11 @@ public class ItemExternalStorageCache {
|
||||
return stored;
|
||||
}
|
||||
|
||||
public void update(INetwork network, @Nullable IItemHandler handler) {
|
||||
if (handler == null) {
|
||||
stored = 0;
|
||||
return;
|
||||
public boolean initCache(IItemHandler handler) {
|
||||
if (cache != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cache == null) {
|
||||
cache = new ArrayList<>();
|
||||
|
||||
int stored = 0;
|
||||
@@ -34,6 +32,16 @@ public class ItemExternalStorageCache {
|
||||
}
|
||||
this.stored = stored;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void update(INetwork network, @Nullable IItemHandler handler) {
|
||||
if (handler == null) {
|
||||
stored = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (initCache(handler)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -6,10 +6,12 @@ import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStora
|
||||
import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageContext;
|
||||
import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageProvider;
|
||||
import com.refinedmods.refinedstorage.blockentity.InterfaceBlockEntity;
|
||||
import com.refinedmods.refinedstorage.util.NetworkUtils;
|
||||
import com.refinedmods.refinedstorage.util.LevelUtils;
|
||||
import com.refinedmods.refinedstorage.util.NetworkUtils;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@@ -30,11 +32,21 @@ public class ItemExternalStorageProvider implements IExternalStorageProvider<Ite
|
||||
@Override
|
||||
public IExternalStorage<ItemStack> provide(IExternalStorageContext context, BlockEntity blockEntity, Direction direction) {
|
||||
return new ItemExternalStorage(context, () -> {
|
||||
if (!blockEntity.getLevel().isLoaded(blockEntity.getBlockPos())) {
|
||||
Level level = blockEntity.getLevel();
|
||||
|
||||
if (level == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return LevelUtils.getItemHandler(blockEntity, direction.getOpposite());
|
||||
BlockPos blockPos = blockEntity.getBlockPos();
|
||||
|
||||
if (!level.isLoaded(blockPos)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
BlockEntity currentBlockEntity = level.getBlockEntity(blockPos);
|
||||
|
||||
return LevelUtils.getItemHandler(currentBlockEntity, direction.getOpposite());
|
||||
}, blockEntity instanceof InterfaceBlockEntity);
|
||||
}
|
||||
|
||||
|
@@ -205,7 +205,7 @@ public class IngredientTracker {
|
||||
int amount = Math.min(ingredient.getMissingAmount(), used == null ? stackInSlot.getCount() : stackInSlot.getCount() - used);
|
||||
if (amount > 0) {
|
||||
ingredient.fulfill(amount);
|
||||
usedMatrixStacks.put(slot, amount);
|
||||
usedMatrixStacks.put(slot, used == null ? amount : used + amount);
|
||||
}
|
||||
return ingredient.isAvailable();
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ public class NetworkHandler {
|
||||
.serverAcceptedVersions(protocolVersion::equals)
|
||||
.networkProtocolVersion(() -> protocolVersion)
|
||||
.simpleChannel();
|
||||
private final PacketSplitter splitter = new PacketSplitter(5, handler, channel);
|
||||
private final PacketSplitter splitter = new PacketSplitter(10, handler, channel);
|
||||
|
||||
public void register() {
|
||||
int id = 0;
|
||||
|
Reference in New Issue
Block a user