Fixed teleporter loop crash
This commit is contained in:
@@ -163,10 +163,6 @@ public class Conveyor extends Block{
|
||||
long result = ItemPos.packItem(item, y*0.9f, pos, (byte)Mathf.random(255));
|
||||
boolean inserted = false;
|
||||
|
||||
if(pos <= 0.00001f && entity.minitem <= 0.001f){
|
||||
return; //TODO low fps stacked items: what now?
|
||||
}
|
||||
|
||||
for(int i = 0; i < entity.convey.size; i ++){
|
||||
if(compareItems(result, entity.convey.get(i)) < 0){
|
||||
entity.convey.insert(i, result);
|
||||
|
||||
@@ -47,6 +47,7 @@ public class Teleporter extends PowerBlock{
|
||||
solid = true;
|
||||
health = 80;
|
||||
powerCapacity = 30f;
|
||||
instantTransfer = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -155,7 +156,7 @@ public class Teleporter extends PowerBlock{
|
||||
public boolean available(Tile tile, Item item){
|
||||
for(int i = 0; i < 4; i ++){
|
||||
Tile next = tile.getNearby(i);
|
||||
if(next != null && next.block().acceptItem(item, next, tile)){
|
||||
if(next != null && !(next.block().instantTransfer) && next.block().acceptItem(item, next, tile)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user