Possible junction clog fix

This commit is contained in:
Anuken
2018-02-19 20:13:45 -05:00
parent 2208198aa8
commit 1397ed2d06
4 changed files with 6 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
#Autogenerated file. Do not modify. #Autogenerated file. Do not modify.
#Mon Feb 19 15:07:31 EST 2018 #Mon Feb 19 20:13:04 EST 2018
version=beta version=beta
androidBuildCode=247 androidBuildCode=248
name=Mindustry name=Mindustry
code=3.3 code=3.3
build=custom build build=custom build

View File

@@ -72,7 +72,7 @@ public class DebugFragment implements Fragment {
}); });
row(); row();
new button("time", () -> { new button("time", () -> {
Timers.resetTime(1080000/2f); Timers.resetTime(1080000 - 60*10);
}); });
row(); row();
new button("time2", () -> { new button("time2", () -> {

View File

@@ -37,7 +37,7 @@ public class Junction extends Block{
long l = buffer.items[0]; long l = buffer.items[0];
float time = NumberUtils.intBitsToFloat(Bits.getLeftInt(l)); float time = NumberUtils.intBitsToFloat(Bits.getLeftInt(l));
if(Timers.time() >= time + speed){ if(Timers.time() >= time + speed || Timers.time() < time){
int val = Bits.getRightInt(l); int val = Bits.getRightInt(l);
@@ -91,6 +91,7 @@ public class Junction extends Block{
arr.add("nearby." + i); arr.add("nearby." + i);
arr.add(tile.getNearby(i)); arr.add(tile.getNearby(i));
} }
Consumer<Buffer> write = b -> { Consumer<Buffer> write = b -> {
for(int i = 0; i < b.index; i++){ for(int i = 0; i < b.index; i++){
long l = b.items[i]; long l = b.items[i];

View File

@@ -49,7 +49,7 @@ public class TunnelConveyor extends Block{
long l = entity.buffer[0]; long l = entity.buffer[0];
float time = NumberUtils.intBitsToFloat(Bits.getLeftInt(l)); float time = NumberUtils.intBitsToFloat(Bits.getLeftInt(l));
if(Timers.time() >= time + speed){ if(Timers.time() >= time + speed || Timers.time() < time){
Item item = Item.getByID(Bits.getRightInt(l)); Item item = Item.getByID(Bits.getRightInt(l));