mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-20 07:29:17 +00:00
禁止不可附魔的物品被附魔书附魔
This commit is contained in:
@@ -284,6 +284,10 @@ public class RecipeEventListener implements Listener {
|
|||||||
}
|
}
|
||||||
// 如果第二个物品是附魔书,那么忽略
|
// 如果第二个物品是附魔书,那么忽略
|
||||||
if (wrappedSecond.vanillaId().equals(ItemKeys.ENCHANTED_BOOK)) {
|
if (wrappedSecond.vanillaId().equals(ItemKeys.ENCHANTED_BOOK)) {
|
||||||
|
// 禁止不可附魔的物品被附魔书附魔
|
||||||
|
if (firstCustom.isPresent() && !firstCustom.get().settings().canEnchant()) {
|
||||||
|
event.setResult(null);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=0.0.62.3
|
project_version=0.0.62.4
|
||||||
config_version=45
|
config_version=45
|
||||||
lang_version=25
|
lang_version=25
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|||||||
Reference in New Issue
Block a user