Fixed item bridges

This commit is contained in:
Anuken 2020-05-03 12:56:14 -04:00
parent 80a13237f4
commit 85503a7a95
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ public class ExtendingItemBridge extends ItemBridge{
public class ExtendingItemBridgeEntity extends ItemBridgeEntity{
@Override
public void draw(){
super.draw();
Draw.rect(region, x, y);
Draw.z(Layer.power);
@ -29,7 +29,7 @@ public class ExtendingItemBridge extends ItemBridge{
int i = tile.absoluteRelativeTo(other.x, other.y);
float ex = other.worldx() - x - Geometry.d4[i].x * tilesize / 2f,
ey = other.worldy() - y - Geometry.d4[i].y * tilesize / 2f;
ey = other.worldy() - y - Geometry.d4[i].y * tilesize / 2f;
float uptime = state.isEditor() ? 1f : this.uptime;
@ -62,7 +62,8 @@ public class ExtendingItemBridge extends ItemBridge{
Draw.alpha(Mathf.absin(a / (float)arrows - time / 100f, 0.1f, 1f) * uptime * opacity);
Draw.rect(arrowRegion,
x + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * uptime,
y + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime, i * 90f);
y + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime,
i * 90f);
}
Draw.reset();
}

View File

@ -132,7 +132,7 @@ public class ItemBridge extends Block{
public void playerPlaced(){
Tile link = findLink(tile.x, tile.y);
if(linkValid(tile, link)){
configure(tile.pos());
link.entity.configure(tile.pos());
}
lastPlaced = tile.pos();