Refactor & update to gt7
* gt7 removed credits/coins * port gregtech additions to java * add eslint locally * add style linting * switch target ECMA standard * run linter * clean up a bunch of linter errors * remove outdated greate API calls * forgot about the TFC multi compat issue * reverted greate recipe removals * some more linting stuff * fix some issues with greenhouse recipes * fix up some material stuff * fix recipe types * - Fixed single block machine rendering (#1465) * minor fixes and changes --------- Signed-off-by: Pyritie <pyritie@gmail.com> Co-authored-by: Pyritie <pyritie@gmail.com> Co-authored-by: Redeix <59435925+Redeix@users.noreply.github.com>
This commit is contained in:
parent
d0af2cd96f
commit
f3dfa471ec
249 changed files with 2359 additions and 792 deletions
|
|
@ -1,8 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
// Handles the quest for drinking water. The drinking water quest checks if the player has this stage.
|
||||
ItemEvents.firstRightClicked(evt =>
|
||||
{
|
||||
ItemEvents.firstRightClicked(evt => {
|
||||
const FORGE_CAPS = "ForgeCaps";
|
||||
const TFC_PLAYERDATA = "tfc:player_data";
|
||||
const FOOD = "food";
|
||||
|
|
@ -11,7 +10,7 @@ ItemEvents.firstRightClicked(evt =>
|
|||
const STAGE = "tfg.stages.quests.drank_fresh_water_with_hand";
|
||||
const {player, level} = evt;
|
||||
|
||||
if(evt.target.block == null)
|
||||
if (evt.target.block === null)
|
||||
return;
|
||||
|
||||
//We reach for the "food" compound tag, that contains the tfc thirst.
|
||||
|
|
@ -23,8 +22,7 @@ ItemEvents.firstRightClicked(evt =>
|
|||
//Do we already keep track of the previous thirst value? if not, put it and then return.
|
||||
let customData = getTFGPersistentDataRoot(player);
|
||||
let containsPreviousThirst = customData.contains(PREVIOUS_THIRST);
|
||||
if(!containsPreviousThirst)
|
||||
{
|
||||
if (!containsPreviousThirst) {
|
||||
customData.putFloat(PREVIOUS_THIRST, thirstValue);
|
||||
return;
|
||||
}
|
||||
|
|
@ -33,9 +31,8 @@ ItemEvents.firstRightClicked(evt =>
|
|||
|
||||
//As long as our new thirst is greater than our previous, it means we hydrated ourselves. OFC we need to make sure the block clicked was potable.
|
||||
let blockID = evt.target.block.id;
|
||||
let isFreshWater = blockID == "minecraft:water" || blockID == "tfc:fluid/river_water";
|
||||
if(isFreshWater && thirstValue > previousThirstValue && !player.stages.has(STAGE))
|
||||
{
|
||||
let isFreshWater = blockID === "minecraft:water" || blockID === "tfc:fluid/river_water";
|
||||
if (isFreshWater && thirstValue > previousThirstValue && !player.stages.has(STAGE)) {
|
||||
player.stages.add(STAGE);
|
||||
}
|
||||
//Put it back in.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue