mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-27 05:38:33 +01:00
Compare commits
2 commits
1c9d5c1102
...
791c6ada5e
Author | SHA1 | Date | |
---|---|---|---|
791c6ada5e | |||
41214e7b2f |
2 changed files with 7 additions and 4 deletions
|
@ -67,9 +67,11 @@ public final class Helper {
|
||||||
var chunk = Helper.getLoadedChunk(level, x, z);
|
var chunk = Helper.getLoadedChunk(level, x, z);
|
||||||
if (chunk != null) {
|
if (chunk != null) {
|
||||||
for (var tilePos : chunk.getBlockEntitiesPos()) {
|
for (var tilePos : chunk.getBlockEntitiesPos()) {
|
||||||
if (tilePos.distSqr(pos) <= radius * radius)
|
if (tilePos.distSqr(pos) <= radius * radius) {
|
||||||
if (consumer.apply(chunk.getBlockEntity(tilePos)))
|
var tile = chunk.getBlockEntity(tilePos);
|
||||||
|
if (tile != null && consumer.apply(tile))
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void defineSynchedData() {
|
protected void defineSynchedData() {
|
||||||
this.entityData.define(EntityEffectInhibitor.INHIBITED_EFFECT, null);
|
this.entityData.define(EntityEffectInhibitor.INHIBITED_EFFECT, "");
|
||||||
this.entityData.define(EntityEffectInhibitor.COLOR, 0);
|
this.entityData.define(EntityEffectInhibitor.COLOR, 0);
|
||||||
this.entityData.define(EntityEffectInhibitor.AMOUNT, 0);
|
this.entityData.define(EntityEffectInhibitor.AMOUNT, 0);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInhibitedEffect(ResourceLocation effect) {
|
public void setInhibitedEffect(ResourceLocation effect) {
|
||||||
this.entityData.set(EntityEffectInhibitor.INHIBITED_EFFECT, effect != null ? effect.toString() : null);
|
this.entityData.set(EntityEffectInhibitor.INHIBITED_EFFECT, effect != null ? effect.toString() : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getColor() {
|
public int getColor() {
|
||||||
|
@ -212,4 +212,5 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
|
||||||
this.powderListDirty = false;
|
this.powderListDirty = false;
|
||||||
this.lastEffect = inhibitedEffect;
|
this.lastEffect = inhibitedEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue