diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IAttackTask.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IAttackTask.java
index 8deac5d97..162ec4eb5 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IAttackTask.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IAttackTask.java
@@ -5,10 +5,6 @@
import com.github.tartaricacid.touhoulittlemaid.entity.misc.DefaultMonsterType;
import com.github.tartaricacid.touhoulittlemaid.entity.misc.MonsterType;
import com.github.tartaricacid.touhoulittlemaid.entity.passive.EntityMaid;
-import com.github.tartaricacid.touhoulittlemaid.init.InitItems;
-import com.github.tartaricacid.touhoulittlemaid.item.ItemMonsterList;
-import net.minecraft.nbt.CompoundTag;
-import net.minecraft.nbt.Tag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
@@ -16,7 +12,6 @@
import net.minecraft.world.entity.ai.memory.MemoryModuleType;
import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.item.ItemStack;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.Optional;
@@ -62,19 +57,11 @@ default boolean canAttack(EntityMaid maid, LivingEntity target) {
return false;
}
- // 获取女仆副手是否有妖怪名单
- ItemStack offhandItem = maid.getOffhandItem();
- if (offhandItem.is(InitItems.MONSTER_LIST.get())) {
- CompoundTag monsterList = ItemMonsterList.getMonsterList(offhandItem);
- if (monsterList.contains(id, Tag.TAG_INT)) {
- int index = monsterList.getInt(id);
- MonsterType monsterType = MonsterType.getTypeByIndex(index);
- return DefaultMonsterType.canAttack(maid, target, monsterType);
- }
- }
+ // TODO 获取女仆 Task Data
+
// 那如果没有呢?走默认配置
- MonsterType monsterType = DefaultMonsterType.getMonsterType(target.getType());
+ MonsterType monsterType = DefaultMonsterType.getMonsterType(target);
return DefaultMonsterType.canAttack(maid, target, monsterType);
}
@@ -85,4 +72,9 @@ default boolean hasExtraAttack(EntityMaid maid, Entity target) {
default boolean doExtraAttack(EntityMaid maid, Entity target) {
return false;
}
+
+ @Override
+ default boolean enablePanic(EntityMaid maid) {
+ return false;
+ }
}
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IMaidTask.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IMaidTask.java
index 69b7d8a59..3f83283ce 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IMaidTask.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/task/IMaidTask.java
@@ -78,12 +78,24 @@ default boolean isEnable(EntityMaid maid) {
* 但是有些需要专心致志的工作模式,这样做反而会带来问题。将其设置为 false 就能禁止这种情况
*
* @param maid 女仆对象
- * @return 禁用四处张望和随机走动 AI
+ * @return 是否禁用四处张望和随机走动 AI
*/
default boolean enableLookAndRandomWalk(EntityMaid maid) {
return true;
}
+ /**
+ * 是否启用慌乱 AI,默认情况下女仆受伤后会乱跑
+ *
+ * 但是处于攻击模式或者灭火模式时不应当启用
+ *
+ * @param maid 女仆对象
+ * @return 是否禁用慌乱 AI
+ */
+ default boolean enablePanic(EntityMaid maid) {
+ return true;
+ }
+
/**
* 获取任务启用的条件提示文本
*
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/gui/item/MonsterListScreen.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/gui/item/MonsterListScreen.java
deleted file mode 100644
index 5830c0aa4..000000000
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/client/gui/item/MonsterListScreen.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package com.github.tartaricacid.touhoulittlemaid.client.gui.item;
-
-import com.github.tartaricacid.touhoulittlemaid.client.gui.widget.button.FlatColorButton;
-import com.github.tartaricacid.touhoulittlemaid.entity.misc.DefaultMonsterType;
-import com.github.tartaricacid.touhoulittlemaid.entity.misc.MonsterType;
-import com.github.tartaricacid.touhoulittlemaid.network.NetworkHandler;
-import com.github.tartaricacid.touhoulittlemaid.network.message.SetMonsterListMessage;
-import com.google.common.collect.Maps;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiGraphics;
-import net.minecraft.client.gui.screens.Screen;
-import net.minecraft.network.chat.CommonComponents;
-import net.minecraft.network.chat.Component;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.item.ItemStack;
-import net.minecraftforge.registries.ForgeRegistries;
-
-import java.util.List;
-import java.util.Map;
-
-public class MonsterListScreen extends Screen {
- private static final int PER_MAX_COUNT = 10;
-
- private final Map, MonsterType> monsterList;
- private final List> monsterListIndex;
-
- private int page = 0;
- private int posX;
- private int posY;
-
- public MonsterListScreen(ItemStack stack) {
- super(Component.literal("Monster List Screen"));
- this.monsterList = DefaultMonsterType.getMonsterList(stack, Minecraft.getInstance().level);
- this.monsterListIndex = this.monsterList.keySet().stream().toList();
- }
-
- @Override
- protected void init() {
- this.clearWidgets();
-
- this.posX = this.width / 2;
- this.posY = this.height / 2;
-
- int startY = posY - 16 * PER_MAX_COUNT / 2 - 8;
- int size = this.monsterListIndex.size();
- for (int i = 0; i < PER_MAX_COUNT; i++) {
- final int index = page * PER_MAX_COUNT + i;
- if (index >= size) {
- break;
- }
-
- EntityType> entityType = this.monsterListIndex.get(index);
- MonsterType monsterType = this.monsterList.get(entityType);
- Component text = monsterType.getComponent()
- .copy()
- .append(CommonComponents.SPACE)
- .append(entityType.getDescription());
-
- FlatColorButton button = new FlatColorButton(posX - 100, startY, 200, 14, text, b -> {
- MonsterType next = monsterType.getNext();
- this.monsterList.put(entityType, next);
- this.init();
- });
-
- this.addRenderableWidget(button);
- startY += 16;
- }
-
- startY = posY + 16 * PER_MAX_COUNT / 2 - 8;
- this.addRenderableWidget(new FlatColorButton(posX - 100, startY, 28, 14, Component.literal("<"), b -> {
- if (this.page > 0) {
- this.page--;
- this.init();
- }
- }));
-
- this.addRenderableWidget(new FlatColorButton(posX + 100 - 28, startY, 28, 14, Component.literal(">"), b -> {
- int nextStartIndex = (this.page + 1) * PER_MAX_COUNT;
- if (nextStartIndex < this.monsterListIndex.size()) {
- this.page++;
- this.init();
- }
- }));
- }
-
- @Override
- public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) {
- this.renderBackground(graphics);
- super.render(graphics, mouseX, mouseY, partialTick);
-
- String pageText = String.format("%d/%d", page + 1, this.monsterListIndex.size() / PER_MAX_COUNT + 1);
- int startY = posY + 16 * PER_MAX_COUNT / 2 - 5;
- graphics.drawCenteredString(font, pageText, this.posX, startY, 0xFFFFFF);
- }
-
- @Override
- public void onClose() {
- Map monsterListOutput = Maps.newHashMap();
- this.monsterList.forEach((type, monsterType) -> {
- ResourceLocation key = ForgeRegistries.ENTITY_TYPES.getKey(type);
- monsterListOutput.put(key, monsterType);
- });
- NetworkHandler.CHANNEL.sendToServer(new SetMonsterListMessage(monsterListOutput));
- super.onClose();
- }
-
- @Override
- public boolean isPauseScreen() {
- return false;
- }
-}
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidClearHurtTask.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidClearHurtTask.java
index a69c553e6..144ebe8b6 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidClearHurtTask.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidClearHurtTask.java
@@ -14,7 +14,7 @@ public MaidClearHurtTask() {
@Override
protected void start(ServerLevel worldIn, EntityMaid maid, long gameTimeIn) {
boolean hurtOrHostile = MaidPanicTask.isHurt(maid) || MaidPanicTask.hasHostile(maid);
- if (MaidPanicTask.isAttack(maid) || !hurtOrHostile) {
+ if (!MaidPanicTask.canPanic(maid) || !hurtOrHostile) {
maid.getBrain().eraseMemory(MemoryModuleType.HURT_BY);
maid.getBrain().eraseMemory(MemoryModuleType.HURT_BY_ENTITY);
MaidUpdateActivityFromSchedule.updateActivityFromSchedule(maid);
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidPanicTask.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidPanicTask.java
index 61fa305c6..0b038830f 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidPanicTask.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/ai/brain/task/MaidPanicTask.java
@@ -1,6 +1,5 @@
package com.github.tartaricacid.touhoulittlemaid.entity.ai.brain.task;
-import com.github.tartaricacid.touhoulittlemaid.api.task.IAttackTask;
import com.github.tartaricacid.touhoulittlemaid.entity.passive.EntityMaid;
import com.google.common.collect.ImmutableMap;
import net.minecraft.server.level.ServerLevel;
@@ -24,14 +23,14 @@ public static boolean isHurt(EntityMaid maid) {
return maid.getBrain().hasMemoryValue(MemoryModuleType.HURT_BY);
}
- public static boolean isAttack(EntityMaid maid) {
- return maid.getTask() instanceof IAttackTask;
+ public static boolean canPanic(EntityMaid maid) {
+ return maid.getTask().enablePanic(maid);
}
@Override
protected void start(ServerLevel worldIn, EntityMaid maid, long gameTimeIn) {
boolean hurtOrHostile = isHurt(maid) || hasHostile(maid);
- if (!isAttack(maid) && hurtOrHostile) {
+ if (canPanic(maid) && hurtOrHostile) {
Brain> brain = maid.getBrain();
if (!brain.isActive(Activity.PANIC)) {
brain.eraseMemory(MemoryModuleType.PATH);
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/misc/DefaultMonsterType.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/misc/DefaultMonsterType.java
index bef33d1e7..f204dafa5 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/misc/DefaultMonsterType.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/misc/DefaultMonsterType.java
@@ -1,91 +1,26 @@
package com.github.tartaricacid.touhoulittlemaid.entity.misc;
-import com.github.tartaricacid.touhoulittlemaid.entity.item.AbstractEntityFromItem;
import com.github.tartaricacid.touhoulittlemaid.entity.passive.EntityMaid;
-import com.github.tartaricacid.touhoulittlemaid.init.InitItems;
-import com.github.tartaricacid.touhoulittlemaid.item.ItemMonsterList;
-import com.google.common.collect.Maps;
-import net.minecraft.nbt.CompoundTag;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.TamableAnimal;
-import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.entity.monster.Enemy;
import net.minecraft.world.entity.npc.Npc;
import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.level.Level;
-import net.minecraftforge.registries.ForgeRegistries;
-
-import javax.annotation.Nullable;
-import java.util.Map;
public final class DefaultMonsterType {
- private final static Map, MonsterType> DEFAULT = Maps.newHashMap();
-
- public static void initDefault(Level level) {
- // 只允许初始化一次
- if (!DEFAULT.isEmpty()) {
- return;
+ public static MonsterType getMonsterType(LivingEntity target) {
+ // 如果继承了 Enemy 接口,那就是敌对生物
+ if (target instanceof Enemy) {
+ return MonsterType.HOSTILE;
}
- ForgeRegistries.ENTITY_TYPES.getValues().forEach(type -> {
- Entity entity = null;
-
- // 因为某些模组方法 create 实体会失败
- try {
- entity = type.create(level);
- } catch (Exception e) {
- e.fillInStackTrace();
- }
-
- if (!(entity instanceof LivingEntity livingEntity)) {
- return;
- }
-
- // 排除一些盔甲架,还有本模组的实体,以及玩家
- if (livingEntity instanceof ArmorStand || livingEntity instanceof AbstractEntityFromItem || livingEntity instanceof Player) {
- return;
- }
-
- // 如果继承了 Enemy 接口,那就是敌对生物
- if (livingEntity instanceof Enemy) {
- DEFAULT.putIfAbsent(type, MonsterType.HOSTILE);
- return;
- }
-
- // 如果是玩家、宠物、NPC、归为友好
- if (livingEntity instanceof TamableAnimal || livingEntity instanceof Npc) {
- DEFAULT.putIfAbsent(type, MonsterType.FRIENDLY);
- return;
- }
-
- // 否则归为中立
- DEFAULT.putIfAbsent(type, MonsterType.NEUTRAL);
- });
- }
-
- public static Map, MonsterType> getMonsterList(ItemStack stack, @Nullable Level level) {
- Map, MonsterType> output = Maps.newHashMap();
-
- if (level == null || stack.getItem() != InitItems.MONSTER_LIST.get()) {
- return output;
+ // 如果是玩家、宠物、NPC、归为友好
+ if (target instanceof TamableAnimal || target instanceof Npc) {
+ return MonsterType.FRIENDLY;
}
- // 先从物品里读取数据
- CompoundTag monsterList = ItemMonsterList.getMonsterList(stack);
- monsterList.getAllKeys().forEach(key -> readTagData(key, monsterList, output));
-
- // 最后补齐默认数据
- DEFAULT.forEach(output::putIfAbsent);
-
- return output;
- }
-
- public static MonsterType getMonsterType(EntityType> entityType) {
- return DEFAULT.getOrDefault(entityType, MonsterType.NEUTRAL);
+ // 否则归为中立
+ return MonsterType.NEUTRAL;
}
public static boolean canAttack(EntityMaid maid, LivingEntity target, MonsterType monsterType) {
@@ -103,16 +38,6 @@ public static boolean canAttack(EntityMaid maid, LivingEntity target, MonsterTyp
return true;
}
- private static void readTagData(String key, CompoundTag monsterList, Map, MonsterType> output) {
- int index = monsterList.getInt(key);
- MonsterType monsterType = MonsterType.getTypeByIndex(index);
- ResourceLocation id = new ResourceLocation(key);
- EntityType> entityType = ForgeRegistries.ENTITY_TYPES.getValue(id);
- if (entityType != null) {
- output.put(entityType, monsterType);
- }
- }
-
private static boolean checkNeutral(EntityMaid maid, LivingEntity target) {
// 先判断主人
if (maid.getOwner() instanceof Player player) {
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/task/TaskExtinguishing.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/task/TaskExtinguishing.java
index bbc9b9f79..479ec87e8 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/task/TaskExtinguishing.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/entity/task/TaskExtinguishing.java
@@ -1,7 +1,7 @@
package com.github.tartaricacid.touhoulittlemaid.entity.task;
import com.github.tartaricacid.touhoulittlemaid.TouhouLittleMaid;
-import com.github.tartaricacid.touhoulittlemaid.api.task.IAttackTask;
+import com.github.tartaricacid.touhoulittlemaid.api.task.IMaidTask;
import com.github.tartaricacid.touhoulittlemaid.entity.ai.brain.task.MaidExtinguishingTask;
import com.github.tartaricacid.touhoulittlemaid.entity.passive.EntityMaid;
import com.github.tartaricacid.touhoulittlemaid.init.InitItems;
@@ -19,7 +19,7 @@
import java.util.List;
import java.util.function.Predicate;
-public class TaskExtinguishing implements IAttackTask {
+public class TaskExtinguishing implements IMaidTask {
public static final ResourceLocation UID = new ResourceLocation(TouhouLittleMaid.MOD_ID, "extinguishing");
@Override
@@ -48,6 +48,11 @@ public List>> getConditionDescription(EntityM
return Collections.singletonList(Pair.of("has_extinguisher", this::hasExtinguisher));
}
+ @Override
+ public boolean enablePanic(EntityMaid maid) {
+ return false;
+ }
+
private boolean hasExtinguisher(EntityMaid maid) {
return maid.getMainHandItem().getItem() == InitItems.EXTINGUISHER.get();
}
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/event/LevelLoadEvent.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/event/LevelLoadEvent.java
deleted file mode 100644
index 4be965def..000000000
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/event/LevelLoadEvent.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.github.tartaricacid.touhoulittlemaid.event;
-
-import com.github.tartaricacid.touhoulittlemaid.TouhouLittleMaid;
-import com.github.tartaricacid.touhoulittlemaid.entity.misc.DefaultMonsterType;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.LevelAccessor;
-import net.minecraftforge.event.level.LevelEvent;
-import net.minecraftforge.eventbus.api.SubscribeEvent;
-import net.minecraftforge.fml.common.Mod;
-
-@Mod.EventBusSubscriber(modid = TouhouLittleMaid.MOD_ID)
-public class LevelLoadEvent {
- @SubscribeEvent
- public static void onLevelLoadEvent(LevelEvent.Load event) {
- LevelAccessor levelAccessor = event.getLevel();
- if (levelAccessor instanceof Level level) {
- DefaultMonsterType.initDefault(level);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/init/InitCreativeTabs.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/init/InitCreativeTabs.java
index 32008c216..20f8639c9 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/init/InitCreativeTabs.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/init/InitCreativeTabs.java
@@ -61,7 +61,6 @@ public class InitCreativeTabs {
output.accept(RED_FOX_SCROLL.get());
output.accept(WHITE_FOX_SCROLL.get());
output.accept(SERVANT_BELL.get());
- output.accept(MONSTER_LIST.get());
output.accept(KAPPA_COMPASS.get());
output.accept(EXTINGUISHER.get());
output.accept(GOMOKU.get());
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/item/ItemMonsterList.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/item/ItemMonsterList.java
index 7ca5fed0c..5bbab7f50 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/item/ItemMonsterList.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/item/ItemMonsterList.java
@@ -1,67 +1,23 @@
package com.github.tartaricacid.touhoulittlemaid.item;
-import com.github.tartaricacid.touhoulittlemaid.client.gui.item.MonsterListScreen;
-import com.github.tartaricacid.touhoulittlemaid.entity.misc.MonsterType;
import net.minecraft.ChatFormatting;
-import net.minecraft.client.Minecraft;
-import net.minecraft.nbt.CompoundTag;
-import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.InteractionHand;
-import net.minecraft.world.InteractionResultHolder;
-import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
-import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.api.distmarker.OnlyIn;
-import net.minecraftforge.fml.DistExecutor;
import javax.annotation.Nullable;
import java.util.List;
-import java.util.Map;
+@Deprecated(since = "1.1.13")
public class ItemMonsterList extends Item {
- private static final String TAG_NAME = "MonsterList";
-
- public static CompoundTag getMonsterList(ItemStack stack) {
- CompoundTag tag = stack.getTag();
- if (tag != null && tag.contains(TAG_NAME, Tag.TAG_COMPOUND)) {
- return tag.getCompound(TAG_NAME);
- }
- return new CompoundTag();
- }
-
- public static void addMonster(ItemStack stack, Map monsterList) {
- CompoundTag tag = stack.getOrCreateTagElement(TAG_NAME);
- monsterList.forEach((key, value) -> tag.putInt(key.toString(), value.ordinal()));
- }
-
public ItemMonsterList() {
super(new Item.Properties().stacksTo(1));
}
- @Override
- public InteractionResultHolder use(Level worldIn, Player playerIn, InteractionHand handIn) {
- if (handIn == InteractionHand.MAIN_HAND) {
- ItemStack stack = playerIn.getMainHandItem();
- DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> openMonsterListSetScreen(stack, playerIn));
- return InteractionResultHolder.success(stack);
- }
- return super.use(worldIn, playerIn, handIn);
- }
-
- @OnlyIn(Dist.CLIENT)
- private void openMonsterListSetScreen(ItemStack stack, Player playerIn) {
- if (playerIn.level.isClientSide) {
- Minecraft.getInstance().setScreen(new MonsterListScreen(stack));
- }
- }
-
@Override
public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) {
- tooltip.add(Component.translatable("tooltips.touhou_little_maid.monster_list.desc").withStyle(ChatFormatting.GRAY));
+ tooltip.add(Component.translatable("tooltips.touhou_little_maid.monster_list.desc").withStyle(ChatFormatting.DARK_RED));
}
}
\ No newline at end of file
diff --git a/src/main/java/com/github/tartaricacid/touhoulittlemaid/network/message/SetMonsterListMessage.java b/src/main/java/com/github/tartaricacid/touhoulittlemaid/network/message/SetMonsterListMessage.java
index 05f67c2df..07f9d22db 100644
--- a/src/main/java/com/github/tartaricacid/touhoulittlemaid/network/message/SetMonsterListMessage.java
+++ b/src/main/java/com/github/tartaricacid/touhoulittlemaid/network/message/SetMonsterListMessage.java
@@ -1,13 +1,10 @@
package com.github.tartaricacid.touhoulittlemaid.network.message;
import com.github.tartaricacid.touhoulittlemaid.entity.misc.MonsterType;
-import com.github.tartaricacid.touhoulittlemaid.init.InitItems;
-import com.github.tartaricacid.touhoulittlemaid.item.ItemMonsterList;
import com.google.common.collect.Maps;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
-import net.minecraft.world.item.ItemStack;
import net.minecraftforge.network.NetworkEvent;
import java.util.Map;
@@ -52,9 +49,6 @@ private static void writeList(SetMonsterListMessage message, NetworkEvent.Contex
if (sender == null) {
return;
}
- ItemStack item = sender.getMainHandItem();
- if (item.is(InitItems.MONSTER_LIST.get())) {
- ItemMonsterList.addMonster(item, message.monsterList);
- }
+ // TODO: 需要修改
}
}
diff --git a/src/main/resources/assets/touhou_little_maid/lang/en_us.json b/src/main/resources/assets/touhou_little_maid/lang/en_us.json
index cac24c5c0..94884ccdc 100644
--- a/src/main/resources/assets/touhou_little_maid/lang/en_us.json
+++ b/src/main/resources/assets/touhou_little_maid/lang/en_us.json
@@ -165,7 +165,7 @@
"item.touhou_little_maid.broom": "Marisa's Broom",
"item.touhou_little_maid.picnic_basket": "Picnic Basket",
"item.touhou_little_maid.servant_bell": "Servant Bell",
- "item.touhou_little_maid.monster_list": "Monster List",
+ "item.touhou_little_maid.monster_list": "Monster List (Removed)",
"item.touhou_little_maid.advancement_icon": "Advancement Icon",
"enchantment.touhou_little_maid.impeding": "Impeding Danmaku",
"enchantment.touhou_little_maid.impeding.desc": "Danmaku can inflict slowness I - IV on the enemy",
@@ -242,7 +242,7 @@
"tooltips.touhou_little_maid.servant_bell.uuid": "UUID: %s",
"tooltips.touhou_little_maid.servant_bell.desc.1": "- Right click on the maid to mark it.",
"tooltips.touhou_little_maid.servant_bell.desc.2": "- After mark, you can teleport the bound maid after using it.",
- "tooltips.touhou_little_maid.monster_list.desc": "Placed in the maid's offhand, she can attack based on this list",
+ "tooltips.touhou_little_maid.monster_list.desc": "Version 1.1.13 and later removed this item and can no longer be used",
"tooltips.touhou_little_maid.advancement_icon.desc": "For advancement icon display only",
"overlay.touhou_little_maid.compass.tips": "Right click to display the maid's task area",
"overlay.touhou_little_maid.golden_apple.tips": "Golden apple shift click can be fed to maid",
@@ -775,8 +775,6 @@
"patchouli.touhou_little_maid.book.entries.maid.maid_meal.pages.1.text": "When maids in idle schedule, they will look for nearby picnic mats to eat, which will greatly increase their favorability.$(br2)Please serve them a delicious meal!",
"patchouli.touhou_little_maid.book.entries.maid.servant_bell.name": "Servant Bell",
"patchouli.touhou_little_maid.book.entries.maid.servant_bell.pages.0.text": "The servant bell can find the maid back one by one. If the maid is on the unloading chunk, it can also prompt you where the maid is.$(br2)Hold this item and right click the maid to bind it!",
- "patchouli.touhou_little_maid.book.entries.maid.monster_list.name": "Monster List",
- "patchouli.touhou_little_maid.book.entries.maid.monster_list.pages.0.text": "The monster list is used for the maid's attack mode. You can set what kind of mobs the maid should attack. Just put this item in her offhand.$(br2)Note: The maid will not attack any player! Or any pet with an owner!",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.name": "Chisel & Statues",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.pages.0.text": "Right-click the clay with a chisel can make statues of different sizes. Currently supports 1x1x1, 1x1x2, 2x2x4, 3x3x6 sizes.",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.pages.1.text": "The player holds a photo of the maid in offhand, the mainhand holds the chisel, then right-clicks the lower left corner of the multi-block structure to engrave the maid in the photo.",
diff --git a/src/main/resources/assets/touhou_little_maid/lang/zh_cn.json b/src/main/resources/assets/touhou_little_maid/lang/zh_cn.json
index 15e47f6bd..40902e50b 100644
--- a/src/main/resources/assets/touhou_little_maid/lang/zh_cn.json
+++ b/src/main/resources/assets/touhou_little_maid/lang/zh_cn.json
@@ -165,7 +165,7 @@
"item.touhou_little_maid.broom": "魔理沙的扫帚",
"item.touhou_little_maid.picnic_basket": "野餐篮",
"item.touhou_little_maid.servant_bell": "仆人铃",
- "item.touhou_little_maid.monster_list": "妖怪名单",
+ "item.touhou_little_maid.monster_list": "妖怪名单(移除)",
"item.touhou_little_maid.advancement_icon": "进度图标",
"enchantment.touhou_little_maid.impeding": "阻碍",
"enchantment.touhou_little_maid.impeding.desc": "弹幕会对敌方造成缓慢 I - IV 的效果",
@@ -242,7 +242,7 @@
"tooltips.touhou_little_maid.servant_bell.uuid": "UUID:%s",
"tooltips.touhou_little_maid.servant_bell.desc.1": "- 右击女仆进行绑定;",
"tooltips.touhou_little_maid.servant_bell.desc.2": "- 绑定后,右击使用即可召回女仆。",
- "tooltips.touhou_little_maid.monster_list.desc": "放置在女仆的副手,她会依据此名单来进行攻击",
+ "tooltips.touhou_little_maid.monster_list.desc": "自 1.1.13 版本后移除此物品",
"tooltips.touhou_little_maid.advancement_icon.desc": "仅用于进度图标显示的物品",
"overlay.touhou_little_maid.compass.tips": "右击可以显示女仆的任务区域",
"overlay.touhou_little_maid.golden_apple.tips": "手持金苹果可以使用 Shift 右击喂给女仆",
@@ -775,8 +775,6 @@
"patchouli.touhou_little_maid.book.entries.maid.maid_meal.pages.1.text": "女仆在空闲日程时,会寻找周围的野餐垫进食,这会大幅度提升她们的好感度。$(br2)请给她们放上美味的大餐吧!",
"patchouli.touhou_little_maid.book.entries.maid.servant_bell.name": "仆人铃",
"patchouli.touhou_little_maid.book.entries.maid.servant_bell.pages.0.text": "仆人铃可以一对一的召唤回女仆,如果女仆在卸载区块上,它也能提示你女仆所处的位置。$(br2)手持此物品右击女仆即可进行绑定!",
- "patchouli.touhou_little_maid.book.entries.maid.monster_list.name": "妖怪名单",
- "patchouli.touhou_little_maid.book.entries.maid.monster_list.pages.0.text": "妖怪名单用于女仆的攻击模式,可以设置女仆应当攻击什么样的生物,只需要在她的副手放上这个物品即可。$(br2)注意:女仆不会攻击任何玩家!或者是有主人的宠物!",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.name": "雕刻刀与雕像",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.pages.0.text": "雕刻刀右击黏土可以做成不同尺寸大小的雕像,目前支持 1x1x1、1x1x2、2x2x4、3x3x6 大小尺寸。",
"patchouli.touhou_little_maid.book.entries.other.chisel_and_statues.pages.1.text": "玩家副手持有女仆照片,主手持有雕刻刀,右击多方块结构的左下角,即可雕刻出照片中的女仆。",
diff --git a/src/main/resources/assets/touhou_little_maid/patchouli_books/memorizable_gensokyo/en_us/entries/maid/monster_list.json b/src/main/resources/assets/touhou_little_maid/patchouli_books/memorizable_gensokyo/en_us/entries/maid/monster_list.json
deleted file mode 100644
index 8ecce9003..000000000
--- a/src/main/resources/assets/touhou_little_maid/patchouli_books/memorizable_gensokyo/en_us/entries/maid/monster_list.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "sortnum": 10,
- "name": "patchouli.touhou_little_maid.book.entries.maid.monster_list.name",
- "icon": "touhou_little_maid:monster_list",
- "category": "touhou_little_maid:maid",
- "pages": [
- {
- "type": "spotlight",
- "item": "touhou_little_maid:monster_list",
- "text": "patchouli.touhou_little_maid.book.entries.maid.monster_list.pages.0.text"
- }
- ]
-}
\ No newline at end of file
diff --git a/src/main/resources/data/touhou_little_maid/recipes/altar/monster_list.json b/src/main/resources/data/touhou_little_maid/recipes/altar/monster_list.json
deleted file mode 100644
index 31f8fda3b..000000000
--- a/src/main/resources/data/touhou_little_maid/recipes/altar/monster_list.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "type": "touhou_little_maid:altar_crafting",
- "output": {
- "type": "minecraft:item",
- "nbt": {
- "Item": {
- "id": "touhou_little_maid:monster_list",
- "Count": 1
- }
- }
- },
- "power": 0.2,
- "ingredients": [
- {
- "tag": "forge:dusts/redstone"
- },
- {
- "tag": "forge:dusts/redstone"
- },
- {
- "tag": "forge:nuggets/gold"
- },
- {
- "tag": "forge:nuggets/gold"
- },
- {
- "item": "minecraft:book"
- },
- {
- "item": "minecraft:book"
- }
- ]
-}
\ No newline at end of file