Skip to content

Commit 554e000

Browse files
authored
Merge pull request #2 from lunaynx/fix/lore-update
fix: ignore lore updates
2 parents 1e0730f + 9a1cb1d commit 554e000

File tree

1 file changed

+4
-3
lines changed
  • src/main/java/hsm/hotshirtlessmen

1 file changed

+4
-3
lines changed

src/main/java/hsm/hotshirtlessmen/HSM.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ public void onInitialize() {
2525
public static boolean compareComponents(ComponentMap component1, ComponentMap component2) {
2626
// bit flags:
2727
// 1st digit -> if any other tag was different
28-
// 2nd digit -> DAMAGE
28+
// 2nd digit -> DAMAGE or LORE
2929
// 3rd digit -> CUSTOM_DATA
3030
byte x = 0;
3131

3232
for (Component<?> i : component1) {
3333
for (Component<?> j : component2) {
3434
if (i.type() == j.type()) {
3535
if (!Objects.equals(i.value().toString(), j.value().toString())) {
36-
if (i.type().toString().equals("minecraft:damage")) {
36+
String tagName = i.type().toString();
37+
if (tagName.equals("minecraft:damage") || tagName.equals("minecraft:lore")) {
3738
x |= 2;
38-
} else if (i.type().toString().equals("minecraft:custom_data")) {
39+
} else if (tagName.equals("minecraft:custom_data")) {
3940
//HSM.LOGGER.info(i.value().toString());
4041
//HSM.LOGGER.info(j.value().toString());
4142
x |= (byte) (compareUUIDs(i.value().toString(),j.value().toString()) ? 4 : 0);

0 commit comments

Comments
 (0)