Rough Mobs Revamped

Rough Mobs Revamped

2M Downloads

[Feature] Boss equipment is random or not always

0xebjc opened this issue ยท 4 comments

commented

So I was expecting that boss spawns would always have a complete armor set, but here in the:

bossHelper
Line 75: equipApplier.equipEntity(entity);

It calls the same equipment helper as all regular mobs, would be nice for a config options or I would perfer always full armor set for bosses

modify equipHelp:
line 135: public void equipEntity(EntityLiving entity) {

to:
public void equipEntity(EntityLiving entity, Boolean isBoss) {

commented

Will have a look. Thanks.

commented

I would perfer to see the boss have both hands equipped with weapons also.

commented

Here's my solution, (I'm glad to help, and I hope you don't mind, I'm trying to finalize my mod pack) :)

EquipHelper.java

...
		public void equipEntity(EntityLiving entity) {
			equipEntity(entity, false);
		}

		public void equipEntity(EntityLiving entity, boolean isBoss) {
			
			if (entity == null || entity.getEntityData().getBoolean(KEY_APPLIED))
				return;
...
...
			// If getChance succeeds, then equip entity with complete set of armor
			// 4 x less than individual armor piece roles
			// Code/idea thanks to 0xebjc
			boolean completeArmorSet = getChance(chancePerPiece/4);

			// Bosses always have complete armor set
			if (isBoss) {
				completeArmorSet = true;
			}
...

BossHelper.java

			boolean isBoss = true;
			equipApplier.equipEntity(entity, isBoss);