some work

This commit is contained in:
Dmitry 2024-02-10 13:35:31 +07:00
parent 64fb11a55f
commit b449f53bd6
9 changed files with 460 additions and 57 deletions

View file

@ -15,12 +15,13 @@ const registerGTCEULoots = (event) => {
let normalRawOre = ChemicalHelper.get(TagPrefix.rawOre, material, 1)
let poorRawOre = ChemicalHelper.get(TFGTagPrefix.poorRawOre, material, 1)
let crushedOre = ChemicalHelper.get(TagPrefix.crushed, material, 1)
let blockName = `gtceu:${stoneType}_${material.getName()}_ore`
if (!richRawOre.isEmpty() && !normalRawOre.isEmpty() && !poorRawOre.isEmpty()) {
event.addBlockLootModifier(blockName)
.matchMainHand('#minecraft:pickaxes')
.removeLoot(Ingredient.all)
.addWeightedLoot([
richRawOre.withChance(0.2),
@ -31,11 +32,22 @@ const registerGTCEULoots = (event) => {
if (!stoneTypeDust.isEmpty()) {
event.addBlockLootModifier(blockName)
.matchMainHand('#minecraft:pickaxes')
.addLoot(
LootEntry.of(stoneTypeDust).when((c) => c.randomChance(0.25))
)
}
if (!crushedOre.isEmpty()) {
event.addBlockLootModifier(blockName)
.matchMainHand('#forge:tools/hammers')
.removeLoot(Ingredient.all)
.addWeightedLoot([
crushedOre.withChance(0.8),
crushedOre.withCount(2).withChance(0.2)
]);
}
}
})
})