cape system (<3 gaba)

This commit is contained in:
NK 2023-05-26 19:16:20 +01:00
parent 570b1d5467
commit 07291c0da9
2 changed files with 1 additions and 2 deletions

View file

@ -2,7 +2,6 @@ package me.night0721.lilase.utils.capes;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import me.night0721.lilase.Lilase; import me.night0721.lilase.Lilase;
import me.night0721.lilase.utils.HWIDUtils;
import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderPlayer; import net.minecraft.client.renderer.entity.RenderPlayer;

View file

@ -11,7 +11,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class CapeManager { public class CapeManager {
@SubscribeEvent @SubscribeEvent
public void onJoin(EntityJoinWorldEvent event) { public void onJoin(EntityJoinWorldEvent event) {
if (event.entity instanceof EntityPlayer) { if (event.entity instanceof EntityPlayer && Lilase.capeDatabase.userHasCape(event.entity.getName())) {
Lilase.mc.gameSettings.setModelPartEnabled(EnumPlayerModelParts.CAPE, true); Lilase.mc.gameSettings.setModelPartEnabled(EnumPlayerModelParts.CAPE, true);
Lilase.mc.getRenderManager().getSkinMap().values().forEach(p -> p.addLayer(new CapeLayer(p))); Lilase.mc.getRenderManager().getSkinMap().values().forEach(p -> p.addLayer(new CapeLayer(p)));
} }