diff --git a/gradle.properties b/gradle.properties index fcf69ff..0c5679a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G loom.platform = neoforge # Mod properties -mod_version = 0.1.7 +mod_version = 0.1.8 maven_group = cn.zbx1425 archives_name = project_me diff --git a/src/main/java/cn/zbx1425/projectme/entity/EntityProjection.java b/src/main/java/cn/zbx1425/projectme/entity/EntityProjection.java index 80f86f4..70ec329 100644 --- a/src/main/java/cn/zbx1425/projectme/entity/EntityProjection.java +++ b/src/main/java/cn/zbx1425/projectme/entity/EntityProjection.java @@ -14,6 +14,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.SkullBlockEntity; @@ -83,6 +84,16 @@ public boolean isPickable() { return ClientConfig.isProjectionEntityEnabled && super.isPickable(); } + @Override + public boolean isInvisible() { + return !ClientConfig.isProjectionEntityEnabled; + } + + @Override + public boolean isInvisibleTo(Player arg) { + return !ClientConfig.isProjectionEntityEnabled; + } + @Override public Iterable getArmorSlots() { return List.of(); diff --git a/src/main/resources/assets/project_me/lang/en_us.json b/src/main/resources/assets/project_me/lang/en_us.json index 734228c..311d626 100644 --- a/src/main/resources/assets/project_me/lang/en_us.json +++ b/src/main/resources/assets/project_me/lang/en_us.json @@ -1,8 +1,9 @@ { - "project_me.projection_entity.tooltip": "Player in another sub-server", - "project_me.projection_entity.tooltip_hint_1": "To interact with it, use '/go %s'", - "project_me.projection_entity.tooltip_hint_2": "To hide it, use '/pme'", - "project_me.projection_entity.goto": "To interact with it, go to their server - use '/go %s'", + "project_me.projection_entity.goto": "To got to their server, use '/go %s' To hide it, use '/pme'", "project_me.projection.disabled": "Player Projection has been disabled. Execute '/pme' to enable this feature.", - "project_me.projection.enabled": "Player Projection has been enabled." + "project_me.projection.enabled": "Player Projection has been enabled.", + + "config.jade.plugin_project_me.projection_entity_tooltip": "Player Projection", + "project_me.projection_entity.tooltip": "Player in another sub-server", + "project_me.projection_entity.tooltip_hint_1": "Hide: '/pme'" } \ No newline at end of file diff --git a/src/main/resources/assets/project_me/lang/zh_cn.json b/src/main/resources/assets/project_me/lang/zh_cn.json index 2a541ba..b1c1bf4 100644 --- a/src/main/resources/assets/project_me/lang/zh_cn.json +++ b/src/main/resources/assets/project_me/lang/zh_cn.json @@ -1,8 +1,9 @@ { + "project_me.projection_entity.goto": "要隐藏它请用指令: /pme 要一起玩集体项目: /go %s", + "project_me.projection.disabled": "已不再显示其他分服务器的玩家;运行 /pme 来重新启用,以便让参观体验显得热闹一点!", + "project_me.projection.enabled": "已启用显示其他分服务器的玩家", + + "config.jade.plugin_project_me.projection_entity_tooltip": "玩家投影", "project_me.projection_entity.tooltip": "位于其他分服务器的玩家", - "project_me.projection_entity.tooltip_hint_1": "要与它交互,请使用指令: /go %s", - "project_me.projection_entity.tooltip_hint_2": "要不显示它,请使用指令: /pme", - "project_me.projection_entity.goto": "前往对方所在的分服务器才可与其交互——请使用指令: /go %s", - "project_me.projection.disabled": "已不再显示其他分服务器的玩家,运行 /pme 来重新启用", - "project_me.projection.enabled": "已启用显示其他分服务器的玩家" + "project_me.projection_entity.tooltip_hint_1": "隐藏它: /pme" } \ No newline at end of file