SPIGOT-5362: Suspicious stews fail isSimilar check
Dieser Commit ist enthalten in:
Ursprung
d6b3eddf68
Commit
db98d54df9
@ -223,7 +223,7 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean notUncommon(CraftMetaItem meta) {
|
boolean notUncommon(CraftMetaItem meta) {
|
||||||
return super.notUncommon(meta) && (meta instanceof CraftMetaPotion || isStewEmpty());
|
return super.notUncommon(meta) && (meta instanceof CraftMetaSuspiciousStew || isStewEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -405,6 +405,10 @@ public class ItemMetaTest extends AbstractTestingBase {
|
|||||||
final ItemStack blank = new ItemStack(Material.STONE);
|
final ItemStack blank = new ItemStack(Material.STONE);
|
||||||
final ItemStack craftBlank = CraftItemStack.asCraftCopy(blank);
|
final ItemStack craftBlank = CraftItemStack.asCraftCopy(blank);
|
||||||
|
|
||||||
|
// Check that equality and similarity works for each meta implementation
|
||||||
|
assertThat(name, provider.stack(), is(provider.stack()));
|
||||||
|
assertThat(name, provider.stack().isSimilar(provider.stack()), is(true));
|
||||||
|
|
||||||
downCastTest(name, provider.stack(), blank);
|
downCastTest(name, provider.stack(), blank);
|
||||||
blank.setItemMeta(blank.getItemMeta());
|
blank.setItemMeta(blank.getItemMeta());
|
||||||
downCastTest(name, provider.stack(), blank);
|
downCastTest(name, provider.stack(), blank);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren