Skip to content

Commit

Permalink
Adjusted how some loot tables work
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticKoko committed Dec 1, 2024
1 parent ab1e3f9 commit b8cae37
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 137 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "hybrid-aquatic:goldfish"
"name": "hybrid-aquatic:surgeonfish_lined"
}
],
"rolls": 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import net.minecraft.loot.provider.number.UniformLootNumberProvider
import net.minecraft.util.Identifier
import java.util.function.BiConsumer

class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTableProvider(output, LootContextTypes.GENERIC) {
class GenericLootTableProvider(output: FabricDataOutput) :
SimpleFabricLootTableProvider(output, LootContextTypes.GENERIC) {
override fun accept(exporter: BiConsumer<Identifier, LootTable.Builder>) {
exporter.accept(
HybridAquaticLootTables.CRAB_POT_TREASURE_ID,
Expand Down Expand Up @@ -519,7 +520,7 @@ class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTable
)

exporter.accept(
HybridAquaticLootTables.BLUE_TANG,
HybridAquaticLootTables.SURGEONFISH_BLUE_TANG,
LootTable.builder()
.pool(
LootPool.builder()
Expand All @@ -537,7 +538,7 @@ class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTable
)

exporter.accept(
HybridAquaticLootTables.UNICORNFISH,
HybridAquaticLootTables.SURGEONFISH_UNICORNFISH,
LootTable.builder()
.pool(
LootPool.builder()
Expand All @@ -546,7 +547,7 @@ class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTable
)

exporter.accept(
HybridAquaticLootTables.SOHAL,
HybridAquaticLootTables.SURGEONFISH_SOHAL,
LootTable.builder()
.pool(
LootPool.builder()
Expand All @@ -555,56 +556,38 @@ class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTable
)

exporter.accept(
HybridAquaticLootTables.ORANGESHOULDER,
HybridAquaticLootTables.SURGEONFISH_LINED,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.SURGEONFISH_ORANGESHOULDER))
)
)

exporter.accept(
HybridAquaticLootTables.POWDER_BLUE_TANG,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.POWDER_BLUE_TANG))
)
)

exporter.accept(
HybridAquaticLootTables.YELLOW_TANG,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.YELLOW_TANG))
.with(ItemEntry.builder(HybridAquaticItems.SURGEONFISH_LINED))
)
)

exporter.accept(
HybridAquaticLootTables.SEAHORSE,
HybridAquaticLootTables.SURGEONFISH_ORANGESHOULDER,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.SEAHORSE))
.with(ItemEntry.builder(HybridAquaticItems.SURGEONFISH_ORANGESHOULDER))
)
)

exporter.accept(
HybridAquaticLootTables.SUNFISH,
HybridAquaticLootTables.SURGEONFISH_POWDER_BLUE_TANG,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.SUNFISH))
.with(ItemEntry.builder(HybridAquaticItems.POWDER_BLUE_TANG))
)
)

exporter.accept(
HybridAquaticLootTables.GOLDFISH,
HybridAquaticLootTables.SURGEONFISH_YELLOW_TANG,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.GOLDFISH))
.with(ItemEntry.builder(HybridAquaticItems.YELLOW_TANG))
)
)

Expand All @@ -626,24 +609,6 @@ class GenericLootTableProvider(output: FabricDataOutput) : SimpleFabricLootTable
)
)

exporter.accept(
HybridAquaticLootTables.PARROTFISH,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.PARROTFISH))
)
)

exporter.accept(
HybridAquaticLootTables.SEABASS_BLACK,
LootTable.builder()
.pool(
LootPool.builder()
.with(ItemEntry.builder(HybridAquaticItems.SEA_BASS))
)
)

