Merge pull request #2178 from StephenBarnes/mc1.16/dev

Add config option for windmill sails per RPM
This commit is contained in:
simibubi 2021-09-13 17:46:11 +02:00 committed by GitHub
commit 86b0d80c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
import java.util.List;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.AllIcons;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.INamedIconOptions;
@ -41,7 +42,8 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity {
return 0;
if (movedContraption == null)
return lastGeneratedSpeed;
int sails = ((BearingContraption) movedContraption.getContraption()).getSailBlocks() / 8;
int sails = ((BearingContraption) movedContraption.getContraption()).getSailBlocks()
/ AllConfigs.SERVER.kinetics.windmillSailsPerRPM.get();
return MathHelper.clamp(sails, 1, 16) * getAngleSpeedDirection();
}

View file

@ -18,6 +18,7 @@ public class CKinetics extends ConfigBase {
i(60, 5, "kineticValidationFrequency", Comments.kineticValidationFrequency);
public ConfigFloat crankHungerMultiplier = f(.01f, 0, 1, "crankHungerMultiplier", Comments.crankHungerMultiplier);
public ConfigInt minimumWindmillSails = i(8, 0, "minimumWindmillSails", Comments.minimumWindmillSails);
public ConfigInt windmillSailsPerRPM = i(8, 1, "windmillSailsPerRPM", Comments.windmillSailsPerRPM);
public ConfigInt maxEjectorDistance = i(32, 0, "maxEjectorDistance", Comments.maxEjectorDistance);
public ConfigInt ejectorScanInterval = i(120, 10, "ejectorScanInterval", Comments.ejectorScanInterval);
@ -93,6 +94,7 @@ public class CKinetics extends ConfigBase {
"Game ticks between Kinetic Blocks checking whether their source is still valid.";
static String minimumWindmillSails =
"Amount of sail-type blocks required for a windmill to assemble successfully.";
static String windmillSailsPerRPM = "Number of sail-type blocks required to increase windmill speed by 1RPM.";
static String maxEjectorDistance = "Max Distance in blocks a Weighted Ejector can throw";
static String ejectorScanInterval =
"Time in ticks until the next item launched by an ejector scans blocks for potential collisions";