* Support having capacity of network as a double and fix mean capacity for tube networks of multiple different tiers
* Less duplicate code for calculating capacities. Also less division then remultiplication
* Minor cleanup
* Reduce a small amount of duplicate code from universal cable
* Don't check Y height for sending update packets. Seems to fix compat with cubic chunks #5262
* First pass transitioning from using sendToReceivers to using built in forge stuff
* Make code cleaner to read with helper methods
* Fix accidental extra code from a local branch issue I had
* Further improve readability
* Rename method
* shortcut if player not in same dimension & use EMP.server for the reference
* First pass reformatting code to be more readable (common still not done)
* Replace google common collect calls with Java calls where possible
* Remove a bunch of unnecessary parenthesis leaving clarifying ones
* Add some missing @Nonnull annotations
* Fix checking wrong type
* Remove unnecessary continue/return statements and simplify comparision check
* Pass exception instead of directly printing stack trace
* Work on cleaning up common, through config so far
* Work on cleaning up common, through integration so far
* Work on cleaning up common, through network so far
* Work on cleaning up common, through tier so far
* Remove empty constructors that get created by default anyways
* Work on cleaning up common, through transmitters so far
* Work on cleaning up common, through utils so far
* Finish cleaning up spacing for common
* Change unused map (values) to use a set
* bump api version
* make DynamicNetwork fields non public and weaker type
* remove overhead of a set in CME avoidance
* Minor cleaning
* First pass improving performance of EnergyNetwork emitting
Only sends power once per tick per accept now. Lots of comments of design included so that I have a backup of my thought process/solutions if I run into some blocker.
* Optimized implementation slightly, still more to be done
* Cleanup some comments
* Move send energy to acceptor logic to CableUtils
Replace old emit logic in CableUtils with using the newer logic
* Inline getConnections to slightly cut down on number of operations ran
* Fix a couple bugs with targets that have multiple sides
Also improve performance reducing frequency at amountPerChanged needs to be ran
* Improve performance of CableUtils.emit by faking we have one 6 sided target as opposed to having 6 one sided targets
* Allow simulating insertion into the EnergyAcceptorWrapper for IC2
* Fix using wrong value for total acceptor count when acceptors have multiple sides
* Use an EnumMap instead of a HashMap for the Target
* First pass converting gas and fluid network emission to target system
* Improve general fluid and gas emitting using the utility method
Change a couple things to using Sets rather than lists for emitting so that we can ensure each side is only done once.
* Document and cleanup method/variable names of target classes
* Start deduplicating emitting code into a EmitUtils file
Logic for Gas and Fluid emitting fully generic now
* Partially extract how we keep track of the split to make it easier to deduplicate the common code
* Start moving shifting needed to given to the targets themselves
* Use generics to deduplicate a lot of the remaining duplication in the new emitting code
* Fix having broke energy emitting and also further cleanup some code
* Half the number of loops the HeatNetwork does onUpdate
* Fix potentially divide by zero errors
* Deprecate and remove implementations of getAcceptors as it is no longer needed
* Never round up from doubles for sending power stops energy networks going negative.
* Fix more spots where we were accidentally rounding upwards/clamping improperly for energy
* Cleanup impl to use less memory and adjust better as sending if
the possible amount changed/should be adjusted
Also removed the need for a specific IntegerTypeTarget intermediary class
* Cleanup the docs of some of the changed things
* Given tickEmit is private now we already know it is only being called serverside
* Improve documentation slightly and rename a method to be more accurate
* Remove limit on IC2 given it uses doubles as well now
* Rename amountPer to amountPerTarget
* prevent Out of Bounds exception in factory ItemMeshDefinition
* prevent Out of Bounds error in item stack display name
* Respect NONE connection between pipes. Fixes#4781
* prevent fluid/gas pipes from connecting if their contents arent the same (part 1)
* prevent some case of incorrect network merges that would convert/void a fluid/gas
* Add a way to check if a network is compatible with an buffer
Used for checking the orphan's buffer against the external network
* rename some generic type variables for readability
* introduce BUFFER generic type variable
* Fix missing null check causing new pipes not being able to be added to a network
* More checks for when there is an invalid factory
* bump api version & use a constant for all
* add default method to not break binary compat
* Refresh if a connection exists if a transmitter failed to combine two networks
Fallback to the network's buffer as if we have not saved any data yet the TE's buffer may still be null
* Add a way to get the pipes buffer falling back to the network, rather than doing it from the same method. This ensures that there is no accidental leakage where the count of the buffer matters
* Return a null buffer for pressurized tube buffer if the stack is empty
* Allow merging of networks when they are able to connect again
Visuals still need a minor update to sync the type it should be rendering
* Update network visuals when networks merge
* allow unconnected sides to have their mode set - except logistical transporters which already used that function, they only can un-NONE their unconnected sides
I went for what seemed like a good level of organisation:
Java
__________
Mekanism
__________
Minecraft
Forge
FML
__________
Netty
LWJGL
__________
Other APIs
__________
Static Imports.
Move Config variables into their own class, (in api because other stuff in API references config, may make sense to move it back to common later), and move Blocks and Items into final variables in their own classes. It looks a lot cleaner this way and my OCD can finally rest now.