Skip to content

Commit

Permalink
Update WaterFluidMixin.java
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS authored Aug 25, 2020
1 parent fa6f41a commit eca766d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/main/java/redstonetweaks/mixin/server/WaterFluidMixin.java
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);
}
}

0 comments on commit eca766d

Please sign in to comment.