Inlined Time.time

This commit is contained in:
Anuken
2020-11-30 10:15:22 -05:00
parent c41dfa46aa
commit 371a14af87
42 changed files with 97 additions and 95 deletions

View File

@@ -20,7 +20,7 @@ public class ItemBuffer{
public void accept(Item item, short data){
//if(!accepts()) return;
buffer[index++] = Pack.longInt(Float.floatToIntBits(Time.time()), Pack.shortInt(item.id, data));
buffer[index++] = Pack.longInt(Float.floatToIntBits(Time.time), Pack.shortInt(item.id, data));
}
public void accept(Item item){
@@ -32,7 +32,7 @@ public class ItemBuffer{
long l = buffer[0];
float time = Float.intBitsToFloat(Pack.leftInt(l));
if(Time.time() >= time + speed || Time.time() < time){
if(Time.time >= time + speed || Time.time < time){
return content.item(Pack.leftShort(Pack.rightInt(l)));
}
}