Skip to content

Commit

Permalink
补充汉化
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Jun 18, 2022
1 parent b00a079 commit 6fd9a53
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rules:
mergeMethod: merge
assignees:
- ybw0014
- haiman233
conflictReviewers:
- ybw0014

Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ private Stacks() {
"NPS_MIXING_QUARTZ_1",
Material.QUARTZ,
Theme.TOOL,
"Mixing Quartz",
"Drop 3 Netheo Paste on the ground",
"and right click with this mixing",
"quartz to form a Netheo Ball",
"The type and flavour depends on the",
"pastes dropped."
"混合石英",
"在地上丢出3种下界浆糊,",
"手持混合石英右键点击",
"将它们混合成为下界丸子.",
"丸子的类型与风味值取决于",
"下界浆糊的类型."
);

public static final SlimefunItemStack ENDER_CAKE = Theme.themedSlimefunItemStack(
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 @@ -55,12 +57,12 @@ public class TradesFlexGroup extends FlexItemGroup {

private static final ItemStack TRADE_ITEM_INFO = new CustomItemStack(
Material.LIGHT_BLUE_STAINED_GLASS_PANE,
Theme.PASSIVE + "The Item Given to the Trader"
Theme.PASSIVE + "你提供的物品"
);

private static final ItemStack DROPPED_ITEM_INFO = new CustomItemStack(
Material.LIGHT_BLUE_STAINED_GLASS_PANE,
Theme.PASSIVE + "The Item you receive"
Theme.PASSIVE + "你获得的物品"
);

private static final ItemStack HELD_SLOT = new CustomItemStack(
Expand Down Expand Up @@ -115,12 +117,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 Expand Up @@ -161,16 +167,21 @@ private void displayDetail(Player p,
int returnPage,
Trade trade
) {
// Back Button
// Sound
p.playSound(p.getLocation(), Sound.ITEM_BOOK_PAGE_TURN, 1.0F, 1.0F);

// Back
menu.replaceExistingItem(
GUIDE_BACK,
ChestMenuUtils.getBackButton(
p,
Slimefun.getLocalization().getMessage("guide.back.guide")
"",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(p, "guide.back.guide")
)
);
menu.addMenuClickHandler(GUIDE_BACK, (player1, slot, itemStack, clickAction) -> {
setupPage(player1, profile, mode, menu, returnPage);
p.playSound(p.getLocation(), Sound.ITEM_BOOK_PAGE_TURN, 1.0F, 1.0F);
return false;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class MixingQuartz extends LimitedUseItem {

private static final NamespacedKey KEY = Keys.newKey("uses");
private static final Pattern LORE_FLAVOUR = Pattern.compile(Theme.CLICK_INFO + "Flavour: [0-9]+");
private static final Pattern LORE_FLAVOUR = Pattern.compile(Theme.CLICK_INFO + "风味值: [0-9]+");

public MixingQuartz(ItemGroup group,
SlimefunItemStack item,
Expand Down Expand Up @@ -100,7 +100,7 @@ private void onUse(@Nonnull PlayerRightClickEvent event) {
for (int i = 0; i < lore.size(); i++) {
final String string = lore.get(i);
if (LORE_FLAVOUR.matcher(string).matches()) {
lore.set(i, Theme.CLICK_INFO.asTitle("Flavour", volume));
lore.set(i, Theme.CLICK_INFO.asTitle("风味值", volume));
}
}
// Set meta and drop item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private FileConfiguration getConfig(@Nonnull String fileName) {
}

public void saveAll() {
Netheopoiesis.getInstance().getLogger().info("Netheopoiesis saving data.");
Netheopoiesis.getInstance().getLogger().info("正在保存下界乌托邦数据.");
saveDiscoveries();
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 开启自动更新
auto-update: true
# 开启调试
debug-messages: false
# 生物生成
spawning:
player-cap-water-ambient: 15
player-cap-water-animal: 5
Expand All @@ -10,6 +13,7 @@ spawning:
player-cap-villager: 5
player-cap-piglin-trader: 1
player-cap-wandering-trader: 1
# 速率
speed:
speed-multiplier-crux-spread: 1
speed-crystalline-crux-spread: 1
Expand Down

0 comments on commit 6fd9a53

Please sign in to comment.