Merge branch 'dev' of https://github.com/TerraFirmaGreg-Team/Modpack-Modern into dev
This commit is contained in:
commit
5a6b9bb6eb
5 changed files with 53 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Unreleased
|
||||
### Changes
|
||||
- High Tier saws can Silk Harvest Ice (#3019) @Nebby1999
|
||||
### Bug fixes
|
||||
### Translation updates
|
||||
|
||||
|
|
|
|||
|
|
@ -521,4 +521,16 @@ const registerTooltips = (event) => {
|
|||
event.addAdvanced(['gtceu:ice_bucket'], (item, advanced, text) => {
|
||||
text.add(1, Text.translate('tfg.tooltip.cooling_foods'));
|
||||
})
|
||||
|
||||
// Saw can silk harvest ice
|
||||
//This kinda sucks, but it works. We're basically getting the default "silk_ice" harvesting tooltip, getting the index, then removing it.
|
||||
//Then, we insert on that index our custom tooltip that tells the player it harvests ALL ice blocks
|
||||
event.addAdvanced(['#tfg:silk_harvest_ice'], (item, advanced, text) => {
|
||||
const sculptorKey = "item.gtceu.tool.behavior.silk_ice";
|
||||
let keyToRemove = text.find(tip => tip.toString().indexOf(sculptorKey) != -1);
|
||||
let indexOf = text.findIndex(tip => tip.toString().indexOf(sculptorKey) != -1);
|
||||
|
||||
text.remove(keyToRemove);
|
||||
text.add(indexOf, Text.translate("tfg.tooltip.tool_behaviour.silk_ice"));
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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'])
|
||||
|
|
|
|||
|
|
@ -252,3 +252,19 @@ global.FISH_INDEX = [
|
|||
{ id: 'tfc:pufferfish', item: 'minecraft:pufferfish', parent: 'tfc:bucket/pufferfish', dimension: null },
|
||||
{ id: 'wan_ancient_beasts:toxlacanth', item: 'wan_ancient_beasts:toxlacanth', parent: 'wan_ancient_beasts:toxlacanth_bucket', dimension: 'ad_astra:mars' }
|
||||
];
|
||||
|
||||
/**
|
||||
* @type {string[]} - Saws unable to silk harvest ice
|
||||
*/
|
||||
global.ICE_SAW_BLACKLIST = [
|
||||
"gtceu:damascus_steel_saw",
|
||||
"gtceu:steel_saw",
|
||||
"gtceu:bronze_saw",
|
||||
"gtceu:bismuth_bronze_saw",
|
||||
"gtceu:copper_saw",
|
||||
"gtceu:cobalt_brass_saw",
|
||||
"gtceu:black_steel_saw",
|
||||
"gtceu:black_bronze_saw",
|
||||
"gtceu:wrought_iron_saw",
|
||||
"gtceu:invar_saw"
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue