mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-19 20:00:05 +00:00
Fix comp drawer item resolution; comp drawer render sync; slave insertion behavior
This commit is contained in:
1 parent
79ba52a0d5
commit
f94b91fb8a
2 files changed
+24
-2
No files matched your search
@@ -212,6 +212,9 @@ public class TileEntityDrawersComp extends TileEntityDrawers
|
||||
protoStack[slot] = stack.copy();
|
||||
//centralInventory.setStoredItem(slot, stack, 0);
|
||||
//getDrawer(slot).setStoredItem(stack, 0);
|
||||
|
||||
if (worldObj != null && worldObj.isRemote)
|
||||
getWorldObj().func_147479_m(xCoord, yCoord, zCoord); // markBlockForRenderUpdate
|
||||
}
|
||||
|
||||
private ItemStack findHigherTier (ItemStack stack) {
|
||||
@@ -341,7 +344,7 @@ public class TileEntityDrawersComp extends TileEntityDrawers
|
||||
}
|
||||
|
||||
if (match != null) {
|
||||
setupLookup(lookup1, stack);
|
||||
setupLookup(lookup1, output);
|
||||
List<ItemStack> compMatches = findAllMatchingRecipes(lookup1);
|
||||
for (ItemStack comp : compMatches) {
|
||||
if (DrawerData.areItemsEqual(match, comp, true) && comp.stackSize == recipe.getRecipeSize()) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.jaquadro.minecraft.storagedrawers.api.inventory.IDrawerInventory;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawer;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawerGroup;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IPriorityGroup;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.ISmartGroup;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,7 +15,7 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
public class TileEntitySlave extends TileEntity implements IDrawerGroup, IPriorityGroup, ISidedInventory
|
||||
public class TileEntitySlave extends TileEntity implements IDrawerGroup, IPriorityGroup, ISmartGroup, ISidedInventory
|
||||
{
|
||||
private BlockCoord controllerCoord;
|
||||
private BlockCoord selfCoord;
|
||||
@@ -256,6 +257,24 @@ public class TileEntitySlave extends TileEntity implements IDrawerGroup, IPriori
|
||||
return controller.getDrawerInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Integer> enumerateDrawersForInsertion (ItemStack stack, boolean strict) {
|
||||
TileEntityController controller = getController();
|
||||
if (controller == null || !controller.isValidSlave(selfCoord))
|
||||
return null;
|
||||
|
||||
return controller.enumerateDrawersForInsertion(stack, strict);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Integer> enumerateDrawersForExtraction (ItemStack stack, boolean strict) {
|
||||
TileEntityController controller = getController();
|
||||
if (controller == null || !controller.isValidSlave(selfCoord))
|
||||
return null;
|
||||
|
||||
return controller.enumerateDrawersForExtraction(stack, strict);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty () {
|
||||
TileEntityController controller = getController();
|
||||
|
||||
Reference in new issue
Block a user