Richard Freimer b3663a37a9 Emitting logic overhaul (#5422)
* 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
2019-04-30 10:25:23 -04:00
2019-03-09 22:44:57 -07:00
2017-06-15 15:01:45 +02:00
2019-04-30 10:25:23 -04:00
2017-10-01 21:30:21 -04:00
2017-06-03 16:48:01 +02:00
2019-04-12 10:53:06 +08:00
2019-04-20 10:52:21 -04:00
2019-04-03 11:17:48 -07:00

Build Status

Mekanism for Minecraft 1.12

Mekanism is a Minecraft add-on featuring high-tech machinery that can be used to create powerful tools, armor, and weapons. You can find more detail on the features at the Official Website. Mekanism is an independent tech mod that brings low, mid, and high tier machinery to Minecraft. The mod doesn't have an actual goal, and you'll understand this when you see all the random content Mekanism contains, from jetpacks to balloons. However, I can assure you that you'll notice all the content blend together as you get to know the mod better!

Mekanism uses a tier-based system when organizing several of its core features, including Energy Cubes and Factories. There are four tiers: basic, the simplest tier, advanced, the second-most basic tier, elite, the second-most complex tier, and ultimate, the most complex tier. You can upgrade tiers by placing the component in a crafting grid and surrounding it with the necessary resources for the next upgrade.

By the time you've been using Mekanism for a while, you'll have a near-instructible suit of Obsidian Armor, be obtaining four ingots for each ore you mine, have the ability to fly wherever you want with the hydrogen-powered jetpacks, and have a cute robotic friend following you around while you mine. :)

Discord

Mekanism has a discord where you can come chat with other Mekanism users and the developers. Join us!

License

Mekanism is under the MIT license. You may use it in modpacks, reviews or any other form as long as you abide by the terms below.

Copyright 2017 Aidan C. Brady

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

  • aidancbrady
  • thommy101
  • thiakil
  • pupnewfster
  • dizzyd
  • unpairedbracket
  • CyanideX (artwork)
  • Cheapshot (artwork)
  • Archadia (artwork)
  • micdoodle
  • Bluexin
  • JaSpr

YourKit

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler and YourKit YouMonitor. Mekanism uses YourKit for all our profiling needs!

S
Description
Pull mirror of github.com/Thorfusion/Mekanism-Community-Edition (submodule source for TDLM/Mekanism-Community-Edition)
Readme
98 MiB
0 Stars 1 Watchers 0 Forks
Languages
Java 99.9%
Shell 0.1%