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

@@ -1,6 +1,9 @@
# Refined Storage Changelog # Refined Storage Changelog
### 0.7 ### 0.7
**Bugfixes**
- Fixed Crafting Grid / Pattern Grid not throwing items on break
**Features** **Features**
- Port to Minecraft 1.9.4 - Port to Minecraft 1.9.4

View File

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

View File

@@ -32,6 +32,8 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
private StorageBlockStorage storage; private StorageBlockStorage storage;
private EnumStorageType type;
private int priority = 0; private int priority = 0;
private int compare = 0; private int compare = 0;
private int mode = ModeConstants.WHITELIST; private int mode = ModeConstants.WHITELIST;
@@ -101,11 +103,11 @@ public class TileStorage extends TileMachine implements IStorageProvider, IStora
} }
public EnumStorageType getType() { public EnumStorageType getType() {
if (worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.STORAGE) { if (type == null && worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.STORAGE) {
return ((EnumStorageType) worldObj.getBlockState(pos).getValue(BlockStorage.TYPE)); this.type = ((EnumStorageType) worldObj.getBlockState(pos).getValue(BlockStorage.TYPE));
} }
return EnumStorageType.TYPE_1K; return type;
} }
@Override @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 BasicItemHandler patterns = new BasicItemHandler(2, this, new BasicItemValidator(RefinedStorageItems.PATTERN));
private EnumGridType type;
private int sortingDirection = SORTING_DIRECTION_DESCENDING; private int sortingDirection = SORTING_DIRECTION_DESCENDING;
private int sortingType = SORTING_TYPE_NAME; private int sortingType = SORTING_TYPE_NAME;
private int searchBoxMode = SEARCH_BOX_MODE_NORMAL; private int searchBoxMode = SEARCH_BOX_MODE_NORMAL;
@@ -77,11 +79,11 @@ public class TileGrid extends TileMachine implements IGrid {
} }
public EnumGridType getType() { public EnumGridType getType() {
if (worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.GRID) { if (type == null && worldObj.getBlockState(pos).getBlock() == RefinedStorageBlocks.GRID) {
return (EnumGridType) worldObj.getBlockState(pos).getValue(BlockGrid.TYPE); this.type = (EnumGridType) worldObj.getBlockState(pos).getValue(BlockGrid.TYPE);
} }
return EnumGridType.NORMAL; return type;
} }
@Override @Override