High Tier saws can silk harvest ice (#3019)

* High Tier saws can silk harvest packed ice

* Update changelog
This commit is contained in:
Nebby 2026-02-10 08:53:48 -03:00 committed by GitHub
parent d122cba3f5
commit a7a01a96b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 2 deletions

View file

@ -37,6 +37,18 @@ function registerGTCEUItemTags(event) {
event.add("tfc:saws", "#forge:tools/buzzsaws");
event.add("tfc:saws", "#forge:tools/chainsaws");
const saws = event.get('forge:tools/saws').getObjectIds().concat(event.get('forge:tools/chainsaws').getObjectIds());
saws.forEach(sawId =>
{
const id = sawId.getNamespace() + ":" + sawId.getPath();
if(global.ICE_SAW_BLACKLIST.includes(id) || Item.of(sawId).hasTag('forge:tools/buzzsaws'))
{
return;
}
event.add("tfg:silk_harvest_ice", id);
});
global.GTCEU_CASTING_MOLDS.concat(global.TFG_CASTING_MOLDS).forEach((mold) => {
event.add("gtceu:casting_molds", mold);
});

View file

@ -1,6 +1,9 @@
// priority: 0
"use strict";
/**
*
* @param {Internal.LootModificationEventJS} event
*/
function registerTFCLoots(event) {
// Hostile animals
@ -352,8 +355,15 @@ function registerTFCLoots(event) {
event.addBlockLootModifier('minecraft:ice')
.removeLoot(ItemFilter.ALWAYS_TRUE)
event.addBlockLootModifier('minecraft:ice')
.not(n => n.matchMainHand("#tfg:silk_harvest_ice"))
.addLoot('firmalife:ice_shavings')
event.addBlockLootModifier('minecraft:ice')
.matchMainHand("#tfg:silk_harvest_ice")
.addLoot('minecraft:ice');
event.addBlockLootModifier('minecraft:packed_ice')
.not(n => n.matchMainHand("#forge:tools/saws"))
.addWeightedLoot([4, 6], ['firmalife:ice_shavings'])