medicine rework

This commit is contained in:
Pyritie 2025-12-13 23:30:51 +00:00
parent 793e2c0158
commit e3be7d6d1d
7 changed files with 45 additions and 102 deletions

View file

@ -14,38 +14,32 @@ const pill_event = [
pill_event.forEach(pill_event => {
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:${pill_event}_pill`) return
item.count--
player.addItemCooldown(item, 100)
server.runCommandSilent(`effect give ${player.username} minecraft:${pill_event} 480 0 true`)
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
});
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:${pill_event}_tablet`) return
item.count--
player.addItemCooldown(item, 100)
server.runCommandSilent(`effect give ${player.username} minecraft:${pill_event} 1800 0 true`)
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
});
});
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:antipoison_pill`) return
item.count--
player.addItemCooldown(item, 50)
event.player.removeEffect('minecraft:poison')
server.runCommandSilent(`playsound minecraft:item.honey_bottle.drink player ${player.username} ${x} ${y} ${z} 10 1.5 1`)
});
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:antipoison_tablet`) return
item.count--
player.addItemCooldown(item, 50)
event.player.removeEffect('minecraft:poison')
event.player.removeEffect('minecraft:wither')
@ -70,31 +64,24 @@ const salvo_event = [
];
salvo_event.forEach(salvo_event => {
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:${salvo_event}_salvo`) return
item.count--
player.addItemCooldown(item, 100)
server.runCommandSilent(`effect give ${player.username} minecraft:${salvo_event} 480 0 true`)
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
});
});
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:absorption_salvo`) return
item.count--
player.addItemCooldown(item, 200)
server.runCommandSilent(`effect give ${player.username} minecraft:absorption 480 4 true`)
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
});
ItemEvents.rightClicked(event => {
ItemEvents.foodEaten(event => {
const { item, server, player, player: { x, y, z } } = event
if (item.id !== `tfg:instant_health_salvo`) return
item.count--
player.addItemCooldown(item, 100)
server.runCommandSilent(`effect give ${player.username} minecraft:instant_health 1 1 true`)
server.runCommandSilent(`playsound minecraft:item.glow_ink_sac.use player ${player.username} ${x} ${y} ${z} 10 2 1`)
});

View file

@ -570,13 +570,4 @@ function registerTFGMedicineRecipes(event) {
.EUt(GTValues.VA[GTValues.LV])
//#endregion
//#region Paracetamol
event.recipes.firmalife.mixing_bowl()
.ingredients(['tfg:regeneration_pill', 'tfg:weakness_pill', 'tfg:antipoison_pill', 'tfg:slowness_pill'], Fluid.of('tfc:vinegar', 250))
.outputItem('4x gtceu:paracetamol_pill')
.id(`tfg:mixing_bowl/paracetamol`)
//#endregion
}

View file

@ -2,6 +2,33 @@
function registerTFGMedicineItemTags(event) {
event.add('tfg:medicine', 'tfg:antipoison_pill')
event.add('tfg:medicine', 'tfg:antipoison_tablet')
event.add('tfg:medicine', 'tfg:haste_pill')
event.add('tfg:medicine', 'tfg:haste_tablet')
event.add('tfg:medicine', 'tfg:night_vision_pill')
event.add('tfg:medicine', 'tfg:night_vision_tablet')
event.add('tfg:medicine', 'tfg:poison_pill')
event.add('tfg:medicine', 'tfg:poison_tablet')
event.add('tfg:medicine', 'tfg:regeneration_pill')
event.add('tfg:medicine', 'tfg:regeneration_tablet')
event.add('tfg:medicine', 'tfg:slowness_pill')
event.add('tfg:medicine', 'tfg:slowness_tablet')
event.add('tfg:medicine', 'tfg:speed_pill')
event.add('tfg:medicine', 'tfg:speed_tablet')
event.add('tfg:medicine', 'tfg:water_breathing_pill')
event.add('tfg:medicine', 'tfg:water_breathing_tablet')
event.add('tfg:medicine', 'tfg:weakness_pill')
event.add('tfg:medicine', 'tfg:weakness_tablet')
event.add('tfg:medicine', 'tfg:absorption_salvo')
event.add('tfg:medicine', 'tfg:fire_resistance_salvo')
event.add('tfg:medicine', 'tfg:invisibility_salvo')
event.add('tfg:medicine', 'tfg:luck_salvo')
event.add('tfg:medicine', 'tfg:resistance_salvo')
event.add('tfg:medicine', 'tfg:instant_health_salvo')
event.add('tfg:medicine', 'gtceu:paracetamol_pill')
event.add('tfg:medicine', 'gtceu:rad_away_pill')
event.add('tfg:antipoison_ingredients', 'tfc:plant/blood_lily')
event.add('tfg:antipoison_ingredients', 'tfc:plant/pistia')
event.add('tfg:antipoison_ingredients', 'tfc:powder/bismuthinite')
@ -46,6 +73,9 @@ function registerTFGMedicineItemTags(event) {
event.add('tfg:night_vision_ingredients', 'tfg:sunflower_product')
event.add('tfg:invisibility_ingredients', 'tfc:plant/calendula')
event.add('tfg:invisibility_ingredients', 'tfc:plant/snapdragon_pink')
event.add('tfg:absorption_ingredients', 'tfc:plant/poppy')
event.add('tfg:absorption_ingredients', 'beneath:burpflower')
event.add('tfg:fire_resistance_ingredients', 'tfc:plant/cattail')
@ -59,9 +89,6 @@ function registerTFGMedicineItemTags(event) {
event.add('tfg:instant_health_ingredients', 'tfc:plant/foxglove')
event.add('tfg:instant_health_ingredients', 'tfc:plant/artists_conk')
event.add('tfg:absorption_ingredients', 'tfc:plant/poppy')
event.add('tfg:invisibility_ingredients', 'tfc:plant/snapdragon_pink')
event.add('tfg:luck_ingredients', 'tfc:plant/goldenrod')
event.add('tfg:luck_ingredients', 'tfc:plant/heather')
}