mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Update
This commit is contained in:
parent
76f5848e08
commit
16a5a2ce06
@ -142,12 +142,12 @@ public class AutoDisenchanter extends AbstractEnchantmentMachine {
|
||||
private boolean isDisenchantable(@Nullable ItemStack item) {
|
||||
if (item == null) {
|
||||
return false;
|
||||
} else if (item.getType() != Material.BOOK) {
|
||||
} else if (item.getType() != Material.BOOK && !hasIgnoredLore(item)) {
|
||||
// ^ This stops endless checks of getByItem for books
|
||||
SlimefunItem sfItem = SlimefunItem.getByItem(item);
|
||||
return sfItem == null || sfItem.isDisenchantable();
|
||||
} else {
|
||||
return !hasIgnoredLore(item);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,12 +121,12 @@ public class AutoEnchanter extends AbstractEnchantmentMachine {
|
||||
private boolean isEnchantable(@Nullable ItemStack item) {
|
||||
if (item == null) {
|
||||
return false;
|
||||
} else if (item.getType() != Material.ENCHANTED_BOOK) {
|
||||
} else if (item.getType() != Material.ENCHANTED_BOOK && !hasIgnoredLore(item)) {
|
||||
// stops endless checks of getByItem for enchanted book stacks.
|
||||
SlimefunItem sfItem = SlimefunItem.getByItem(item);
|
||||
return sfItem == null || sfItem.isEnchantable();
|
||||
} else {
|
||||
return !hasIgnoredLore(item);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user