-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa6f41a
commit eca766d
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 11 additions & 4 deletions
15
src/main/java/redstonetweaks/mixin/server/WaterFluidMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
package redstonetweaks.mixin.server; | ||
|
||
import static redstonetweaks.setting.Settings.waterDelay; | ||
import static redstonetweaks.setting.SettingsManager.*; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
import net.minecraft.fluid.WaterFluid; | ||
import net.minecraft.world.TickPriority; | ||
import redstonetweaks.helper.FluidHelper; | ||
|
||
@Mixin(WaterFluid.class) | ||
public class WaterFluidMixin { | ||
public class WaterFluidMixin implements FluidHelper { | ||
|
||
@ModifyConstant(method = "getTickRate", constant = @Constant(intValue = 5)) | ||
private int getWaterDelay(int oldDelay) { | ||
return waterDelay.get(); | ||
return WATER.get(DELAY); | ||
} | ||
|
||
@Override | ||
public TickPriority getTickPriority() { | ||
return WATER.get(TICK_PRIORITY); | ||
} | ||
} |