Skip to content

Commit

Permalink
Change Waterwheel Behavior & Model (#5954)
Browse files Browse the repository at this point in the history
* First steps towards waterwheel torque calcs

* Update waterwheels to have proper restrictions
 - Serverconfig kinetic multiplier is now 1.0 by default, other values updated
 - Source blocks are now a large drag on waterwheels
 - Waterwheels gain more speed when water is flowing directly along them
 - Higher levels of water give waterwheels more torque

* Make snow no longer place on waterwheels correctly

* Bounds mixin!

* Update waterwheel model to go along with new behavior

* Update waterwheel model

* Fix decision to unilaterally change config, make change softer

* Fix mixin formatting slightly

* Fix resistance modifier calculations
 - Resistance torque is now capped at -0.9x of power torque
 - Resistance torque now does not calculate if there is no torque to start

* Fix spin direction not reversing properly

 - Documented several methods to explain their reasons for naming/being
 - Waterwheels now properly rotate in the water flow direction
  • Loading branch information
voidsong-dragonfly committed Jun 17, 2024
1 parent a373f0f commit e300ff2
Show file tree
Hide file tree
Showing 13 changed files with 1,072 additions and 408 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ protected void addTags(Provider p_256380_)
.add(StoneDecoration.CONCRETE_REINFORCED_TILE.get())
.add(IEBlocks.TO_SLAB.get(StoneDecoration.CONCRETE_REINFORCED_TILE.getId()).get())
.add(MetalDecoration.REINFORCED_WINDOW.get());
tag(BlockTags.SNOW_LAYER_CANNOT_SURVIVE_ON)
.add(WoodenDevices.WATERMILL.get())
.add(WoodenDevices.WINDMILL.get());
//Add parity tags to gravel & sand for IE similar blocks
tag(BlockTags.BAMBOO_PLANTABLE_ON)
.add(StoneDecoration.SLAG_GRAVEL.get())
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ private class RotationAcceptor implements IRotationAcceptor
@Override
public void inputRotation(double rotation)
{
int output = (int)(IEServerConfig.MACHINES.dynamo_output.get()*rotation);
// TODO: Make this divisor one on next major (1.21?) update, whenever IEServerConfig mult is updated
int output = (int)((IEServerConfig.MACHINES.dynamo_output.get()/3f)*rotation);
for(IEBlockCapabilityCache<IEnergyStorage> neighbor : neighbors.values())
{
IEnergyStorage capOnSide = neighbor.getCapability();
Expand Down
Loading

0 comments on commit e300ff2

Please sign in to comment.