Reduces visibility of internal fields/methods
Reduces the visibility of all fields to private and create setters/getters when necessary. Exceptions are fields with GuiSync as these need to be public. Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
@@ -27,8 +27,8 @@ import appeng.util.item.AEItemStack;
|
||||
public class ItemSlot
|
||||
{
|
||||
|
||||
public int slot;
|
||||
public boolean isExtractable;
|
||||
private int slot;
|
||||
private boolean isExtractable;
|
||||
// one or the other..
|
||||
private IAEItemStack aeItemStack;
|
||||
private ItemStack itemStack;
|
||||
@@ -49,9 +49,29 @@ public class ItemSlot
|
||||
return this.aeItemStack == null ? ( this.itemStack == null ? null : ( this.aeItemStack = AEItemStack.create( this.itemStack ) ) ) : this.aeItemStack;
|
||||
}
|
||||
|
||||
public void setAEItemStack( final IAEItemStack is )
|
||||
void setAEItemStack( final IAEItemStack is )
|
||||
{
|
||||
this.aeItemStack = is;
|
||||
this.itemStack = null;
|
||||
}
|
||||
|
||||
public boolean isExtractable()
|
||||
{
|
||||
return this.isExtractable;
|
||||
}
|
||||
|
||||
void setExtractable( final boolean isExtractable )
|
||||
{
|
||||
this.isExtractable = isExtractable;
|
||||
}
|
||||
|
||||
public int getSlot()
|
||||
{
|
||||
return this.slot;
|
||||
}
|
||||
|
||||
public void setSlot( final int slot )
|
||||
{
|
||||
this.slot = slot;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user