mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
...except overflow gates
This commit is contained in:
parent
cac953e812
commit
93bbd34055
@ -2,11 +2,14 @@ package io.anuke.mindustry.world.blocks.distribution;
|
||||
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.entities.type.TileEntity;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.world.Edges;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class OverflowGate extends Router{
|
||||
private int bufferCapacity = 10;
|
||||
|
||||
public OverflowGate(String name){
|
||||
super(name);
|
||||
@ -70,4 +73,20 @@ public class OverflowGate extends Router{
|
||||
|
||||
return to;
|
||||
}
|
||||
|
||||
public class OverflowGateEntity extends TileEntity{
|
||||
DirectionalItemBuffer buffer = new DirectionalItemBuffer(bufferCapacity, speed);
|
||||
|
||||
@Override
|
||||
public void write(DataOutput stream) throws IOException{
|
||||
super.write(stream);
|
||||
buffer.write(stream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(DataInput stream, byte revision) throws IOException{
|
||||
super.read(stream, revision);
|
||||
buffer.read(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user