mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Fixed the earth pony ability
This commit is contained in:
parent
645a0d1496
commit
22c430750c
2 changed files with 5 additions and 5 deletions
|
@ -123,7 +123,7 @@ public class TreeTraverser {
|
||||||
BlockState state = w.getBlockState(pos);
|
BlockState state = w.getBlockState(pos);
|
||||||
boolean yay = false;
|
boolean yay = false;
|
||||||
|
|
||||||
if (isLeaves(state, log) && state.get(LeavesBlock.PERSISTENT)) {
|
if (isLeaves(state, log) && !state.get(LeavesBlock.PERSISTENT)) {
|
||||||
leaves.add(pos);
|
leaves.add(pos);
|
||||||
yay = true;
|
yay = true;
|
||||||
} else if (variantAndBlockEquals(state, log)) {
|
} else if (variantAndBlockEquals(state, log)) {
|
||||||
|
@ -140,7 +140,7 @@ public class TreeTraverser {
|
||||||
|
|
||||||
public static boolean isWoodOrLeaf(World w, BlockState log, BlockPos pos) {
|
public static boolean isWoodOrLeaf(World w, BlockState log, BlockPos pos) {
|
||||||
BlockState state = w.getBlockState(pos);
|
BlockState state = w.getBlockState(pos);
|
||||||
return variantAndBlockEquals(state, log) || (isLeaves(state, log) && state.get(LeavesBlock.PERSISTENT));
|
return variantAndBlockEquals(state, log) || (isLeaves(state, log) && !state.get(LeavesBlock.PERSISTENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isLeaves(BlockState state, BlockState log) {
|
private static boolean isLeaves(BlockState state, BlockState log) {
|
||||||
|
|
|
@ -147,9 +147,9 @@ public interface Caster<E extends LivingEntity> extends Owned<E>, Levelled, Affi
|
||||||
|
|
||||||
default void notifyNearbySpells(Spell sender, BlockPos origin, double radius, int newState) {
|
default void notifyNearbySpells(Spell sender, BlockPos origin, double radius, int newState) {
|
||||||
AwaitTickQueue.enqueueTask(w -> {
|
AwaitTickQueue.enqueueTask(w -> {
|
||||||
VecHelper.findAllEntitiesInRange(getEntity(), getWorld(), origin, radius).filter(i -> i instanceof EtherialListener).forEach(i -> {
|
VecHelper.findAllEntitiesInRange(getEntity(), getWorld(), origin, radius)
|
||||||
((EtherialListener)i).onNearbySpellChange(this, sender, newState);
|
.filter(i -> i instanceof EtherialListener)
|
||||||
});
|
.forEach(i -> ((EtherialListener)i).onNearbySpellChange(this, sender, newState));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue