mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
when passing an activator rail, move aura one last time
This commit is contained in:
parent
bb2763028c
commit
01510fa07a
1 changed files with 2 additions and 3 deletions
|
@ -16,7 +16,6 @@ import net.minecraft.nbt.ListNBT;
|
||||||
import net.minecraft.nbt.LongNBT;
|
import net.minecraft.nbt.LongNBT;
|
||||||
import net.minecraft.network.IPacket;
|
import net.minecraft.network.IPacket;
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.RegistryKey;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
|
@ -87,13 +86,14 @@ public class EntityMoverMinecart extends AbstractMinecartEntity {
|
||||||
if (this.isActive != receivingPower) {
|
if (this.isActive != receivingPower) {
|
||||||
this.isActive = receivingPower;
|
this.isActive = receivingPower;
|
||||||
|
|
||||||
|
BlockPos pos = this.getPosition();
|
||||||
if (!this.isActive) {
|
if (!this.isActive) {
|
||||||
|
this.moveAura(this.world, this.lastPosition, this.world, pos);
|
||||||
this.spotOffsets.clear();
|
this.spotOffsets.clear();
|
||||||
this.lastPosition = BlockPos.ZERO;
|
this.lastPosition = BlockPos.ZERO;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockPos pos = this.getPosition();
|
|
||||||
IAuraChunk.getSpotsInArea(this.world, pos, 25, (spot, amount) -> {
|
IAuraChunk.getSpotsInArea(this.world, pos, 25, (spot, amount) -> {
|
||||||
if (amount > 0)
|
if (amount > 0)
|
||||||
this.spotOffsets.add(spot.subtract(pos));
|
this.spotOffsets.add(spot.subtract(pos));
|
||||||
|
@ -134,7 +134,6 @@ public class EntityMoverMinecart extends AbstractMinecartEntity {
|
||||||
this.spotOffsets.add(BlockPos.fromLong(((LongNBT) base).getLong()));
|
this.spotOffsets.add(BlockPos.fromLong(((LongNBT) base).getLong()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Entity changeDimension(ServerWorld destination, ITeleporter teleporter) {
|
public Entity changeDimension(ServerWorld destination, ITeleporter teleporter) {
|
||||||
|
|
Loading…
Reference in a new issue