Skip to content

Commit

Permalink
Тестовое использование собственного события регистрации информации о …
Browse files Browse the repository at this point in the history
…предмете в GTM хранилище
  • Loading branch information
Dmitry committed Jun 1, 2024
1 parent 9df416b commit 236f05d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions kubejs/startup_scripts/main_startup_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,20 @@ GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
*/
GTCEuStartupEvents.registry('gtceu:machine', event => {
registerGTCEuMachines(event)
})

/**
* Событие регистрации информации о составе предмета.
*/
TFGStartupEvents.materialInfo(event => {

const testMaterial1 = GTMaterials.Copper;
const testMaterial2 = GTMaterials.Tin;

const b = new ItemMaterialInfo(new MaterialStack(testMaterial1, GTValues.M), new MaterialStack(testMaterial2, GTValues.M))


event.remove('minecraft:acacia_planks')

event.add('minecraft:acacia_planks', b)
})

0 comments on commit 236f05d

Please sign in to comment.