Merge pull request #107 from Silent-Client/TEST2

(fix) color tags fix
This commit is contained in:
kirillsaint 2024-03-21 17:14:52 +06:00 committed by GitHub
commit 36762fce8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View File

@ -53,16 +53,16 @@ public class Cosmetics {
public void init(boolean cosmeticInit) {
if(cosmeticInit) {
Client.logger.info("STARTING > cosmeitcs > bandana_model");
Client.logger.info("STARTING > cosmetics > bandana_model");
try {
bandana = new ModelBuffer(new ResourceLocation("silentclient/models/bandana.obj"));
} catch (Exception e) {
e.printStackTrace();
}
Client.logger.info("STARTING > cosmeitcs > default_icon");
Client.logger.info("STARTING > cosmetics > default_icon");
defaultIcon = new StaticResourceLocation("silentclient/icons/player_icon.png");
PlayerResponse.Account.Cosmetics allCosmetics = getAllCosmetics();
Client.logger.info("STARTING > cosmeitcs > capes");
Client.logger.info("STARTING > cosmetics > capes");
capes.clear();
capesShoulders.clear();
@ -73,7 +73,7 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > wings");
Client.logger.info("STARTING > cosmetics > wings");
wings.clear();
if(allCosmetics != null && allCosmetics.getWings() != null) {
allCosmetics.getWings().forEach((wing) -> {
@ -81,7 +81,7 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > bandanas");
Client.logger.info("STARTING > cosmetics > bandanas");
bandanas.clear();
if(allCosmetics != null && allCosmetics.getBandanas() != null) {
allCosmetics.getBandanas().forEach((bandana) -> {
@ -89,14 +89,14 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > hats");
Client.logger.info("STARTING > cosmetics > hats");
hats.clear();
if(allCosmetics != null && allCosmetics.getHats() != null) {
allCosmetics.getHats().forEach((hat) -> {
hats.put(hat.getId(), new HatData(new AnimatedResourceLocation("silentclient/cosmetics/hats/"+hat.getId(), hat.getFrames(), hat.getFrameDelay(), false, hat.getId() == Client.getInstance().getAccount().getSelectedHat()), hat.getModel()));
if(!hatModels.containsKey(hat.getModel())) {
try {
Client.logger.info("STARTING > cosmeitcs > hats > model > " + hat.getModel());
Client.logger.info("STARTING > cosmetics > hats > model > " + hat.getModel());
ModelBuffer model = new ModelBuffer(new ResourceLocation("silentclient/models/"+ hat.getModel() + ".obj"));
if(model != null) {
hatModels.put(hat.getModel(), model);
@ -107,14 +107,14 @@ public class Cosmetics {
}
});
}
Client.logger.info("STARTING > cosmeitcs > shields");
Client.logger.info("STARTING > cosmetics > shields");
shields.clear();
if(allCosmetics != null && allCosmetics.getShields() != null) {
allCosmetics.getShields().forEach((shield) -> {
shields.put(shield.getId(), new ShieldData(new AnimatedResourceLocation("silentclient/cosmetics/shields/"+shield.getId(), shield.getFrames(), shield.getFrameDelay(), false, shield.getId() == Client.getInstance().getAccount().getSelectedShield()), shield.getModel()));
if(!hatModels.containsKey(shield.getModel())) {
try {
Client.logger.info("STARTING > cosmeitcs > shields > model > " + shield.getModel());
Client.logger.info("STARTING > cosmetics > shields > model > " + shield.getModel());
ModelBuffer model = new ModelBuffer(new ResourceLocation("silentclient/models/"+ shield.getModel() + ".obj"));
if(model != null) {
shieldModels.put(shield.getModel(), model);
@ -126,7 +126,7 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > icons");
Client.logger.info("STARTING > cosmetics > icons");
icons.clear();
if(allCosmetics != null && allCosmetics.getIcons() != null) {
allCosmetics.getIcons().forEach((icon) -> {
@ -134,7 +134,7 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > emotes");
Client.logger.info("STARTING > cosmetics > emotes");
emotes.clear();
if(allCosmetics != null && allCosmetics.getEmotes() != null) {
allCosmetics.getEmotes().forEach((emote) -> {
@ -142,7 +142,7 @@ public class Cosmetics {
});
}
Client.logger.info("STARTING > cosmeitcs > outfits");
Client.logger.info("STARTING > cosmetics > outfits");
Outfits.loadOutfits();
}

View File

@ -55,7 +55,7 @@ public abstract class RenderPlayerMixin extends RendererLivingEntity<AbstractCli
}
if(nametagMessages) {
renderLivingLabel(entityIn, "§r" + ((AbstractClientPlayerExt) entityIn).silent$getAccount().getNametagMessage() + "§r", x, y + ((double) ((float) getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * p_177069_9_)), z, 64);
renderLivingLabel(entityIn, "§r" + ((AbstractClientPlayerExt) entityIn).silent$getAccount().getNametagMessage().replaceAll("&", "§") + "§r", x, y + ((double) ((float) getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * p_177069_9_)), z, 64);
}
}