Fixed multiblocks not accepting items

This commit is contained in:
Anuken
2018-08-15 19:38:13 -04:00
parent 14c526d0c4
commit c569232e74
2 changed files with 5 additions and 1 deletions

View File

@@ -197,6 +197,10 @@ public class Renderer extends RendererModule{
@Override @Override
public void draw(){ public void draw(){
camera.update(); camera.update();
if(Float.isNaN(Core.camera.position.x) || Float.isNaN(Core.camera.position.y)){
Core.camera.position.x = players[0].x;
Core.camera.position.y = players[0].y;
}
Graphics.clear(clearColor); Graphics.clear(clearColor);

View File

@@ -274,7 +274,7 @@ public abstract class BaseBlock{
/** Try offloading an item to a nearby container in its facing direction. Returns true if success.*/ /** Try offloading an item to a nearby container in its facing direction. Returns true if success.*/
public boolean offloadDir(Tile tile, Item item){ public boolean offloadDir(Tile tile, Item item){
Tile other = tile.getNearby(tile.getRotation()); Tile other = tile.getNearby(tile.getRotation());
if(other != null && other.getTeamID() == tile.getTeamID() && other.block().acceptItem(item, other, tile)){ if(other != null && other.target().getTeamID() == tile.getTeamID() && other.block().acceptItem(item, other, tile)){
other.block().handleItem(item, other, tile); other.block().handleItem(item, other, tile);
return true; return true;
} }