Allow llamas to be steered (EntitySpeed)

Closes #54
This commit is contained in:
zeroeightsix 2018-10-15 22:20:32 +02:00
parent e736bc4442
commit 32abd567dd
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,21 @@
package me.zeroeightsix.kami.mixin.client;
import me.zeroeightsix.kami.module.ModuleManager;
import net.minecraft.entity.passive.EntityLlama;
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;
/**
* Created by 086 on 15/10/2018.
*/
@Mixin(EntityLlama.class)
public class MixinEntityLlama {
@Inject(method = "canBeSteered", at = @At("RETURN"), cancellable = true)
public void canBeSteered(CallbackInfoReturnable<Boolean> returnable) {
if (ModuleManager.isModuleEnabled("EntitySpeed")) returnable.setReturnValue(true);
}
}

View File

@ -21,6 +21,7 @@
"MixinC00Handshake",
"MixinNetHandlerPlayClient",
"MixinRenderLiving",
"MixinPlayerControllerMP"
"MixinPlayerControllerMP",
"MixinEntityLlama"
]
}