Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void processItem()
- {
- if(shards)
- {
- ItemStack input, output;
- input = getStackInSlot(0);
- if(input == null)
- {
- reqvis = null;
- return;
- }
- ElementalizerRecepie recepie = ElementalizerApi.getRecepie(input);
- if(recepie != null)
- {
- output = recepie.output;
- if(reqvis == null)
- {
- reqvis = recepie.cost;
- }
- TileShardHolder[] holders = Elementalizer.getHolders(worldObj, xCoord, yCoord, zCoord);
- for(int i = 0; i < reqvis.length; i++)
- {
- if(shards && holders[i] != null)
- {
- int shardmeta = holders[i].getStackInSlot(0).getItemDamage();
- if(reqvis[shardmeta] > 0)
- reqvis[shardmeta] -= holders[i].drawVis(AdvThaumApi.aspects[shardmeta], reqvis[i]);
- }
- else
- {
- reqvis = null;
- return;
- }
- }
- System.out.println("Aer: " + reqvis[0]);
- System.out.println("Ignis: " + reqvis[1]);
- System.out.println("Aqua: " + reqvis[2]);
- System.out.println("Terra: " + reqvis[3]);
- boolean empty = true;
- for(int i = 0; i < 4; i++)
- {
- if(reqvis[i] > 0)
- {
- empty = false;
- }
- }
- if(empty)
- {
- reqvis = null;
- setInventorySlotContents(0, null);
- setInventorySlotContents(1, output);
- }
- }
- else
- {
- reqvis = null;
- }
- }
- else
- {
- reqvis = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment