init
This commit is contained in:
commit
8084ac50b3
1629 changed files with 238620 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* This file is part of the Combatant Client distribution.
|
||||
* Copyright (c) 2026 pivosos2007.
|
||||
*
|
||||
* Licensed under the GNU General Public License v3.0.
|
||||
*/
|
||||
|
||||
package dev.loki.lovisual.mixins;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import dev.loki.lovisual.util.player.EnvironmentMovementController;
|
||||
|
||||
@Mixin(Block.class)
|
||||
public abstract class BlockMixin {
|
||||
|
||||
@Inject(
|
||||
method = "getFriction",
|
||||
at = @At("HEAD"),
|
||||
cancellable = true
|
||||
)
|
||||
private void nostun$overrideSlipperiness(CallbackInfoReturnable<Float> cir) {
|
||||
Float override = EnvironmentMovementController.getSlipperinessOverride((Block) (Object) this);
|
||||
if (override != null) {
|
||||
cir.setReturnValue(override);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(
|
||||
method = "getSpeedFactor",
|
||||
at = @At("HEAD"),
|
||||
cancellable = true
|
||||
)
|
||||
private void nostun$overrideVelocityMultiplier(CallbackInfoReturnable<Float> cir) {
|
||||
Float override = EnvironmentMovementController.getVelocityMultiplierOverride((Block) (Object) this);
|
||||
if (override != null) {
|
||||
cir.setReturnValue(override);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue