Fixed Crafting Grid / Pattern Grid not throwing items on break

This commit is contained in:
Raoul Van den Berge
2016-05-23 23:48:16 +02:00
parent 69e736c652
commit c469db9199
4 changed files with 18 additions and 9 deletions

View File

@@ -71,6 +71,8 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
public static final int MAX_CRAFTING_QUANTITY_PER_REQUEST = 500;
private EnumControllerType type;
private List<ItemGroup> itemGroups = new ArrayList<ItemGroup>();
private List<IStorage> storages = new ArrayList<IStorage>();
private List<WirelessGridConsumer> wirelessGridConsumers = new ArrayList<WirelessGridConsumer>();
@@ -255,11 +257,11 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
}
public EnumControllerType getType() {
if (worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.CONTROLLER) {
return (EnumControllerType) worldObj.getBlockState(pos).getValue(BlockController.TYPE);
if (type == null && worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.CONTROLLER) {
this.type = (EnumControllerType) worldObj.getBlockState(pos).getValue(BlockController.TYPE);
}
return EnumControllerType.NORMAL;
return type;
}
public int getWirelessGridRange() {

View File

@@ -32,6 +32,8 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
private StorageBlockStorage storage;
private EnumStorageType type;
private int priority = 0;
private int compare = 0;
private int mode = ModeConstants.WHITELIST;
@@ -101,11 +103,11 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
}
public EnumStorageType getType() {
if (worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.STORAGE) {
return ((EnumStorageType) worldObj.getBlockState(pos).getValue(BlockStorage.TYPE));
if (type == null && worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.STORAGE) {
this.type = ((EnumStorageType) worldObj.getBlockState(pos).getValue(BlockStorage.TYPE));
}
return EnumStorageType.TYPE_1K;
return type;
}
@Override

View File

@@ -61,6 +61,8 @@ public class TileGrid extends TileMachine implements IGrid {
private BasicItemHandler patterns = new BasicItemHandler(2, this, new BasicItemValidator(RefinedStorageItems.PATTERN));
private EnumGridType type;
private int sortingDirection = SORTING_DIRECTION_DESCENDING;
private int sortingType = SORTING_TYPE_NAME;
private int searchBoxMode = SEARCH_BOX_MODE_NORMAL;
@@ -77,11 +79,11 @@ public class TileGrid extends TileMachine implements IGrid {
}
public EnumGridType getType() {
if (worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.GRID) {
return (EnumGridType) worldObj.getBlockState(pos).getValue(BlockGrid.TYPE);
if (type == null && worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.GRID) {
this.type = (EnumGridType) worldObj.getBlockState(pos).getValue(BlockGrid.TYPE);
}
return EnumGridType.NORMAL;
return type;
}
@Override