diff --git a/src/main/java/net/momirealms/customfishing/fishing/bar/ModeThreeBar.java b/src/main/java/net/momirealms/customfishing/fishing/bar/ModeThreeBar.java index 3dc4d231..ce9c2080 100644 --- a/src/main/java/net/momirealms/customfishing/fishing/bar/ModeThreeBar.java +++ b/src/main/java/net/momirealms/customfishing/fishing/bar/ModeThreeBar.java @@ -4,7 +4,56 @@ import org.bukkit.configuration.ConfigurationSection; public class ModeThreeBar extends FishingBar { + private final String fish_image; + private final int fish_icon_width; + private final String[] strain; + private final String[] struggling_fish_image; + private final int bar_effective_width; + private final int fish_offset; + private final int fish_start_position; + private final int success_position; + public ModeThreeBar(ConfigurationSection section) { super(section); + this.fish_icon_width = section.getInt("arguments.fish-icon-width"); + this.fish_image = section.getString("subtitle.fish"); + this.strain = section.getStringList("strain").toArray(new String[0]); + this.struggling_fish_image = section.getStringList("subtitle.struggling-fish").toArray(new String[0]); + this.bar_effective_width = section.getInt("arguments.bar-effective-area-width"); + this.fish_offset = section.getInt("arguments.fish-offset"); + this.fish_start_position = section.getInt("arguments.fish-start-position"); + this.success_position = section.getInt("arguments.success-position"); + } + + public String getFish_image() { + return fish_image; + } + + public int getFish_icon_width() { + return fish_icon_width; + } + + public String[] getStrain() { + return strain; + } + + public int getBar_effective_width() { + return bar_effective_width; + } + + public int getFish_offset() { + return fish_offset; + } + + public int getFish_start_position() { + return fish_start_position; + } + + public int getSuccess_position() { + return success_position; + } + + public String[] getStruggling_fish_image() { + return struggling_fish_image; } } diff --git a/src/main/java/net/momirealms/customfishing/fishing/loot/Item.java b/src/main/java/net/momirealms/customfishing/fishing/loot/Item.java index 1de02140..d2d3721d 100644 --- a/src/main/java/net/momirealms/customfishing/fishing/loot/Item.java +++ b/src/main/java/net/momirealms/customfishing/fishing/loot/Item.java @@ -41,6 +41,7 @@ public class Item { private String head64; private List enchantment; private Map nbt; + private String totem; public Item(Material material, String key) { this.material = material; @@ -79,6 +80,9 @@ public class Item { if (section.contains("head64")) { this.setHead64(section.getString("head64")); } + if (section.contains("totem")) { + this.setTotem(section.getString("totem")); + } } public Material getMaterial() { @@ -157,6 +161,14 @@ public class Item { return amount; } + public String getTotem() { + return totem; + } + + public void setTotem(String totem) { + this.totem = totem; + } + public Item cloneWithPrice(double price){ Item newItem = new Item(this.material, this.key); if (this.lore != null){ diff --git a/src/main/java/net/momirealms/customfishing/fishing/mode/ModeThreeGame.java b/src/main/java/net/momirealms/customfishing/fishing/mode/ModeThreeGame.java index 4996dc2a..7232d335 100644 --- a/src/main/java/net/momirealms/customfishing/fishing/mode/ModeThreeGame.java +++ b/src/main/java/net/momirealms/customfishing/fishing/mode/ModeThreeGame.java @@ -1,13 +1,100 @@ package net.momirealms.customfishing.fishing.mode; import net.momirealms.customfishing.CustomFishing; -import net.momirealms.customfishing.fishing.bar.FishingBar; +import net.momirealms.customfishing.fishing.bar.ModeThreeBar; import net.momirealms.customfishing.manager.FishingManager; +import net.momirealms.customfishing.util.AdventureUtil; +import org.bukkit.entity.FishHook; import org.bukkit.entity.Player; public class ModeThreeGame extends FishingGame { - public ModeThreeGame(CustomFishing plugin, FishingManager fishingManager, long deadline, Player player, int difficulty, FishingBar fishingBar) { - super(plugin, fishingManager, deadline, player, difficulty, fishingBar); + private final ModeThreeBar modeThreeBar; + private int fish_position; + private boolean success; + private int timer; + private final int timer_max; + private double strain; + private int struggling_time; + + public ModeThreeGame(CustomFishing plugin, FishingManager fishingManager, long deadline, Player player, int difficulty, ModeThreeBar modeThreeBar) { + super(plugin, fishingManager, deadline, player, difficulty, modeThreeBar); + this.fish_position = modeThreeBar.getFish_start_position(); + this.success = false; + this.modeThreeBar = modeThreeBar; + this.timer_max = modeThreeBar.getStruggling_fish_image().length; + } + + @Override + public void run() { + if (timeOut() || switchItem()) return; + timer++; + if (timer >= timer_max) { + timer = 0; + } + if (struggling_time <= 0) { + if (Math.random() < ((double) difficulty / 200)) { + struggling_time = (int) (20 + Math.random() * difficulty * 3); + } + } + else { + struggling_time--; + } + if (player.isSneaking()) { + if (struggling_time > 0) { + strain += (2 + ((double) difficulty / 5)); + fish_position -= 1; + } + else { + strain += 1; + fish_position -= 2; + } + } + else { + fish_position++; + strain -= 2; + } + if (fish_position < modeThreeBar.getSuccess_position() - modeThreeBar.getFish_icon_width() - 1) { + cancel(); + success = true; + FishHook fishHook = fishingManager.getBobber(player); + if (fishHook != null) { + fishingManager.proceedReelIn(fishHook.getLocation(), player, this); + fishingManager.removeBobber(player); + } + fishingManager.removeFishingPlayer(player); + return; + } + if (fish_position + modeThreeBar.getFish_icon_width() > modeThreeBar.getBar_effective_width() || strain > 50) { + cancel(); + FishHook fishHook = fishingManager.getBobber(player); + if (fishHook != null) { + fishingManager.proceedReelIn(fishHook.getLocation(), player, this); + fishingManager.removeBobber(player); + } + fishingManager.removeFishingPlayer(player); + return; + } + showBar(); + } + + @Override + public void showBar() { + String bar = "" + modeThreeBar.getBarImage() + + "" + offsetManager.getOffsetChars(modeThreeBar.getFish_offset() + fish_position) + "" + + (struggling_time > 0 ? modeThreeBar.getStruggling_fish_image()[timer] : modeThreeBar.getFish_image()) + + "" + offsetManager.getOffsetChars(modeThreeBar.getBar_effective_width() - fish_position - modeThreeBar.getFish_icon_width()) + "" + + ""; + if (strain > 50) strain = 50; + if (strain < 0) strain = 0; + AdventureUtil.playerTitle(player, + title.replace("{strain}", modeThreeBar.getStrain()[(int) ((strain / 50) * modeThreeBar.getStrain().length)]) + , bar,0,500,0 + ); + } + + @Override + public boolean isSuccess() { + return success; } } diff --git a/src/main/java/net/momirealms/customfishing/integration/quest/ClueScrollCFQuest.java b/src/main/java/net/momirealms/customfishing/integration/quest/ClueScrollCFQuest.java index b4eeba77..821444ca 100644 --- a/src/main/java/net/momirealms/customfishing/integration/quest/ClueScrollCFQuest.java +++ b/src/main/java/net/momirealms/customfishing/integration/quest/ClueScrollCFQuest.java @@ -17,6 +17,7 @@ package net.momirealms.customfishing.integration.quest; +import com.electro2560.dev.cluescrolls.api.ClueDataPair; import com.electro2560.dev.cluescrolls.api.ClueScrollsAPI; import com.electro2560.dev.cluescrolls.api.CustomClue; import net.momirealms.customfishing.CustomFishing; @@ -33,20 +34,20 @@ public class ClueScrollCFQuest implements Listener { public ClueScrollCFQuest() { commonClue = ClueScrollsAPI.getInstance().registerCustomClue(CustomFishing.getInstance(), "fish"); - fishClue = ClueScrollsAPI.getInstance().registerCustomClue(CustomFishing.getInstance(), "catch_fish"); + fishClue = ClueScrollsAPI.getInstance().registerCustomClue(CustomFishing.getInstance(), "catch_item"); mobClue = ClueScrollsAPI.getInstance().registerCustomClue(CustomFishing.getInstance(), "catch_mob"); } @EventHandler public void onFish(FishResultEvent event) { if (event.isCancelled()) return; + if (event.getResult() == FishResult.FAILURE) return; + commonClue.handle(event.getPlayer(), event.isDouble() ? 2 : 1, new ClueDataPair("id", event.getLoot_id())); if (event.getResult() == FishResult.CATCH_SPECIAL_ITEM || event.getResult() == FishResult.CATCH_VANILLA_ITEM) { - fishClue.handle(event.getPlayer(), 1); - commonClue.handle(event.getPlayer(), 1); + fishClue.handle(event.getPlayer(), event.isDouble() ? 2 : 1, new ClueDataPair("id", event.getLoot_id())); } if (event.getResult() == FishResult.CATCH_MOB) { - mobClue.handle(event.getPlayer(), 1); - commonClue.handle(event.getPlayer(), 1); + mobClue.handle(event.getPlayer(), 1, new ClueDataPair("id", event.getLoot_id())); } } } diff --git a/src/main/java/net/momirealms/customfishing/manager/BarMechanicManager.java b/src/main/java/net/momirealms/customfishing/manager/BarMechanicManager.java index ba6bd670..e29416f6 100644 --- a/src/main/java/net/momirealms/customfishing/manager/BarMechanicManager.java +++ b/src/main/java/net/momirealms/customfishing/manager/BarMechanicManager.java @@ -21,6 +21,7 @@ import net.momirealms.customfishing.CustomFishing; import net.momirealms.customfishing.fishing.MiniGameConfig; import net.momirealms.customfishing.fishing.bar.FishingBar; import net.momirealms.customfishing.fishing.bar.ModeOneBar; +import net.momirealms.customfishing.fishing.bar.ModeThreeBar; import net.momirealms.customfishing.fishing.bar.ModeTwoBar; import net.momirealms.customfishing.object.Function; import net.momirealms.customfishing.util.AdventureUtil; @@ -77,10 +78,15 @@ public class BarMechanicManager extends Function { AdventureUtil.consoleMessage("[CustomFishing] Bar " + bar + " doesn't exist"); } } + int[] difficulties = section.getIntegerList("difficulty").stream().mapToInt(Integer::intValue).toArray(); + if (difficulties.length == 0) { + AdventureUtil.consoleMessage("[CustomFishing] Game " + key + " doesn't have difficulties"); + continue; + } MiniGameConfig miniGameConfig = new MiniGameConfig( section.getInt("time", 10), fishingBarList.toArray(new FishingBar[0]), - section.getIntegerList("difficulty").stream().mapToInt(Integer::intValue).toArray() + difficulties ); miniGames.put(key, miniGameConfig); } @@ -111,6 +117,10 @@ public class BarMechanicManager extends Function { ModeTwoBar modeTwoBar = new ModeTwoBar(section); bars.put(key, modeTwoBar); } + else if (type == 3) { + ModeThreeBar modeThreeBar = new ModeThreeBar(section); + bars.put(key, modeThreeBar); + } } } AdventureUtil.consoleMessage("[CustomFishing] Loaded " + bars.size() + " bar(s)"); diff --git a/src/main/java/net/momirealms/customfishing/manager/FishingManager.java b/src/main/java/net/momirealms/customfishing/manager/FishingManager.java index f16bddde..4474ce58 100644 --- a/src/main/java/net/momirealms/customfishing/manager/FishingManager.java +++ b/src/main/java/net/momirealms/customfishing/manager/FishingManager.java @@ -30,6 +30,7 @@ import net.momirealms.customfishing.data.PlayerBagData; import net.momirealms.customfishing.fishing.*; import net.momirealms.customfishing.fishing.bar.FishingBar; import net.momirealms.customfishing.fishing.bar.ModeOneBar; +import net.momirealms.customfishing.fishing.bar.ModeThreeBar; import net.momirealms.customfishing.fishing.bar.ModeTwoBar; import net.momirealms.customfishing.fishing.competition.Competition; import net.momirealms.customfishing.fishing.competition.CompetitionGoal; @@ -38,6 +39,7 @@ import net.momirealms.customfishing.fishing.loot.Loot; import net.momirealms.customfishing.fishing.loot.Mob; import net.momirealms.customfishing.fishing.mode.FishingGame; import net.momirealms.customfishing.fishing.mode.ModeOneGame; +import net.momirealms.customfishing.fishing.mode.ModeThreeGame; import net.momirealms.customfishing.fishing.mode.ModeTwoGame; import net.momirealms.customfishing.fishing.requirements.RequirementInterface; import net.momirealms.customfishing.fishing.totem.ActivatedTotem; @@ -378,14 +380,14 @@ public class FishingManager extends Function { else { vanillaLoot.put(player, new VanillaLoot(item.getItemStack(), event.getExpToDrop())); } - showPlayerBar(player, loot); + showFishingBar(player, loot); } // Is vanilla loot else { if (ConfigManager.alwaysFishingBar) { event.setCancelled(true); vanillaLoot.put(player, new VanillaLoot(item.getItemStack(), event.getExpToDrop())); - showPlayerBar(player, null); + showFishingBar(player, null); } //else vanilla fishing mechanic } @@ -399,7 +401,7 @@ public class FishingManager extends Function { } else { event.setCancelled(true); - showPlayerBar(player, loot); + showFishingBar(player, loot); } } } @@ -505,7 +507,7 @@ public class FishingManager extends Function { if (bobberCheckTask != null && bobberCheckTask.isHooked()) { Loot loot = nextLoot.get(player); if (loot == Loot.EMPTY) return; - showPlayerBar(player, loot); + showFishingBar(player, loot); event.setCancelled(true); } } @@ -784,7 +786,7 @@ public class FishingManager extends Function { Loot loot = nextLoot.get(player); if (loot != null) { if (loot == Loot.EMPTY) return; - showPlayerBar(player, loot); + showFishingBar(player, loot); } } @@ -922,7 +924,7 @@ public class FishingManager extends Function { AdventureUtil.playerMessage(player, stringBuilder.substring(0, stringBuilder.length() - MessageManager.splitChar.length())); } - private void showPlayerBar(Player player, @Nullable Loot loot){ + private void showFishingBar(Player player, @Nullable Loot loot){ MiniGameConfig game; if (loot != null && loot.getFishingGames() != null) { game = loot.getFishingGames()[new Random().nextInt(loot.getFishingGames().length)]; @@ -948,14 +950,19 @@ public class FishingManager extends Function { FishingBar fishingBar = game.getRandomBar(); if (fishingBar instanceof ModeOneBar modeOneBar) { ModeOneGame modeOneGame = new ModeOneGame(plugin, this, System.currentTimeMillis() + game.getTime() * 1000L, player, difficult, modeOneBar); - modeOneGame.runTaskTimer(CustomFishing.getInstance(), 0, 1); + modeOneGame.runTaskTimer(plugin, 0, 1); fishingPlayerMap.put(player, modeOneGame); } else if (fishingBar instanceof ModeTwoBar modeTwoBar) { ModeTwoGame modeTwoGame = new ModeTwoGame(plugin, this, System.currentTimeMillis() + game.getTime() * 1000L, player, difficult, modeTwoBar); - modeTwoGame.runTaskTimer(CustomFishing.getInstance(), 0, 1); + modeTwoGame.runTaskTimer(plugin, 0, 1); fishingPlayerMap.put(player, modeTwoGame); } + else if (fishingBar instanceof ModeThreeBar modeThreeBar) { + ModeThreeGame modeThreeGame = new ModeThreeGame(plugin, this, System.currentTimeMillis() + game.getTime() * 1000L, player, difficult, modeThreeBar); + modeThreeGame.runTaskTimer(plugin, 0, 1); + fishingPlayerMap.put(player, modeThreeGame); + } if (vanillaLoot.get(player) == null && loot != null){ for (ActionInterface action : loot.getHookActions()) { action.doOn(player, null); diff --git a/src/main/java/net/momirealms/customfishing/manager/SellManager.java b/src/main/java/net/momirealms/customfishing/manager/SellManager.java index 7dbf831b..3d437261 100644 --- a/src/main/java/net/momirealms/customfishing/manager/SellManager.java +++ b/src/main/java/net/momirealms/customfishing/manager/SellManager.java @@ -93,10 +93,10 @@ public class SellManager extends Function { this.plugin = plugin; this.windowPacketListener = new WindowPacketListener(this); this.inventoryListener = new InventoryListener(this); - this.inventoryMap = new HashMap<>(); this.joinQuitListener = new JoinQuitListener(this); this.sellDataMap = new HashMap<>(); this.triedTimes = new HashMap<>(); + this.inventoryMap = new HashMap<>(); } @Override diff --git a/src/main/java/net/momirealms/customfishing/util/ItemStackUtil.java b/src/main/java/net/momirealms/customfishing/util/ItemStackUtil.java index 4ed9412c..eb956875 100644 --- a/src/main/java/net/momirealms/customfishing/util/ItemStackUtil.java +++ b/src/main/java/net/momirealms/customfishing/util/ItemStackUtil.java @@ -93,6 +93,9 @@ public class ItemStackUtil { NBTListCompound texture = nbtCompound.addCompound("Properties").getCompoundList("textures").addCompound(); texture.setString("Value", item.getHead64()); } + if (item.getTotem() != null) { + nbtItem.setString("Totem", item.getTotem()); + } if (item.getNbt() != null) NBTUtil.setTags(item.getNbt(), nbtItem); return nbtItem.getItem(); } diff --git a/src/main/resources/baits/default.yml b/src/main/resources/baits/default.yml index 7d54bed7..94db37fc 100644 --- a/src/main/resources/baits/default.yml +++ b/src/main/resources/baits/default.yml @@ -5,11 +5,10 @@ simple_bait: lore: - 'Reduce the time spent fishing' - 'But make it more difficult to catch fish' - custom-model-data: 646 - # Click here to learn how effect system works: https://www.yuque.com/docs/share/4842ac5f-b5ea-4568-acef-d510f8bc9064?# 《Modifier System》 + custom-model-data: 50001 effect: time: 0.85 - difficulty: 2 + difficulty: 1 wild_bait: material: paper @@ -17,7 +16,7 @@ wild_bait: name: 'Wild Bait' lore: - 'Decreases fishing time by 30%.' - custom-model-data: 696 + custom-model-data: 50002 effect: time: 0.7 @@ -27,7 +26,7 @@ magnet_bait: name: 'Magnet Bait' lore: - 'Increases the probability of better loots by 15%.' - custom-model-data: 695 + custom-model-data: 50003 effect: weight-multiply: silver: 1.15 diff --git a/src/main/resources/bars/default.yml b/src/main/resources/bars/default.yml index ed825bff..cac270c4 100644 --- a/src/main/resources/bars/default.yml +++ b/src/main/resources/bars/default.yml @@ -547,24 +547,24 @@ bar_11: bar: '뀌' fish: '뀎' struggling-fish: - - 1 - - 2 - - 1 - - 3 + - 뀑 + - 뀐 + - 뀑 + - 뀒 arguments: - punishment: 1 - bar-effective-area-width: 155 - fish-start-position: 55~105 + bar-effective-area-width: 218 + fish-offset: -221 + fish-start-position: 170 fish-icon-width: 8 - success-position: 16 + success-position: 21 strain: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 + - '뀑' + - '뀒' + - '뀓' + - '뀔' + - '뀕' + - '뀖' + - '뀗' + - '뀘' + - '뀙' diff --git a/src/main/resources/enchants/default.yml b/src/main/resources/enchants/default.yml index e6e8b5ab..372490c6 100644 --- a/src/main/resources/enchants/default.yml +++ b/src/main/resources/enchants/default.yml @@ -1,4 +1,4 @@ -# CustomFishing does not contain an enchantment system but it's able to read enchantments from NBT tags and customize its bonus! +# CustomFishing does not contain an enchantment system but it's able to read enchantments from items and customize its bonus! # https://www.yuque.com/docs/share/4842ac5f-b5ea-4568-acef-d510f8bc9064?# 《Modifier System》 minecraft:luck_of_the_sea: #levels diff --git a/src/main/resources/loots/default.yml b/src/main/resources/loots/default.yml index de18715c..42f00614 100644 --- a/src/main/resources/loots/default.yml +++ b/src/main/resources/loots/default.yml @@ -1,5 +1,5 @@ rubbish: - material: paper + material: cod show-in-fishfinder: false display: name: 'Garbage' @@ -59,7 +59,7 @@ tropical_fish: - minecraft:lukewarm_ocean - minecraft:deep_lukewarm_ocean tuna_fish: - material: paper + material: cod nick: Tuna Fish display: name: 'Tuna Fish' @@ -67,7 +67,7 @@ tuna_fish: - 'Tuna is a kind of healthy food.' - 'size: {size}cm' weight: 50 - custom-model-data: 641 + custom-model-data: 50001 action: success: mending: 5 @@ -87,7 +87,7 @@ tuna_fish: - minecraft:warm_ocean tuna_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Tuna Fish <#F5F5F5>(Silver Star)' lore: @@ -95,7 +95,7 @@ tuna_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 666 + custom-model-data: 50002 action: success: mending: 7 @@ -115,7 +115,7 @@ tuna_fish_silver_star: - minecraft:warm_ocean tuna_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Tuna Fish <#FFD700>(Golden Star)' lore: @@ -123,7 +123,7 @@ tuna_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 667 + custom-model-data: 50003 action: success: mending: 9 @@ -142,7 +142,7 @@ tuna_fish_golden_star: - minecraft:lukewarm_ocean - minecraft:warm_ocean pike_fish: - material: paper + material: cod nick: Pike Fish display: name: 'Pike Fish' @@ -153,7 +153,7 @@ pike_fish: - 'water and inland freshwater lakes' - 'size: {size}cm' weight: 70 - custom-model-data: 642 + custom-model-data: 50004 action: success: mending: 4 @@ -171,7 +171,7 @@ pike_fish: - minecraft:warm_ocean pike_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Pike Fish <#F5F5F5>(Silver Star)' lore: @@ -189,7 +189,7 @@ pike_fish_silver_star: price: base: 40 bonus: 1.5 - custom-model-data: 664 + custom-model-data: 50005 requirements: biome: - minecraft:ocean @@ -200,7 +200,7 @@ pike_fish_silver_star: - minecraft:warm_ocean pike_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Pike Fish <#FFD700>(Golden Star)' lore: @@ -218,7 +218,7 @@ pike_fish_golden_star: price: base: 50 bonus: 1.5 - custom-model-data: 665 + custom-model-data: 50006 requirements: biome: - minecraft:ocean @@ -228,7 +228,7 @@ pike_fish_golden_star: - minecraft:lukewarm_ocean - minecraft:warm_ocean gold_fish: - material: paper + material: cod display: name: 'Gold Fish' lore: @@ -238,13 +238,13 @@ gold_fish: weight: 50 price: base: 70 - custom-model-data: 643 + custom-model-data: 50007 action: success: mending: 5 gold_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Gold Fish <#F5F5F5>(Silver Star)' lore: @@ -255,13 +255,13 @@ gold_fish_silver_star: price: base: 80 group: silver - custom-model-data: 658 + custom-model-data: 50008 action: success: mending: 7 gold_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Gold Fish <#FFD700>(Golden Star)' lore: @@ -272,12 +272,12 @@ gold_fish_golden_star: price: base: 100 group: gold - custom-model-data: 659 + custom-model-data: 50009 action: success: mending: 9 perch_fish: - material: paper + material: cod display: name: 'Perch Fish' lore: @@ -285,7 +285,7 @@ perch_fish: - 'foraging at dusk and early morning' - 'size: {size}cm' weight: 100 - custom-model-data: 644 + custom-model-data: 50010 action: success: mending: 3 @@ -299,7 +299,7 @@ perch_fish: - 17000~19000 perch_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Perch Fish <#F5F5F5>(Silver Star)' lore: @@ -308,7 +308,7 @@ perch_fish_silver_star: - 'size: {size}cm' weight: 30 group: silver - custom-model-data: 660 + custom-model-data: 50011 action: success: mending: 6 @@ -322,7 +322,7 @@ perch_fish_silver_star: - 17000~19000 perch_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Perch Fish <#FFD700>(Golden Star)' lore: @@ -331,7 +331,7 @@ perch_fish_golden_star: - 'size: {size}cm' weight: 15 group: gold - custom-model-data: 661 + custom-model-data: 50012 action: success: mending: 12 @@ -344,7 +344,7 @@ perch_fish_golden_star: - 0~3000 - 17000~19000 mullet_fish: - material: paper + material: cod nick: Mullet Fish display: name: 'Mullet Fish' @@ -353,7 +353,7 @@ mullet_fish: - 'to treat spleen and stomach weakness' - 'size: {size}cm' weight: 50 - custom-model-data: 645 + custom-model-data: 50013 action: success: mending: 6 @@ -363,7 +363,7 @@ mullet_fish: bonus: 1.5 mullet_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Mullet Fish <#F5F5F5>(Silver Star)' lore: @@ -372,7 +372,7 @@ mullet_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 662 + custom-model-data: 50014 action: success: mending: 8 @@ -382,7 +382,7 @@ mullet_fish_silver_star: bonus: 1.5 mullet_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Mullet Fish <#FFD700>(Golden Star)' lore: @@ -391,7 +391,7 @@ mullet_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 663 + custom-model-data: 50015 action: success: mending: 12 @@ -400,7 +400,7 @@ mullet_fish_golden_star: base: 50 bonus: 1.5 sardine_fish: - material: paper + material: cod nick: Sardine Fish display: name: 'Sardine Fish' @@ -409,7 +409,7 @@ sardine_fish: - 'Therefore, sardine are also called "smart food"' - 'size: {size}cm' weight: 50 - custom-model-data: 668 + custom-model-data: 50016 action: success: mending: 7 @@ -419,7 +419,7 @@ sardine_fish: bonus: 3.4 sardine_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Sardine Fish <#F5F5F5>(Silver Star)' lore: @@ -428,7 +428,7 @@ sardine_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 669 + custom-model-data: 50017 action: success: mending: 9 @@ -438,7 +438,7 @@ sardine_fish_silver_star: bonus: 3.4 sardine_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Sardine Fish <#FFD700>(Golden Star)' lore: @@ -447,7 +447,7 @@ sardine_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 670 + custom-model-data: 50018 action: success: mending: 14 @@ -456,7 +456,7 @@ sardine_fish_golden_star: base: 15 bonus: 3.4 carp_fish: - material: paper + material: cod nick: Carp Fish display: name: 'Carp Fish' @@ -464,7 +464,7 @@ carp_fish: - 'One of the most common edible fish' - 'size: {size}cm' weight: 100 - custom-model-data: 671 + custom-model-data: 50019 action: success: mending: 6 @@ -485,7 +485,7 @@ carp_fish: - minecraft:sunflower_plains carp_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Carp Fish <#F5F5F5>(Silver Star)' lore: @@ -493,7 +493,7 @@ carp_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 672 + custom-model-data: 50020 action: success: mending: 8 @@ -514,7 +514,7 @@ carp_fish_silver_star: - minecraft:sunflower_plains carp_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Carp Fish <#FFD700>(Golden Star)' lore: @@ -522,7 +522,7 @@ carp_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 673 + custom-model-data: 50021 action: success: mending: 10 @@ -542,7 +542,7 @@ carp_fish_golden_star: - minecraft:old_growth_birch_forest - minecraft:sunflower_plains cat_fish: - material: paper + material: cod display: name: '<#BDB76B>Cat Fish' lore: @@ -550,7 +550,7 @@ cat_fish: - 'sharp jaw teeth, short intestine and stomach' - 'size: {size}cm' weight: 50 - custom-model-data: 674 + custom-model-data: 50022 action: success: mending: 6 @@ -571,7 +571,7 @@ cat_fish: - minecraft:sunflower_plains cat_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#BDB76B>Cat Fish <#F5F5F5>(Silver Star)' lore: @@ -580,7 +580,7 @@ cat_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 675 + custom-model-data: 50023 action: success: mending: 10 @@ -601,7 +601,7 @@ cat_fish_silver_star: - minecraft:sunflower_plains cat_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#BDB76B>Cat Fish <#FFD700>(Golden Star)' lore: @@ -610,7 +610,7 @@ cat_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 676 + custom-model-data: 50024 action: success: mending: 13 @@ -630,7 +630,7 @@ cat_fish_golden_star: - minecraft:old_growth_birch_forest - minecraft:sunflower_plains octopus: - material: paper + material: cod nick: 'Octopus' display: name: 'Octopus' @@ -639,7 +639,7 @@ octopus: - 'People often use pots to catch octopus' - 'size: {size}cm' weight: 50 - custom-model-data: 677 + custom-model-data: 50025 action: success: mending: 6 @@ -657,7 +657,7 @@ octopus: - minecraft:jungle octopus_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Octopus <#F5F5F5>(Silver Star)' lore: @@ -666,7 +666,7 @@ octopus_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 678 + custom-model-data: 50026 action: success: mending: 7 @@ -686,7 +686,7 @@ octopus_silver_star: - minecraft:warm_ocean octopus_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Octopus <#FFD700>(Golden Star)' lore: @@ -695,7 +695,7 @@ octopus_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 679 + custom-model-data: 50027 action: success: mending: 8 @@ -714,7 +714,7 @@ octopus_golden_star: - minecraft:lukewarm_ocean - minecraft:warm_ocean sunfish: - material: paper + material: cod nick: <#F5DEB3>Sunfish display: name: '<#F5DEB3>Sunfish' @@ -722,7 +722,7 @@ sunfish: - 'It only has one huge head' - 'size: {size}cm' weight: 50 - custom-model-data: 680 + custom-model-data: 50028 action: success: mending: 9 @@ -732,7 +732,7 @@ sunfish: bonus: 1.5 sunfish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#F5DEB3>Sunfish <#F5F5F5>(Silver Star)' lore: @@ -740,7 +740,7 @@ sunfish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 681 + custom-model-data: 50029 action: success: mending: 10 @@ -750,7 +750,7 @@ sunfish_silver_star: bonus: 1.5 sunfish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#F5DEB3>Sunfish <#FFD700>(Golden Star)' lore: @@ -758,7 +758,7 @@ sunfish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 682 + custom-model-data: 50030 action: success: mending: 15 @@ -767,7 +767,7 @@ sunfish_golden_star: base: 26 bonus: 1.5 red_snapper_fish: - material: paper + material: cod display: name: 'Red Snapper Fish' lore: @@ -775,7 +775,7 @@ red_snapper_fish: - 'with a male as the "head of the family"' - 'size: {size}cm' weight: 100 - custom-model-data: 683 + custom-model-data: 50031 action: success: mending: 10 @@ -785,7 +785,7 @@ red_snapper_fish: bonus: 2.3 red_snapper_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Red Snapper Fish <#F5F5F5>(Silver Star)' lore: @@ -794,7 +794,7 @@ red_snapper_fish_silver_star: - 'size: {size}cm' weight: 40 group: silver - custom-model-data: 684 + custom-model-data: 50032 action: success: mending: 12 @@ -804,7 +804,7 @@ red_snapper_fish_silver_star: bonus: 2.3 red_snapper_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: 'Red Snapper Fish <#FFD700>(Golden Star)' lore: @@ -813,7 +813,7 @@ red_snapper_fish_golden_star: - 'size: {size}cm' weight: 20 group: gold - custom-model-data: 685 + custom-model-data: 50033 action: success: mending: 14 @@ -822,7 +822,7 @@ red_snapper_fish_golden_star: base: 10 bonus: 2.3 salmon_void_fish: - material: paper + material: cod in-lava: true nick: Void Salmon display: @@ -830,7 +830,7 @@ salmon_void_fish: lore: - 'A fish from the hell' weight: 50 - custom-model-data: 686 + custom-model-data: 50034 action: success: mending: 20 @@ -842,14 +842,14 @@ salmon_void_fish: salmon_void_fish_silver_star: show-in-fishfinder: false in-lava: true - material: paper + material: cod display: name: 'Void Salmon<#F5F5F5>(Silver Star)' lore: - 'A fish from the hell' weight: 20 group: silver - custom-model-data: 687 + custom-model-data: 50035 action: success: mending: 24 @@ -861,14 +861,14 @@ salmon_void_fish_silver_star: salmon_void_fish_golden_star: show-in-fishfinder: false in-lava: true - material: paper + material: cod display: name: 'Void Salmon <#FFD700>(Golden Star)' lore: - 'A fish from the hell' weight: 10 group: gold - custom-model-data: 688 + custom-model-data: 50036 action: success: mending: 28 @@ -878,7 +878,7 @@ salmon_void_fish_golden_star: world: - world_nether woodskip_fish: - material: paper + material: cod nick: <#CD5C5C>Woodskip Fish display: name: '<#CD5C5C>Woodskip Fish' @@ -887,7 +887,7 @@ woodskip_fish: - 'live in pools deep in the forest' - 'size: {size}cm' weight: 50 - custom-model-data: 689 + custom-model-data: 50037 action: success: mending: 6 @@ -903,7 +903,7 @@ woodskip_fish: - minecraft:birch_forest woodskip_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#CD5C5C>Woodskip Fish <#F5F5F5>(Silver Star)' lore: @@ -912,7 +912,7 @@ woodskip_fish_silver_star: - 'size: {size}cm' weight: 20 group: silver - custom-model-data: 690 + custom-model-data: 50038 action: success: mending: 9 @@ -928,7 +928,7 @@ woodskip_fish_silver_star: - minecraft:birch_forest woodskip_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#CD5C5C>Woodskip Fish <#FFD700>(Golden Star)' lore: @@ -937,7 +937,7 @@ woodskip_fish_golden_star: - 'size: {size}cm' weight: 10 group: gold - custom-model-data: 691 + custom-model-data: 50039 action: success: mending: 13 @@ -952,7 +952,7 @@ woodskip_fish_golden_star: - minecraft:flower_forest - minecraft:birch_forest sturgeon_fish: - material: paper + material: cod nick: <#48D1CC>Sturgeon Fish display: name: '<#48D1CC>Sturgeon Fish' @@ -961,7 +961,7 @@ sturgeon_fish: - 'population. Females can live up to 150 years' - 'size: {size}cm' weight: 5 - custom-model-data: 692 + custom-model-data: 50040 action: success: mending: 28 @@ -974,7 +974,7 @@ sturgeon_fish: - -64~0 sturgeon_fish_silver_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#48D1CC>Sturgeon Fish <#F5F5F5>(Silver Star)' lore: @@ -983,7 +983,7 @@ sturgeon_fish_silver_star: - 'size: {size}cm' weight: 2 group: silver - custom-model-data: 693 + custom-model-data: 50041 action: success: mending: 35 @@ -996,7 +996,7 @@ sturgeon_fish_silver_star: - -64~0 sturgeon_fish_golden_star: show-in-fishfinder: false - material: paper + material: cod display: name: '<#48D1CC>Sturgeon Fish <#FFD700>(Golden Star)' lore: @@ -1005,7 +1005,7 @@ sturgeon_fish_golden_star: - 'size: {size}cm' weight: 1 group: gold - custom-model-data: 694 + custom-model-data: 50042 action: success: mending: 42 diff --git a/src/main/resources/loots/example.yml b/src/main/resources/loots/example.yml index a5a3e605..f5adf8bd 100644 --- a/src/main/resources/loots/example.yml +++ b/src/main/resources/loots/example.yml @@ -22,7 +22,8 @@ rainbow_fish: # 比赛中获取的分数 score: 10 - + minigame: + - # Basic elements of an item # You can use MiniMessage format in name & lore diff --git a/src/main/resources/utils/fish_finder.yml b/src/main/resources/utils/fish_finder.yml index 7b8ca4fc..6f8fbf31 100644 --- a/src/main/resources/utils/fish_finder.yml +++ b/src/main/resources/utils/fish_finder.yml @@ -1,7 +1,7 @@ fishfinder: - material: PAPER + material: COMPASS display: name: 'Fish Finder' lore: - 'Right click to see what fish can be caught in this place!' - custom-model-data: 647 + custom-model-data: 50001 diff --git a/src/main/resources/utils/splash_items.yml b/src/main/resources/utils/splash_items.yml index bfea0fc5..45ed531e 100644 --- a/src/main/resources/utils/splash_items.yml +++ b/src/main/resources/utils/splash_items.yml @@ -1,6 +1,6 @@ water_effect: material: PAPER - custom-model-data: 888 + custom-model-data: 49998 lava_effect: material: PAPER - custom-model-data: 889 \ No newline at end of file + custom-model-data: 49999 \ No newline at end of file diff --git a/src/main/resources/utils/totem_items.yml b/src/main/resources/utils/totem_items.yml index 5bc5b22f..9d6021f2 100644 --- a/src/main/resources/utils/totem_items.yml +++ b/src/main/resources/utils/totem_items.yml @@ -2,5 +2,4 @@ totem_activator: material: DIAMOND display: name: 'Double Loot Fishing Totem Core' - nbt: - Totem: (String) double_loot_fishing_totem \ No newline at end of file + totem: double_loot_fishing_totem \ No newline at end of file