start rework
This commit is contained in:
parent
e95f1e93dc
commit
b1b12f109d
8 changed files with 177 additions and 34 deletions
|
|
@ -4,9 +4,9 @@
|
|||
* Событие регистрации предмет-тэгов.
|
||||
*/
|
||||
ServerEvents.tags('item', event => {
|
||||
registerMinecraftItemTags(event)
|
||||
//registerMinecraftItemTags(event)
|
||||
registerTFCItemTags(event)
|
||||
registerCreateTags(event)
|
||||
//registerCreateTags(event)
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
@ -24,10 +24,18 @@ ServerEvents.tags('fluid', event => {
|
|||
})
|
||||
|
||||
/**
|
||||
* Здесь регистрируются файлы датапаков (json).
|
||||
* Здесь регистрируются файлы датапаков общие.
|
||||
* Срабатывает до инициализации рецептов.
|
||||
*/
|
||||
ServerEvents.highPriorityData(event => {
|
||||
//registerTFCDataPacks(event)
|
||||
})
|
||||
|
||||
/**
|
||||
* Здесь регистрируются файлы датапаков TFC.
|
||||
* Срабатывает до инициализации рецептов.
|
||||
*/
|
||||
TFCEvents.data(event => {
|
||||
registerTFCData(event)
|
||||
})
|
||||
|
||||
|
|
@ -36,6 +44,7 @@ ServerEvents.highPriorityData(event => {
|
|||
* Срабатывает после инициализации датапаков.
|
||||
*/
|
||||
ServerEvents.recipes(event => {
|
||||
/*
|
||||
registerMinecraftRecipes(event)
|
||||
registerTFCRecipes(event)
|
||||
registerGTCEURecipes(event)
|
||||
|
|
@ -48,12 +57,12 @@ ServerEvents.recipes(event => {
|
|||
registerSophisticatedBackpacksRecipes(event)
|
||||
registerSmallShipsRecipes(event)
|
||||
registerExtendedCraftingRecipes(event)
|
||||
registerToolBeltRecipes(event)
|
||||
registerToolBeltRecipes(event)*/
|
||||
})
|
||||
|
||||
/**
|
||||
* Событие модификации лута.
|
||||
*/
|
||||
LootJS.modifiers((event) => {
|
||||
modifyLootGT(event)
|
||||
//modifyLootGT(event)
|
||||
});
|
||||
|
|
@ -1,29 +1,123 @@
|
|||
// priority: 0
|
||||
|
||||
const registerTFCData = (event) => {
|
||||
registerAutoTFCItemHeats(event)
|
||||
|
||||
addItemHeat(event, 'compressed_coke_clay', { item: 'gtceu:compressed_coke_clay' }, 0.5)
|
||||
const registerTFCDataPacks = (event) => {
|
||||
|
||||
}
|
||||
|
||||
const registerAutoTFCItemHeats = (event) => {
|
||||
Object.entries(global.METAL_TO_SPECS).forEach(pair => {
|
||||
let tfcMetalName = pair[0]
|
||||
let metalSpecifications = pair[1]
|
||||
const registerTFCData = (event) => {
|
||||
registerTFCMetals(event)
|
||||
registerTFCHeats(event)
|
||||
registerTFCFuels(event)
|
||||
registerTFCLampFuels(event)
|
||||
registerTFCFertilizers(event)
|
||||
}
|
||||
|
||||
/**
|
||||
* event.metal(
|
||||
fluid: string,
|
||||
meltTemperature: number,
|
||||
heatCapacity: number,
|
||||
ingot: @Nullable Ingredient,
|
||||
doubleIngot: @Nullable Ingredient,
|
||||
sheet: @Nullable Ingredient,
|
||||
tier: number,
|
||||
name?: string
|
||||
)
|
||||
*/
|
||||
const registerTFCMetals = (event) => {
|
||||
|
||||
// TFC
|
||||
event.metal('gtceu:tin', 230, 0.02143, null, null, null, 1)
|
||||
event.metal('gtceu:bismuth', 270, 0.02143, null, null, null, 1)
|
||||
event.metal('gtceu:zinc', 420, 0.01429, null, null, null, 1)
|
||||
event.metal('gtceu:sterling_silver', 950, 0.00857, null, null, null, 1)
|
||||
event.metal('gtceu:rose_gold', 960, 0.00857, null, null, null, 1)
|
||||
event.metal('gtceu:silver', 961, 0.00625, null, null, null, 1)
|
||||
event.metal('gtceu:gold', 1060, 0.005, null, null, null, 1)
|
||||
event.metal('gtceu:copper', 1080, 0.00857, null, null, null, 1)
|
||||
event.metal('gtceu:nickel', 1453, 0.00625, null, null, null, 1)
|
||||
|
||||
event.metal('gtceu:brass', 930, 0.00857, null, null, null, 2)
|
||||
event.metal('gtceu:bronze', 950, 0.00857, null, null, null, 2)
|
||||
event.metal('gtceu:bismuth_bronze', 985, 0.00857, null, null, null, 2)
|
||||
event.metal('gtceu:black_bronze', 1070, 0.00857, null, null, null, 2)
|
||||
|
||||
event.metal('gtceu:iron', 1535, 0.00857, null, null, null, 3)
|
||||
event.metal('gtceu:wrought_iron', 1535, 0.00857, null, null, null, 3)
|
||||
|
||||
event.metal('gtceu:steel', 1540, 0.00857, null, null, null, 4)
|
||||
|
||||
event.metal('gtceu:black_steel', 1485, 0.00857, null, null, null, 5)
|
||||
event.metal('gtceu:blue_steel', 1540, 0.00857, null, null, null, 6)
|
||||
event.metal('gtceu:red_steel', 1540, 0.00857, null, null, null, 6)
|
||||
|
||||
// FirmaLife
|
||||
|
||||
// Stainless Steel ? what
|
||||
// Chromite ? what
|
||||
}
|
||||
|
||||
/**
|
||||
* event.itemHeat(
|
||||
ingredient: Ingredient,
|
||||
heatCapacity: number,
|
||||
forgingTemperature: @Nullable number,
|
||||
weldingTemperature: @Nullable number,
|
||||
name?: string
|
||||
)
|
||||
*/
|
||||
const registerTFCHeats = (event) => {
|
||||
event.itemHeat('gtceu:compressed_coke_clay', 0.5, null, null)
|
||||
}
|
||||
|
||||
/**
|
||||
* event.fuel(
|
||||
ingredient: Ingredient,
|
||||
temperature: number,
|
||||
duration: number,
|
||||
purity: @Nullable number,
|
||||
name?: string
|
||||
)
|
||||
*/
|
||||
const registerTFCFuels = (event) => {
|
||||
event.fuel('minecraft:coal', 1415, 2200, 1.0)
|
||||
event.fuel('gtceu:coke_gem', 1415, 4400, 1.0)
|
||||
|
||||
event.fuel('gtceu:rich_raw_coal', 1415, 2200, 0.95)
|
||||
event.fuel('gtceu:raw_coal', 1415, 1900, 0.95)
|
||||
event.fuel('gtceu:poor_raw_coal', 1415, 1600, 0.95)
|
||||
}
|
||||
|
||||
/**
|
||||
* event.lampFuel(
|
||||
fluidIngredient: FluidIngredient,
|
||||
blockIngredient: BlockIngredient,
|
||||
burnRate: number,
|
||||
name?: string
|
||||
)
|
||||
*/
|
||||
const registerTFCLampFuels = (event) => {
|
||||
event.lampFuel('gtceu:creosote', '#tfc:lamps', 1)
|
||||
}
|
||||
|
||||
/**
|
||||
* event.fertilizer(
|
||||
ingredient: Ingredient,
|
||||
nitrogen: @Nullable number,
|
||||
phosphorous: @Nullable number,
|
||||
potassium: @Nullable number,
|
||||
name?: string
|
||||
)
|
||||
*/
|
||||
const registerTFCFertilizers = (event) => {
|
||||
event.fertilizer('gtceu:fertilizer', 0.15, 0.15, 0.15)
|
||||
|
||||
event.fertilizer('gtceu:potassium_tiny_dust', null, null, 0.016)
|
||||
event.fertilizer('gtceu:potassium_small_dust', null, null, 0.037)
|
||||
event.fertilizer('gtceu:potassium_dust', null, null, 0.15)
|
||||
|
||||
event.fertilizer('gtceu:phosphorus_tiny_dust', null, 0.016, null)
|
||||
event.fertilizer('gtceu:phosphorus_small_dust', null, 0.037, null)
|
||||
event.fertilizer('gtceu:phosphorus_dust', null, 0.15, null)
|
||||
}
|
||||
|
||||
metalSpecifications.props.forEach(propertyName => {
|
||||
let itemType = global.ITEM_TAG_TO_HEAT[propertyName]
|
||||
let pathToExistFile = `tfc:tfc/item_heats/metal/${tfcMetalName}_${propertyName}`
|
||||
|
||||
if (itemType.heat_capacity == null) global.CREATE_EMPTY_JSON(event, pathToExistFile)
|
||||
else addItemHeat(
|
||||
event,
|
||||
`metal/${tfcMetalName}_${propertyName}`,
|
||||
itemType.input(tfcMetalName),
|
||||
itemType.heat_capacity,
|
||||
metalSpecifications.forging_temp,
|
||||
metalSpecifications.welding_temp
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -1,17 +1,29 @@
|
|||
// priority: 0
|
||||
|
||||
const registerTFCItemTags = (event) => {
|
||||
|
||||
/*
|
||||
// Удаление тегов у откоюченных предметов
|
||||
global.TFC_DISABLED_ITEMS.forEach(item => {
|
||||
event.removeAllTagsFrom(item)
|
||||
})
|
||||
})*/
|
||||
|
||||
// Тэги для возможности использования разных углей в кузне
|
||||
event.add('tfc:forge_fuel', 'minecraft:coal')
|
||||
event.add('tfc:forge_fuel', 'gtceu:coke_gem')
|
||||
event.add('tfc:forge_fuel', 'gtceu:rich_raw_coal')
|
||||
event.add('tfc:forge_fuel', 'gtceu:raw_coal')
|
||||
event.add('tfc:forge_fuel', 'gtceu:poor_raw_coal')
|
||||
|
||||
// Тэги для сундуков, чтобы отличать их виды
|
||||
global.TFC_WOOD_TYPES.forEach(woodType => {
|
||||
event.add('tfg:only_default_wooden_chests', `tfc:wood/chest/${woodType}`)
|
||||
event.add('tfg:only_trapped_wooden_chests', `tfc:wood/trapped_chest/${woodType}`)
|
||||
event.add('tfg:default_chests', `tfc:wood/chest/${woodType}`)
|
||||
event.add('tfg:trapped_chests', `tfc:wood/trapped_chest/${woodType}`)
|
||||
|
||||
event.add('tfg:bladed_axles', `tfc:wood/bladed_axle/${woodType}`)
|
||||
})
|
||||
|
||||
// Теги для двойных слитков тфк
|
||||
event.add('forge:ingots/double/bismuth', 'tfc:metal/double_ingot/bismuth')
|
||||
event.add('forge:ingots/double/bismuth_bronze', 'tfc:metal/double_ingot/bismuth_bronze')
|
||||
event.add('forge:ingots/double/black_bronze', 'tfc:metal/double_ingot/black_bronze')
|
||||
|
|
@ -32,9 +44,11 @@ const registerTFCItemTags = (event) => {
|
|||
event.add('forge:ingots/double/blue_steel', 'tfc:metal/double_ingot/blue_steel')
|
||||
event.add('forge:ingots/double/red_steel', 'tfc:metal/double_ingot/red_steel')
|
||||
|
||||
// Теги для объединения наковален
|
||||
event.add('tfc:red_or_blue_anvil', 'tfc:metal/anvil/blue_steel')
|
||||
event.add('tfc:red_or_blue_anvil', 'tfc:metal/anvil/red_steel')
|
||||
|
||||
// Теги для кораллов
|
||||
event.add('tfc:corals', 'tfc:coral/tube_coral_fan')
|
||||
event.add('tfc:corals', 'tfc:coral/brain_coral_fan')
|
||||
event.add('tfc:corals', 'tfc:coral/bubble_coral_fan')
|
||||
|
|
@ -56,9 +70,10 @@ const registerTFCItemTags = (event) => {
|
|||
event.add('tfc:corals', 'tfc:coral/fire_dead_coral')
|
||||
event.add('tfc:corals', 'tfc:coral/horn_dead_coral')
|
||||
|
||||
// Теги для каменных ступенек тфк
|
||||
global.TFC_STONE_TYPES.forEach(stoneTypeName => {
|
||||
global.TFC_ROCK_SLAB_BLOCK_TYPES.forEach(slabType => {
|
||||
event.add(`tfc:rock_slabs`, `tfc:rock/${slabType}/${stoneTypeName}_slab`)
|
||||
event.add(`tfg:rock_slabs`, `tfc:rock/${slabType}/${stoneTypeName}_slab`)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
3
kubejs/startup_scripts/gtceu/machines.js
Normal file
3
kubejs/startup_scripts/gtceu/machines.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// priority: 0
|
||||
|
||||
|
||||
2
kubejs/startup_scripts/gtceu/recipe_types.js
Normal file
2
kubejs/startup_scripts/gtceu/recipe_types.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// priority: 0
|
||||
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
// priority: 1
|
||||
|
||||
const $SimpleTieredMachine = Java.loadClass('com.gregtechceu.gtceu.api.machine.SimpleTieredMachine')
|
||||
|
||||
/**
|
||||
* Событие регистрации предметов.
|
||||
*/
|
||||
StartupEvents.registry('item', (event) => {
|
||||
registerCreateItems(event);
|
||||
//registerCreateItems(event);
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
@ -12,4 +14,22 @@ StartupEvents.registry('item', (event) => {
|
|||
*/
|
||||
StartupEvents.registry('block', (event) => {
|
||||
|
||||
})
|
||||
|
||||
GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
|
||||
event.create('saw_mill')
|
||||
.category('tfg') // Used in the GTlib / LDlib ui editor
|
||||
.setEUIO('in')
|
||||
.setMaxIOSize(2, 2, 0, 0) // Max Item Inputs, Max Item Outputs, Max Fluid Inputs, Max Fluid Outputs
|
||||
.setSlotOverlay(false, false, GuiTextures.CIRCUIT_OVERLAY)
|
||||
.setSlotOverlay(true, false, false, GuiTextures.PIPE_OVERLAY_2)
|
||||
.setSlotOverlay(true, false, true, GuiTextures.DUST_OVERLAY)
|
||||
.setProgressBar(GuiTextures.PROGRESS_BAR_LATHE, FillDirection.LEFT_TO_RIGHT)
|
||||
.setSound(GTSoundEntries.CUT)
|
||||
})
|
||||
|
||||
GTCEuStartupEvents.registry('gtceu:machine', event => {
|
||||
event.create('saw_mill', 'simple', GTValues.LV, GTValues.MV, GTValues.HV, GTValues.EV, GTValues.IV, GTValues.LuV, GTValues.ZPM, GTValues.UV)
|
||||
.editableUI($SimpleTieredMachine.EDITABLE_UI_CREATOR.apply(new ResourceLocation("gtceu"), GTRecipeTypes.get('saw_mill')))
|
||||
.recipeType('saw_mill')
|
||||
})
|
||||
BIN
ldlib/assets/gtceu/ui/recipe_type/saw_mill12312312.rtui
Normal file
BIN
ldlib/assets/gtceu/ui/recipe_type/saw_mill12312312.rtui
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue