Commit Graph
916 Commits
Author SHA1 Message Date
Xander bbcea85fc4 Respect NONE connection mode for Pipe Connections (#5387)
* 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
2019-04-20 13:38:14 +08:00
pupnewfster a5d9a5a2c1 Fix redstone bug described in #5407 turns out it did have to call markDirtyTransmitters and notifyTileChange was not enough 2019-04-17 12:01:23 -04:00
Richard Freimer 04372a6426 Various fixes to data not loading properly (#5407)
* Cleanup redstone handling of TileEntitySidedPipe
Properly mark the transmitters as dirty if the redstone mode changed during refresh

* Fix not updating tank capacity when loading TEFluidTank from NBT

* Make transmitters fix invalid connections on load

* Address comments and call refreshConnections() directly.
2019-04-17 11:24:44 -04:00
Richard Freimer f3fdf00064 Factory recipe check (#5399)
* Fixes null pointer on no recipe found #5392
Compare the recipe against the cache

* Add a few missing secondary input checks

* Don't set the cached recipe when only checking if an item can be inserted
2019-04-15 10:10:16 -04:00
Thiakil c195cd6bbb null pointer fix for #5388 2019-04-13 11:54:40 +08:00
Dave Smith 8bc38d47a7 Avoid scheduling a sound to be played if it's fully muffled. (#5386)
* Avoid scheduling a sound to be played if it's fully muffled.

* Remove debug message
2019-04-12 12:50:54 -04:00
Richard Freimer da71637053 Port ToMe25's PR for sawing factories (#5383)
* Port remainder of #5327 implementing #5236 sawing factories

* Add missing blockstate files for sawing factories

* Inline helper method

* Revert a bit of minor formatting changes to make dif easier to read

* remove redundant mcmeta for sawing front textures

* de-dupe sawmill factory textures (left+right are the same)
2019-04-12 10:22:16 -04:00
pupnewfster fcef0e2ed4 Fix logistical transporters attempting to connect to chargepads 2019-04-11 11:21:00 -04:00
temp1011 7ae0a4d5ca port tesr pull (#5380)
Logistical Sorter & Chargepad TESR to model improvements
2019-04-11 20:27:46 +08:00
pupnewfster d6a0d989e0 Fix JEI error from a circular enum dependency 2019-04-10 21:26:18 -04:00
Richard Freimer 9d98ef575d Port config rewrite (#5378)
Port Config system, Remove some unused code, Refactored various Tier enums out into their own package
2019-04-11 07:18:59 +08:00
Richard Freimer a1e0688af8 Make many more Mekanism fluid renderers Stack aware for NBT purposes (#5360)
* Port 72251446f make many more Mekanism fluid renderers Stack aware for NBT purposes

* Make it a bit easier to see osmium in the compressor

* fix a missed stack color get

* move osmium gas colour back to a more vibrant blue for contrast reasons
2019-04-10 10:12:45 -04:00
Richard Freimer 88eae4f314 Port a couple missed commits (#5376)
* Port d303295da Move all version number references to gradle based

* Port ebb0c467717 dont set main multiblock position to air if its not loaded or not the right tile. Log if its not null but not what we expect

* Fix compile error
2019-04-09 22:39:06 -04:00
Richard Freimer 1e5e853241 Disable some capabilities in missed spots (#5364)
* Don't expose item handler in spots there are never slots accessible.
Change Oredictionificator to be accessible on all sides except the front
2019-04-09 00:38:16 -04:00
Richard Freimer 4ea79c529c Port a7fbfff75 fix energy cubes missing the spinny cube on load/enter-area (#5359) 2019-04-08 13:19:13 -04:00
Richard Freimer a3ae18703b Port factory insertion (#5346)
* Port dfd5252cd and improve factory auto sort performance
* Fix comparing against wrong item causing being unable to insert into factory at all
* Only auto sort into a slot if the recipe output will stack with the current output
* Make factory slot insertion obey changes to checking output items as well
2019-04-08 10:59:29 -06:00
Dave Smith 9456b68529 Introduce bounds to search for sparkles! (#5343)
* Address c368692a3; create upper bound on number of blocks scanned and reduce memory utilization

* Final cleanup on sparkle overhaul; all multiblock structures should now sparkle in < 1ms on average

* Remove timing info; either enable sparkles or the message (not both)
2019-04-07 22:43:17 -04:00
Thiakil 6e3b3fcf56 Change thermal evap controller check to not recurse. Fixes #5334 2019-04-08 10:03:03 +08:00
Aidan 17708ce587 Fix TransporterStack home locations & DM inventory interaction (#5335)
* Fix DM charge slot inventory interaction, fixed TransporterStack home paths

* Added clarification comment to JavaDoc for canBeCharged/Discharged
2019-04-07 19:16:25 -04:00
pupnewfster 41d4db1b4c Port d8fa091c5 dont do distance calculation when teleporting between dimensions 2019-04-05 18:14:14 -07:00
pupnewfster 6a1657eaa6 Fix some desync in data between server and client active states of blocks 2019-04-04 11:23:40 -04:00
Dave Smith 32eccdec9c Rename all Mekanica -> Mekanism 2019-04-03 10:50:13 -07:00
aidancbrady 6a0f8e386d Fix #5329
Check against homeLocation when finding TransporterStack acceptors; also, don't allow inventory insertion/extraction of things in charge slot for Digital Miner
2019-04-02 20:16:11 -04:00
pupnewfster 97421bd7dd Fix dupe bug caused by the offset capabilities 2019-04-02 12:50:14 -07:00
pupnewfster ed9dedd39c Remove a lot of the unchecked cast warnings around capabilities 2019-04-02 12:50:14 -07:00
pupnewfster 66d0bca37c Remove usage of TUBE_CONNECTION_CAPABILITY, in favor of using toggleable capabilities 2019-04-02 12:50:14 -07:00
pupnewfster c9f4a90dba Allow bins to be accessed from all sides 2019-04-02 12:50:14 -07:00
pupnewfster 5cf9551123 Add some JavaDocs to the new Capability Interfaces 2019-04-02 12:50:14 -07:00
pupnewfster 8c102b85c2 Implement isItemValid check for BinItemHandler (only is true for slot 0)
Also have the custom interfaces extend ICapabilityProvider
2019-04-02 12:50:14 -07:00
pupnewfster cf8ef8ad5f Move configuration capability checking from CapabilityUtils to TileEntityComponentConfig 2019-04-02 12:50:14 -07:00
pupnewfster 5822c3ce69 Disable capability for a couple other tiles 2019-04-02 12:50:14 -07:00
pupnewfster 1f5353bd04 Obey the configuration tabs of various machines 2019-04-02 12:50:14 -07:00
pupnewfster b8ae59286e Better handling of if energy should be allowed to connect 2019-04-02 12:50:14 -07:00
pupnewfster b4adb6d5f8 Easier disabling of capabilities, and support for offset capabilities 2019-04-02 12:50:14 -07:00
Dave Smith cf8a92c302 Use per-stack IDs for batch deletes in network protocol (#141)
* Break out the ID from being stored in transporter stack (since they are shared)
* Mark needsSync as private; update comments and cleanup delete loop
* Fix broken packet, and remove the overlap between needsSync and deletes. Also minorly deduped some code
* Turns out needSync for entityEntering is needed (as it is nextID not same ID)
2019-04-02 12:35:45 -07:00
Richard Freimer cbd2aab888 Fixes IC2 complaining about unregistering without registering fixes #146 (#147) 2019-04-01 09:59:29 -06:00
aidancbrady ccaa88a622 Touchups 2019-04-01 02:12:41 -04:00
aidancbrady 2ed0028a93 Utility method for throwing IItemHandler exceptions 2019-03-29 16:25:55 -04:00
aidancbrady c07ecda4de warning fixes, cleanups 2019-03-29 15:46:43 -04:00
Richard Freimer 8c276b6b1a IInventory automation removal (#132)
* Start killing off IInventory
* Write a couple TODO's of things that should eventually use IItemHandler
* Remove unused variable, and add back special case handling for bins
* Update some of the implementations of getSlotsForFace
https://github.com/mekanism-mod/Mekanism/commit/11e9e2df7a2f2b053fcb9371bf496f7aa88a04cd
* Cleanup a bit of implementation around items being valid for a slot
2019-03-29 10:32:11 -06:00
Aidan 934788e0e7 Transit request overhaul (#135)
* Fix a pretty glaring issue in Pos3D equality checks
* TransitRequest/TransitResponse overhaul. Items can now be pulled from multiple slots at once by Logistical Transporter and Logistical Sorter. getTopStacks() is now buildInventoryMap() and is more comprehensive of a total inventory. Note this is entirely untested and may have some issues to work out!
* Cache hash code of HashedItem
* Remove ISidedInventory/IInventory implementations
2019-03-29 08:00:18 -06:00
Dave Smith 987894c63f Reduce idle tick time on DigitalMiner by removing constant refreshing of chunk set 2019-03-28 11:01:58 -06:00
Dave Smith ac371dec01 Logistical Transporter Performance Work (#116)
Introduce a "BATCH" packet that includes all changes for a single tile in one message. Also, removed need for separate sync when a TransporterStack moves from one tile to another. Cumulatively, these changes reduced bandwidth on a busy server from 20Mb/user/sec -> 3 Mb/user/sec.
2019-03-27 22:13:18 -06:00
Dave Smith f6933b662b Overhaul how logistics networks estimate what can fit in the network (#124)
This completely changes the prediction logic when items are inserted into a network. In our testing it works well for every mod, with the occasional issue from Storage Drawers. Their interface for IItemHandler is a little odd and causes problems when they get very full and the network is slow.

* Completely overhaul how prediction of paths is done; use IItemHandler's exclusively
* Add exponential backoff when pulling items, up to 40 ticks
* Cache getSlotLimit; add TODO for investigating why we have a for loop
* Do proper simulation insert when dest slot is empty
* Add better handling of new stacks and break loop once stack is fully used up
2019-03-27 20:18:40 -06:00
temp1011 ff9c32ff6b cleanup stackutils (#127)
* second round of cleanup

* hash stacks in a better way (cherry picked from https://github.com/mekanism-mod/Mekanism/commit/54e80b305726204ffb620d3518f66539a0d7e937)

* add some comments

* rename method for clarity

* don't crash on null registry name
2019-03-27 17:08:36 -04:00
Aidan 426ac05e6b Merge pull request #126 from mekanica/dss-remaster-sounds
Remaster sounds
2019-03-26 23:21:12 -05:00
Dave Smith a392514e16 Remaster sounds to all be -30dBFS; remove per-object sound volume; honor config setting for volume adjustment 2019-03-26 21:48:04 -06:00
temp1011 b511470778 remove unused imports 2019-03-26 14:57:31 +00:00
temp1011 392b7c2ea0 remove and inline methods 2019-03-26 14:50:30 +00:00
Richard Freimer 5a67067f07 Update config to include comments (#108)
* Add comments to configs
* Removed unused options
* Added a few of the newer options mainline Mekanism supports
* Also list the default values in the MekanismConfig class for easier comparision
* Change spacing slightly for tools config in code
* Add some of the missing generator config comments
* Config comments for tiers, and add missing comment for MinerSilkMultiplier
* Config comments for rest of generators module
* Fix which stick to sawdust recipe
* Config comments for tools
* Config comments for armor
* Add warning to DM radius comment, and fix a couple things addressed in PR comments
2019-03-24 14:40:28 -06:00