blob: 28342c9470fe91c1239ae546f799d9bb856a293b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package com.keuin.ohmyvanillamc.mixin;
import com.keuin.ohmyvanillamc.OhMyVanillaMinecraft;
import net.minecraft.entity.passive.SchoolingFishEntity;
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.CallbackInfo;
@Mixin(SchoolingFishEntity.class)
public class DisableFishSchooling {
/**
* @reason To disable SchoolingFish schooling.
* @author trueKeuin
*/
@Inject(method = "moveTowardLeader()V", at = @At("HEAD"))
protected void moveTowardLeader(CallbackInfo ci) {
if (OhMyVanillaMinecraft.disableFishSchooling)
ci.cancel();
}
}
|