// priority: 0

// Visit the wiki for more info - https://kubejs.com/

// made by ekazuya

		//Makes it so player does 1/4th damage in EpicFight Mining Mode
ForgeEvents.onEvent("net.minecraftforge.event.entity.living.LivingHurtEvent", event => global.onHurt(event))
/**
 * 
 * @param {Internal.LivingHurtEvent} event 
 */
global.onHurt = event => {
	try {
     let { entity, amount } = event
	 let player = event.source.player
	 if (!player) return
	 let playerData = player.getNbt().toString()
	  if (playerData.includes("VANILLA") && !player.isCreative()) {
		  player.displayClientMessage(Component.of(Text.of("You're in mining mode so no full damage for you").darkRed()), true)
		  event.setAmount(amount * 0.5)
		  }
 } catch (error) {
     console.log(error)
 }
}