Optimize Imports

This commit is contained in:
Kam committed 2024-02-15 17:54:28 -05:00
1 parent ec78673fa2
commit e46b78ff71
149 files changed
+931 -1029

No files matched your search

@@ -2,7 +2,6 @@ package noppes.npcs.controllers.data;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.api.handler.data.IAnimation;
@@ -10,13 +10,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import noppes.npcs.DataDisplay;
import noppes.npcs.Server;
import noppes.npcs.api.handler.data.IAnimationData;
import noppes.npcs.api.handler.data.IAnimation;
import noppes.npcs.client.Client;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.api.handler.data.IAnimationData;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.PlayerDataController;
import noppes.npcs.entity.EntityNPCInterface;
@@ -15,20 +15,19 @@ import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.containers.ContainerNPCBankInterface;
import noppes.npcs.controllers.BankController;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.util.CustomNPCsThreader;
import java.util.HashMap;
public class BankData {
public HashMap<Integer,NpcMiscInventory> itemSlots;
public HashMap<Integer,Boolean> upgradedSlots;
public HashMap<Integer,NpcMiscInventory> itemSlots;
public HashMap<Integer,Boolean> upgradedSlots;
public int unlockedSlots = 0;
public int bankId = -1;
public BankData(){
itemSlots = new HashMap<Integer,NpcMiscInventory>();
upgradedSlots = new HashMap<Integer,Boolean>();
for(int i = 0; i < 6; i++){
itemSlots.put(i, new NpcMiscInventory(54));
upgradedSlots.put(i, false);
@@ -63,7 +62,7 @@ public class BankData {
for(int slot: items.keySet()){
NBTTagCompound nbttagcompound = new NBTTagCompound();
nbttagcompound.setInteger("Slot", slot);
nbttagcompound.setTag("BankItems",items.get(slot).getToNBT());
list.appendTag(nbttagcompound);
}
@@ -74,16 +73,16 @@ public class BankData {
return true;
return bank.canBeUpgraded(slot) && upgradedSlots.get(slot);
}
public void openBankGui(final EntityPlayer player, EntityNPCInterface npc, int bankId, int slot) {
final Bank bank = BankController.getInstance().getBank(bankId);
if(bank.getMaxSlots() <= slot)
return;
if(bank.startSlots > unlockedSlots)
unlockedSlots = bank.startSlots;
ItemStack currency = null;
if(unlockedSlots <= slot){
currency = bank.currencyInventory.getStackInSlot(slot);
@@ -115,7 +114,7 @@ public class BankData {
Container con = player.openContainer;
if(con == null || !(con instanceof ContainerNPCBankInterface))
return null;
return (ContainerNPCBankInterface) con;
}
}
@@ -14,8 +14,11 @@ import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.ScriptContainer;
import noppes.npcs.controllers.ScriptController;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
public class ForgeDataScript implements INpcScriptHandler {
private List<ScriptContainer> scripts = new ArrayList();
@@ -2,7 +2,6 @@ package noppes.npcs.controllers.data;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.api.handler.data.IAnimation;
import noppes.npcs.api.handler.data.IFrame;
import noppes.npcs.api.handler.data.IFramePart;
import noppes.npcs.constants.EnumAnimationPart;
@@ -6,7 +6,6 @@
package noppes.npcs.controllers.data;
import cpw.mods.fml.common.eventhandler.Event;
import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.ScriptContainer;
import java.util.List;
@@ -18,7 +18,10 @@ import noppes.npcs.controllers.QuestController;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
public class Party {
private final UUID partyUUID;
@@ -152,7 +155,7 @@ public class Party {
// Remove New Leader
partyOrder.remove(uuid);
// Add New Leader to Front
partyOrder.add(0, uuid);
@@ -7,8 +7,10 @@ import noppes.npcs.*;
import noppes.npcs.api.IContainer;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.*;
import noppes.npcs.config.ConfigMain;
import noppes.npcs.constants.*;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.EnumQuestCompletion;
import noppes.npcs.constants.EnumQuestRepeat;
import noppes.npcs.constants.EnumQuestType;
import noppes.npcs.controllers.PlayerDataController;
import noppes.npcs.controllers.QuestController;
import noppes.npcs.quests.*;
@@ -30,15 +32,15 @@ public class Quest implements ICompatibilty, IQuest {
public String nextQuestTitle = "";
public PlayerMail mail = new PlayerMail();
public String command = "";
public QuestInterface questInterface = new QuestItem();
public int rewardExp = 0;
public NpcMiscInventory rewardItems = new NpcMiscInventory(9);
public boolean randomReward = false;
public FactionOptions factionOptions = new FactionOptions();
public PartyOptions partyOptions = new PartyOptions();
public void readNBT(NBTTagCompound compound) {
id = compound.getInteger("Id");
@@ -47,7 +49,7 @@ public class Quest implements ICompatibilty, IQuest {
public void readNBTPartial(NBTTagCompound compound) {
version = compound.getInteger("ModRev");
VersionCompatibility.CheckAvailabilityCompatibility(this, compound);
setType(EnumQuestType.values()[compound.getInteger("Type")]);
title = compound.getString("Title");
logText = compound.getString("Text");
@@ -63,15 +65,15 @@ public class Quest implements ICompatibilty, IQuest {
randomReward = compound.getBoolean("RandomReward");
rewardExp = compound.getInteger("RewardExp");
rewardItems.setFromNBT(compound.getCompoundTag("Rewards"));
completion = EnumQuestCompletion.values()[compound.getInteger("QuestCompletion")];
repeat = EnumQuestRepeat.values()[compound.getInteger("QuestRepeat")];
questInterface.readEntityFromNBT(compound);
factionOptions.readFromNBT(compound.getCompoundTag("QuestFactionPoints"));
partyOptions.readFromNBT(compound.getCompoundTag("PartyOptions"));
mail.readNBT(compound.getCompoundTag("QuestMail"));
}
@@ -85,7 +87,7 @@ public class Quest implements ICompatibilty, IQuest {
questInterface = new QuestKill();
else if(type == EnumQuestType.Location)
questInterface = new QuestLocation();
if(questInterface != null)
questInterface.questId = id;
}
@@ -110,7 +112,7 @@ public class Quest implements ICompatibilty, IQuest {
compound.setInteger("QuestCompletion", completion.ordinal());
compound.setInteger("QuestRepeat", repeat.ordinal());
this.questInterface.writeEntityToNBT(compound);
compound.setTag("QuestFactionPoints", factionOptions.writeToNBT(new NBTTagCompound()));
compound.setTag("PartyOptions", partyOptions.writeToNBT());
@@ -118,7 +120,7 @@ public class Quest implements ICompatibilty, IQuest {
return compound;
}
public boolean hasNewQuest()
{
return getNextQuest() != null;
@@ -156,7 +158,7 @@ public class Quest implements ICompatibilty, IQuest {
}
return 0L;
}
@Override
public int getVersion() {
return version;
@@ -1,12 +1,7 @@
package noppes.npcs.controllers.data;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.api.ISkinOverlay;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.renderer.ImageData;
import noppes.npcs.entity.data.DataSkinOverlays;
public class SkinOverlay implements ISkinOverlay {