Fixed conveyor belt not refreshing on world load
This commit is contained in:
parent
4be96d95be
commit
7a5075e323
2 changed files with 23 additions and 11 deletions
|
@ -126,7 +126,7 @@ public class BlockConveyorBelt extends BlockRI
|
||||||
{
|
{
|
||||||
par6List.add(newBounds);
|
par6List.add(newBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,8 +304,8 @@ public class BlockConveyorBelt extends BlockRI
|
||||||
|
|
||||||
if (slantType == SlantType.UP)
|
if (slantType == SlantType.UP)
|
||||||
{
|
{
|
||||||
//We need at least 0.25 to move items up.
|
// We need at least 0.25 to move items up.
|
||||||
entity.motionY = Math.max(0.25, maxSpeed);
|
entity.motionY = maxSpeed * 2;// Math.max(0.25, maxSpeed);
|
||||||
}
|
}
|
||||||
else if (slantType == SlantType.DOWN)
|
else if (slantType == SlantType.DOWN)
|
||||||
{
|
{
|
||||||
|
@ -330,16 +330,14 @@ public class BlockConveyorBelt extends BlockRI
|
||||||
{
|
{
|
||||||
double difference = (z + 0.5) - entity.posZ;
|
double difference = (z + 0.5) - entity.posZ;
|
||||||
entity.motionZ += difference * 0.1;
|
entity.motionZ += difference * 0.1;
|
||||||
// entity.posZ = z + 0.5;
|
|
||||||
}
|
}
|
||||||
else if (direction.offsetZ != 0)
|
else if (direction.offsetZ != 0)
|
||||||
{
|
{
|
||||||
double difference = (x + 0.5) - entity.posX;
|
double difference = (x + 0.5) - entity.posX;
|
||||||
entity.motionX += difference * 0.1;
|
entity.motionX += difference * 0.1;
|
||||||
// /entity.posX = x + 0.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
((EntityItem) entity).age++;
|
((EntityItem) entity).age = 0;
|
||||||
|
|
||||||
boolean foundSneaking = false;
|
boolean foundSneaking = false;
|
||||||
for (EntityPlayer player : (List<EntityPlayer>) world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1)))
|
for (EntityPlayer player : (List<EntityPlayer>) world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1)))
|
||||||
|
|
|
@ -14,6 +14,12 @@ public abstract class TileMechanical extends TileAdvanced implements IMechanical
|
||||||
protected long torque;
|
protected long torque;
|
||||||
public float angle = 0;
|
public float angle = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initiate()
|
||||||
|
{
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity()
|
public void updateEntity()
|
||||||
{
|
{
|
||||||
|
@ -23,11 +29,6 @@ public abstract class TileMechanical extends TileAdvanced implements IMechanical
|
||||||
angularVelocity *= getLoad();
|
angularVelocity *= getLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float getLoad()
|
|
||||||
{
|
|
||||||
return 0.9f;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void invalidate()
|
public void invalidate()
|
||||||
{
|
{
|
||||||
|
@ -35,6 +36,19 @@ public abstract class TileMechanical extends TileAdvanced implements IMechanical
|
||||||
super.invalidate();
|
super.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refreshes all the connections of this block.
|
||||||
|
*/
|
||||||
|
public void refresh()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected float getLoad()
|
||||||
|
{
|
||||||
|
return 0.9f;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getConnections()
|
public Object[] getConnections()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue