View difference between Paste ID: GkvTehyZ and y2Pr6mkA
SHOW: | | - or go back to the newest paste.
1
        if (shouldAltar == 1)
2
		{
3
			if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
4
			{
5
				findAndFillAltar(world, player, 1);
6
			} else
7
			{
8
				float maxHealth = player.getMaxHealth();
9
				int divisor = ThreadLocalRandom.current().nextInt(1, 11);
10
				//int senight = divisor + 1;
11
				float altarAddVal = maxHealth / divisor;
12
				int altarAdd = Math.round(altarAddVal);
13
				findAndFillAltar(world, player, altarAdd);
14
			}
15
16
			if (player.getHealth() <= 0.001f)
17
			{
18
				player.onDeath(DamageSource.generic);
19
			}
20
21
			return stack;