Skip to content

Commit

Permalink
翻译
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Jun 13, 2022
1 parent e78c5f1 commit 2535e2d
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 174 deletions.
17 changes: 6 additions & 11 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
Expand All @@ -44,6 +45,10 @@
<pattern>io.papermc.lib</pattern>
<shadedPattern>dev.sefiraat.netheopoiesis.paperlib</shadedPattern>
</relocation>
<relocation>
<pattern>net.guizhanss.guizhanlib</pattern>
<shadedPattern>dev.sefiraat.netheopoiesis.guizhanlib</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
Expand Down Expand Up @@ -86,18 +91,8 @@
</dependency>
</dependencies>
<properties>
<sonar.issue.ignore.multicriteria.e3.ruleKey>java:S6206</sonar.issue.ignore.multicriteria.e3.ruleKey>
<sonar.issue.ignore.multicriteria.e3.resourceKey>**</sonar.issue.ignore.multicriteria.e3.resourceKey>
<sonar.issue.ignore.multicriteria>e1,e2,e3</sonar.issue.ignore.multicriteria>
<maven.compiler.source>16</maven.compiler.source>
<sonar.issue.ignore.multicriteria.e2.ruleKey>java:S125</sonar.issue.ignore.multicriteria.e2.ruleKey>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>sefiraat</sonar.organization>
<sonar.projectKey>Networks</sonar.projectKey>
<maven.compiler.target>16</maven.compiler.target>
<maven.compiler.source>16</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.issue.ignore.multicriteria.e1.resourceKey>**</sonar.issue.ignore.multicriteria.e1.resourceKey>
<sonar.issue.ignore.multicriteria.e2.resourceKey>**</sonar.issue.ignore.multicriteria.e2.resourceKey>
<sonar.issue.ignore.multicriteria.e1.ruleKey>java:S6212</sonar.issue.ignore.multicriteria.e1.ruleKey>
</properties>
</project>
27 changes: 11 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
Expand All @@ -29,6 +30,10 @@
<pattern>io.papermc.lib</pattern>
<shadedPattern>dev.sefiraat.netheopoiesis.paperlib</shadedPattern>
</relocation>
<relocation>
<pattern>net.guizhanss.guizhanlib</pattern>
<shadedPattern>dev.sefiraat.netheopoiesis.guizhanlib</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
Expand Down Expand Up @@ -68,22 +73,6 @@
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.projectKey>Networks</sonar.projectKey>
<sonar.organization>sefiraat</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<sonar.issue.ignore.multicriteria>e1,e2,e3</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria.e1.ruleKey>java:S6212</sonar.issue.ignore.multicriteria.e1.ruleKey>
<sonar.issue.ignore.multicriteria.e1.resourceKey>**</sonar.issue.ignore.multicriteria.e1.resourceKey>

<sonar.issue.ignore.multicriteria.e2.ruleKey>java:S125</sonar.issue.ignore.multicriteria.e2.ruleKey>
<sonar.issue.ignore.multicriteria.e2.resourceKey>**</sonar.issue.ignore.multicriteria.e2.resourceKey>

<sonar.issue.ignore.multicriteria.e3.ruleKey>java:S2245</sonar.issue.ignore.multicriteria.e3.ruleKey>
<sonar.issue.ignore.multicriteria.e3.resourceKey>**</sonar.issue.ignore.multicriteria.e3.resourceKey>

<sonar.issue.ignore.multicriteria.e3.ruleKey>java:S6206</sonar.issue.ignore.multicriteria.e3.ruleKey>
<sonar.issue.ignore.multicriteria.e3.resourceKey>**</sonar.issue.ignore.multicriteria.e3.resourceKey>
</properties>

<repositories>
Expand Down Expand Up @@ -140,6 +129,12 @@
<version>1.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.guizhanss</groupId>
<artifactId>GuizhanLib</artifactId>
<version>0.9.7</version>
<scope>compile</scope>
</dependency>

<!-- Supported Plugins -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Netheopoiesis extends JavaPlugin implements SlimefunAddon {
private PlantRegistry plantRegistry;

public Netheopoiesis() {
this.username = "Sefiraat";
this.username = "SlimefunGuguProject";
this.repo = "Netheopoiesis";
this.branch = "master";
}
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/dev/sefiraat/netheopoiesis/slimefun/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public static void setup(Netheopoiesis addon) {
oakPlank, oakPlank, null,
},
25
);
).register(addon);

new HarvestingTool(
NpsGroups.TOOLS,
Expand All @@ -172,7 +172,7 @@ public static void setup(Netheopoiesis addon) {
ironIngot, ironIngot, null,
},
150
);
).register(addon);

new PurificationBarometer(
NpsGroups.TOOLS,
Expand All @@ -183,7 +183,7 @@ public static void setup(Netheopoiesis addon) {
glass, redstone, glass,
SlimefunItems.ZINC_INGOT, glass, SlimefunItems.ZINC_INGOT,
}
);
).register(addon);

new PurificationScanner(
NpsGroups.TOOLS,
Expand All @@ -194,7 +194,7 @@ public static void setup(Netheopoiesis addon) {
glass, Stacks.PURIFICATION_BAROMETER, glass,
SlimefunItems.BILLON_INGOT, glass, SlimefunItems.BILLON_INGOT,
}
);
).register(addon);

new Analyser(
NpsGroups.TOOLS,
Expand All @@ -205,7 +205,7 @@ public static void setup(Netheopoiesis addon) {
null, glass, null,
null, glass, null,
}
);
).register(addon);

new Analyser(
NpsGroups.TOOLS,
Expand All @@ -216,7 +216,7 @@ public static void setup(Netheopoiesis addon) {
SlimefunItems.BRASS_INGOT, glass, SlimefunItems.BRASS_INGOT,
SlimefunItems.DAMASCUS_STEEL_INGOT, redstone, SlimefunItems.DAMASCUS_STEEL_INGOT,
}
);
).register(addon);

new EnderCake(
NpsGroups.TOOLS,
Expand All @@ -227,7 +227,7 @@ public static void setup(Netheopoiesis addon) {
Stacks.ADDON_JAM, Stacks.ADDON_JAM, Stacks.ADDON_JAM,
wheat, wheat, wheat,
}
);
).register(addon);

// endregion

Expand Down
33 changes: 17 additions & 16 deletions src/main/java/dev/sefiraat/netheopoiesis/slimefun/RecipeTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ private RecipeTypes() {
Theme.themedItemStack(
Material.WITHER_ROSE,
Theme.RECIPE_TYPE,
"Nether Purification",
"These items are made by purifying the Nether.",
"This is done by planting Purifying Seeds."
"净化下界",
"该物品可以通过净化下界获得.",
"种植净化之种以开始净化."
)
);

Expand All @@ -34,8 +34,8 @@ private RecipeTypes() {
Theme.themedItemStack(
Material.PRISMARINE_SHARD,
Theme.RECIPE_TYPE,
"Plant Harvesting",
"This item can be harvested from a plant."
"收获植物",
"该物品可以通过收获植物获得."
)
);

Expand All @@ -45,17 +45,18 @@ private RecipeTypes() {
Theme.themedItemStack(
Material.FLOWER_POT,
Theme.RECIPE_TYPE,
"Plant Breeding",
"This seed is found via breeding.",
"You breed plants by placing",
"two plants down with an air block",
"between them.",
"培育植物",
"这个种子可以通过培育获得.",
"",
"The breeding dictionary can be used",
"to track your discoveries.",
"你需要将两株植物放在一起,",
"中间间隔一格空气,",
"来进行培育.",
"",
"Hint: Black particles mean the",
"two plants CANNOT breed."
"你可以通过培育笔记",
"来查看所有已发现的培育.",
"",
"提示: 黑色粒子代表",
"两株植物不能进行培育."
)
);

Expand All @@ -65,8 +66,8 @@ private RecipeTypes() {
Theme.themedItemStack(
Material.BROWN_DYE,
Theme.RECIPE_TYPE,
"World Drop",
"Drops from blocks when broken in the world."
"方块掉落物",
"通过破坏方块获得."
)
);
}
41 changes: 20 additions & 21 deletions src/main/java/dev/sefiraat/netheopoiesis/slimefun/Stacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@ private Stacks() {
"NPS_ADDON_BERRY",
Material.SWEET_BERRIES,
Theme.CRAFTING,
"Addon Berry",
"A deliciously sweet berry that",
"can be made into jam."
"附加浆果",
"一种美味的甜浆果,",
"可以被制成果酱."
);

public static final SlimefunItemStack ADDON_JAM = Theme.themedSlimefunItemStack(
"NPS_ADDON_JAM",
ItemStackUtils.potion(Color.RED),
Theme.CRAFTING,
"Addon Jam",
"A very sweet jam.",
"For some reason, it feels rushed",
"and incomplete."
"附加果酱",
"一种非常甜的果酱.",
"不知为何, 它看上去像赶制的.",
"(这个物品的英文名是Addon Jam,",
"也是本次附属竞赛的名称)"
);

// endregion
Expand All @@ -50,11 +51,10 @@ private Stacks() {
"NPS_CRUDE_HARVESTING_TOOL",
Material.PRISMARINE_SHARD,
Theme.TOOL,
"Crude Harvesting Tool",
"This tool will harvest plants",
"where possible.",
"This one is very shoddy and won't",
"last long",
"粗制收获工具",
"这个工具可以收获植物.",
"似乎是个劣质品,",
"没法用太久.",
"",
LoreBuilder.usesLeft(25)
);
Expand All @@ -63,11 +63,10 @@ private Stacks() {
"NPS_HARVESTING_TOOL",
Material.PRISMARINE_SHARD,
Theme.TOOL,
"Harvesting Tool",
"This tool will harvest plants",
"where possible.",
"This one is sturdier but still won't",
"last long",
"收获工具",
"这个工具可以收获植物.",
"它更加结实,",
"但也没法用太久.",
"",
LoreBuilder.usesLeft(150)
);
Expand All @@ -76,16 +75,16 @@ private Stacks() {
"NPS_PURIFICATION_BAROMETER",
Material.CLOCK,
Theme.TOOL,
"Purification Barometer",
"When used, this tool will tell you",
"how purified the current chunk is."
"净化测量仪",
"使用后, 可以获取",
"当前区块的净化值."
);

public static final SlimefunItemStack PURIFICATION_SCANNER = Theme.themedSlimefunItemStack(
"NPS_PURIFICATION_SCANNER",
Material.BRICK,
Theme.TOOL,
"Purification Scanner",
"净化扫描仪",
"When used on a relevant block or plant,",
"this tool will tell you what its",
"purifying effect on the world is."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

Expand Down Expand Up @@ -61,17 +63,17 @@ public class DiscoveriesFlexGroup extends FlexItemGroup {

private static final ItemStack MOTHER_INFO = new CustomItemStack(
Material.LIGHT_BLUE_STAINED_GLASS_PANE,
Theme.PASSIVE + "'Mother' Seed"
Theme.PASSIVE + "母种子"
);

private static final ItemStack FATHER_INFO = new CustomItemStack(
Material.LIGHT_BLUE_STAINED_GLASS_PANE,
Theme.PASSIVE + "'Father' Seed"
Theme.PASSIVE + "父种子"
);

private static final ItemStack CHILD_INFO = new CustomItemStack(
Material.LIGHT_BLUE_STAINED_GLASS_PANE,
Theme.PASSIVE + "'Child' Seed"
Theme.PASSIVE + "子种子"
);

private static final ItemStack HELD_SLOT = new CustomItemStack(
Expand All @@ -94,7 +96,7 @@ public boolean isVisible(Player player, PlayerProfile playerProfile, SlimefunGui
@Override
@ParametersAreNonnullByDefault
public void open(Player p, PlayerProfile profile, SlimefunGuideMode mode) {
final ChestMenu chestMenu = new ChestMenu(Theme.MAIN.getColor() + "Breeding Discoveries");
final ChestMenu chestMenu = new ChestMenu(Theme.MAIN.getColor() + "遗传笔记");

for (int slot : HEADER) {
chestMenu.addItem(slot, ChestMenuUtils.getBackground(), (player1, i1, itemStack, clickAction) -> false);
Expand Down Expand Up @@ -123,12 +125,16 @@ private void setupPage(Player player, PlayerProfile profile, SlimefunGuideMode m

reapplyFooter(player, profile, mode, menu, page, totalPages);

// Sound
menu.addMenuOpeningHandler((p) -> p.playSound(p.getLocation(), Sound.ITEM_BOOK_PAGE_TURN, 1.0F, 1.0F));

// Back
menu.replaceExistingItem(
GUIDE_BACK,
ChestMenuUtils.getBackButton(
player,
Slimefun.getLocalization().getMessage("guide.back.guide")
"",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(player, "guide.back.guide")
)
);
menu.addMenuClickHandler(GUIDE_BACK, (player1, slot, itemStack, clickAction) -> {
Expand Down
Loading

0 comments on commit 2535e2d

Please sign in to comment.