This commit is contained in:
Bella 2019-12-28 09:26:09 -05:00
parent 4c26c3d885
commit 7957b79edc
3 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,41 @@
package me.zeroeightsix.kami.mixin.client;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.module.modules.bewwawho.gui.ArmourHide;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.layers.LayerBipedArmor;
import net.minecraft.inventory.EntityEquipmentSlot;
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;
/***
* @author TBM, Darki
*/
@Mixin(LayerBipedArmor.class)
public class MixinLayerBipedArmor {
@Inject(method = "setModelSlotVisible", at = @At(value = "HEAD"), cancellable = true)
protected void setModelSlotVisible(ModelBiped model, EntityEquipmentSlot slotIn, CallbackInfo info) {
if (ModuleManager.isModuleEnabled("ArmourHide")) {
info.cancel();
switch (slotIn) {
case HEAD:
model.bipedHead.showModel = false;
model.bipedHeadwear.showModel = false;
case CHEST:
model.bipedBody.showModel = false;
model.bipedRightArm.showModel = false;
model.bipedLeftArm.showModel = false;
case LEGS:
model.bipedBody.showModel = false;
model.bipedRightLeg.showModel = false;
model.bipedLeftLeg.showModel = false;
case FEET:
model.bipedRightLeg.showModel = false;
model.bipedLeftLeg.showModel = false;
}
}
}
}

View File

@ -0,0 +1,7 @@
package me.zeroeightsix.kami.module.modules.bewwawho.gui;
import me.zeroeightsix.kami.module.Module;
@Module.Info(name = "ArmourHide", category = Module.Category.GUI, description = "Hides entity armour", showOnArray = Module.ShowOnArray.OFF)
public class ArmourHide extends Module{
}

View File

@ -24,6 +24,7 @@
"MixinRenderPlayer",
"MixinStateImplementation",
"MixinAbstractClientPlayer",
"MixinGuiNewChat"
"MixinGuiNewChat",
"MixinLayerBipedArmor"
]
}