be9c7ea
Branches > main > be9c7ea > files / src / main / kotlin / net / bowmap / server
Move fishing loot table
Commit: be9c7ea906d4c9f9c2c4286e347c5d4c810e75be
Parent: cb458b8
2 changed files:
src/main/kotlin/net/bowmap/handlers/Fishing.kt view file
@@ -12,6 +12,8 @@ import org.bukkit.event.player.PlayerFishEvent.State import org.bukkit.util.Vector +import net.bowmap.server.loot.tables.fishingLootTable+ private fun calculateFishVelocity(e: PlayerCaughtFish): Vector { val eye = e.player.eyeLocation val distance = eye.distance(e.hook.location)@@ -22,64 +24,6 @@ .multiply(0.2 + distance * 0.1) } -private val fishingLootTable = WeightedLoot(- Category(- "trash",- 100,- MaterialLoot(ROTTEN_FLESH), MaterialLoot(ROTTEN_FLESH), MaterialLoot(STRING), MaterialLoot(BONE), MaterialLoot(SPIDER_EYE), MaterialLoot(GUNPOWDER)- ),-- Category(- "rareTrash",- 15,- MaterialLoot(TRIPWIRE_HOOK), MaterialLoot(STICK), MaterialLoot(REDSTONE), MaterialLoot(GLOWSTONE_DUST), MaterialLoot(FEATHER),- MaterialLoot(CLAY_BALL, 4),- MaterialLoot(HONEYCOMB, 3),- MaterialLoot(LEATHER, 2)- ),-- Category(- "fish",- 20,- MaterialLoot(COD), MaterialLoot(SALMON)- ),-- Category(- "exoticFish",- 6,- MaterialLoot(PUFFERFISH), MaterialLoot(TROPICAL_FISH)- ),-- Category(- "decoration",- 2,- MaterialLoot(SKELETON_SKULL), MaterialLoot(PAINTING), MaterialLoot(OAK_SIGN), MaterialLoot(BELL), MaterialLoot(DECORATED_POT),- LootList(MaterialLoot(WHITE_BANNER), MaterialLoot(BLACK_BANNER), MaterialLoot(GRAY_BANNER), MaterialLoot(GREEN_BANNER), MaterialLoot(BLUE_BANNER))- ),-- Category(- "treasure",- 6,- MaterialLoot(GLOW_INK_SAC),- MaterialLoot(IRON_NUGGET, 6),- MaterialLoot(GOLD_NUGGET, 5),- MaterialLoot(PRISMARINE_SHARD, 3),- MaterialLoot(PRISMARINE_CRYSTALS, 3)- ),-- Category(- "extremeTreasure",- 2,- MaterialLoot(IRON_INGOT), MaterialLoot(GOLD_INGOT), MaterialLoot(COPPER_INGOT), MaterialLoot(NAME_TAG), MaterialLoot(TNT), MaterialLoot(GLASS_BOTTLE), MaterialLoot(IRON_SHOVEL)- ),-- Category(- "books",- 3,- MaterialLoot(ENCHANTED_BOOK), MaterialLoot(BOOK)- )-)- object Fishing { fun register() { handler<PlayerStartedFishing> {src/main/kotlin/net/bowmap/server/loot/tables/Fishing.kt view file
@@ -0,0 +1,63 @@+package net.bowmap.server.loot.tables++import net.bowmap.server.loot.*+import org.bukkit.Material.*++// TODO imports+val fishingLootTable = WeightedLoot(+ Category(+ "trash",+ 100,+ MaterialLoot(ROTTEN_FLESH), MaterialLoot(ROTTEN_FLESH), MaterialLoot(STRING), MaterialLoot(BONE), MaterialLoot(SPIDER_EYE), MaterialLoot(GUNPOWDER)+ ),++ Category(+ "rareTrash",+ 15,+ MaterialLoot(TRIPWIRE_HOOK), MaterialLoot(STICK), MaterialLoot(REDSTONE), MaterialLoot(GLOWSTONE_DUST), MaterialLoot(FEATHER),+ MaterialLoot(CLAY_BALL, 4),+ MaterialLoot(HONEYCOMB, 3),+ MaterialLoot(LEATHER, 2)+ ),++ Category(+ "fish",+ 20,+ MaterialLoot(COD), MaterialLoot(SALMON)+ ),++ Category(+ "exoticFish",+ 6,+ MaterialLoot(PUFFERFISH), MaterialLoot(TROPICAL_FISH)+ ),++ Category(+ "decoration",+ 2,+ MaterialLoot(SKELETON_SKULL), MaterialLoot(PAINTING), MaterialLoot(OAK_SIGN), MaterialLoot(BELL), MaterialLoot(DECORATED_POT),+ LootList(MaterialLoot(WHITE_BANNER), MaterialLoot(BLACK_BANNER), MaterialLoot(GRAY_BANNER), MaterialLoot(GREEN_BANNER), MaterialLoot(BLUE_BANNER))+ ),++ Category(+ "treasure",+ 6,+ MaterialLoot(GLOW_INK_SAC),+ MaterialLoot(IRON_NUGGET, 6),+ MaterialLoot(GOLD_NUGGET, 5),+ MaterialLoot(PRISMARINE_SHARD, 3),+ MaterialLoot(PRISMARINE_CRYSTALS, 3)+ ),++ Category(+ "extremeTreasure",+ 2,+ MaterialLoot(IRON_INGOT), MaterialLoot(GOLD_INGOT), MaterialLoot(COPPER_INGOT), MaterialLoot(NAME_TAG), MaterialLoot(TNT), MaterialLoot(GLASS_BOTTLE), MaterialLoot(IRON_SHOVEL)+ ),++ Category(+ "books",+ 3,+ MaterialLoot(ENCHANTED_BOOK), MaterialLoot(BOOK)+ )+)