mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-25 06:24:21 +00:00
Add some api stuff related to quantify key
This commit is contained in:
1 parent
ffc36cdea9
commit
bc5a87caf8
6 files changed
+31
-8
No files matched your search
+5
@@ -649,6 +649,11 @@ public class TileEntityDrawersComp extends TileEntityDrawers {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isQuantified() {
|
||||
return TileEntityDrawersComp.this.isQuantified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLocked(int slot, LockAttribute attr) {
|
||||
return TileEntityDrawersComp.this.isLocked(attr);
|
||||
|
||||
+11
@@ -68,6 +68,17 @@ public class TileEntityDrawersStandard extends TileEntityDrawers {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isQuantified(int slot) {
|
||||
return TileEntityDrawersStandard.this.isQuantified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setIsQuantified(int slot, boolean state) {
|
||||
TileEntityDrawersStandard.this.setIsQuantified(state);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStorageUnlimited(int slot) {
|
||||
return TileEntityDrawersStandard.this.isUnlimited();
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
package com.jaquadro.minecraft.storagedrawers.storage;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.*;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawer;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IFractionalDrawer;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.ILockable;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.IShroudable;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.IVoidable;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.LockAttribute;
|
||||
|
||||
public class CompDrawerData extends BaseDrawerData implements IFractionalDrawer, IVoidable, IShroudable, ILockable {
|
||||
public class CompDrawerData extends BaseDrawerData implements IFractionalDrawer, IVoidable, IShroudable, ILockable, IQuantifiable {
|
||||
|
||||
private static final ItemStack nullStack = new ItemStack((Item) null);
|
||||
|
||||
@@ -142,6 +139,14 @@ public class CompDrawerData extends BaseDrawerData implements IFractionalDrawer,
|
||||
return central.setIsSlotShrouded(slot, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isQuantified() {
|
||||
return central.isQuantified();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsQuantified(boolean state) {};
|
||||
|
||||
@Override
|
||||
public boolean isLocked(LockAttribute attr) {
|
||||
return central.isLocked(slot, attr);
|
||||
|
||||
@@ -208,9 +208,7 @@ public class DrawerData extends BaseDrawerData implements IVoidable, IShroudable
|
||||
public boolean isQuantified() { return storageProvider.isQuantified(slot); }
|
||||
|
||||
@Override
|
||||
public boolean setIsQuantified(boolean state) {
|
||||
return storageProvider.setIsQuantified(slot, state);
|
||||
}
|
||||
public void setIsQuantified(boolean state) {}
|
||||
|
||||
@Override
|
||||
public boolean isLocked(LockAttribute attr) {
|
||||
|
||||
@@ -38,6 +38,8 @@ public interface ICentralInventory {
|
||||
|
||||
public boolean setIsSlotShrouded(int slot, boolean state);
|
||||
|
||||
public boolean isQuantified();
|
||||
|
||||
public boolean isLocked(int slot, LockAttribute attr);
|
||||
|
||||
public void readFromNBT(int slot, NBTTagCompound tag);
|
||||
|
||||
@@ -8,5 +8,7 @@ public interface IUpgradeProvider {
|
||||
|
||||
boolean isShrouded();
|
||||
|
||||
boolean isQuantified();
|
||||
|
||||
boolean isDowngraded();
|
||||
}
|
||||
Reference in new issue
Block a user