Commit Graph
21 Commits
Author SHA1 Message Date
Richard Freimer d19f1cd7eb Transporter performance improvements (#5488)
* Improve performance of predicted insert. Don't copy stacks nearly as often

* Cache what stack is in the slots and update comments

* Cleanup up pathfinder code some

* Clean up a bit more mainly TileComponentEjector

* Fix crash caused by an earlier commit

* Minor cleanup

* Minor cleanup

* Slightly clean up TileEntityBin and fix creative bin auto eject lowering item count

* Partially cleanup getpaths, and prep work for better handling of AcceptorData with mulitple TransitResponses

* Scratch previous attempted idea of combining responses

* Use EnumMap instead of HashMap for keeping track of side data for Ejector and prep for an eventual change to TransitResponse of inserting into more than one slot at a time if the stack would be best split among multiple

* Change some more HashMaps to EnumMaps

* Make it easier to read component ejector for gas and fluids

* Inline getStacksToDest so that it can bail even earlier in cases when destination is full

* Don't create a copy of the stack if it won't be inserted AND also fix having broken inserting across multiple slots

* Replace a bunch of other HashMap instances with EnumMap where possible

* Make a couple sets more generic

* Use Int2ObjectMap for int based cache & tidy clamping

* ensure EnumMap doesnt throw NPE

* FastUtil map changes
2019-05-28 09:31:33 -04:00
Richard Freimer 0d4b50908f Formatting and code readability cleanup (#5467)
* 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
2019-05-11 14:13:24 -04:00
Dave Smith e0b7ea62a4 The Great Reformat; moving to google-java-style w/ 4 space indent and 120 column line wrap 2019-03-09 22:47:13 -07:00
Tom Elfring b72d6efab3 Java 7 and 8 cleanup
Diamond operator <>
Lambdas and method references
2017-08-05 17:50:38 +02:00
PlayerWithoutName dfea471bff Fixed IllegalArgumentException in OreDictCache class 2017-06-02 15:17:56 +02:00
aidancbrady 89604ac199 Start on JEI plugin, bump Forge version, fixed Mod ID filters (ItemRegistryUtils) 2016-05-19 00:50:44 -04:00
aidancbrady 87438dcc7f Boiler work, added heat info tab, worked on polishing heat interactions among machines 2016-02-27 13:32:48 -05:00
Aidan C. Brady ed8823b038 Merge branch 'development' into 1.8
Conflicts:
	src/main/java/mekanism/common/CommonProxy.java
	src/main/java/mekanism/common/Mekanism.java
2014-10-02 12:47:22 -04:00
sk89q 16fc882da7 Change OreDictCache to hit the hash map one fewer time. 2014-09-30 13:26:34 -07:00
Ben Spiers fab95e8900 Re-organise imports.
I went for what seemed like a good level of organisation:

Java
__________
Mekanism
__________
Minecraft
Forge
FML
__________
Netty
LWJGL
__________
Other APIs
__________
Static Imports.
2014-09-03 19:00:03 +01:00
Aidan C. Brady 6b4ef3bb50 Merge branch 'development' into 1.8 2014-08-19 19:08:47 -04:00
Aidan C. Brady 8c58a9eaed Fixed crash related to OreDictCache 2014-08-19 19:06:50 -04:00
Ben Spiers 725b7463f0 Make the mod classes significantly less godlike.
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.
2014-08-01 01:35:06 +01:00
Ben Spiers 700cc76c35 Fix a different, unrelated OreDict issue. 2014-07-13 19:58:00 +01:00
Ben Spiers c560bdc2e1 Fix a different, unrelated OreDict issue. 2014-07-13 19:53:41 +01:00
Aidan C. Brady f67be01658 Tank-based fluid container interaction fixes. Can't figure out the data request issue. 2014-07-07 15:54:26 -04:00
Dashkal 9b3ee926e2 Port to forge-10.12.2.1121 (was 10.12.1.1112)
* Updated build.properties
 * Now using the new OreDictionary.getoreIDs() call to obtain oreDict names
 * No longer modifying OreDictionary collections in ChemicalInjectionRecipeHandler
 * No longer registering list redstone under oreRedstone (causes an NPE)
2014-06-27 16:20:02 +01:00
Aidan C. Brady 098a74600c Fixed PRC NEI issue, fixed bucket not sustaining inventory, fixed a few other things 2014-06-19 20:33:10 +02:00
Daniel Schubert df8d651c5d Fix crash when mining BlockMultipart with Atomic Disassembler 2014-06-19 13:33:23 +02:00
Aidan C. Brady 31dd643259 Add necessary GUI implementation for new mod ID filters 2014-06-14 10:26:12 +02:00
Ben Spiers ab47724473 Move the directory structure around to a more conventional one and start out on the 1.7 update.
3797 errors. We have a long way to go.
2014-04-20 03:44:06 +01:00