Commit Graph
174 Commits
Author SHA1 Message Date
Alex Bee f7d25c6daa Level Maintainer: don't queue jobs when all CPUs are busy. (#203) 2024-03-27 15:59:20 +01:00
claimg 300f01be8b Fixed fluid emitter when there is no filter in it (#199) 2024-03-22 18:02:26 +01:00
SKProCH 9668cffe59 Adds the sticky card support for fluid storage bus (#198)
* Adds the sticky card support for fluid storage bus

* Replace wildcard imports with regular one

* Apply spotless
2024-03-20 17:54:12 +01:00
slprimeandslprime 0caf89e539 Use GT and ae2fс fluids in ME inputs/outputs and storagе (#191)
* use of GT and ae2fс fluids in inputs/outputs and storagе

* remove unused imports

---------

Co-authored-by: slprime <history-21@yandex.ru>
2024-02-01 11:40:55 +01:00
Ryan Nasers b3e480a6cb Adding fluids to sticky card (#190)
* Adding sticky support for AE2-FC

* Spotless whoopsies
2024-01-12 22:18:05 +01:00
Abdiel Kavash 6187a7306d Level Maintainer fulfills requests in a round robin pattern. (#187) 2024-01-01 11:25:01 +01:00
Andrei Laiff 6e96cba6fe Correct split client-server code 2023-12-23 14:39:11 +02:00
TechnicianLP db8aee2c25 Implement Interface Locking for Dual Interfaces (#182)
* Implement Interface Locking for Dual Interfaces

* Update AE2
2023-12-20 13:03:50 +01:00
Andrei Antropov e621da2082 Support to show p2p outputs in interface terminal (#179)
Closes: GTNewHorizons/GT-New-Horizons-Modpack#15124
2023-12-19 09:17:17 +01:00
MCTBL 3b1b1af852 Add thousandth mark for cell tooltips. (#174)
* Add millennials to cell tooltips, make it more readable

* Update build.gradle
2023-12-03 14:29:03 +00:00
MCTBLandMartin Robertz 3077326c16 Implement the new interface in AE2 for network bytes informations. (#173)
* implement the interface

* sa

* Implements the new interface

---------

Co-authored-by: Martin Robertz <dream-master@gmx.net>
2023-11-20 19:25:54 +01:00
Батьків Нестор-Євген Васильович 79dc0eb5bc Add dual interface p2p copy paste (#169)
* update deps

* add dualt interface p2p copy pasting
2023-10-29 11:25:08 +01:00
f5912ef2e3 Add LevelMaintainerTerminal rework logic inside TileLevelMaintainer (#162)
* Use new interface terminal API

* Update dependencies.gradle

* feat: Update core hooks and integrations

* api: Add `LevelTerminalRegistry` functionality

* feat: Use `customName` to display in `GuiFluidLevelEmitter`

* feat: Rework scheduling and data storage in `TileLevelMaintainer` functionality

* feat: Add new item `LevelTerminal`

* feat: Support back navigation functionality

* feat: add back navigation in `LevelMaintainer` from terminal

* use `IGuiTooltipHandler` directly from ae2

include #160

* fix correct `InterfaceTerminalSupportedClassProvider` deprecation

* Implement new version of `InterfaceWireless` based on `InterfaceTerminal`

* Fix `LevelTerminal` data recursion and few in fixes gui

* Use `aeRenderItem` directly and fix `zIndex` in custom slots

* Fix rendering numbers bigger than 2.1G through `aeRenderItem`

* Fix fails on `getCraftingItem`

no root cause was found

* Fix add packet logging and try to not fail after receive corrupted packet

* Fix add logging around empty configuration

* Fix packet corruption and log invalid data

* Fix packet corruption with level emitters

* Correct handle overwrite packet

* Fix intercept dnd click from GT5 hook for `AppEngGuiHandler`

keyword `net.bdew.neiaddons.appeng.AppEngGuiHandler`

* update be+deps

* Update dependencies.gradle

* Update dependencies.gradle

* Fix `zIndexes` for compatability with `DuraDisplay`

* Update AE2 and fix compatability

* Change `ForgeDirection` side serialization to `byte`

* Fix tooltip zIndexes

* Rename all rest parts related to `Level terminal`

* Code cleanup after review

* Remove duplicated dependency declaration

---------

Co-authored-by: Firenoo <49818773+firenoo@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
2023-10-27 14:10:07 +02:00
miozune 1efa92adad Fix stacksize overflow when overlaying recipe (#167) 2023-10-25 23:01:56 +09:00
miozune 861791f4fb Fix GUIs not accepting numpad enter key (#159)
* updateBuildScript

* updateDependencies

* Fix GUIs not accepting numpad enter key

* Fix wildcard import
2023-09-27 16:03:59 +02:00
firenoo 98ff754306 Fix doubling fluids for real now (#153)
If condition was inverted
2023-08-07 23:50:39 +02:00
firenoo 1ed32d46dc A collection of fixes (#152)
* Fix the adv blocking mode setting shown w/o upgrade

* Use else ifs instead of ifs when looking for button

* Register dual p2p interface to interface term

* Fix moving inventory region when space is held

* Fix scrollbars not initialized when terminal is empty

* Fix fluid handling for the 3rd time

Rearranges the steps to insertion and validates whether the tank can be
drained.

* Fix fluid extraction for the 3rd time
2023-08-07 09:28:11 +02:00
firenoo 3d01f50100 Fix fluid stack not doubling (#151) 2023-08-05 17:15:07 +02:00
Raven Szewczyk 64977b87a9 Lazy monitor updates (#150)
* Update buildscript and dependencies

* Implement getAvailableItem for faster network updates

* Use findPrecise
2023-08-05 09:39:12 +02:00
firenooandGitHub GTNH Actions c94876b02e Add the dual P2P interface (#139)
* Add the dual P2P interface

- Can be disabled in the config
- Updated dependencies
- We now require a hard inheritance dependency on beta-238+.
- CANNOT BE ATTUNED.

* Dependency cleanup (don't use pre)

* Fix dual interface background

* Fix null icon for p2p dual interface

BetterP2P needs this to properly display the icon.

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <unknown>
2023-07-22 17:00:43 +02:00
firenooGitHub GTNH Actionsgithub-actions[bot]
51229e972b Untangle Baubles hard dependency and skip on unmapped items/blocks (#137)
* Untangle Baubles hard dependency and skip on unmapped items/blocks

Have forge issue the standard "Missing items" screen when updating, so
players are warned before joining the world. Previously we consumed all
missing mapping by mistake.

Remove the hard dependency on baubles by adding Optional.Interface

* spotlessApply (#138)

Co-authored-by: GitHub GTNH Actions <>

* Update dependencies and fix wrong gui channel

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-14 21:08:20 +02:00
chill d5b8ef6ea9 Code cleanup (#133)
* gradle updateBuildScript

* fix comments and commented-out code

Code deletion, converting comments into javadocs, and refactoring code to not
need comments.

* remove redundant suppressions

* replace C-style array declaration with Java-style

* make private field final

* remove unnecessary semicolon

* extract a common part from an if

* simplify boolean expression

* simplify ternary if

* remove unused imports

* convert escaped characters for clarity

* replace while with for

* replace explicit types with diamond operators

* replace anonymous type with lambda

* enable modern Java syntax

* migrate to enhanced switch

* migrate to pattern variables for instanceof

* remove empty javadoc

* add Nonnull annotation to overrides of Nonnull methods

* replace wailaStack with null

When wailaStack is not null, the flow breaks out of the loop,
so there's no need to confuse the reader with putting wailaStack
both as the result and the parameter of the call - there's no
recursion.

* int cannot be bigger than its max value

* suppress dataflow warning

* remove redundant initializer

The default value of int is 0.

* null check is covered by instanceof

* simplify some calls of addVertexWithUV

* fix typos and add TODOs

* make flipState more understandable
2023-06-18 23:29:57 +02:00
firenooandGitHub GTNH Actions f87b76347e Update APIs (#130)
* Add an API to allow other mods to blacklist fluids from this mod.

* Removed Thaumic Energistics config setting. This will be handled by
Thaumic Energistic's side (which also happens to have a config setting).

* Added an API that allows for blacklisting fluids from either the storage
or the display individually.

* Prevent blacklisted fluids from being discretized

* Update API usage

- use AE2's new API

- use ThE's config setting for aspect -> gas

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <unknown>
2023-05-20 19:46:37 +02:00
miozune 14853a2481 Fix NPE with FCStackStringifyHandler (#129) 2023-05-13 19:03:22 +02:00
firenooGitHub GTNH Actionsgithub-actions[bot]
3da14b3bbe More ec2 mappings (#124)
* Replace ore dictionary bus

Extra Cells ore dict bus -> export bus w/ ore dict card
(retains ore filter setting, not verified they are 1:1)

* Add OpenComputer migration

Moves migration to postInit, and migrates OC upgrades.

* Remap wireless w/ correct encryption key + power

Basically now works without needing to relink in security term

* Update buildscript

* spotless apply

* spotlessApply (#125)

Co-authored-by: GitHub GTNH Actions <>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-06 19:04:59 +02:00
firenoo d2df9beb31 Fix fluid export bus voiding fluids on crafting only mode (#120)
The Fluid Export Bus was voiding fluids on craft only mode because it
tried to craft it, and decided to continue with the normal export logic:
Extract fluid from ME system and fill the tank.

Unfortunately, there was a condition that prevented the extracted fluid
from going anywhere depending on craft only mode, so it got voided.

Commit fixes this by skipping the normal extract logic if set to craft
only.

The amount must be simulated before extracting from the ME system. This
helps prevent a scenario where we cannot insert the fluid back (such as
when we have a fluid storage bus on Extract Only).

Signed-off-by: Firenoo <49818773+firenoo@users.noreply.github.com>
2023-05-01 19:43:07 +02:00
firenoo dab5a0dbf3 Add mappings for most important Extra Cells items (#115)
* EC2 deprecation: Part 1 - Items

Laying the groundwork for absorbing EC2 mappings.

* EC2 deprecation: Part 2 - Blocks

* EC2 Deprecation: Part 3 - Parts

Parts are deprecated.

* set config "replaceEC2" to default true

* API changes to make room for Extra Cells fluid placeholder

* Finish basic item replacement code

- parts work
- items are remapped properly, and converted when they enter the player inventory

* Fixed some storage cell conversion issues

The placeholders did not transfer NBT data properly

* Add handlers for deprecated item cells

Now the placeholder should work automatically in a drive.

The void cell is still a WIP.

* Add more tooltip help and cell handler for void cell

* apply spotless

too lazy to rebase
2023-05-01 19:42:52 +02:00
firenoo 6090f198e6 Allow all 63 partition items to be used for fluid cells (#121)
Previously, only one partition item was allowed. This fix will have
the cell consider all 63 slots. If you configure more than 1 or 5
cell slots, it works as expected - up to 1 or 5 of the whitelisted
fluids can be stored at a time.

This will degrade performance slightly.

Signed-off-by: Firenoo <49818773+firenoo@users.noreply.github.com>
2023-05-01 19:38:07 +02:00
firenoo c29f8cf846 Fix FluidContainerRegistry interactions w/ Certus Quart Tank (#122)
The Certus Quartz Tank previously did not consider the
FluidContainerRegistry API for fluid containers, so fluid containers
that implemented that (like ic2 cells) were voided when filling the
tank.

Signed-off-by: Firenoo <49818773+firenoo@users.noreply.github.com>
2023-05-01 19:37:53 +02:00
firenoo 508f6e5d64 Add null check when determining potential tanks to import (#116)
It seems that implementers of IFluidHandler sometimes return null
in `getTankInfo()`, so this adds a check for that before doing the
bus work.
2023-04-26 21:14:40 +02:00
firenooandMartin Robertz e1b3f20078 Network throttle: Force ME update packets to be sent once every N ms. (#110)
* Network throttle: Force ME update packets to be sent once every 50ms.

1. Item and fluid packets are separated to their own classes, as they are
not even allowed to be mixed together in the first place. This will enforce a strict
separation of the two.

2. New network worker thread for handling ME inventory updates. Instead of
creating packets directly, classes should schedule packet(s) to be sent at the
next 50ms boundary. The packet has a limit of 256 items to prevent killing the
client, but this can be changed in the config. In fact, the packet send rate is
also configurable.

3. Upon opening a terminal GUI, ME update packets are split. Only the last received
packet will trigger a terminal sorting, so if the ME system is large, it may take
several seconds (!) to load all the items.

* Update SPacketMEFluidInvUpdate.java

---------

Co-authored-by: Martin Robertz <dream-master@gmx.net>
2023-04-01 14:04:39 +02:00
firenoo 9c2ef02383 Split packets when sending items over network (#107)
Packets are now split into smaller chunks when sent. The packet
size is adjustable in the config.
2023-03-23 17:14:14 +01:00
Raven Szewczyk 6a244c12c4 Add unlocalized names to fluid drops&packets (#105)
Previously they were null.

Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/12874>
2023-03-14 21:04:56 +01:00
asdfljandRaven Szewczyk b9724d9369 fc terminal add type filter (#98)
* fc terminal add type filter

* Update dependencies.gradle

---------

Co-authored-by: Raven Szewczyk <git@eigenraven.me>
2023-03-12 20:25:42 +01:00
GlodBlock 0a01bb008b fix gl crash 2023-03-03 20:27:02 +08:00
GlodBlock 18f31ac3ef fix export bus exporting too much fluid 2023-03-02 16:46:35 +08:00
asdflj 6505967826 add fluid packet check 2023-02-28 09:06:06 +08:00
asdflj 78e9291fc6 Certus Quartz Tank add waila support
fluid packet decode add support to use conduit to export fluid
2023-02-27 16:50:29 +08:00
asdflj ebf5a23ab9 fluid export bus add schedule mode 2023-02-26 10:46:55 +08:00
GlodBlock 161e38cbda fix fluid dupe from simulate drain 2023-02-25 22:06:29 +08:00
asdflj acfb5b1d48 add universal terminal more tips 2023-02-24 16:30:39 +08:00
asdflj 7438c7075c fix can't be display in network details 2023-02-24 09:40:21 +08:00
asdflj bc053b2690 fix fluid storage bus crash 2023-02-20 18:19:47 +08:00
asdflj aef677868b add hotkey and baubles support 2023-02-17 22:34:06 +08:00
asdflj 09c1c49529 pattern terminal add auto fill blank pattern 2023-02-17 12:04:11 +08:00
GlodBlock 0734dc4d0b add fluid name in certus tank name 2023-02-14 12:34:32 +08:00
GlodBlock a5f7d8bed2 fix wireless terminal not usable at server 2023-02-13 14:59:31 +08:00
GlodBlock 4f54c9bb28 add 5 type fluid cell 2023-02-12 20:12:23 +08:00
GlodBlock 96c7032523 add fluid cell housing 2023-02-12 19:04:04 +08:00
asdflj f7001d205e fix bug 2023-02-12 15:54:35 +08:00