mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Changed some stuff around in Drill's container to match TileInventoryBase's sorting
This commit is contained in:
parent
a7a76cc861
commit
b75837d6b2
1 changed files with 30 additions and 27 deletions
|
@ -14,6 +14,7 @@ import cofh.api.energy.IEnergyContainerItem;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotImmovable;
|
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotImmovable;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemDrill;
|
import de.ellpeck.actuallyadditions.mod.items.ItemDrill;
|
||||||
import de.ellpeck.actuallyadditions.mod.items.ItemDrillUpgrade;
|
import de.ellpeck.actuallyadditions.mod.items.ItemDrillUpgrade;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||||
import invtweaks.api.container.InventoryContainer;
|
import invtweaks.api.container.InventoryContainer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
@ -23,6 +24,7 @@ import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.TextComponentString;
|
||||||
|
|
||||||
@InventoryContainer
|
@InventoryContainer
|
||||||
public class ContainerDrill extends Container{
|
public class ContainerDrill extends Container{
|
||||||
|
@ -153,16 +155,6 @@ public class ContainerDrill extends Container{
|
||||||
return "drill";
|
return "drill";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasCustomName(){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ITextComponent getDisplayName(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInventoryStackLimit(){
|
public int getInventoryStackLimit(){
|
||||||
return 64;
|
return 64;
|
||||||
|
@ -174,7 +166,22 @@ public class ContainerDrill extends Container{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int slot, ItemStack stack){
|
public boolean isUseableByPlayer(EntityPlayer player){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openInventory(EntityPlayer player){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeInventory(EntityPlayer player){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isItemValidForSlot(int index, ItemStack stack){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,22 +202,8 @@ public class ContainerDrill extends Container{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clear(){
|
public void clear(){
|
||||||
this.slots = new ItemStack[this.slots.length];
|
int length = this.slots.length;
|
||||||
}
|
this.slots = new ItemStack[length];
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void openInventory(EntityPlayer player){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void closeInventory(EntityPlayer player){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -260,5 +253,15 @@ public class ContainerDrill extends Container{
|
||||||
this.slots[index] = null;
|
this.slots[index] = null;
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasCustomName(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITextComponent getDisplayName(){
|
||||||
|
return new TextComponentString(StringUtil.localize(this.getName()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue