FIx inconsistencies in the diff

This commit is contained in:
Patrick 'Quezler' Mounier 2020-01-28 07:59:11 +01:00
parent 28765ef909
commit af83d08fb1
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA
3 changed files with 15 additions and 15 deletions

View File

@ -24,14 +24,16 @@ abstract public class BaseConveyor extends Block implements Autotiler{
rotate = true;
update = true;
layer = Layer.overlay;
group = BlockGroup.transportation;
hasItems = true;
itemCapacity = 4;
unloadable = false;
layer = Layer.overlay;
idleSoundVolume = 0.004f;
conveyorPlacement = true;
entityType = BaseConveyorEntity::new;
idleSound = Sounds.conveyor;
group = BlockGroup.transportation;
idleSoundVolume = 0.004f;
unloadable = false;
}
@Override
@ -86,7 +88,7 @@ abstract public class BaseConveyor extends Block implements Autotiler{
return true;
}
static abstract class BaseConveyorEntity extends TileEntity{
static class BaseConveyorEntity extends TileEntity{
int blendbits;
int blendsclx, blendscly;

View File

@ -22,6 +22,7 @@ public class CraterConveyor extends BaseConveyor{
public CraterConveyor(String name){
super(name);
entityType = CraterConveyorEntity::new;
}
@ -43,8 +44,8 @@ public class CraterConveyor extends BaseConveyor{
public void setStats(){
super.setStats();
stats.add(BlockStat.boostEffect, "$blocks.itemcapacity");
stats.add(BlockStat.itemsMoved, speed * 60, StatUnit.perSecond);
stats.add(BlockStat.boostEffect, "$blocks.itemcapacity");
}
@Override

View File

@ -32,12 +32,14 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
protected ItemConveyor(String name){
super(name);
entityType = ItemConveyorEntity::new;
}
@Override
public void setStats(){
super.setStats();
//have to add a custom calculated speed, since the actual movement speed is apparently not linear
stats.add(BlockStat.itemsMoved, displayedSpeed, StatUnit.itemsSecond);
stats.add(BlockStat.boostEffect, "$blocks.itemsmoved");
@ -164,10 +166,10 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
public Block getReplacement(BuildRequest req, Array<BuildRequest> requests){
Boolf<Point2> cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && o.rotation == req.rotation && (req.block instanceof ItemConveyor || req.block instanceof Junction));
return cont.get(Geometry.d4(req.rotation)) &&
cont.get(Geometry.d4(req.rotation - 2)) &&
req.tile() != null &&
req.tile().block() instanceof ItemConveyor &&
Mathf.mod(req.tile().rotation() - req.rotation, 2) == 1 ? Blocks.junction : this;
cont.get(Geometry.d4(req.rotation - 2)) &&
req.tile() != null &&
req.tile().block() instanceof ItemConveyor &&
Mathf.mod(req.tile().rotation() - req.rotation, 2) == 1 ? Blocks.junction : this;
}
@Override
@ -266,11 +268,6 @@ public class ItemConveyor extends BaseConveyor implements Autotiler{
int lastInserted, mid;
float minitem = 1;
int blendbits;
int blendsclx, blendscly;
float clogHeat = 0f;
final void add(int o){
for(int i = Math.max(o + 1, len); i > o; i--){
ids[i] = ids[i - 1];