Full Imports and Code Format Optimization

This commit is contained in:
Kam committed 2025-03-12 20:12:01 -04:00
1 parent 250edf099c
commit 6815f579a7
1192 files changed
+60344 -62167

No files matched your search

@@ -8,97 +8,95 @@ import noppes.npcs.NpcMiscInventory;
import noppes.npcs.controllers.PlayerDataController;
import noppes.npcs.controllers.data.PlayerBankData;
public class ContainerNPCBankInterface extends ContainerNpcInterface
{
public class ContainerNPCBankInterface extends ContainerNpcInterface {
public InventoryNPC currencyMatrix;
private EntityPlayer player;
private final EntityPlayer player;
public SlotNpcBankCurrency currency;
public int slot = 0;
public int bankid;
private PlayerBankData data;
public ContainerNPCBankInterface(EntityPlayer player, int slot, int bankid)
{
super(player);
this.bankid = bankid;
this.slot = slot;
this.player = player;
public ContainerNPCBankInterface(EntityPlayer player, int slot, int bankid) {
super(player);
this.bankid = bankid;
this.slot = slot;
this.player = player;
currencyMatrix = new InventoryNPC("currency", 1, this);
if(!isAvailable() || canBeUpgraded()){
currency = new SlotNpcBankCurrency(this, currencyMatrix, 0, 80, 29);
addSlotToContainer(currency);
if (!isAvailable() || canBeUpgraded()) {
currency = new SlotNpcBankCurrency(this, currencyMatrix, 0, 80, 29);
addSlotToContainer(currency);
}
NpcMiscInventory items = new NpcMiscInventory(54);
if(!player.worldObj.isRemote){
data = PlayerDataController.Instance.getBankData(player,bankid);
items = data.getBankOrDefault(bankid).itemSlots.get(slot);
if (!player.worldObj.isRemote) {
data = PlayerDataController.Instance.getBankData(player, bankid);
items = data.getBankOrDefault(bankid).itemSlots.get(slot);
}
int xOffset = xOffset();
for (int j = 0; j < getRowNumber(); j++)
{
for (int i1 = 0; i1 < 9; i1++)
{
int id = i1 + j * 9;
addSlotToContainer(new Slot(items, id, 8 + i1 * 18, 17 + xOffset + j * 18));
}
}
if(isUpgraded())
xOffset += 54;
for (int k = 0; k < 3; k++)
{
for (int j1 = 0; j1 < 9; j1++)
{
addSlotToContainer(new Slot(player.inventory, j1 + k * 9 + 9, 8 + j1 * 18, 86 + xOffset + k * 18));
for (int j = 0; j < getRowNumber(); j++) {
for (int i1 = 0; i1 < 9; i1++) {
int id = i1 + j * 9;
addSlotToContainer(new Slot(items, id, 8 + i1 * 18, 17 + xOffset + j * 18));
}
}
for (int l = 0; l < 9; l++)
{
addSlotToContainer(new Slot(player.inventory, l, 8 + l * 18, 144 + xOffset ));
if (isUpgraded())
xOffset += 54;
for (int k = 0; k < 3; k++) {
for (int j1 = 0; j1 < 9; j1++) {
addSlotToContainer(new Slot(player.inventory, j1 + k * 9 + 9, 8 + j1 * 18, 86 + xOffset + k * 18));
}
}
for (int l = 0; l < 9; l++) {
addSlotToContainer(new Slot(player.inventory, l, 8 + l * 18, 144 + xOffset));
}
}
public int getRowNumber() {
return 0;
}
public int xOffset(){
return 0;
}
@Override
public void onCraftMatrixChanged(IInventory inv){
}
public boolean isAvailable(){
return false;
}
public boolean isUpgraded(){
return false;
}
public boolean canBeUpgraded(){
return false;
return 0;
}
public synchronized void setCurrency(ItemStack item){
public int xOffset() {
return 0;
}
@Override
public void onCraftMatrixChanged(IInventory inv) {
}
public boolean isAvailable() {
return false;
}
public boolean isUpgraded() {
return false;
}
public boolean canBeUpgraded() {
return false;
}
public synchronized void setCurrency(ItemStack item) {
currency.item = item;
}
@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int i)
{
return null;
}
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int i) {
return null;
}
@Override
public void onContainerClosed(EntityPlayer entityplayer)
{
public void onContainerClosed(EntityPlayer entityplayer) {
super.onContainerClosed(entityplayer);
if (!entityplayer.worldObj.isRemote){
if (!entityplayer.worldObj.isRemote) {
ItemStack var3 = this.currencyMatrix.getStackInSlot(0);
currencyMatrix.setInventorySlotContents(0, null);
if (var3 != null)
{
entityplayer.dropPlayerItemWithRandomChoice(var3, false);
if (var3 != null) {
entityplayer.dropPlayerItemWithRandomChoice(var3, false);
}
}
}