inventive uses of attributes
This commit is contained in:
parent
6cd03fab06
commit
507ed6b7e5
7 changed files with 87 additions and 28 deletions
|
@ -0,0 +1,21 @@
|
|||
package me.kawaiizenbo.moonlight.mixin;
|
||||
|
||||
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 me.kawaiizenbo.moonlight.module.ModuleManager;
|
||||
import net.minecraft.block.PowderSnowBlock;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@Mixin(PowderSnowBlock.class)
|
||||
public class PowderSnowBlockMixin
|
||||
{
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "canWalkOnPowderSnow", cancellable = true)
|
||||
private static void canWalkOnPowderSnow(Entity entity, CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
if (ModuleManager.INSTANCE.getModuleByName("Anti Powder Snow").enabled) cir.setReturnValue(true);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue