Skip to content

Commit

Permalink
chore(wiki): 添加 Wiki 链接
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed May 12, 2024
1 parent 6573041 commit 8a81689
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<dependency>
<groupId>com.github.StarWishsama</groupId>
<artifactId>Slimefun4</artifactId>
<version>eabaa21b05</version>
<version>2024.3</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -142,14 +142,14 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.32</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.0</version>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
import java.util.Map;
import java.util.logging.Level;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import lombok.SneakyThrows;
import net.guizhanss.guizhanlibplugin.updater.GuizhanUpdater;
import net.guizhanss.slimefun4.utils.WikiUtils;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
Expand Down Expand Up @@ -109,6 +111,8 @@ public void onEnable() {
FluffyItemSetup.setup(this);
FluffyItemSetup.setupBarrels(this);

WikiUtils.setupJson(this);

// Register Events Class
getServer().getPluginManager().registerEvents(new Events(), this);
getServer().getPluginManager().registerEvents(new KeyedCrafterListener(), this);
Expand Down Expand Up @@ -213,6 +217,11 @@ public String getBugTrackerURL() {
return "https://github.com/SlimefunGuguProject/FluffyMachines/issues";
}

@Override
public String getWikiURL() {
return "https://slimefun-addons-wiki.guizhanss.cn/fluffy-machines/{0}";
}

@Nonnull
@Override
public JavaPlugin getJavaPlugin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

public class Barrel extends NonHopperableBlock implements DoubleHologramOwner {

private final String WIKI_PAGE = "barrels";

private final int[] inputBorder = {9, 10, 11, 12, 18, 21, 27, 28, 29, 30};
private final int[] outputBorder = {14, 15, 16, 17, 23, 26, 32, 33, 34, 35};
private final int[] plainBorder = {0, 1, 2, 3, 4, 5, 6, 7, 8, 13, 36, 37, 38, 39, 40, 41, 42, 43, 44};
Expand Down Expand Up @@ -318,6 +320,11 @@ public boolean isSynchronized() {
});
}

@Override
public void postRegister() {
addWikiPage(WIKI_PAGE);
}

protected void tick(Block b) {
BlockMenu inv = StorageCacheUtils.getMenu(b.getLocation());
int capacity = getCapacity(b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

public class AutoCrafter extends SlimefunItem implements EnergyNetComponent {

private static final String WIKI_PAGE = "machines/auto-crafters";

public static final int ENERGY_CONSUMPTION = 128;
public static final int CAPACITY = ENERGY_CONSUMPTION * 3;
private final int[] border = {0, 1, 3, 4, 5, 7, 8, 13, 14, 15, 16, 17, 50, 51, 52, 53};
Expand All @@ -61,6 +63,11 @@ public AutoCrafter(ItemGroup category, SlimefunItemStack item, RecipeType recipe
addItemHandler(onBreak());
}

@Override
public void postRegister() {
addWikiPage(WIKI_PAGE);
}

private void constructMenu(String displayName) {
new BlockMenuPreset(getId(), displayName) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private FluffyItems() {
public static final SlimefunItemStack ADVANCED_AUTO_DISENCHANTER = new SlimefunItemStack(
"ADVANCED_AUTO_DISENCHANTER",
Material.ENCHANTING_TABLE,
"&c高级全自动驱魔机",
"&c高级全自动祛魔机",
"",
"&7从一个物品中移除第一个附魔",
"&7需要一本&6远古之书&7来操作",
Expand All @@ -334,10 +334,10 @@ private FluffyItems() {
public static final SlimefunItemStack UPGRADED_LUMBER_AXE = new SlimefunItemStack(
"UPGRADED_LUMBER_AXE",
Material.DIAMOND_AXE,
"&6&l改进斧头",
"&6&l改进伐木斧",
"",
"&7一次砍下整棵树",
"&7右键给树削皮"
"&7一次砍下整棵树",
"&7右键给树削皮"
);
public static final SlimefunItemStack DOLLY = new SlimefunItemStack(
"DOLLY",
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/wiki.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"GENERATOR_CORE": "multiblock/crank-generator",
"CRANK_GENERATOR": "multiblock/crank-generator",
"FOUNDRY": "multiblock/foundry",
"SUPERHEATED_FURNACE": "multiblock/foundry",
"AUTO_CRAFTING_TABLE": "machines/auto-crafting-table",
"ADVANCED_CHARGING_BENCH": "machines/advanced-charging-bench",
"ACB_UPGRADE_CARD": "machines/advanced-charging-bench",
"SMART_FACTORY": "machines/smart-factory"
}

0 comments on commit 8a81689

Please sign in to comment.