Skip to content

Commit

Permalink
balanced loot table
Browse files Browse the repository at this point in the history
  • Loading branch information
baguchan committed Jul 23, 2022
1 parent 51e47db commit 9731d56
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 15 deletions.
14 changes: 8 additions & 6 deletions src/main/java/baguchan/tofucraft/event/LootEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@
public class LootEvents {
private static final Set<ResourceLocation> TEMPLE_LOOT = Sets.newHashSet(new ResourceLocation("chests/jungle_temple"));

private static final Set<ResourceLocation> SHIP_LOOT = Sets.newHashSet(new ResourceLocation("chests/shipwreck_supply"));
private static final Set<ResourceLocation> SHIP_SUPPLY_LOOT = Sets.newHashSet(new ResourceLocation("chests/shipwreck_supply"));

private static final Set<ResourceLocation> SHIP_TREASURE_LOOT = Sets.newHashSet(new ResourceLocation("chests/shipwreck_treasure"));

private static final Set<ResourceLocation> RUIN_LOOT = Sets.newHashSet(new ResourceLocation("chests/underwater_ruin_big"));

@SubscribeEvent
public static void onInjectLoot(LootTableLoadEvent event) {
if (TEMPLE_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_temple")).setWeight(1).setQuality(1)).name("tofustick_temple").build();
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_temple")).setWeight(2).setQuality(1)).name("tofustick_temple").build();
event.getTable().addPool(pool);
}
if (SHIP_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_ship")).setWeight(1).setQuality(1)).name("tofustick_ship").build();
if (SHIP_TREASURE_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_ship")).setWeight(10).setQuality(1)).name("tofustick_ship").build();
event.getTable().addPool(pool);
}
if (RUIN_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_ruin")).setWeight(1).setQuality(1)).name("tofustick_ruin").build();
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/tofustick_ruin")).setWeight(2).setQuality(1)).name("tofustick_ruin").build();
event.getTable().addPool(pool);
}
if (TEMPLE_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/seeds_chili_temple")).setWeight(10).setQuality(5)).name("seeds_chili_temple").build();
event.getTable().addPool(pool);
}
if (SHIP_LOOT.contains(event.getName())) {
if (SHIP_SUPPLY_LOOT.contains(event.getName())) {
LootPool pool = LootPool.lootPool().add(LootTableReference.lootTableReference(new ResourceLocation("tofucraft", "injections/seeds_chili_ship")).setWeight(10).setQuality(5)).name("seeds_chili_ship").build();
event.getTable().addPool(pool);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
{
"rolls": {
"min": 0.0,
"max": 1.0,
"max": 2.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"weight": 2,
"name": "tofucraft:seeds_chili"
"name": "tofucraft:seeds_chili",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 3.0,
"type": "minecraft:uniform"
}
}
]
},
{
"type": "minecraft:item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
{
"rolls": {
"min": 0.0,
"max": 1.0,
"max": 2.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"weight": 2,
"name": "tofucraft:seeds_chili"
"name": "tofucraft:seeds_chili",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 3.0,
"type": "minecraft:uniform"
}
}
]
},
{
"type": "minecraft:item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
{
"rolls": {
"min": 0.0,
"max": 1.0,
"max": 2.0,
"type": "minecraft:uniform"
},
"entries": [
{
"type": "minecraft:item",
"weight": 2,
"name": "tofucraft:seeds_chili"
"name": "tofucraft:seeds_chili",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 3.0,
"type": "minecraft:uniform"
}
}
]
},
{
"type": "minecraft:item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"entries": [
{
"type": "minecraft:item",
"weight": 1,
"weight": 2,
"name": "tofucraft:tofustick"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"entries": [
{
"type": "minecraft:item",
"weight": 1,
"weight": 2,
"name": "tofucraft:tofustick"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"entries": [
{
"type": "minecraft:item",
"weight": 1,
"weight": 2,
"name": "tofucraft:tofustick"
},
{
Expand Down

0 comments on commit 9731d56

Please sign in to comment.