Skip to content

Commit

Permalink
Update ControllerTile.java
Browse files Browse the repository at this point in the history
this should fix #11
  • Loading branch information
Thutmose committed Dec 4, 2020
1 parent 2653dd3 commit d70770d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main/java/thut/tech/common/blocks/lift/ControllerTile.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,8 @@ public void tick()
if (this.here == null) this.here = Vector3.getNewVector();
this.here.set(this);
EntityLift lift = this.getLift();
// if (this.liftID != null)
// {
// System.out.println(lift + " " + this.liftID);
// System.out.println(this.floor);
// }

// Processing beyond here is only server side!
if (this.getWorld().isRemote) return;
if (this.world instanceof IBlockEntityWorld) return;

Expand Down Expand Up @@ -457,6 +454,14 @@ else if (this.lift == null)
{
this.lift = EntityLift.getLiftFromUUID(this.liftID, this.getWorld());

// Client side process this differently for when the tile entity
// ticks before the lift actually loads in.
if (this.getWorld().isRemote)
{
if (this.lift != null) this.setLift(this.lift);
return this.lift;
}

if (this.lift == null) this.setLift(null);
else
{
Expand Down

0 comments on commit d70770d

Please sign in to comment.