Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void readFromNBT(NBTTagCompound tag) {
- super.readFromNBT(tag);
- if (tag.hasKey(NBTTags.Bank.ACCOUNTS_TAG)){
- NBTTagCompound accounts = tag.getCompoundTag(NBTTags.Bank.ACCOUNTS_TAG);
- LogHelper.info(accounts);
- if (accounts.hasKey(NBTTags.Bank.ACCOUNT_COUNT_TAG)) {
- int accountCount = accounts.getInteger(NBTTags.Bank.ACCOUNT_COUNT_TAG);
- this.accounts = new ArrayList<BankAccount>();
- for (int i = 0; i < accountCount; i++) {
- String accountX = String.format(NBTTags.Bank.ACCOUNT_X_TAG_fmt, i);
- if (accounts.hasKey(accountX)) {
- LogHelper.info("Looking for player: " + i);
- this.accounts.add(BankAccount.fromNBT(accounts.getCompoundTag(accountX), this)); //Crashes here.
- }
- }
- }
- }
- if (tag.hasKey(NBTTags.Bank.NAME_TAG)) name = tag.getString(NBTTags.Bank.NAME_TAG);
- else name = CharLists.getRandomName(worldObj.rand);
- }
Add Comment
Please, Sign In to add comment