Merge pull request #106 from Silent-Client/TEST2

(fix) color tags fix
This commit is contained in:
kirillsaint 2024-03-21 17:14:35 +06:00 committed by GitHub
commit 2e15946a56
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) { public void init(boolean cosmeticInit) {
if(cosmeticInit) { if(cosmeticInit) {
Client.logger.info("STARTING > cosmeitcs > bandana_model"); Client.logger.info("STARTING > cosmetics > bandana_model");
try { try {
bandana = new ModelBuffer(new ResourceLocation("silentclient/models/bandana.obj")); bandana = new ModelBuffer(new ResourceLocation("silentclient/models/bandana.obj"));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
Client.logger.info("STARTING > cosmeitcs > default_icon"); Client.logger.info("STARTING > cosmetics > default_icon");
defaultIcon = new StaticResourceLocation("silentclient/icons/player_icon.png"); defaultIcon = new StaticResourceLocation("silentclient/icons/player_icon.png");
PlayerResponse.Account.Cosmetics allCosmetics = getAllCosmetics(); PlayerResponse.Account.Cosmetics allCosmetics = getAllCosmetics();
Client.logger.info("STARTING > cosmeitcs > capes"); Client.logger.info("STARTING > cosmetics > capes");
capes.clear(); capes.clear();
capesShoulders.clear(); capesShoulders.clear();
@ -73,7 +73,7 @@ public class Cosmetics {
}); });
} }
Client.logger.info("STARTING > cosmeitcs > wings"); Client.logger.info("STARTING > cosmetics > wings");
wings.clear(); wings.clear();
if(allCosmetics != null && allCosmetics.getWings() != null) { if(allCosmetics != null && allCosmetics.getWings() != null) {
allCosmetics.getWings().forEach((wing) -> { 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(); bandanas.clear();
if(allCosmetics != null && allCosmetics.getBandanas() != null) { if(allCosmetics != null && allCosmetics.getBandanas() != null) {
allCosmetics.getBandanas().forEach((bandana) -> { 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(); hats.clear();
if(allCosmetics != null && allCosmetics.getHats() != null) { if(allCosmetics != null && allCosmetics.getHats() != null) {
allCosmetics.getHats().forEach((hat) -> { 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())); 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())) { if(!hatModels.containsKey(hat.getModel())) {
try { 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")); ModelBuffer model = new ModelBuffer(new ResourceLocation("silentclient/models/"+ hat.getModel() + ".obj"));
if(model != null) { if(model != null) {
hatModels.put(hat.getModel(), model); 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(); shields.clear();
if(allCosmetics != null && allCosmetics.getShields() != null) { if(allCosmetics != null && allCosmetics.getShields() != null) {
allCosmetics.getShields().forEach((shield) -> { 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())); 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())) { if(!hatModels.containsKey(shield.getModel())) {
try { 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")); ModelBuffer model = new ModelBuffer(new ResourceLocation("silentclient/models/"+ shield.getModel() + ".obj"));
if(model != null) { if(model != null) {
shieldModels.put(shield.getModel(), model); 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(); icons.clear();
if(allCosmetics != null && allCosmetics.getIcons() != null) { if(allCosmetics != null && allCosmetics.getIcons() != null) {
allCosmetics.getIcons().forEach((icon) -> { 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(); emotes.clear();
if(allCosmetics != null && allCosmetics.getEmotes() != null) { if(allCosmetics != null && allCosmetics.getEmotes() != null) {
allCosmetics.getEmotes().forEach((emote) -> { 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(); Outfits.loadOutfits();
} }

View File

@ -55,7 +55,7 @@ public abstract class RenderPlayerMixin extends RendererLivingEntity<AbstractCli
} }
if(nametagMessages) { 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);
} }
} }