mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed creative players being able to break an unbreakable floating artefact entity
This commit is contained in:
parent
d39c003c2e
commit
1f64e6c4a6
1 changed files with 5 additions and 0 deletions
|
@ -186,6 +186,11 @@ public class FloatingArtefactEntity extends Entity implements UDamageSources, Ma
|
|||
|
||||
@Override
|
||||
public boolean damage(DamageSource damageSource, float amount) {
|
||||
|
||||
if (getWorld().isClient || isInvulnerable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isInvulnerableTo(damageSource) || !getStack().getItem().damage(damageSource)) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue