diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 00000000..5f81c8fc
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,34 @@
+name: Build Pull Request
+
+on:
+ push:
+
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: submodules-init
+ uses: snickerbockers/submodules-init@v4
+ - name: Build with Maven
+ run: mvn -B package -T 2C
+ - name: Archive artifacts (SensibleToolbox)
+ uses: actions/upload-artifact@v2
+ if: success()
+ with:
+ name: SensibleToolbox-CN
+ path: target/SensibleToolbox vCN.jar
diff --git a/.github/workflows/merge-conflicts.yml b/.github/workflows/merge-conflicts.yml
deleted file mode 100644
index c8aaaec1..00000000
--- a/.github/workflows/merge-conflicts.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Merge Conflicts
-
-on:
- push:
- branches:
- - master
-
-jobs:
- validate:
-
- name: Check for merge conflicts
- runs-on: ubuntu-latest
-
- steps:
- - uses: mschilde/auto-label-merge-conflicts@master
- with:
- CONFLICT_LABEL_NAME: 'Merge Conflicts'
- GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}"
diff --git a/pom.xml b/pom.xml
index 5a13b8a9..2c26b3a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
com.github.slimefun
SensibleToolbox
- UNOFFICIAL
+ CN
2014
jar
diff --git a/src/main/java/io/github/thebusybiscuit/sensibletoolbox/blocks/machines/AutoBuilder.java b/src/main/java/io/github/thebusybiscuit/sensibletoolbox/blocks/machines/AutoBuilder.java
index 5a532bf8..c306ffe2 100644
--- a/src/main/java/io/github/thebusybiscuit/sensibletoolbox/blocks/machines/AutoBuilder.java
+++ b/src/main/java/io/github/thebusybiscuit/sensibletoolbox/blocks/machines/AutoBuilder.java
@@ -118,12 +118,12 @@ public Material getMaterial() {
@Override
public String getItemName() {
- return "Auto Builder";
+ return "建筑魔杖";
}
@Override
public String[] getLore() {
- return new String[] { "Can build or clear", "an area. Use Land Markers", "to define the area" };
+ return new String[] { "可以建造或清理", "右左键分别点击长方形对角线来规划此区域" };
}
@Override
@@ -181,9 +181,9 @@ public InventoryGUI createGUI() {
}));
ChatColor c = STBUtil.dyeColorToChatColor(status.getColor());
- gui.addLabel(ChatColor.WHITE + "Status: " + c + status, STATUS_SLOT, status.makeTexture(), status.getText());
+ gui.addLabel(ChatColor.WHITE + "类型: " + c + status, STATUS_SLOT, status.makeTexture(), status.getText());
- gui.addLabel("Building Inventory", 29, null);
+ gui.addLabel("方块列表", 29, null);
return gui;
}
@@ -194,7 +194,7 @@ public AutoBuilderMode getBuildMode() {
}
public void setBuildMode(@Nonnull AutoBuilderMode buildMode) {
- Validate.notNull(buildMode, "The Build mode cannot be null");
+ Validate.notNull(buildMode, "建筑不能为空");
this.buildMode = buildMode;
setStatus(workArea == null ? BuilderStatus.NO_WORKAREA : BuilderStatus.READY);
}
@@ -244,12 +244,12 @@ public BuilderStatus getStatus() {
}
private void setStatus(@Nonnull BuilderStatus status) {
- Validate.notNull(status, "The Status cannot be null");
+ Validate.notNull(status, "方块不能为空");
if (status != this.status) {
this.status = status;
ChatColor c = STBUtil.dyeColorToChatColor(status.getColor());
- getGUI().addLabel(ChatColor.WHITE + "Status: " + c + status, STATUS_SLOT, status.makeTexture(), status.getText());
+ getGUI().addLabel(ChatColor.WHITE + "类型: " + c + status, STATUS_SLOT, status.makeTexture(), status.getText());
updateAttachedLabelSigns();
}
}
@@ -457,11 +457,11 @@ private BuilderStatus setupWorkArea() {
private void setupLandMarkerLabel(InventoryGUI gui, Location loc1, Location loc2) {
if (workArea == null) {
- gui.addLabel("Land Markers", 11, null, "Place two Land Markers", "in these slots, set", "to two opposite corners", "of the area to work.");
+ gui.addLabel("标记点一", 11, null, "放置两个标记点", "左键右键分别点击长方形对角线");
} else {
int v = workArea.getVolume();
String s = v == 1 ? "" : "s";
- gui.addLabel("Land Markers", 11, null, "Work Area:", MiscUtil.formatLocation(loc1), MiscUtil.formatLocation(loc2), v + " block" + s);
+ gui.addLabel("标记点二", 11, null, "建造面积:", MiscUtil.formatLocation(loc1), MiscUtil.formatLocation(loc2), v + " block" + s);
}
}
@@ -508,7 +508,7 @@ public int onShiftClickInsert(HumanEntity player, int slot, ItemStack toInsert)
if (((LandMarker) item).getMarkedLocation() != null) {
insertLandMarker(toInsert);
} else {
- STBUtil.complain((Player) player, "Land Marker doesn't have a location set!");
+ STBUtil.complain((Player) player, "你没有标记标记点!");
}
// we just put a copy of the land marker into the builder
return 0;
@@ -606,16 +606,16 @@ public int getYDirection() {
private enum BuilderStatus {
- READY(DyeColor.LIME, "Ready to Operate!"),
- NO_WORKAREA(DyeColor.YELLOW, "No work area has", "been defined yet"),
- NO_INVENTORY(DyeColor.RED, "Out of building material!", "Place more blocks in", "the inventory and", "press Start to resume"),
- NO_PERMISSION(DyeColor.RED, "Builder doesn't have", "building rights in", "this area"),
- TOO_NEAR(DyeColor.RED, "Auto Builder is inside", "the work area!"),
- TOO_FAR(DyeColor.RED, "Auto Builder is too far", "away from the work area!", "Place it " + MAX_DISTANCE + " blocks or less from", "the edge of the work area"),
- LM_WORLDS_DIFFERENT(DyeColor.RED, "Land Markers are", "from different worlds!"),
- RUNNING(DyeColor.LIGHT_BLUE, "Builder is running", "Press Start button to pause"),
- PAUSED(DyeColor.ORANGE, "Builder has been paused", "Press Start button to resume"),
- FINISHED(DyeColor.WHITE, "Builder has finished!", "Ready for next operation");
+ READY(DyeColor.LIME, "准备就绪!"),
+ NO_WORKAREA(DyeColor.YELLOW, "你还没有确定建筑区域"),
+ NO_INVENTORY(DyeColor.RED, "建筑材料已用完!", "请放入更多的方块", "然后按下开始键"),
+ NO_PERMISSION(DyeColor.RED, "你没有此区域的建筑权限"),
+ TOO_NEAR(DyeColor.RED, "建筑魔杖正在工作!"),
+ TOO_FAR(DyeColor.RED, "建筑魔杖离建筑区域太远了,请走进" + MAX_DISTANCE + "格,到距离建筑区的边缘"),
+ LM_WORLDS_DIFFERENT(DyeColor.RED, "此标记点来自不同的世界!"),
+ RUNNING(DyeColor.LIGHT_BLUE, "建筑魔杖正在运行,你可以按下开始按钮暂停"),
+ PAUSED(DyeColor.ORANGE, "建筑魔杖已暂停,你可以恢复他"),
+ FINISHED(DyeColor.WHITE, "建筑完成,可以准备下一次建筑");
private final DyeColor color;
private final String[] text;
@@ -642,7 +642,7 @@ public DyeColor getColor() {
public boolean resetBuildPosition() {
// returning true causes the build position to be reset
- // when the Start button is pressed
+ // when the Start button is pressed.
return this != PAUSED && this != NO_INVENTORY;
}
}
@@ -651,10 +651,10 @@ private class AutoBuilderGadget extends CyclerGadget {
protected AutoBuilderGadget(InventoryGUI gui, int slot) {
super(gui, slot, "Build Mode");
- add(AutoBuilderMode.CLEAR, ChatColor.YELLOW, Material.WHITE_STAINED_GLASS, "Clear all blocks", "in the work area");
- add(AutoBuilderMode.FILL, ChatColor.YELLOW, Material.BRICK, "Use inventory to replace", "all empty blocks", "in the work area");
- add(AutoBuilderMode.WALLS, ChatColor.YELLOW, Material.COBBLESTONE_WALL, "Use inventory to build", "walls around the", "the work area");
- add(AutoBuilderMode.FRAME, ChatColor.YELLOW, Material.OAK_FENCE, "Use inventory to build", "a frame around the", "the work area");
+ add(AutoBuilderMode.CLEAR, ChatColor.YELLOW, Material.WHITE_STAINED_GLASS, "清除区域的所有方块");
+ add(AutoBuilderMode.FILL, ChatColor.YELLOW, Material.BRICK, "使用清除物来清除区域内所有方块");
+ add(AutoBuilderMode.WALLS, ChatColor.YELLOW, Material.COBBLESTONE_WALL, "利用库存在建筑区周围筑墙");
+ add(AutoBuilderMode.FRAME, ChatColor.YELLOW, Material.OAK_FENCE, "利用库存在工作区周围建一个框架");
setInitialValue(((AutoBuilder) gui.getOwningBlock()).getBuildMode());
}
@@ -675,3 +675,4 @@ public boolean isEnabled() {
}
}
}
+