fix drops
This commit is contained in:
parent
16f05e8222
commit
177b04a3d6
2 changed files with 26 additions and 0 deletions
19
kubejs/server_scripts/gregtech/loot.js
Normal file
19
kubejs/server_scripts/gregtech/loot.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// priority: 0
|
||||
|
||||
const registerGTCEULoots = (event) => {
|
||||
|
||||
global.TFC_STONE_TYPES.forEach(stoneType => {
|
||||
GTRegistries.MATERIALS.forEach(material => {
|
||||
if (material.hasProperty(PropertyKey.ORE)) {
|
||||
event.addBlockLootModifier(`gtceu:${stoneType}_${material}_ore`)
|
||||
.removeLoot(Ingredient.all)
|
||||
.addWeightedLoot([
|
||||
Item.of(`gtceu:rich_raw_${material}`).withChance(20),
|
||||
Item.of(`gtceu:raw_${material}`).withChance(60),
|
||||
Item.of(`gtceu:poor_raw_${material}`).withChance(20)
|
||||
]);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
|
@ -113,6 +113,13 @@ GTCEuServerEvents.oreVeins(event => {
|
|||
event.removeAll()
|
||||
})
|
||||
|
||||
/**
|
||||
* Событие регистрации лут-тейблов.
|
||||
*/
|
||||
LootJS.modifiers((event) => {
|
||||
registerGTCEULoots(event)
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue