mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Merge pull request #3298 from TBiscuit1/mc1.18/dev
Fixed kinetic blocks able to surpass the rpm limit
This commit is contained in:
commit
b1a5bf7744
1 changed files with 10 additions and 7 deletions
|
@ -234,7 +234,10 @@ public class RotationPropagator {
|
||||||
boolean incompatible =
|
boolean incompatible =
|
||||||
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
|
Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0);
|
||||||
|
|
||||||
boolean tooFast = Math.abs(newSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get();
|
boolean tooFast = Math.abs(newSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get()
|
||||||
|
|| Math.abs(oppositeSpeed) > AllConfigs.SERVER.kinetics.maxRotationSpeed.get();
|
||||||
|
// Check for both the new speed and the opposite speed, just in case
|
||||||
|
|
||||||
boolean speedChangedTooOften = currentTE.getFlickerScore() > MAX_FLICKER_SCORE;
|
boolean speedChangedTooOften = currentTE.getFlickerScore() > MAX_FLICKER_SCORE;
|
||||||
if (tooFast || speedChangedTooOften) {
|
if (tooFast || speedChangedTooOften) {
|
||||||
world.destroyBlock(pos, true);
|
world.destroyBlock(pos, true);
|
||||||
|
|
Loading…
Reference in a new issue