forked from lambda-client/lambda-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMixinBlock.java
More file actions
19 lines (17 loc) · 736 Bytes
/
MixinBlock.java
File metadata and controls
19 lines (17 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.lambda.mixin.world;
import com.lambda.client.module.modules.render.Xray;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
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;
@Mixin(Block.class)
public class MixinBlock {
@Inject(method = "getLightValue(Lnet/minecraft/block/state/IBlockState;)I", at = @At("HEAD"), cancellable = true)
public void getLightValue(IBlockState state, CallbackInfoReturnable<Integer> cir) {
if (Xray.INSTANCE.isEnabled()) {
cir.setReturnValue(15);
}
}
}