Fixed multiblocks not accepting items
This commit is contained in:
@@ -197,6 +197,10 @@ public class Renderer extends RendererModule{
|
||||
@Override
|
||||
public void draw(){
|
||||
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);
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ public abstract class BaseBlock{
|
||||
/** Try offloading an item to a nearby container in its facing direction. Returns true if success.*/
|
||||
public boolean offloadDir(Tile tile, Item item){
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user