mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
enhanced glyphid crumblyness
This commit is contained in:
parent
c004912941
commit
ec052ca2b8
@ -46,7 +46,7 @@ public class EntityGlyphid extends EntityMob {
|
|||||||
protected void applyEntityAttributes() {
|
protected void applyEntityAttributes() {
|
||||||
super.applyEntityAttributes();
|
super.applyEntityAttributes();
|
||||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(32D);
|
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(32D);
|
||||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
|
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,7 +57,7 @@ public class EntityGlyphid extends EntityMob {
|
|||||||
|
|
||||||
if(armor != 0) { //if at least one bit of armor is present
|
if(armor != 0) { //if at least one bit of armor is present
|
||||||
int chance = amount < 10 ? 5 : amount < 20 ? 3 : 2; //chances of armor being broken off
|
int chance = amount < 10 ? 5 : amount < 20 ? 3 : 2; //chances of armor being broken off
|
||||||
if(this.rand.nextInt(chance) == 0) {
|
if(this.rand.nextInt(chance) == 0 && amount > 1) {
|
||||||
List<Integer> indices = Arrays.asList(0, 1, 2, 3, 4);
|
List<Integer> indices = Arrays.asList(0, 1, 2, 3, 4);
|
||||||
Collections.shuffle(indices);
|
Collections.shuffle(indices);
|
||||||
|
|
||||||
@ -67,7 +67,8 @@ public class EntityGlyphid extends EntityMob {
|
|||||||
armor &= ~bit; //...remove it
|
armor &= ~bit; //...remove it
|
||||||
armor = (byte) (armor & 0b11111);
|
armor = (byte) (armor & 0b11111);
|
||||||
this.dataWatcher.updateObject(17, armor);
|
this.dataWatcher.updateObject(17, armor);
|
||||||
return false;
|
amount = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,8 +84,6 @@ public class EntityGlyphid extends EntityMob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("" + divisor);
|
|
||||||
|
|
||||||
amount /= divisor;
|
amount /= divisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 887 B After Width: | Height: | Size: 2.4 KiB |
Loading…
x
Reference in New Issue
Block a user