diff --git a/README.md b/README.md index ad74da1f..34c59757 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ ### 规则/Rules -`NoteBlockChunkLoader`: 当音符盒被激活时会加载3x3的区块持续15s,无论音符盒是否能够发出声音。 - `SuperBow`: 可以让弓同时拥有无限和经验修补附魔。 `zeroTickCactus`: 使计划刻仍可以给予随机刻进行强制催熟仙人掌。 @@ -33,11 +31,15 @@ `optimizedDragonRespawn`: 大幅度优化了龙战判定代码的性能表现,可能影响原版特性。 -### 区块加载控制/Ghost Commands +`blockChunkLoader [block_type]`: 当红石激活特定 + +### 区块加载控制/Chunk Loading Commands + +控制玩家的区块加载,有时候会有比较奇怪的情况,可以挪到附近的区块再回来,可能因为某些未知原因所在区块还会加载。不会移除所在维度的玩家检测,例如主世界出生点区块加载和末地主岛加载。 + +玩家上下线时会将交互状态重置回加载以避免[MC-157812](https://bugs.mojang.com/browse/MC-157812)。 -控制玩家的区块加载。玩家上下线时会将交互状态重置回默认状态以避免[MC-157812](https://bugs.mojang.com/browse/MC-157812) -的发生 -格式:`/ghost [true/false]` +格式:`/chunkloading [true/false]` ### 相关链接 @@ -47,7 +49,7 @@ 2. `zeroTick` 系列主要功能实现代码来自1.16.4/1.16.5的[OhMyVanillaMinecraf](https://github.com/hit-mc/OhMyVanillaMinecraft) -3. `ghost`交互控制功能实现代码来自1.16.5/1.17.1的[Intricarpet](https://github.com/lntricate1/intricarpet) +3. `chunkloading`交互控制功能实现代码来自1.16.5/1.17.1的[Intricarpet](https://github.com/lntricate1/intricarpet) ### 致谢 diff --git a/src/main/java/club/mcams/carpet/AmsServer.java b/src/main/java/club/mcams/carpet/AmsServer.java index 21ad3152..e7880ff3 100644 --- a/src/main/java/club/mcams/carpet/AmsServer.java +++ b/src/main/java/club/mcams/carpet/AmsServer.java @@ -3,8 +3,8 @@ import carpet.CarpetExtension; import carpet.CarpetServer; -import club.mcams.carpet.command.GhostCommand; -import club.mcams.carpet.function.Ghost; +import club.mcams.carpet.command.amscarpetCommandRegistry; +import club.mcams.carpet.function.ChunkLoading; import club.mcams.carpet.logging.amscarpetLoggerRegistry; import com.mojang.brigadier.CommandDispatcher; import net.fabricmc.api.ModInitializer; @@ -12,7 +12,6 @@ import net.minecraft.server.network.ServerPlayerEntity; public class AmsServer implements CarpetExtension, ModInitializer { - @Override public void registerLoggers() { amscarpetLoggerRegistry.registerLoggers(); @@ -20,17 +19,17 @@ public void registerLoggers() { @Override public void registerCommands(CommandDispatcher dispatcher) { - GhostCommand.register(dispatcher); + amscarpetCommandRegistry.register(dispatcher); } @Override public void onPlayerLoggedIn(ServerPlayerEntity player) { - Ghost.onPlayerConnect(player); + ChunkLoading.onPlayerConnect(player); } @Override public void onPlayerLoggedOut(ServerPlayerEntity player) { - Ghost.onPlayerDisconnect(player); + ChunkLoading.onPlayerDisconnect(player); } @Override diff --git a/src/main/java/club/mcams/carpet/AmsServerSettings.java b/src/main/java/club/mcams/carpet/AmsServerSettings.java index e98fb469..94c9f13e 100644 --- a/src/main/java/club/mcams/carpet/AmsServerSettings.java +++ b/src/main/java/club/mcams/carpet/AmsServerSettings.java @@ -1,6 +1,12 @@ package club.mcams.carpet; +import carpet.settings.ParsedRule; import carpet.settings.Rule; +import carpet.settings.Validator; +import net.minecraft.server.command.ServerCommandSource; + +import java.util.List; + import static carpet.settings.RuleCategory.*; /** @@ -11,63 +17,83 @@ public class AmsServerSettings public static final String AMS="AMS"; @Rule( - desc ="音符盒被触发时加载附近区块 3x3 15s", - extra = {"noteblock chunk loader"}, - category = {AMS,FEATURE} - ) - public static boolean NoteBlockChunkLoader = false; - - @Rule( - desc = "让弓可以同时拥有无限与经验修补", - category = {AMS,FEATURE} + desc = "Enabling making super bows with both infinite and mending enchants", + category = {AMS, FEATURE} ) - public static boolean SuperBow = false; + public static boolean superBow = false; @Rule( - desc = "0t仙人掌催熟", + desc = "Make cactus accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickCactus = false; @Rule( - desc = "0t竹子催熟", + desc = "Make bamboo accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickBamboo = false; @Rule( - desc = "0t紫颂花催熟", + desc = "Make chorus flower accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickChorusFlower = false; @Rule( - desc = "0t甘蔗催熟", + desc = "Make sugar cane accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickSugarCane = false; @Rule( - desc = "0t海带、缠怨藤、垂泪藤", + desc = "Make stems accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickStem = false; @Rule( - desc = "0t催熟总开关", + desc = "Make all plants accepts scheduled tick as random tick", category = {AMS, FEATURE, SURVIVAL} ) public static boolean zeroTickAllPlants = false; @Rule( - desc = "末影龙复活过程检测优化", + desc = "Optimize dragon respawning", + extra = {"May slightly affect the vanilla feature"}, category = {AMS, OPTIMIZATION} ) public static boolean optimizedDragonRespawn = false; @Rule( - desc = "玩家区块加载控制", + desc = "Load nearby 3x3 chunks for 15 seconds when a certain block is triggered", + options = {"false", "note_block", "bell_block"}, + validate = BlockLoaderValidator.class, + category = {AMS, FEATURE} + ) + public static String blockChunkLoader = "false"; + + private static class BlockLoaderValidator extends Validator { + private static final List OPTIONS = List.of("false", "note_block", "bell_block"); + + @Override + public String validate(ServerCommandSource source, ParsedRule currentRule, String newValue, String userString) { + if (!OPTIONS.contains(newValue)) { + return null; + } + return newValue; + } + + @Override + public String description() { + return "Can be limited to 'ops' only, true/false for everyone/no one, or a custom permission level"; + } + } + + @Rule( + desc = "Control chunk loading for players at any gamemodes", category = {AMS, COMMAND} ) - public static String commandGhost = "false"; + public static String commandChunkLoading = "false"; + } diff --git a/src/main/java/club/mcams/carpet/command/GhostCommand.java b/src/main/java/club/mcams/carpet/command/amscarpetCommandRegistry.java similarity index 79% rename from src/main/java/club/mcams/carpet/command/GhostCommand.java rename to src/main/java/club/mcams/carpet/command/amscarpetCommandRegistry.java index 341a5bb3..7ccec3a0 100644 --- a/src/main/java/club/mcams/carpet/command/GhostCommand.java +++ b/src/main/java/club/mcams/carpet/command/amscarpetCommandRegistry.java @@ -2,7 +2,7 @@ import carpet.utils.Messenger; import club.mcams.carpet.AmsServerSettings; -import club.mcams.carpet.function.Ghost; +import club.mcams.carpet.function.ChunkLoading; import club.mcams.carpet.util.CommandHelper; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.BoolArgumentType; @@ -13,10 +13,10 @@ import static net.minecraft.server.command.CommandManager.argument; import static net.minecraft.server.command.CommandManager.literal; -public class GhostCommand { +public class amscarpetCommandRegistry { public static void register(CommandDispatcher dispatcher) { - dispatcher.register(literal("ghost") - .requires((player) -> CommandHelper.canUseCommand(player, AmsServerSettings.commandGhost)) + dispatcher.register(literal("chunkloading") + .requires((player) -> CommandHelper.canUseCommand(player, AmsServerSettings.commandChunkLoading)) .executes((c) -> listPlayerInteractions(c.getSource(), c.getSource().getName())) .then(argument("boolean", BoolArgumentType.bool()). executes((c) -> setPlayerInteraction(c.getSource(), c.getSource().getName(), getBool(c, "boolean"))) @@ -30,8 +30,8 @@ private static int setPlayerInteraction(ServerCommandSource source, String playe Messenger.m(source, "r No player specified"); return 0; } - Ghost.setPlayerInteraction(playerName, !b, true); - Messenger.m(source, "w Set interaction ", "g " + "chunkloading", "w to ", "g " + b); + ChunkLoading.setPlayerInteraction(playerName, b, true); + Messenger.m(source, "w Set interaction ", "g " + "chunk loading", "w to ", "g " + b); return 1; } @@ -41,10 +41,10 @@ private static int listPlayerInteractions(ServerCommandSource source, String pla Messenger.m(source, "r No player specified"); return 0; } - boolean playerInteractions = Ghost.onlinePlayerMap.getOrDefault(playerName, true); + boolean playerInteractions = ChunkLoading.onlinePlayerMap.getOrDefault(playerName, true); - if (playerInteractions) Messenger.m(source, "w " + "chunk loading" + ": ", "g false"); - else Messenger.m(source, "w " + "chunk loading" + ": ", "g true"); + if (playerInteractions) Messenger.m(source, "w " + "chunk loading" + ": ", "g true"); + else Messenger.m(source, "w " + "chunk loading" + ": ", "g false"); return 1; } } \ No newline at end of file diff --git a/src/main/java/club/mcams/carpet/function/BlockChunkLoader.java b/src/main/java/club/mcams/carpet/function/BlockChunkLoader.java new file mode 100644 index 00000000..41ce27a8 --- /dev/null +++ b/src/main/java/club/mcams/carpet/function/BlockChunkLoader.java @@ -0,0 +1,24 @@ + +package club.mcams.carpet.function; + +import net.minecraft.server.world.ChunkTicketType; +import net.minecraft.util.math.ChunkPos; +import java.util.Comparator; + + +public class BlockChunkLoader { + public static final ChunkTicketType + NOTE_BLOCK = ChunkTicketType.create + ( + "note_block", Comparator.comparingLong(ChunkPos::toLong), + 300 + ); + public static final ChunkTicketType + BELL_BLOCK = ChunkTicketType.create + ( + "bell_block", Comparator.comparingLong(ChunkPos::toLong), + 300 + ); +} + + diff --git a/src/main/java/club/mcams/carpet/function/Ghost.java b/src/main/java/club/mcams/carpet/function/ChunkLoading.java similarity index 76% rename from src/main/java/club/mcams/carpet/function/Ghost.java rename to src/main/java/club/mcams/carpet/function/ChunkLoading.java index 1a3f6b83..287174af 100644 --- a/src/main/java/club/mcams/carpet/function/Ghost.java +++ b/src/main/java/club/mcams/carpet/function/ChunkLoading.java @@ -7,25 +7,19 @@ import java.util.HashMap; import java.util.Map; -public class Ghost { +public class ChunkLoading { public static Map onlinePlayerMap = new HashMap<>(); - public static Map offlinePlayerMap = new HashMap<>(); public static void setPlayerInteraction(String playerName, boolean b, boolean online) { if (playerFromName(playerName) == null) return; if (online) { onlinePlayerMap.put(playerName, b); - } else { - offlinePlayerMap.put(playerName, b); } } public static void onPlayerConnect(PlayerEntity player) { String playerName = player.getName().getString(); - if (offlinePlayerMap.containsKey(playerName)) { - setPlayerInteraction(playerName, true, true); - offlinePlayerMap.remove(playerName); - } + setPlayerInteraction(playerName, true, true); } public static void onPlayerDisconnect(PlayerEntity player) { diff --git a/src/main/java/club/mcams/carpet/function/NoteBlockChunkLoader.java b/src/main/java/club/mcams/carpet/function/NoteBlockChunkLoader.java deleted file mode 100644 index d878d563..00000000 --- a/src/main/java/club/mcams/carpet/function/NoteBlockChunkLoader.java +++ /dev/null @@ -1,18 +0,0 @@ - -package club.mcams.carpet.function; - -import net.minecraft.server.world.ChunkTicketType; -import net.minecraft.util.math.ChunkPos; -import java.util.Comparator; - - -public class NoteBlockChunkLoader { - public static final ChunkTicketType - NOTE_BLOCK = ChunkTicketType.create - ( - "note_block", Comparator.comparingLong(ChunkPos::toLong), - 300 - ); -} - - diff --git a/src/main/java/club/mcams/carpet/logging/amscarpetLoggerRegistry.java b/src/main/java/club/mcams/carpet/logging/amscarpetLoggerRegistry.java index eec6d72a..a0589241 100644 --- a/src/main/java/club/mcams/carpet/logging/amscarpetLoggerRegistry.java +++ b/src/main/java/club/mcams/carpet/logging/amscarpetLoggerRegistry.java @@ -1,13 +1,12 @@ package club.mcams.carpet.logging; import carpet.logging.Logger; -import carpet.logging.LoggerRegistry; public class amscarpetLoggerRegistry { public static boolean __dragonPortalLocation; public static void registerLoggers() { - LoggerRegistry.registerLogger("dragonPortalLocation", standardLogger("dragonPortalLocation", null, null)); +// LoggerRegistry.registerLogger("dragonPortalLocation", standardLogger("dragonPortalLocation", null, null)); } static Logger standardLogger(String logName, String def, String[] options) { diff --git a/src/main/java/club/mcams/carpet/mixin/interaction/ThreadedAnvilChunkStorageMixin.java b/src/main/java/club/mcams/carpet/mixin/interaction/ThreadedAnvilChunkStorageMixin.java index b3b92869..2a9a832c 100644 --- a/src/main/java/club/mcams/carpet/mixin/interaction/ThreadedAnvilChunkStorageMixin.java +++ b/src/main/java/club/mcams/carpet/mixin/interaction/ThreadedAnvilChunkStorageMixin.java @@ -1,10 +1,9 @@ package club.mcams.carpet.mixin.interaction; -import club.mcams.carpet.function.Ghost; +import club.mcams.carpet.function.ChunkLoading; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ThreadedAnvilChunkStorage; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -14,13 +13,12 @@ @Mixin(ThreadedAnvilChunkStorage.class) public class ThreadedAnvilChunkStorageMixin { @Shadow - @Final ServerWorld world; @Inject(method = "doesNotGenerateChunks", at = @At("HEAD"), cancellable = true) private void doesNotGenerateChunks(ServerPlayerEntity player, CallbackInfoReturnable cir) { String playerName = player.getName().getString(); - if (!Ghost.onlinePlayerMap.getOrDefault(playerName, true)) { + if (!ChunkLoading.onlinePlayerMap.getOrDefault(playerName, true)) { cir.setReturnValue(true); cir.cancel(); } diff --git a/src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/BellBlockMixin.java b/src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/BellBlockMixin.java new file mode 100644 index 00000000..3dfe8c16 --- /dev/null +++ b/src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/BellBlockMixin.java @@ -0,0 +1,31 @@ +package club.mcams.carpet.mixin.rule.blockChunkLoader; + +import club.mcams.carpet.AmsServerSettings; +import club.mcams.carpet.function.BlockChunkLoader; +import net.minecraft.block.BellBlock; +import net.minecraft.entity.Entity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.Objects; + +@Mixin(BellBlock.class) +public class BellBlockMixin { + @Inject( + method = "ring(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z", + at = @At("HEAD") + ) + private void ringByTriggeredMixin(Entity entity, World world, BlockPos pos, Direction direction, CallbackInfoReturnable cir) { + if (Objects.equals(AmsServerSettings.blockChunkLoader, "bell_block")) { + ChunkPos cp = new ChunkPos(pos.getX() >> 4, pos.getZ() >> 4); + ((ServerWorld) world).getChunkManager().addTicket(BlockChunkLoader.BELL_BLOCK, cp, 3, cp); + } + } +} diff --git a/src/main/java/club/mcams/carpet/mixin/rule/noteBlockChunkLoader/NoteBlockChunkLoaderMixin.java b/src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/NoteBlockMixin.java similarity index 65% rename from src/main/java/club/mcams/carpet/mixin/rule/noteBlockChunkLoader/NoteBlockChunkLoaderMixin.java rename to src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/NoteBlockMixin.java index ac998535..5936979e 100644 --- a/src/main/java/club/mcams/carpet/mixin/rule/noteBlockChunkLoader/NoteBlockChunkLoaderMixin.java +++ b/src/main/java/club/mcams/carpet/mixin/rule/blockChunkLoader/NoteBlockMixin.java @@ -1,7 +1,7 @@ -package club.mcams.carpet.mixin.rule.noteBlockChunkLoader; +package club.mcams.carpet.mixin.rule.blockChunkLoader; import club.mcams.carpet.AmsServerSettings; -import club.mcams.carpet.function.NoteBlockChunkLoader; +import club.mcams.carpet.function.BlockChunkLoader; import net.minecraft.block.NoteBlock; import net.minecraft.server.world.ServerWorld; @@ -14,16 +14,15 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import java.util.Objects; + @Mixin(NoteBlock.class) -public abstract class NoteBlockChunkLoaderMixin -{ +public abstract class NoteBlockMixin { @Inject(at = @At("HEAD"), method = "playNote") - private void loadChunk(World world, BlockPos pos, CallbackInfo info) - { - if(AmsServerSettings.NoteBlockChunkLoader) - { + private void loadChunk(World world, BlockPos pos, CallbackInfo info) { + if (Objects.equals(AmsServerSettings.blockChunkLoader, "note_block")) { ChunkPos cp = new ChunkPos(pos.getX() >> 4, pos.getZ() >> 4); - ((ServerWorld) world).getChunkManager().addTicket(NoteBlockChunkLoader.NOTE_BLOCK, cp, 3, cp); + ((ServerWorld) world).getChunkManager().addTicket(BlockChunkLoader.NOTE_BLOCK, cp, 3, cp); } } } diff --git a/src/main/java/club/mcams/carpet/mixin/rule/optimizedDragonRespawn/EnderDragonFightMixin.java b/src/main/java/club/mcams/carpet/mixin/rule/optimizedDragonRespawn/EnderDragonFightMixin.java index 2583cece..c3a84b44 100644 --- a/src/main/java/club/mcams/carpet/mixin/rule/optimizedDragonRespawn/EnderDragonFightMixin.java +++ b/src/main/java/club/mcams/carpet/mixin/rule/optimizedDragonRespawn/EnderDragonFightMixin.java @@ -1,7 +1,5 @@ package club.mcams.carpet.mixin.rule.optimizedDragonRespawn; -import carpet.logging.LoggerRegistry; -import carpet.utils.Messenger; import club.mcams.carpet.AmsServerSettings; import net.minecraft.block.Blocks; import net.minecraft.block.pattern.BlockPattern; @@ -10,23 +8,19 @@ import net.minecraft.entity.boss.dragon.EnderDragonSpawnState; import net.minecraft.entity.decoration.EndCrystalEntity; import net.minecraft.server.world.ServerWorld; -import net.minecraft.text.BaseText; -import org.slf4j.Logger; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.ArrayList; import java.util.List; @Mixin(EnderDragonFight.class) public abstract class EnderDragonFightMixin { - @Final + @Shadow private ServerWorld world; - @Final + @Shadow private BlockPattern endPortalPattern; @Shadow private boolean dragonKilled; @@ -43,10 +37,6 @@ public abstract class EnderDragonFightMixin { @Shadow protected abstract void generateEndPortal(boolean previouslyKilled); - @Shadow - @Final - private static Logger LOGGER; - @Inject(at = @At("HEAD"), method = "respawnDragon(Ljava/util/List;)V", cancellable = true) private void respawnDragon(List crystals, CallbackInfo ci) { if (AmsServerSettings.optimizedDragonRespawn) { @@ -54,7 +44,6 @@ private void respawnDragon(List crystals, CallbackInfo ci) { if (this.dragonKilled && this.dragonSpawnState == null) { BlockPattern.Result result = findEndPortal(); if (result != null) { - logPortalFind(); for (int i = 0; i < this.endPortalPattern.getWidth(); ++i) { for (int j = 0; j < this.endPortalPattern.getHeight(); ++j) { for (int k = 0; k < this.endPortalPattern.getDepth(); ++k) { @@ -74,14 +63,4 @@ private void respawnDragon(List crystals, CallbackInfo ci) { ci.cancel(); } } - - private void logPortalFind() { - List messages = new ArrayList<>(); - LoggerRegistry.getLogger("dragonPortalLocation").log(() -> - { - messages.add(Messenger.c( - "w Located portals")); - return messages.toArray(new BaseText[0]); - }); - } } diff --git a/src/main/java/club/mcams/carpet/mixin/rule/superBow/SuperBow.java b/src/main/java/club/mcams/carpet/mixin/rule/superBow/SuperBow.java index 899c9d8c..997cc097 100644 --- a/src/main/java/club/mcams/carpet/mixin/rule/superBow/SuperBow.java +++ b/src/main/java/club/mcams/carpet/mixin/rule/superBow/SuperBow.java @@ -18,7 +18,7 @@ public SuperBow(Rarity weight, EquipmentSlot... slotTypes) { @Override public boolean canAccept(Enchantment other) { - if(AmsServerSettings.SuperBow){ + if (AmsServerSettings.superBow) { return other instanceof MendingEnchantment || super.canAccept(other); } return false; diff --git a/src/main/resources/amscarpet.mixins.json b/src/main/resources/amscarpet.mixins.json index 438eac71..2ea0445a 100644 --- a/src/main/resources/amscarpet.mixins.json +++ b/src/main/resources/amscarpet.mixins.json @@ -5,7 +5,8 @@ "compatibilityLevel": "JAVA_17", "mixins": [ "interaction.ThreadedAnvilChunkStorageMixin", - "rule.noteBlockChunkLoader.NoteBlockChunkLoaderMixin", + "rule.blockChunkLoader.BellBlockMixin", + "rule.blockChunkLoader.NoteBlockMixin", "rule.optimizedDragonRespawn.EnderDragonFightMixin", "rule.superBow.SuperBow", "rule.zeroTick.AbstractPlantPartBlockMixin", diff --git a/src/main/resources/assets/modid/icon.png b/src/main/resources/assets/amscarpet/icon.png similarity index 100% rename from src/main/resources/assets/modid/icon.png rename to src/main/resources/assets/amscarpet/icon.png diff --git a/src/main/resources/assets/amscarpet/lang/en_us.json b/src/main/resources/assets/amscarpet/lang/en_us.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/src/main/resources/assets/amscarpet/lang/en_us.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/src/main/resources/assets/amscarpet/lang/zh_cn.json b/src/main/resources/assets/amscarpet/lang/zh_cn.json new file mode 100644 index 00000000..c059525a --- /dev/null +++ b/src/main/resources/assets/amscarpet/lang/zh_cn.json @@ -0,0 +1,20 @@ +{ + "carpet.rule.superBow.name": "超级弓", + "carpet.rule.superBow.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickCactus.name": "超级弓", + "carpet.rule.zeroTickCactus.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickBamboo.name": "超级弓", + "carpet.rule.zeroTickBamboo.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickChorusFlower.name": "超级弓", + "carpet.rule.zeroTickChorusFlower.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickSugarCane.name": "超级弓", + "carpet.rule.zeroTickSugarCane.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickStem.name": "超级弓", + "carpet.rule.zeroTickStem.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.zeroTickAllPlants.name": "超级弓", + "carpet.rule.zeroTickAllPlants.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.optimizedDragonRespawn.name": "超级弓", + "carpet.rule.optimizedDragonRespawn.desc": "让弓能同时打上无限和经验修补两种附魔", + "carpet.rule.blockChunkLoader.name": "超级弓", + "carpet.rule.blockChunkLoader.desc": "让弓能同时打上无限和经验修补两种附魔" +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 688e9e2d..16e29397 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -13,7 +13,7 @@ "sources": "https://mcams.club/" }, "license": "LGPL-3.0", - "icon": "assets/modid/icon.png", + "icon": "assets/amscarpet/icon.png", "environment": "*", "entrypoints": { "main": [