Skip to content

Commit

Permalink
loot tables
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.nutz committed Jan 17, 2024
1 parent e8ec9b7 commit 6c9289e
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ class SensorBlockEntity(pos: BlockPos, state: BlockState):
.location
.toJOML()

val value = lerp(1.0, 15.0, 1 - (start.distance(hit) / TournamentConfig.SERVER.sensorDistance))
println("start to end distance: ${start.distance(end)}")
println("start to hit distance: ${start.distance(hit)}")

return if (clipResult.type != HitResult.Type.MISS) {
value.toInt()
ceil(lerp(1.0, 15.0, start.distance(hit) / TournamentConfig.SERVER.sensorDistance))
} else {
0
}
Expand Down

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 @@ -2,14 +2,64 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "vs_tournament:balloon"
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:redstone",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.25
}
]
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,49 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "vs_tournament:balloon_unpowered"
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "vs_tournament:prop_big"
}
],
"conditions": [
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "vs_tournament:prop_big"
}
],
"conditions": [
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,29 @@
"type": "minecraft:barter",
"pools": [
{
"rolls": 2,
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,49 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 2.0,
"bonus_rolls": 0.0,
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string"
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:string",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.5
}
]
}
]
}
]
}
}

0 comments on commit 6c9289e

Please sign in to comment.