mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 03:43:30 +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.network.IPacket;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
|
@ -87,13 +86,14 @@ public class EntityMoverMinecart extends AbstractMinecartEntity {
|
|||
if (this.isActive != receivingPower) {
|
||||
this.isActive = receivingPower;
|
||||
|
||||
BlockPos pos = this.getPosition();
|
||||
if (!this.isActive) {
|
||||
this.moveAura(this.world, this.lastPosition, this.world, pos);
|
||||
this.spotOffsets.clear();
|
||||
this.lastPosition = BlockPos.ZERO;
|
||||
return;
|
||||
}
|
||||
|
||||
BlockPos pos = this.getPosition();
|
||||
IAuraChunk.getSpotsInArea(this.world, pos, 25, (spot, amount) -> {
|
||||
if (amount > 0)
|
||||
this.spotOffsets.add(spot.subtract(pos));
|
||||
|
@ -134,7 +134,6 @@ public class EntityMoverMinecart extends AbstractMinecartEntity {
|
|||
this.spotOffsets.add(BlockPos.fromLong(((LongNBT) base).getLong()));
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity changeDimension(ServerWorld destination, ITeleporter teleporter) {
|
||||
|
|
Loading…
Reference in a new issue