Compare rose type durability for pre-1.13 servers, fixes #1286

This commit is contained in:
PikaMug 2020-06-26 04:48:48 -04:00
parent 5acea3d213
commit b3aa22e8ab

View File

@ -1309,6 +1309,11 @@ public class Quester {
// Age is unspecified so ignore durability
broken = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
broken = is;
}
} else {
// Blocks are not solid so ignore durability
broken = is;
@ -1335,6 +1340,11 @@ public class Quester {
// Age is unspecified so ignore durability
toBreak = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
toBreak = is;
}
} else {
// Blocks are not solid so ignore durability
toBreak = is;
@ -1386,6 +1396,11 @@ public class Quester {
// Ignore durability for 1.13+
damaged = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
damaged = is;
}
} else {
// Blocks are not solid so ignore durability
damaged = is;
@ -1402,6 +1417,11 @@ public class Quester {
// Ignore durability for 1.13+
toDamage = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
toDamage = is;
}
} else {
// Blocks are not solid so ignore durability
toDamage = is;
@ -1453,6 +1473,11 @@ public class Quester {
// Ignore durability for 1.13+
placed = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
placed = is;
}
} else {
// Blocks are not solid so ignore durability
placed = is;
@ -1469,6 +1494,11 @@ public class Quester {
// Ignore durability for 1.13+
toPlace = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
toPlace = is;
}
} else {
// Blocks are not solid so ignore durability
toPlace = is;
@ -1520,6 +1550,11 @@ public class Quester {
// Ignore durability for 1.13+
used = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
used = is;
}
} else {
// Blocks are not solid so ignore durability
used = is;
@ -1536,6 +1571,11 @@ public class Quester {
// Ignore durability for 1.13+
toUse = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
toUse = is;
}
} else {
// Blocks are not solid, so ignore durability
toUse = is;
@ -1587,6 +1627,11 @@ public class Quester {
// Ignore durability for 1.13+
cut = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
cut = is;
}
} else {
// Blocks are not solid so ignore durability
cut = is;
@ -1603,6 +1648,11 @@ public class Quester {
// Ignore durability for 1.13+
toCut = is;
}
} else if (m.getType().name().equals("RED_ROSE")) {
// Flowers are unique so check for durability
if (m.getDurability() == is.getDurability()) {
toCut = is;
}
} else {
// Blocks are not solid so ignore durability
toCut = is;