mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 06:24:12 +01:00
fix build issues
This commit is contained in:
parent
23beff40f3
commit
f593aca95d
@ -63,14 +63,14 @@ public class AirCurrent {
|
|||||||
public void tick() {
|
public void tick() {
|
||||||
if (direction == null)
|
if (direction == null)
|
||||||
rebuild();
|
rebuild();
|
||||||
World world = source.getWorld();
|
World world = source.getAirCurrentWorld();
|
||||||
Direction facing = direction;
|
Direction facing = direction;
|
||||||
if (world != null && world.isRemote) {
|
if (world != null && world.isRemote) {
|
||||||
float offset = pushing ? 0.5f : maxDistance + .5f;
|
float offset = pushing ? 0.5f : maxDistance + .5f;
|
||||||
Vec3d pos = VecHelper.getCenterOf(source.getPos())
|
Vec3d pos = VecHelper.getCenterOf(source.getAirCurrentPos())
|
||||||
.add(new Vec3d(facing.getDirectionVec()).scale(offset));
|
.add(new Vec3d(facing.getDirectionVec()).scale(offset));
|
||||||
if (world.rand.nextFloat() < AllConfigs.CLIENT.fanParticleDensity.get())
|
if (world.rand.nextFloat() < AllConfigs.CLIENT.fanParticleDensity.get())
|
||||||
world.addParticle(new AirFlowParticleData(source.getPos()), pos.x, pos.y, pos.z, 0, 0, 0);
|
world.addParticle(new AirFlowParticleData(source.getAirCurrentPos()), pos.x, pos.y, pos.z, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Iterator<Entity> iterator = caughtEntities.iterator(); iterator.hasNext();) {
|
for (Iterator<Entity> iterator = caughtEntities.iterator(); iterator.hasNext();) {
|
||||||
@ -81,7 +81,7 @@ public class AirCurrent {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3d center = VecHelper.getCenterOf(source.getPos());
|
Vec3d center = VecHelper.getCenterOf(source.getAirCurrentPos());
|
||||||
Vec3i flow = (pushing ? facing : facing.getOpposite()).getDirectionVec();
|
Vec3i flow = (pushing ? facing : facing.getOpposite()).getDirectionVec();
|
||||||
|
|
||||||
float sneakModifier = entity.isSneaking() ? 4096f : 512f;
|
float sneakModifier = entity.isSneaking() ? 4096f : 512f;
|
||||||
@ -165,8 +165,8 @@ public class AirCurrent {
|
|||||||
pushing = source.getAirFlowDirection() == direction;
|
pushing = source.getAirFlowDirection() == direction;
|
||||||
maxDistance = source.getMaxDistance();
|
maxDistance = source.getMaxDistance();
|
||||||
|
|
||||||
World world = source.getWorld();
|
World world = source.getAirCurrentWorld();
|
||||||
BlockPos start = source.getPos();
|
BlockPos start = source.getAirCurrentPos();
|
||||||
float max = this.maxDistance;
|
float max = this.maxDistance;
|
||||||
Vec3d directionVec = new Vec3d(direction.getDirectionVec());
|
Vec3d directionVec = new Vec3d(direction.getDirectionVec());
|
||||||
// if (source instanceof EncasedFanTileEntity) // debug
|
// if (source instanceof EncasedFanTileEntity) // debug
|
||||||
@ -269,13 +269,13 @@ public class AirCurrent {
|
|||||||
|
|
||||||
public void findEntities() {
|
public void findEntities() {
|
||||||
caughtEntities.clear();
|
caughtEntities.clear();
|
||||||
caughtEntities = source.getWorld()
|
caughtEntities = source.getAirCurrentWorld()
|
||||||
.getEntitiesWithinAABBExcludingEntity(null, bounds);
|
.getEntitiesWithinAABBExcludingEntity(null, bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findAffectedHandlers() {
|
public void findAffectedHandlers() {
|
||||||
World world = source.getWorld();
|
World world = source.getAirCurrentWorld();
|
||||||
BlockPos start = source.getPos();
|
BlockPos start = source.getAirCurrentPos();
|
||||||
affectedItemHandlers.clear();
|
affectedItemHandlers.clear();
|
||||||
for (int i = 0; i < maxDistance + 1; i++) {
|
for (int i = 0; i < maxDistance + 1; i++) {
|
||||||
Type type = getSegmentAt(i);
|
Type type = getSegmentAt(i);
|
||||||
|
@ -50,7 +50,7 @@ public class AirFlowParticle extends SimpleAnimatedParticle {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (source == null || source.isRemoved()) {
|
if (source == null || source.isSourceRemoved()) {
|
||||||
dissipate();
|
dissipate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public class AirFlowParticle extends SimpleAnimatedParticle {
|
|||||||
if (!source.getAirCurrent().pushing)
|
if (!source.getAirCurrent().pushing)
|
||||||
motion = motion.scale(-1);
|
motion = motion.scale(-1);
|
||||||
|
|
||||||
double distance = new Vec3d(posX, posY, posZ).subtract(VecHelper.getCenterOf(source.getPos()))
|
double distance = new Vec3d(posX, posY, posZ).subtract(VecHelper.getCenterOf(source.getAirCurrentPos()))
|
||||||
.mul(directionVec).length() - .5f;
|
.mul(directionVec).length() - .5f;
|
||||||
if (distance > source.getAirCurrent().maxDistance + 1 || distance < -.25f) {
|
if (distance > source.getAirCurrent().maxDistance + 1 || distance < -.25f) {
|
||||||
dissipate();
|
dissipate();
|
||||||
|
Loading…
Reference in New Issue
Block a user