Removed NumberUtils
This commit is contained in:
@@ -22,7 +22,7 @@ public class ItemBuffer{
|
||||
|
||||
public void accept(Item item, short data){
|
||||
//if(!accepts()) return;
|
||||
buffer[index++] = Pack.longInt(NumberUtils.floatToIntBits(Time.time()), Pack.shortInt((short)item.id, data));
|
||||
buffer[index++] = Pack.longInt(Float.floatToIntBits(Time.time()), Pack.shortInt((short)item.id, data));
|
||||
}
|
||||
|
||||
public void accept(Item item){
|
||||
@@ -32,7 +32,7 @@ public class ItemBuffer{
|
||||
public Item poll(){
|
||||
if(index > 0){
|
||||
long l = buffer[0];
|
||||
float time = NumberUtils.intBitsToFloat(Pack.leftInt(l));
|
||||
float time = Float.intBitsToFloat(Pack.leftInt(l));
|
||||
|
||||
if(Time.time() >= time + speed || Time.time() < time){
|
||||
return content.item(Pack.leftShort(Pack.rightInt(l)));
|
||||
@@ -44,7 +44,7 @@ public class ItemBuffer{
|
||||
public short pollData(){
|
||||
if(index > 0){
|
||||
long l = buffer[0];
|
||||
float time = NumberUtils.intBitsToFloat(Pack.leftInt(l));
|
||||
float time = Float.intBitsToFloat(Pack.leftInt(l));
|
||||
|
||||
if(Time.time() >= time + speed || Time.time() < time){
|
||||
return Pack.rightShort(Pack.rightInt(l));
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Junction extends Block{
|
||||
if(buffer.index > 0){
|
||||
if(buffer.index > buffer.items.length) buffer.index = buffer.items.length;
|
||||
long l = buffer.items[0];
|
||||
float time = NumberUtils.intBitsToFloat(Pack.leftInt(l));
|
||||
float time = Float.intBitsToFloat(Pack.leftInt(l));
|
||||
|
||||
if(Time.time() >= time + speed || Time.time() < time){
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Junction extends Block{
|
||||
@Override
|
||||
public void handleItem(Item item, Tile tile, Tile source){
|
||||
JunctionEntity entity = tile.entity();
|
||||
long value = Pack.longInt(NumberUtils.floatToIntBits(Time.time()), item.id);
|
||||
long value = Pack.longInt(Float.floatToIntBits(Time.time()), item.id);
|
||||
int relative = source.relativeTo(tile.x, tile.y);
|
||||
entity.buffers[relative].add(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user