exporter.accept(
HybridAquaticLootTables.YELLOWFIN,
LootTable.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import net.minecraft.entity.EntityType
import net.minecraft.entity.attribute.DefaultAttributeContainer
import net.minecraft.entity.attribute.EntityAttributes
import net.minecraft.entity.mob.WaterCreatureEntity
import net.minecraft.util.Identifier
import net.minecraft.world.World

class BettaEntity(entityType: EntityType<out BettaEntity>, world: World) :
Expand Down Expand Up @@ -34,9 +35,14 @@ class BettaEntity(entityType: EntityType<out BettaEntity>, world: World) :
HybridAquaticEntityTags.LARGE_PREY,
HybridAquaticEntityTags.SHARK)) {

public override fun getLootTableId(): Identifier {
return Identifier("hybrid-aquatic", "entities/betta")
}

override fun getLimitPerChunk(): Int {
return 2
}

companion object {
fun createMobAttributes(): DefaultAttributeContainer.Builder {
return WaterCreatureEntity.createMobAttributes()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ class GoldfishEntity(entityType: EntityType<out GoldfishEntity>, world: World) :
HybridAquaticEntityTags.SHARK)) {

public override fun getLootTableId(): Identifier {
return when (this.variant?.variantName) {
"shubunkin" -> Identifier("hybrid-aquatic", "gameplay/goldfish")
else -> super.getLootTableId()
}
return Identifier("hybrid-aquatic", "entities/goldfish")
}

override fun getLimitPerChunk(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class ParrotfishEntity(entityType: EntityType<out ParrotfishEntity>, world: Worl
HybridAquaticEntityTags.SHARK)) {

public override fun getLootTableId(): Identifier {
return when (this.variant?.variantName) {
"humphead" -> Identifier("hybrid-aquatic", "gameplay/parrotfish")
else -> super.getLootTableId()
}
return Identifier("hybrid-aquatic", "entities/parrotfish")
}

override fun getLimitPerChunk(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ class SeaBassEntity(entityType: EntityType<out SeaBassEntity>, world: World) :
HybridAquaticEntityTags.SHARK)) {

public override fun getLootTableId(): Identifier {
return when (this.variant?.variantName) {
"black" -> Identifier("hybrid-aquatic", "gameplay/seabass_black")
else -> super.getLootTableId()
}
return Identifier("hybrid-aquatic", "entity/sea_bass")
}

override fun getLimitPerChunk(): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class SurgeonfishEntity(entityType: EntityType<out SurgeonfishEntity>, world: Wo

public override fun getLootTableId(): Identifier {
return when (this.variant?.variantName) {
"blue_tang" -> Identifier("hybrid-aquatic", "gameplay/blue_tang")
"yellow_tang" -> Identifier("hybrid-aquatic", "gameplay/yellow_tang")
"powder_blue_tang" -> Identifier("hybrid-aquatic", "gameplay/powder_blue_tang")
"sohal" -> Identifier("hybrid-aquatic", "gameplay/sohal")
"orangeshoulder" -> Identifier("hybrid-aquatic", "gameplay/orangeshoulder")
"lined" -> Identifier("hybrid-aquatic", "gameplay/lined")
"unicornfish" -> Identifier("hybrid-aquatic", "gameplay/unicornfish")
"blue_tang" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_blue_tang")
"yellow_tang" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_yellow_tang")
"powder_blue_tang" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_powder_blue_tang")
"sohal" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_sohal")
"orangeshoulder" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_orangeshoulder")
"lined" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_lined")
"unicornfish" -> Identifier("hybrid-aquatic", "gameplay/surgeonfish_unicornfish")
else -> super.getLootTableId()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ object HybridAquaticLootTables {
val TUBE_SPONGE_LOOT_ID = Identifier(HybridAquatic.MOD_ID, "gameplay/tube_sponge_drops")
val VENT_LOOT_ID = Identifier(HybridAquatic.MOD_ID, "gameplay/vent_drops")

val BLUE_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/blue_tang")
val SOHAL = Identifier(HybridAquatic.MOD_ID, "gameplay/sohal")
val ORANGESHOULDER = Identifier(HybridAquatic.MOD_ID, "gameplay/orangeshoulder")
val YELLOW_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/yellow_tang")
val POWDER_BLUE_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/powder_blue_tang")
val UNICORNFISH = Identifier(HybridAquatic.MOD_ID, "gameplay/unicornfish")

val PARROTFISH = Identifier(HybridAquatic.MOD_ID, "gameplay/parrotfish")
val SEAHORSE = Identifier(HybridAquatic.MOD_ID, "gameplay/seahorse")

val SUNFISH = Identifier(HybridAquatic.MOD_ID, "gameplay/sunfish")
val SURGEONFISH_UNICORNFISH = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_unicornfish")
val SURGEONFISH_SOHAL = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_sohal")
val SURGEONFISH_ORANGESHOULDER = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_orangeshoulder")
val SURGEONFISH_LINED = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_lined")
val SURGEONFISH_YELLOW_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_yellow_tang")
val SURGEONFISH_BLUE_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_blue_tang")
val SURGEONFISH_POWDER_BLUE_TANG = Identifier(HybridAquatic.MOD_ID, "gameplay/surgeonfish_powder_blue_tang")

val KOI = Identifier(HybridAquatic.MOD_ID, "gameplay/koi")
val CARP = Identifier(HybridAquatic.MOD_ID, "gameplay/carp")
val GOLDFISH = Identifier(HybridAquatic.MOD_ID, "gameplay/goldfish")

val CLAWED_LOBSTER = Identifier(HybridAquatic.MOD_ID, "gameplay/clawed_lobster")
val CLAWLESS_LOBSTER = Identifier(HybridAquatic.MOD_ID, "gameplay/clawless_lobster")
Expand All @@ -53,7 +48,6 @@ object HybridAquaticLootTables {

val BLUE_SPOTTED_STINGRAY = Identifier(HybridAquatic.MOD_ID, "gameplay/blue_spotted_stingray")
val SPOTTED_EAGLE_RAY = Identifier(HybridAquatic.MOD_ID, "gameplay/spotted_eagle_ray")
val SEABASS_BLACK = Identifier(HybridAquatic.MOD_ID, "gameplay/seabass_black")

val YELLOWFIN = Identifier(HybridAquatic.MOD_ID, "gameplay/yellowfin")
val BLUEFIN = Identifier(HybridAquatic.MOD_ID, "gameplay/bluefin")
Expand Down

0 comments on commit b8cae37

Please sign in to comment.