29 Commits

Author SHA1 Message Date
Manoel Trapier
4951c63cbe small changes on info.plist 2011-03-14 19:26:16 +01:00
Manoel Trapier
ae40d13174 Minor changes on README.markdown, changed screenshot, add references on merging of nickloose's changes. 2011-03-14 19:09:34 +01:00
Manoel Trapier
d5cabd56dd Now only display .dat file for player name, and "World Default" will correctly open the "level.dat" player 2011-03-12 01:43:56 +01:00
Manoel Trapier
09a3be16d4 Merge branch 'master' of github.com:Godzil/InsideJob 2011-03-11 02:55:32 +01:00
Manoel Trapier
57af26aba0 small update on readme.markdown and add "SMP" to app name to differentiate from official version. 2011-03-11 02:54:42 +01:00
Manoel Trapier
fadf68345c small update on readme.markdown 2011-03-11 02:42:34 +01:00
Manoel Trapier
46ade83b03 We can now select player from SMP world. "Default player" is currently a placeholder, and player file are not filtered. 2011-03-11 02:41:52 +01:00
Manoel Trapier
5184104849 Merge with nickloose's modifications. (9345b2cc7b) 2011-03-11 00:38:24 +01:00
Manoel Trapier
5bad4172ad Add XCode 4 things to .git ignore 2011-03-10 21:47:47 +01:00
Manoel Trapier
642a10a89c Commit before merging changes from nickloose 2011-03-10 20:57:43 +01:00
Nick Loose
9345b2cc7b Can now load named worlds from beta 1.3
Used Godzil's 3ecd8a418f to load from folder and added the ability to save worlds and list all worlds in minecraft/saves/
2011-03-10 19:39:20 +01:00
Nick Loose
708c880361 Added better adding of items form preble's 0cccfddd34
Using the better code form preble's 7330a00242 for setDocumentEdited

(Switched to Xcode 4)
2011-03-10 09:49:44 +01:00
Nick Loose
c5b8d1ae4e Added things to .gitignore for xcode 4 2011-03-10 01:51:42 +01:00
Nick Loose
e7c3c258e4 Added Redstone Repeater with ID 356 2011-03-10 01:44:11 +01:00
Manoël Trapier
9e2986e6c5 Start mechanism to select SMP Player (no real GUI for now) Save should work, but it's not fully tested until the end. I should simplify error mechanisms on loading, there are now bloated. 2011-03-09 09:28:19 +01:00
Manoël Trapier
1b6b0f77d0 Minor changes about the fork 2011-03-09 09:23:30 +01:00
Manoël Trapier
3ecd8a418f Change backen for loading world, now use folder path as index instead of slot id. 2011-03-05 15:29:54 +01:00
Nick Loose
4fddca6e98 Added Beta 1.3 Items 2011-02-23 17:36:45 +01:00
Nick Loose
dc0fbfc1f0 Added 1.2 Beta items except colored wool and all dye colors.
They can be added with the Wool block and then set the wanted damage value
same for dye.
See here http://www.minecraftwiki.net/wiki/Dye for the right values.
For the colored wool the opposite values apply!
2011-01-14 14:41:17 +01:00
Nick Loose
43277ae339 Reorganized Tools Menu in Time and Inventory 2010-11-21 15:39:57 +01:00
Nick Loose
000eafedd6 Added rudimentary support for saving and loading the Inventory 2010-11-21 15:23:59 +01:00
Nick Loose
bae935de1b Rewrote the Time Claculation 2010-11-21 10:43:01 +01:00
Nick Loose
b7a628d6fa Added image for unrecognized items 2010-11-20 13:50:07 +01:00
Nick Loose
fd071b3804 Added dot in the close button when unsaved 2010-11-19 15:14:03 +01:00
Nick Loose
1a4a04ecc8 Added menu item to set time easily to the next Midnight and the next Noon 2010-11-19 15:10:16 +01:00
Nick Loose
34500b6141 Added menu item to set time easily to the next sunset 2010-11-18 18:03:45 +01:00
Nick Loose
5da9ecc7d0 Added menu item to set time easily to the next sunrise 2010-11-18 17:55:54 +01:00
Nick Loose
dd7a2358c0 Added the ability to make Items Indestructible 2010-11-14 20:51:06 +01:00
Nick Loose
ebb5a4aae5 Made Item list non editable 2010-11-03 09:49:07 +01:00
21 changed files with 1801 additions and 1112 deletions

2
.gitignore vendored
View File

@@ -11,6 +11,8 @@ dsa_priv.pem
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
xcuserdata
# Generated files
VersionX-revision.h

View File

@@ -20,12 +20,12 @@
@interface IJInventoryItem : NSObject <NSCoding> {
int16_t itemId;
int16_t damage;
int8_t count;
uint8_t count;
int8_t slot;
}
@property (nonatomic, assign) int16_t itemId;
@property (nonatomic, assign) int16_t damage;
@property (nonatomic, assign) int8_t count;
@property (nonatomic, assign) uint8_t count;
@property (nonatomic, assign) int8_t slot;
@property (nonatomic, readonly) NSString *itemName;

View File

@@ -69,12 +69,18 @@
if (itemId <= 94)
{
if (itemId <= 17)
if (itemId <= 17){
index = itemId - 1; // first item is 1
else if (itemId <= 35 )
}
else if (itemId <= 34 ){
index = itemId + 1;
else if (itemId >= 37)
}
else if (itemId == 35 ){
index = itemId - 8;
}
else if (itemId >= 37){
index = itemId + 6;
}
atlasOffset = NSMakePoint(36, 75);
}
else if (itemId >= 256 && itemId <= 351)

View File

@@ -16,9 +16,10 @@
@interface IJInventoryWindowController : NSWindowController <NSWindowDelegate, IJInventoryViewDelegate> {
IJMinecraftLevel *level;
IJMinecraftLevel *player; /***< SMP Player.dat file use same format as level.dat */
NSArray *inventory;
NSSegmentedControl *worldSelectionControl;
NSPopUpButton *worldSelectionControl;
NSTextField *statusTextField;
IJInventoryView *inventoryView;
@@ -42,24 +43,38 @@
// Document
int64_t sessionLockValue;
int loadedWorldIndex;
int attemptedLoadWorldIndex;
int loadedWorldIndex;
NSString *loadedWorldFolder;
NSString *attemptedLoadWorldFolder;
NSString *loadedPlayer;
NSPopUpButton *playerSelectionControl;
}
@property (nonatomic, assign) IBOutlet NSSegmentedControl *worldSelectionControl;
@property (nonatomic, assign) IBOutlet NSPopUpButton *worldSelectionControl;
@property (nonatomic, assign) IBOutlet NSTextField *statusTextField;
@property (nonatomic, assign) IBOutlet IJInventoryView *inventoryView;
@property (nonatomic, assign) IBOutlet IJInventoryView *quickView;
@property (nonatomic, assign) IBOutlet IJInventoryView *armorView;
@property (nonatomic, assign) IBOutlet NSSearchField *itemSearchField;
@property (nonatomic, assign) IBOutlet NSTableView *itemTableView;
@property (nonatomic, retain) NSNumber *worldTime;
@property (nonatomic, assign) IBOutlet NSPopUpButton *playerSelectionControl;
- (IBAction)menuSelectWorldFromPath:(id)sender;
- (IBAction)menuSelectWorld:(id)sender;
- (IBAction)worldSelectionChanged:(id)sender;
- (IBAction)updateItemSearchFilter:(id)sender;
- (IBAction)makeSearchFieldFirstResponder:(id)sender;
- (IBAction)itemTableViewDoubleClicked:(id)sender;
- (IBAction)setNextDay:(id)sender;
- (IBAction)setNextNight:(id)sender;
- (IBAction)setNextNoon:(id)sender;
- (IBAction)setNextMidnight:(id)sender;
- (IBAction)emptyInventory:(id)sender;
- (IBAction)saveInventoryItems:(id)sender;
- (IBAction)loadInventoryItems:(id)sender;
- (IBAction)playerSelectionChanged:(id)sender;
@end

View File

@@ -4,6 +4,8 @@
//
// Created by Adam Preble on 10/7/10.
// Copyright 2010 Adam Preble. All rights reserved.
// Changes for SMP World (external player support) ©2011 Manoel Trapier
// Changes for searching Named SSP world and GUI changes ©2011 Nickloose
//
#import "IJInventoryWindowController.h"
@@ -12,14 +14,19 @@
#import "IJInventoryView.h"
#import "IJItemPropertiesViewController.h"
#import "MAAttachedWindow.h"
#import "NSFileManager+DirectoryLocations.h"
@interface IJInventoryWindowController ()
- (void)saveWorld;
- (void)loadWorldAtIndex:(int)worldIndex;
- (BOOL)isDocumentEdited;
- (void)loadWorldAtFolder:(NSString *)worldFolder;
- (void)loadWorldSelectionControl;
- (void)loadPlayerSelectionControl;
@end
@implementation IJInventoryWindowController
@synthesize playerSelectionControl;
@synthesize worldSelectionControl;
@synthesize statusTextField;
@@ -29,6 +36,8 @@
- (void)awakeFromNib
{
[self loadWorldSelectionControl];
armorInventory = [[NSMutableArray alloc] init];
quickInventory = [[NSMutableArray alloc] init];
normalInventory = [[NSMutableArray alloc] init];
@@ -46,7 +55,6 @@
keys = [keys sortedArrayUsingSelector:@selector(compare:)];
allItemIds = [[NSArray alloc] initWithArray:keys];
filteredItemIds = [allItemIds retain];
[itemTableView setTarget:self];
[itemTableView setDoubleAction:@selector(itemTableViewDoubleClicked:)];
}
@@ -59,6 +67,7 @@
[normalInventory release];
[inventory release];
[level release];
[player release];
[super dealloc];
}
@@ -70,31 +79,120 @@
{
if (returnCode == NSAlertOtherReturn) // Cancel
{
[worldSelectionControl setSelectedSegment:loadedWorldIndex-1];
[worldSelectionControl selectItemWithTitle:[loadedWorldFolder lastPathComponent]];
return;
}
if (returnCode == NSAlertDefaultReturn) // Save
{
[self saveWorld];
[self loadWorldAtIndex:attemptedLoadWorldIndex];
[self loadWorldAtFolder:attemptedLoadWorldFolder];
}
else if (returnCode == NSAlertAlternateReturn) // Don't save
{
[self setDocumentEdited:NO]; // Slightly hacky -- prevent the alert from being put up again.
[self loadWorldAtIndex:attemptedLoadWorldIndex];
[self loadWorldAtFolder:attemptedLoadWorldFolder];
}
}
- (void)loadWorldAtIndex:(int)worldIndex
- (void)loadWorldPlayerInventory:(NSString *)PlayerName
{
/*
* If passing NULL to PlayerName, we will use level.dat instead of
* Players/PlayerName.dat file
*/
NSString *playerPath;
[armorInventory removeAllObjects];
[quickInventory removeAllObjects];
[normalInventory removeAllObjects];
[inventoryView setItems:normalInventory];
[quickView setItems:quickInventory];
[armorView setItems:armorInventory];
[player release];
player = nil;
[inventory release];
inventory = nil;
loadedPlayer = nil;
NSLog(@"Player name: %@",PlayerName);
if ([PlayerName isEqualToString: @"World default"])
playerPath = [IJMinecraftLevel pathForPlayer:nil withWorld: loadedWorldFolder];
else
playerPath = [IJMinecraftLevel pathForPlayer:PlayerName withWorld: loadedWorldFolder];
NSLog(@"Path: %@", playerPath);
NSData *playerFileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:playerPath]];
if (!playerFileData)
{
// Error loading
NSBeginCriticalAlertSheet(@"Error loading player.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"InsideJob was unable to load the level at %@.", playerPath);
return;
}
player = [[IJMinecraftLevel nbtContainerWithData:playerFileData] retain];
inventory = [[player inventory] retain];
// Add placeholder inventory items:
for (int i = 0; i < IJInventorySlotQuickLast + 1 - IJInventorySlotQuickFirst; i++)
[quickInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotQuickFirst + i]];
for (int i = 0; i < IJInventorySlotNormalLast + 1 - IJInventorySlotNormalFirst; i++)
[normalInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotNormalFirst + i]];
for (int i = 0; i < IJInventorySlotArmorLast + 1 - IJInventorySlotArmorFirst; i++)
[armorInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotArmorFirst + i]];
// Overwrite the placeholders with actual inventory:
for (IJInventoryItem *item in inventory)
{
if (IJInventorySlotQuickFirst <= item.slot && item.slot <= IJInventorySlotQuickLast)
{
[quickInventory replaceObjectAtIndex:item.slot - IJInventorySlotQuickFirst withObject:item];
}
else if (IJInventorySlotNormalFirst <= item.slot && item.slot <= IJInventorySlotNormalLast)
{
[normalInventory replaceObjectAtIndex:item.slot - IJInventorySlotNormalFirst withObject:item];
}
else if (IJInventorySlotArmorFirst <= item.slot && item.slot <= IJInventorySlotArmorLast)
{
[armorInventory replaceObjectAtIndex:item.slot - IJInventorySlotArmorFirst withObject:item];
}
}
// NSLog(@"normal: %@", normalInventory);
// NSLog(@"quick: %@", quickInventory);
[inventoryView setItems:normalInventory];
[quickView setItems:quickInventory];
[armorView setItems:armorInventory];
[self setDocumentEdited:NO];
statusTextField.stringValue = @"Player loaded!";
loadedPlayer = [PlayerName retain];
}
- (void)loadWorldAtFolder:(NSString *)worldPath
{
if ([self isDocumentEdited])
{
attemptedLoadWorldIndex = worldIndex;
attemptedLoadWorldFolder = worldPath;
NSBeginInformationalAlertSheet(@"Do you want to save the changes you made in this world?", @"Save", @"Don't Save", @"Cancel", self.window, self, @selector(dirtyLoadSheetDidEnd:returnCode:contextInfo:), nil, nil, @"Your changes will be lost if you do not save them.");
return;
}
NSFileManager *filemgr;
NSArray *filelist;
NSError *fileError;
int count, i;
[armorInventory removeAllObjects];
[quickInventory removeAllObjects];
[normalInventory removeAllObjects];
@@ -106,29 +204,23 @@
[self willChangeValueForKey:@"worldTime"];
[level release];
level = nil;
[player release];
player = nil;
[inventory release];
inventory = nil;
[self didChangeValueForKey:@"worldTime"];
statusTextField.stringValue = @"No world loaded.";
if (![IJMinecraftLevel worldExistsAtIndex:worldIndex])
{
NSBeginCriticalAlertSheet(@"No world exists in that slot.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Please create a new single player world in this slot using Minecraft and try again.");
return;
}
sessionLockValue = [IJMinecraftLevel writeToSessionLockAtIndex:worldIndex];
if (![IJMinecraftLevel checkSessionLockAtIndex:worldIndex value:sessionLockValue])
NSString *levelPath = [IJMinecraftLevel pathForLevelDatAtFolder:worldPath];
NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:levelPath]];
sessionLockValue = [IJMinecraftLevel writeToSessionLockAtFolder:worldPath];
if (![IJMinecraftLevel checkSessionLockAtFolder:worldPath value:sessionLockValue])
{
NSBeginCriticalAlertSheet(@"Error loading world.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable obtain the session lock.");
return;
}
NSString *levelPath = [IJMinecraftLevel pathForLevelDatAtIndex:worldIndex];
NSData *fileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:levelPath]];
if (!fileData)
{
// Error loading
@@ -138,8 +230,52 @@
[self willChangeValueForKey:@"worldTime"];
level = [[IJMinecraftLevel nbtContainerWithData:fileData] retain];
inventory = [[level inventory] retain];
/* Now search for first player .dat file (but by default try to load from level.dat */
if (!fileData)
{
// Error loading
NSBeginCriticalAlertSheet(@"Error loading world.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"InsideJob was unable to load the level at %@.", levelPath);
return;
}
[self willChangeValueForKey:@"worldTime"];
[playerSelectionControl setHidden: YES];
/* Now search for first player .dat file (but by default try to load from level.dat */
/* Verify that a "Player" folder exist. If not do nt show the player list */
filemgr = [NSFileManager defaultManager];
filelist = [filemgr contentsOfDirectoryAtPath:worldPath error:&fileError];
count = [filelist count];
for (i = 0; i < count; i++)
{
NSLog (@"File in world/ %@", [filelist objectAtIndex: i]);
if ([[filelist objectAtIndex: i] isEqualTo: @"players"])
{
[playerSelectionControl setHidden: NO];
[self loadPlayerSelectionControl];
break;
}
}
loadedPlayer = nil;
NSString *playerPath = [IJMinecraftLevel pathForPlayer:loadedPlayer withWorld:worldPath];
/* Now load level.dat as if i is not a SMP. */
NSData *playerFileData = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:playerPath]];
if (!playerFileData)
{
// Error loading
NSBeginCriticalAlertSheet(@"Error loading player.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"InsideJob was unable to load the level at %@.", playerPath);
return;
}
level = [[IJMinecraftLevel nbtContainerWithData:fileData] retain];
player = [[IJMinecraftLevel nbtContainerWithData:playerFileData] retain];
inventory = [[player inventory] retain];
[self didChangeValueForKey:@"worldTime"];
@@ -173,32 +309,47 @@
}
}
// NSLog(@"normal: %@", normalInventory);
// NSLog(@"quick: %@", quickInventory);
// NSLog(@"normal: %@", normalInventory);
// NSLog(@"quick: %@", quickInventory);
[inventoryView setItems:normalInventory];
[quickView setItems:quickInventory];
[armorView setItems:armorInventory];
[self setDocumentEdited:NO];
statusTextField.stringValue = @"";
loadedWorldIndex = worldIndex;
statusTextField.stringValue = @"World loaded!";
loadedWorldFolder = [worldPath retain];
NSLog(@"%@",loadedWorldFolder);
NSLog(@"%@",worldPath);
}
- (void)loadWorldAtIndex:(int)worldIndex
{
NSString *worldPath;
worldPath = [IJMinecraftLevel pathForWorldAtIndex:worldIndex];
[self loadWorldAtFolder: worldPath];
}
- (void)saveWorld
{
int worldIndex = loadedWorldIndex;
NSString *worldPath = loadedWorldFolder;
if (inventory == nil)
return; // no world loaded, nothing to save
if (![IJMinecraftLevel checkSessionLockAtIndex:worldIndex value:sessionLockValue])
if (![IJMinecraftLevel checkSessionLockAtFolder:worldPath value:sessionLockValue])
{
NSBeginCriticalAlertSheet(@"Another application has modified this world.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"The session lock was changed by another application.");
return;
}
NSString *levelPath = [IJMinecraftLevel pathForLevelDatAtIndex:worldIndex];
NSString *levelPath = [IJMinecraftLevel pathForLevelDatAtFolder:worldPath];
NSString *playerPath = [IJMinecraftLevel pathForPlayer:loadedPlayer withWorld:worldPath];
NSMutableArray *newInventory = [NSMutableArray array];
for (NSArray *items in [NSArray arrayWithObjects:armorInventory, quickInventory, normalInventory, nil])
@@ -210,17 +361,18 @@
}
}
[level setInventory:newInventory];
[player setInventory:newInventory];
NSString *backupPath = [levelPath stringByAppendingPathExtension:@"insidejobbackup"];
NSString *backupLevelPath = [levelPath stringByAppendingPathExtension:@"insidejobbackup"];
NSString *backupPlayerPath = [playerPath stringByAppendingPathExtension:@"insidejobbackup"];
BOOL success = NO;
NSError *error = nil;
// Remove a previously-created .insidejobbackup, if it exists:
if ([[NSFileManager defaultManager] fileExistsAtPath:backupPath])
if ([[NSFileManager defaultManager] fileExistsAtPath:backupLevelPath])
{
success = [[NSFileManager defaultManager] removeItemAtPath:backupPath error:&error];
success = [[NSFileManager defaultManager] removeItemAtPath:backupLevelPath error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
@@ -230,34 +382,80 @@
}
// Create the backup:
success = [[NSFileManager defaultManager] copyItemAtPath:levelPath toPath:backupPath error:&error];
success = [[NSFileManager defaultManager] copyItemAtPath:levelPath toPath:backupLevelPath error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to create a backup of the existing level file:\n%@", [error localizedDescription]);
return;
}
// Write the new level.dat out:
success = [[level writeData] writeToURL:[NSURL fileURLWithPath:levelPath] options:0 error:&error];
// Write the new level.dat out:
success = [[player writeData] writeToURL:[NSURL fileURLWithPath:levelPath] options:0 error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
NSError *restoreError = nil;
success = [[NSFileManager defaultManager] copyItemAtPath:backupPath toPath:levelPath error:&restoreError];
success = [[NSFileManager defaultManager] copyItemAtPath:backupLevelPath toPath:levelPath error:&restoreError];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [restoreError localizedDescription]);
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup could not be restored.\n%@\n%@", [error localizedDescription], [restoreError localizedDescription]);
}
else
{
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup was successfully restored.\n%@", [error localizedDescription]);
}
{
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing level file, and the backup was successfully restored.\n%@", [error localizedDescription]);
}
return;
}
if (playerPath != levelPath)
{
// Remove a previously-created .insidejobbackup, if it exists:
if ([[NSFileManager defaultManager] fileExistsAtPath:backupPlayerPath])
{
success = [[NSFileManager defaultManager] removeItemAtPath:backupPlayerPath error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to remove the prior backup of this player file:\n%@", [error localizedDescription]);
return;
}
}
success = [[NSFileManager defaultManager] copyItemAtPath:playerPath toPath:backupPlayerPath error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to create a backup of the existing player file:\n%@", [error localizedDescription]);
return;
}
// Write the new player.dat out:
success = [[player writeData] writeToURL:[NSURL fileURLWithPath:playerPath] options:0 error:&error];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [error localizedDescription]);
NSError *restoreError = nil;
success = [[NSFileManager defaultManager] copyItemAtPath:backupPlayerPath toPath:playerPath error:&restoreError];
if (!success)
{
NSLog(@"%s:%d %@", __PRETTY_FUNCTION__, __LINE__, [restoreError localizedDescription]);
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing player file, and the backup could not be restored.\n%@\n%@", [error localizedDescription], [restoreError localizedDescription]);
}
else
{
NSBeginCriticalAlertSheet(@"An error occurred while saving.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Inside Job was unable to save to the existing player file, and the backup was successfully restored.\n%@", [error localizedDescription]);
}
return;
}
}
[self setDocumentEdited:NO];
statusTextField.stringValue = @"Saved.";
}
@@ -281,13 +479,121 @@
{
int worldIndex = [sender tag];
[self loadWorldAtIndex:worldIndex];
[worldSelectionControl setSelectedSegment:worldIndex - 1];
[worldSelectionControl selectItemWithTitle:[loadedWorldFolder lastPathComponent]];
}
- (IBAction)menuSelectWorldFromPath:(id)sender
{
NSInteger openResult;
/* Ask user for world folder path */
NSOpenPanel *panel = [NSOpenPanel openPanel];
NSString *worldPath;
/* Only allow to choose a folder */
[panel setCanChooseDirectories:YES];
[panel setCanChooseFiles:NO];
openResult = [panel runModal];
if (openResult == NSOKButton)
{
worldPath = [[panel directoryURL] path];
/* Verify for level.dat */
if (![IJMinecraftLevel worldExistsAtFolder: worldPath])
{
NSBeginCriticalAlertSheet(@"No world exists in that slot.", @"Dismiss", nil, nil, self.window, nil, nil, nil, nil, @"Please create a new single player world in this slot using Minecraft and try again.");
return;
}
/* Now try to open the world... */
[self loadWorldAtFolder:[[panel directoryURL] path]];
[worldSelectionControl addItemWithTitle:[loadedWorldFolder lastPathComponent]];
[worldSelectionControl selectItemWithTitle:[loadedWorldFolder lastPathComponent]];
}
}
- (IBAction)worldSelectionChanged:(id)sender
{
int worldIndex = [worldSelectionControl selectedSegment] + 1;
[self loadWorldAtIndex:worldIndex];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *path = [paths objectAtIndex:0];
path = [path stringByAppendingPathComponent:@"minecraft"];
path = [path stringByAppendingPathComponent:@"saves"];
NSString* worldName = [worldSelectionControl titleOfSelectedItem];
NSString* worldPath = [path stringByAppendingPathComponent:worldName];
NSLog(@"loadedWorldFolder: %@",loadedWorldFolder);
NSLog(@"worldName: %@",worldName);
NSLog(@"worldPath: %@",worldPath);
[self loadWorldAtFolder:worldPath];
}
- (void)loadWorldSelectionControl
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *path = [paths objectAtIndex:0];
path = [path stringByAppendingPathComponent:@"minecraft"];
path = [path stringByAppendingPathComponent:@"saves"];
NSFileManager *filemgr;
NSArray *filelist;
NSError *fileError;
int count;
int i;
filemgr = [NSFileManager defaultManager];
filelist = [filemgr contentsOfDirectoryAtPath:path error:&fileError];
count = [filelist count];
[worldSelectionControl removeAllItems];
for (i = 0; i < count; i++)
{
NSLog (@"%@", [filelist objectAtIndex: i]);
if([IJMinecraftLevel worldExistsAtFolder:[path stringByAppendingPathComponent:[filelist objectAtIndex: i]]])
[worldSelectionControl addItemWithTitle:[filelist objectAtIndex: i]];
}
[filemgr release];
}
- (void)loadPlayerSelectionControl
{
NSString *playerPath = loadedWorldFolder;
playerPath = [playerPath stringByAppendingPathComponent:@"players"];
NSFileManager *filemgr;
NSArray *filelist;
NSError *fileError;
int count;
int i;
filemgr = [NSFileManager defaultManager];
filelist = [filemgr contentsOfDirectoryAtPath:playerPath error:&fileError];
count = [filelist count];
[playerSelectionControl removeAllItems];
[playerSelectionControl addItemWithTitle:@"World default"];
for (i = 0; i < count; i++)
{
NSLog (@"%@", [filelist objectAtIndex: i]);
/* Get only .dat file */
if ([[[filelist objectAtIndex: i] pathExtension] isEqualToString:@"dat"])
[playerSelectionControl addItemWithTitle:[[filelist objectAtIndex: i] stringByDeletingPathExtension]];
}
[filemgr release];
}
- (void)saveDocument:(id)sender
@@ -318,10 +624,12 @@
return YES;
}
- (NSNumber *)worldTime
{
return [level worldTimeContainer].numberValue;
}
- (void)setWorldTime:(NSNumber *)number
{
[self willChangeValueForKey:@"worldTime"];
@@ -330,6 +638,143 @@
[self setDocumentEdited:YES];
}
- (void)calcTimePoints:(int)number
{
int result;
int wTime = [[self worldTime] intValue];
result =wTime +(number - (wTime % number));
NSNumber *newTime = [NSNumber numberWithInt:result];
[self setWorldTime:newTime];
}
- (IBAction)setNextDay:(id)sender
{
int number = 24000;
[self calcTimePoints:number];
}
- (IBAction)setNextNight:(id)sender
{
int number = 12000;
[self calcTimePoints:number];
}
- (IBAction)setNextMidnight:(id)sender
{
int number = 18000;
[self calcTimePoints:number];
}
- (IBAction)setNextNoon:(id)sender
{
int number = 6000;
[self calcTimePoints:number];
}
- (void)clearInventory{
[armorInventory removeAllObjects];
[quickInventory removeAllObjects];
[normalInventory removeAllObjects];
[inventoryView setItems:normalInventory];
[quickView setItems:quickInventory];
[armorView setItems:armorInventory];
[self setDocumentEdited:YES];
}
- (void)saveInventory
{
NSString *path = [[NSFileManager defaultManager] applicationSupportDirectory];
NSLog(@"%@",path);
NSString *file = @"Inventory.plist";
NSString *InventoryPath = [path stringByAppendingPathComponent:file];
NSLog(@"%@",InventoryPath);
NSMutableArray *newInventory = [NSMutableArray array];
for (NSArray *items in [NSArray arrayWithObjects:armorInventory, quickInventory, normalInventory, nil])
{
for (IJInventoryItem *item in items)
{
if (item.count > 0 && item.itemId > 0)
[newInventory addObject:item];
}
}
[NSKeyedArchiver archiveRootObject: newInventory toFile:InventoryPath];
}
-(void)loadInventory
{
NSString *path = [[NSFileManager defaultManager] applicationSupportDirectory];
NSString *file = @"Inventory.plist";
NSString *InventoryPath = [path stringByAppendingPathComponent:file];
[self clearInventory];
NSArray *newInventory = [NSKeyedUnarchiver unarchiveObjectWithFile:InventoryPath];
for (int i = 0; i < IJInventorySlotQuickLast + 1 - IJInventorySlotQuickFirst; i++)
[quickInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotQuickFirst + i]];
for (int i = 0; i < IJInventorySlotNormalLast + 1 - IJInventorySlotNormalFirst; i++)
[normalInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotNormalFirst + i]];
for (int i = 0; i < IJInventorySlotArmorLast + 1 - IJInventorySlotArmorFirst; i++)
[armorInventory addObject:[IJInventoryItem emptyItemWithSlot:IJInventorySlotArmorFirst + i]];
for (IJInventoryItem *item in newInventory)
{
if (IJInventorySlotQuickFirst <= item.slot && item.slot <= IJInventorySlotQuickLast)
{
[quickInventory replaceObjectAtIndex:item.slot - IJInventorySlotQuickFirst withObject:item];
}
else if (IJInventorySlotNormalFirst <= item.slot && item.slot <= IJInventorySlotNormalLast)
{
[normalInventory replaceObjectAtIndex:item.slot - IJInventorySlotNormalFirst withObject:item];
}
else if (IJInventorySlotArmorFirst <= item.slot && item.slot <= IJInventorySlotArmorLast)
{
[armorInventory replaceObjectAtIndex:item.slot - IJInventorySlotArmorFirst withObject:item];
}
}
[inventoryView setItems:normalInventory];
[quickView setItems:quickInventory];
[armorView setItems:armorInventory];
}
- (IBAction)emptyInventory:(id)sender
{
[self clearInventory];
}
- (IBAction)saveInventoryItems:(id)sender
{
[self saveInventory];
}
- (IBAction)loadInventoryItems:(id)sender
{
[self loadInventory];
}
- (IBAction)playerSelectionChanged:(id)sender
{
[self loadWorldPlayerInventory: [playerSelectionControl titleOfSelectedItem]];
}
#pragma mark -
#pragma mark IJInventoryViewDelegate
@@ -442,6 +887,14 @@
[propertiesWindow setAlphaValue:0.0];
}];
propertiesViewController.item = item;
if (propertiesViewController.item.damage == -1000){
[propertiesViewController setState:YES];
}else {
[propertiesViewController setState:NO];
}
[propertiesWindow setPoint:point side:MAPositionRight];
[propertiesWindow makeKeyAndOrderFront:nil];
[propertiesWindow setAlphaValue:1.0];
@@ -557,12 +1010,12 @@
NSMutableArray *inventoryArray = [self inventoryArrayWithEmptySlot:&slot];
if (!inventoryArray)
return;
IJInventoryItem *item = [inventoryArray objectAtIndex:slot];
item.itemId = [[filteredItemIds objectAtIndex:[itemTableView selectedRow]] shortValue];
item.count = 1;
[self setDocumentEdited:YES];
IJInventoryView *invView = [self inventoryViewForItemArray:inventoryArray];
[invView reloadItemAtIndex:slot];
[self inventoryView:invView selectedItemAtIndex:slot];
@@ -623,5 +1076,4 @@
return YES;
}
@end

View File

@@ -12,9 +12,11 @@
@interface IJItemPropertiesViewController : NSViewController {
IJInventoryItem *item;
IBOutlet NSButton *checkIndestructible;
}
@property (nonatomic, retain) IJInventoryItem *item;
- (void)setState:(bool)enabel;
- (IBAction)closeButton:(id)sender;
- (IBAction)makeIndestructible:(id)sender;
@end

View File

@@ -20,4 +20,17 @@
self.item = nil; // Hack to prevent this item as coming up as 'lastItem' if they click again.
}
- (IBAction)makeIndestructible:(id)sender
{
if ([checkIndestructible state] == NSOnState) {
self.item.damage = -1000;
}else {
self.item.damage = 0;
}
}
- (void)setState:(bool)enabel{
[checkIndestructible setState:enabel];
}
@end

View File

@@ -4,26 +4,27 @@
//
// Created by Adam Preble on 10/7/10.
// Copyright 2010 Adam Preble. All rights reserved.
// Changes for opening folder Copyright 2011 Manoel Trapier
//
#import <Cocoa/Cocoa.h>
#import "NBTContainer.h"
@interface IJMinecraftLevel : NBTContainer {
}
@property (nonatomic, copy) NSArray *inventory; // Array of IJInventoryItem objects.
@property (nonatomic, readonly) NBTContainer *worldTimeContainer;
+ (NSString *)pathForWorldAtIndex:(int)worldIndex;
+ (NSString *)pathForLevelDatAtIndex:(int)worldIndex;
+ (NSString *)pathForSessionLockAtIndex:(int)worldIndex;
+ (BOOL)worldExistsAtFolder:(NSString *)worldPath;
+ (NSString *)pathForLevelDatAtFolder:(NSString *)worldPath;
+ (NSString *)pathForSessionLockAtFolder:(NSString *)worldPath;
+ (NSString *)pathForPlayer:(NSString *)loadedPlayer withWorld:(NSString *)worldPath;
+ (BOOL)worldExistsAtIndex:(int)worldIndex;
+ (int64_t)writeToSessionLockAtIndex:(int)worldIndex;
+ (BOOL)checkSessionLockAtIndex:(int)worldIndex value:(int64_t)checkValue;
+ (int64_t)writeToSessionLockAtFolder:(NSString *)worldPath;
+ (BOOL)checkSessionLockAtFolder:(NSString *)worldPath value:(int64_t)checkValue;
@end

View File

@@ -4,6 +4,7 @@
//
// Created by Adam Preble on 10/7/10.
// Copyright 2010 Adam Preble. All rights reserved.
// Changes for opening folder Copyright 2011 Manoel Trapier
//
#import "IJMinecraftLevel.h"
@@ -28,8 +29,19 @@
// - compound "Player"
// - list "Inventory"
// *
// SMP Player have not the same structure, there is no "DATA" compound, nor "player"
NBTContainer *playerCompound;
NBTContainer *dataCompound = [self childNamed:@"Data"];
NBTContainer *playerCompound = [dataCompound childNamed:@"Player"];
if (dataCompound != nil)
{
playerCompound = [dataCompound childNamed:@"Player"];
}
else
{
NSLog(@"Player file is from a SMP file, not level.dat one");
playerCompound = self;
}
NBTContainer *inventoryList = [playerCompound childNamed:@"Inventory"];
// TODO: Check for error conditions here.
return inventoryList;
@@ -41,7 +53,7 @@
for (NSArray *listItems in [self inventoryList].children)
{
IJInventoryItem *invItem = [[IJInventoryItem alloc] init];
invItem.itemId = [[self containerWithName:@"id" inArray:listItems].numberValue shortValue];
invItem.count = [[self containerWithName:@"Count" inArray:listItems].numberValue unsignedCharValue];
invItem.damage = [[self containerWithName:@"Damage" inArray:listItems].numberValue shortValue];
@@ -56,7 +68,7 @@
{
NSMutableArray *newChildren = [NSMutableArray array];
NBTContainer *inventoryList = [self inventoryList];
if (inventoryList.listType != NBTTypeCompound)
{
// There appears to be a bug in the way Minecraft writes empty inventory lists; it appears to
@@ -64,7 +76,7 @@
NSLog(@"%s Fixing inventory list type; was %d.", __PRETTY_FUNCTION__, inventoryList.listType);
inventoryList.listType = NBTTypeCompound;
}
for (IJInventoryItem *invItem in newInventory)
{
NSArray *listItems = [NSArray arrayWithObjects:
@@ -96,20 +108,6 @@
return path;
}
+ (NSString *)pathForLevelDatAtIndex:(int)worldIndex
{
return [[[self class] pathForWorldAtIndex:worldIndex] stringByAppendingPathComponent:@"level.dat"];
}
+ (NSString *)pathForSessionLockAtIndex:(int)worldIndex
{
return [[[self class] pathForWorldAtIndex:worldIndex] stringByAppendingPathComponent:@"session.lock"];
}
+ (BOOL)worldExistsAtIndex:(int)worldIndex
{
return [[NSFileManager defaultManager] fileExistsAtPath:[[self class] pathForLevelDatAtIndex:worldIndex]];
}
+ (NSData *)dataWithInt64:(int64_t)v
{
NSMutableData *data = [NSMutableData data];
@@ -128,23 +126,48 @@
return n;
}
+ (int64_t)writeToSessionLockAtIndex:(int)worldIndex
/******************************************************************************/
+ (NSString *)pathForLevelDatAtFolder:(NSString *)worldPath
{
NSString *path = [IJMinecraftLevel pathForSessionLockAtIndex:worldIndex];
return [worldPath stringByAppendingPathComponent:@"level.dat"];
}
+ (NSString *)pathForSessionLockAtFolder:(NSString *)worldPath
{
return [worldPath stringByAppendingPathComponent:@"session.lock"];
}
+ (NSString *)pathForPlayer:(NSString *)loadedPlayer withWorld:(NSString *)worldPath;
{
/* loadedPlayer == nil, we use level.dat, or else we use the name */
if (loadedPlayer == nil)
return [self pathForLevelDatAtFolder:worldPath];
return [[[worldPath stringByAppendingPathComponent:@"players"] stringByAppendingPathComponent:loadedPlayer] stringByAppendingPathExtension:@"dat"];
}
+ (BOOL)worldExistsAtFolder:(NSString *)worldPath
{
return [[NSFileManager defaultManager] fileExistsAtPath:[[self class] pathForLevelDatAtFolder:worldPath]];
}
+ (int64_t)writeToSessionLockAtFolder:(NSString *)worldPath
{
NSString *path = [IJMinecraftLevel pathForSessionLockAtFolder:worldPath];
NSDate *now = [NSDate date];
NSTimeInterval interval = [now timeIntervalSince1970];
int64_t milliseconds = (int64_t)(interval * 1000.0);
// write as number of milliseconds
NSData *data = [IJMinecraftLevel dataWithInt64:milliseconds];
[data writeToFile:path atomically:YES];
return milliseconds;
}
+ (BOOL)checkSessionLockAtIndex:(int)worldIndex value:(int64_t)checkValue
+ (BOOL)checkSessionLockAtFolder:(NSString *)worldPath value:(int64_t)checkValue
{
NSString *path = [IJMinecraftLevel pathForSessionLockAtIndex:worldIndex];
NSString *path = [IJMinecraftLevel pathForSessionLockAtFolder:worldPath];
NSData *data = [NSData dataWithContentsOfFile:path];
if (!data)
@@ -152,7 +175,7 @@
NSLog(@"Failed to read session lock at %@", path);
return NO;
}
int64_t milliseconds = [IJMinecraftLevel int64FromData:data];
return checkValue == milliseconds;
}

View File

@@ -12,7 +12,7 @@
#ifndef NBT_LOGGING
#define NBT_LOGGING 0
#define NBT_LOGGING 0
#endif
#if NBT_LOGGING

View File

@@ -0,0 +1,27 @@
//
// NSFileManager+DirectoryLocations.h
//
// Created by Matt Gallagher on 06 May 2010
//
// Permission is given to use this source code file, free of charge, in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
#import <Foundation/Foundation.h>
//
// DirectoryLocations is a set of global methods for finding the fixed location
// directoriess.
//
@interface NSFileManager (DirectoryLocations)
- (NSString *)findOrCreateDirectory:(NSSearchPathDirectory)searchPathDirectory
inDomain:(NSSearchPathDomainMask)domainMask
appendPathComponent:(NSString *)appendComponent
error:(NSError **)errorOut;
- (NSString *)applicationSupportDirectory;
@end

View File

@@ -0,0 +1,179 @@
//
// NSFileManager+DirectoryLocations.m
//
// Created by Matt Gallagher on 06 May 2010
//
// Permission is given to use this source code file, free of charge, in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
#import "NSFileManager+DirectoryLocations.h"
enum
{
DirectoryLocationErrorNoPathFound,
DirectoryLocationErrorFileExistsAtLocation
};
NSString * const DirectoryLocationDomain = @"DirectoryLocationDomain";
@implementation NSFileManager (DirectoryLocations)
//
// findOrCreateDirectory:inDomain:appendPathComponent:error:
//
// Method to tie together the steps of:
// 1) Locate a standard directory by search path and domain mask
// 2) Select the first path in the results
// 3) Append a subdirectory to that path
// 4) Create the directory and intermediate directories if needed
// 5) Handle errors by emitting a proper NSError object
//
// Parameters:
// searchPathDirectory - the search path passed to NSSearchPathForDirectoriesInDomains
// domainMask - the domain mask passed to NSSearchPathForDirectoriesInDomains
// appendComponent - the subdirectory appended
// errorOut - any error from file operations
//
// returns the path to the directory (if path found and exists), nil otherwise
//
- (NSString *)findOrCreateDirectory:(NSSearchPathDirectory)searchPathDirectory
inDomain:(NSSearchPathDomainMask)domainMask
appendPathComponent:(NSString *)appendComponent
error:(NSError **)errorOut
{
//
// Search for the path
//
NSArray* paths = NSSearchPathForDirectoriesInDomains(
searchPathDirectory,
domainMask,
YES);
if ([paths count] == 0)
{
if (errorOut)
{
NSDictionary *userInfo =
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTable(
@"No path found for directory in domain.",
@"Errors",
nil),
NSLocalizedDescriptionKey,
[NSNumber numberWithInteger:searchPathDirectory],
@"NSSearchPathDirectory",
[NSNumber numberWithInteger:domainMask],
@"NSSearchPathDomainMask",
nil];
*errorOut =
[NSError
errorWithDomain:DirectoryLocationDomain
code:DirectoryLocationErrorNoPathFound
userInfo:userInfo];
}
return nil;
}
//
// Normally only need the first path returned
//
NSString *resolvedPath = [paths objectAtIndex:0];
//
// Append the extra path component
//
if (appendComponent)
{
resolvedPath = [resolvedPath
stringByAppendingPathComponent:appendComponent];
}
//
// Check if the path exists
//
BOOL exists;
BOOL isDirectory;
exists = [self
fileExistsAtPath:resolvedPath
isDirectory:&isDirectory];
if (!exists || !isDirectory)
{
if (exists)
{
if (errorOut)
{
NSDictionary *userInfo =
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTable(
@"File exists at requested directory location.",
@"Errors",
nil),
NSLocalizedDescriptionKey,
[NSNumber numberWithInteger:searchPathDirectory],
@"NSSearchPathDirectory",
[NSNumber numberWithInteger:domainMask],
@"NSSearchPathDomainMask",
nil];
*errorOut =
[NSError
errorWithDomain:DirectoryLocationDomain
code:DirectoryLocationErrorFileExistsAtLocation
userInfo:userInfo];
}
return nil;
}
//
// Create the path if it doesn't exist
//
NSError *error = nil;
BOOL success = [self
createDirectoryAtPath:resolvedPath
withIntermediateDirectories:YES
attributes:nil
error:&error];
if (!success)
{
if (errorOut)
{
*errorOut = error;
}
return nil;
}
}
if (errorOut)
{
*errorOut = nil;
}
return resolvedPath;
}
//
// applicationSupportDirectory
//
// Returns the path to the applicationSupportDirectory (creating it if it doesn't
// exist).
//
- (NSString *)applicationSupportDirectory
{
NSString *executableName =
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
NSError *error;
NSString *result =
[self
findOrCreateDirectory:NSApplicationSupportDirectory
inDomain:NSUserDomainMask
appendPathComponent:executableName
error:&error];
if (!result)
{
NSLog(@"Unable to find or create application support directory:\n%@", error);
}
return result;
}
@end

View File

@@ -1,11 +1,18 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\vieww9000\viewh8400\viewkind0
\paperw12240\paperh15840\vieww9000\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
\f0\fs20 \cf0 A Minecraft Inventory Editor\
\f0\fs20 \cf0 A Minecraft Inventory Editor - SMP Friendly Version\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural
{\field{\*\fldinst{HYPERLINK "http://github.com/godzil/InsideJob"}}{\fldrslt \cf0 http://github.com/godzil/InsideJob}}\
\
Changes merged from Nickloose fork:\
{\field{\*\fldinst{HYPERLINK "http://github.com/preble/InsideJob"}}{\fldrslt http://github.com/nickloose/InsideJob}}\
\
Forked from original version by Adam Preble:\
{\field{\*\fldinst{HYPERLINK "http://adampreble.net"}}{\fldrslt http://adampreble.net}}\
{\field{\*\fldinst{HYPERLINK "http://github.com/preble/InsideJob"}}{\fldrslt http://github.com/preble/InsideJob}}\
\
@@ -15,4 +22,7 @@ Compiled by Trojam\
and the Minecraft Community\
\
Uses MAAttachedWindow\
by {\field{\*\fldinst{HYPERLINK "http://mattgemmell.com/"}}{\fldrslt Matt Gemmell}}}
by {\field{\*\fldinst{HYPERLINK "http://mattgemmell.com/"}}{\fldrslt Matt Gemmell}}\
\
Uses NSFileManager\
by Matt Gallagher}

View File

@@ -1,2 +1,5 @@
/* Localized versions of Info.plist keys */
"No world loaded." = "No world loaded.";
"No world exists in that slot." = "No world exists in that slot.";
"Dismiss" = "Dismiss";
"Please create a new single player world in this slot using Minecraft and try again." = "Please create a new single player world in this slot using Minecraft and try again.";

View File

@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">804</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.SystemVersion">10H574</string>
<string key="IBDocument.InterfaceBuilderVersion">823</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">804</string>
<string key="NS.object.0">823</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -43,21 +43,80 @@
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="655316018">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{106, 11}, {21, 21}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="499735237">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">checkIndestructible</string>
<object class="NSFont" key="NSSupport" id="1068884137">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="655316018"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSSwitch</string>
</object>
<object class="NSButtonImageSource" key="NSAlternateImage">
<string key="NSImageName">NSSwitch</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSTextField" id="200212759">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{8, 13}, {95, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="70045272">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">71304192</int>
<string key="NSContents">Indestructible:</string>
<reference key="NSSupport" ref="1068884137"/>
<reference key="NSControlView" ref="200212759"/>
<object class="NSColor" key="NSBackgroundColor" id="1036798693">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="646856644">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor" id="833234732">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSButton" id="443904501">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{127, 54}, {12, 30}}</string>
<string key="NSFrame">{{156, 88}, {13, 20}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="67413845">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">268435456</int>
<string key="NSContents">Button</string>
<object class="NSFont" key="NSSupport" id="1068884137">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSSupport" ref="1068884137"/>
<reference key="NSControlView" ref="443904501"/>
<int key="NSButtonFlags">-2042347265</int>
<int key="NSButtonFlags2">129</int>
@@ -74,11 +133,11 @@
<object class="NSTextField" id="644098962">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{74, 9}, {51, 22}}</string>
<string key="NSFrame">{{108, 36}, {51, 22}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="213635492">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags">343014977</int>
<int key="NSCellFlags2">272630848</int>
<reference key="NSSupport" ref="1068884137"/>
<object class="NSNumberFormatter" key="NSFormatter" id="593187453">
@@ -88,6 +147,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>allowsFloats</string>
<string>formatterBehavior</string>
<string>lenient</string>
<string>locale</string>
<string>negativeInfinitySymbol</string>
<string>nilSymbol</string>
@@ -98,17 +158,18 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<boolean value="YES"/>
<integer value="1040"/>
<boolean value="NO"/>
<object class="NSLocale" id="301643830">
<string key="NS.identifier"/>
</object>
<string>-∞</string>
<string/>
<integer value="1"/>
<integer value="0"/>
<string>+∞</string>
</object>
</object>
<string key="NS.positiveformat">#,##0.###</string>
<string key="NS.negativeformat">#,##0.###</string>
<string key="NS.positiveformat">#</string>
<string key="NS.negativeformat">#</string>
<nil key="NS.positiveattrs"/>
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
@@ -142,7 +203,7 @@
</object>
<string key="NS.decimal">.</string>
<string key="NS.thousand">,</string>
<bool key="NS.hasthousands">YES</bool>
<bool key="NS.hasthousands">NO</bool>
<bool key="NS.localized">NO</bool>
<bool key="NS.allowsfloats">YES</bool>
</object>
@@ -161,17 +222,14 @@
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor" id="833234732">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
<reference key="NSColor" ref="833234732"/>
</object>
</object>
</object>
<object class="NSTextField" id="380391011">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{74, 36}, {51, 22}}</string>
<string key="NSFrame">{{108, 62}, {51, 22}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="247292744">
@@ -237,7 +295,7 @@
<object class="NSTextField" id="112492398">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{3, 11}, {66, 17}}</string>
<string key="NSFrame">{{37, 38}, {66, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="503317427">
@@ -246,27 +304,14 @@
<string key="NSContents">Damage:</string>
<reference key="NSSupport" ref="1068884137"/>
<reference key="NSControlView" ref="112492398"/>
<object class="NSColor" key="NSBackgroundColor" id="1036798693">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="646856644">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<reference key="NSColor" ref="833234732"/>
</object>
<reference key="NSBackgroundColor" ref="1036798693"/>
<reference key="NSTextColor" ref="646856644"/>
</object>
</object>
<object class="NSTextField" id="908946299">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{8, 63}, {120, 14}}</string>
<string key="NSFrame">{{8, 92}, {120, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="405749842">
@@ -286,7 +331,7 @@
<object class="NSTextField" id="274194782">
<reference key="NSNextResponder" ref="1005"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{3, 38}, {66, 17}}</string>
<string key="NSFrame">{{37, 65}, {66, 17}}</string>
<reference key="NSSuperview" ref="1005"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="255423386">
@@ -300,7 +345,7 @@
</object>
</object>
</object>
<string key="NSFrameSize">{140, 80}</string>
<string key="NSFrameSize">{174, 109}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@@ -372,6 +417,22 @@
</object>
<int key="connectionID">25</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">makeIndestructible:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="655316018"/>
</object>
<int key="connectionID">34</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">checkIndestructible</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="655316018"/>
</object>
<int key="connectionID">35</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -405,12 +466,14 @@
<reference key="object" ref="1005"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="908946299"/>
<reference ref="274194782"/>
<reference ref="112492398"/>
<reference ref="380391011"/>
<reference ref="200212759"/>
<reference ref="655316018"/>
<reference ref="644098962"/>
<reference ref="443904501"/>
<reference ref="908946299"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -516,6 +579,35 @@
<reference key="object" ref="405749842"/>
<reference key="parent" ref="908946299"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="200212759"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="70045272"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">27</int>
<reference key="object" ref="70045272"/>
<reference key="parent" ref="200212759"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">28</int>
<reference key="object" ref="655316018"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="499735237"/>
</object>
<reference key="parent" ref="1005"/>
<string key="objectName">checkIndestructible</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="499735237"/>
<reference key="parent" ref="655316018"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -524,6 +616,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>1.IBViewBoundsToFrameTransform</string>
<string>1.WindowOrigin</string>
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>10.IBPluginDependency</string>
@@ -531,6 +624,7 @@
<string>11.IBPluginDependency</string>
<string>12.IBNumberFormatterBehaviorMetadataKey</string>
<string>12.IBNumberFormatterLocalizesFormatMetadataKey</string>
<string>12.IBNumberFormatterSampleNumberKey</string>
<string>12.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>17.IBViewBoundsToFrameTransform</string>
@@ -538,6 +632,12 @@
<string>22.IBPluginDependency</string>
<string>22.IBViewBoundsToFrameTransform</string>
<string>23.IBPluginDependency</string>
<string>26.IBPluginDependency</string>
<string>26.IBViewBoundsToFrameTransform</string>
<string>27.IBPluginDependency</string>
<string>28.IBPluginDependency</string>
<string>28.IBViewBoundsToFrameTransform</string>
<string>29.IBPluginDependency</string>
<string>3.IBPluginDependency</string>
<string>3.IBViewBoundsToFrameTransform</string>
<string>4.IBPluginDependency</string>
@@ -553,21 +653,23 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{{550, 448}, {140, 80}}</string>
<string>{{1100, 300}, {174, 109}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform"/>
<string>{628, 654}</string>
<string>{{217, 442}, {480, 272}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABClAAAwjwAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABC2AAAwmAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1041"/>
<boolean value="YES"/>
<real value="1275"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCogAAwo4AAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABDHAAAwtQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -577,17 +679,27 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABAQAAAwmQAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAADAAAAAwfAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABAQAAAwjAAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABC1AAAwfAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABClAAAwpQAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABB2AAAwqQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABB2AAAwlwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCxAAAwqgAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1041"/>
@@ -611,7 +723,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">25</int>
<int key="maxID">35</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -620,19 +732,51 @@
<string key="className">IJItemPropertiesViewController</string>
<string key="superclassName">NSViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">closeButton:</string>
<string key="NS.object.0">id</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>closeButton:</string>
<string>makeIndestructible:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">closeButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">closeButton:</string>
<string key="candidateClassName">id</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>closeButton:</string>
<string>makeIndestructible:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">closeButton:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">makeIndestructible:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">checkIndestructible</string>
<string key="NS.object.0">NSButton</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">checkIndestructible</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">checkIndestructible</string>
<string key="candidateClassName">NSButton</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">IJItemPropertiesViewController.h</string>
<string key="minorKey">Classes/IJItemPropertiesViewController.h</string>
</object>
</object>
</object>
@@ -1099,11 +1243,20 @@
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">InsideJob.xcodeproj</string>
<string key="IBDocument.LastKnownRelativeProjectPath">../InsideJob.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">NSStopProgressFreestandingTemplate</string>
<string key="NS.object.0">{83, 83}</string>
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSStopProgressFreestandingTemplate</string>
<string>NSSwitch</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{83, 83}</string>
<string>{15, 15}</string>
</object>
</object>
</data>
</archive>

File diff suppressed because it is too large Load Diff

View File

@@ -4,12 +4,14 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>InsideJob</string>
<key>CFBundleIdentifier</key>
<string>net.adampreble.${PRODUCT_NAME:rfc1034identifier}</string>
<string>net.godzil.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -17,18 +19,28 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.2</string>
<string>1.0.2-smp</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>5</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2011 Adam Preble</string>
<string>Copyright 2011 Adam Preble and Contributors - SMP mod by Manoel Trapier</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSServices</key>
<array/>
<key>UTExportedTypeDeclarations</key>
<array/>
<key>UTImportedTypeDeclarations</key>
<array/>
</dict>
</plist>

View File

@@ -9,7 +9,6 @@
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
256AC3DA0F4B6AC300CF3369 /* InsideJobAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* InsideJobAppDelegate.m */; };
663803B2131769E90015CFAD /* blockNotFound.png in Resources */ = {isa = PBXBuildFile; fileRef = 663803B1131769E90015CFAD /* blockNotFound.png */; };
668B2556125D5A3E0060BF71 /* NBTContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B2555125D5A3E0060BF71 /* NBTContainer.m */; };
668B255C125D5BCA0060BF71 /* NSData+CocoaDevAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B255B125D5BCA0060BF71 /* NSData+CocoaDevAdditions.m */; };
668B2560125D5C1C0060BF71 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 668B255F125D5C1C0060BF71 /* libz.dylib */; };
@@ -17,7 +16,6 @@
668B27B2125D8F8E0060BF71 /* IJInventoryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B27B1125D8F8E0060BF71 /* IJInventoryItem.m */; };
668B27F2125D963F0060BF71 /* IJInventoryWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B27F1125D963F0060BF71 /* IJInventoryWindowController.m */; };
668B290F125E40560060BF71 /* Items.csv in Resources */ = {isa = PBXBuildFile; fileRef = 668B28D8125E370A0060BF71 /* Items.csv */; };
6697AD7212B86762001890C6 /* IJTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6697AD7112B86762001890C6 /* IJTableView.m */; };
66BC00031260215C005A23F4 /* IJInventoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC00021260215C005A23F4 /* IJInventoryView.m */; };
66BC000E12602359005A23F4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66BC000D12602359005A23F4 /* QuartzCore.framework */; };
66BC033B1260CC59005A23F4 /* MAAttachedWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC033A1260CC59005A23F4 /* MAAttachedWindow.m */; };
@@ -30,6 +28,9 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
BA24598B1297428900F8B9C2 /* blockNotFound.png in Resources */ = {isa = PBXBuildFile; fileRef = BA24598A1297428900F8B9C2 /* blockNotFound.png */; };
BA3329A9129889860079447B /* NSFileManager+DirectoryLocations.m in Sources */ = {isa = PBXBuildFile; fileRef = BA3329A8129889860079447B /* NSFileManager+DirectoryLocations.m */; };
BA9186CB1328C1C600769DEC /* IJTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BA9186CA1328C1C600769DEC /* IJTableView.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -43,7 +44,6 @@
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
663803B1131769E90015CFAD /* blockNotFound.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blockNotFound.png; sourceTree = "<group>"; };
668B2554125D5A3E0060BF71 /* NBTContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBTContainer.h; sourceTree = "<group>"; };
668B2555125D5A3E0060BF71 /* NBTContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBTContainer.m; sourceTree = "<group>"; };
668B255A125D5BCA0060BF71 /* NSData+CocoaDevAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+CocoaDevAdditions.h"; sourceTree = "<group>"; };
@@ -74,6 +74,12 @@
66BCFE61125FCEC6005A23F4 /* DataValuesV110Transparent.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DataValuesV110Transparent.png; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* InsideJob-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "InsideJob-Info.plist"; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* Inside Job.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Inside Job.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BA24598A1297428900F8B9C2 /* blockNotFound.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blockNotFound.png; sourceTree = "<group>"; };
BA3329A7129889860079447B /* NSFileManager+DirectoryLocations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSFileManager+DirectoryLocations.h"; sourceTree = "<group>"; };
BA3329A8129889860079447B /* NSFileManager+DirectoryLocations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileManager+DirectoryLocations.m"; sourceTree = "<group>"; };
BA9186C91328C1C600769DEC /* IJTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJTableView.h; sourceTree = "<group>"; };
BA9186CA1328C1C600769DEC /* IJTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJTableView.m; sourceTree = "<group>"; };
D13FDB481322757D00D318D1 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -196,6 +202,8 @@
668B255B125D5BCA0060BF71 /* NSData+CocoaDevAdditions.m */,
66BC04F612619072005A23F4 /* NSColor+Additions.h */,
66BC04F712619072005A23F4 /* NSColor+Additions.m */,
BA3329A7129889860079447B /* NSFileManager+DirectoryLocations.h */,
BA3329A8129889860079447B /* NSFileManager+DirectoryLocations.m */,
);
name = Categories;
sourceTree = "<group>";
@@ -216,6 +224,8 @@
66BC033E1260CC68005A23F4 /* Views & Windows */ = {
isa = PBXGroup;
children = (
BA9186C91328C1C600769DEC /* IJTableView.h */,
BA9186CA1328C1C600769DEC /* IJTableView.m */,
66BC03391260CC59005A23F4 /* MAAttachedWindow.h */,
66BC033A1260CC59005A23F4 /* MAAttachedWindow.m */,
6697AD7012B86762001890C6 /* IJTableView.h */,
@@ -227,7 +237,7 @@
66BC07711262823E005A23F4 /* Images */ = {
isa = PBXGroup;
children = (
663803B1131769E90015CFAD /* blockNotFound.png */,
BA24598A1297428900F8B9C2 /* blockNotFound.png */,
66BCFE61125FCEC6005A23F4 /* DataValuesV110Transparent.png */,
66BCFC35125EA53E005A23F4 /* InsideJob.icns */,
);
@@ -237,9 +247,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* Inside Job */ = {
8D1107260486CEB800E47090 /* Inside Job-SMP */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Inside Job" */;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Inside Job-SMP" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
@@ -249,7 +259,7 @@
);
dependencies = (
);
name = "Inside Job";
name = "Inside Job-SMP";
productInstallPath = "$(HOME)/Applications";
productName = InsideJob;
productReference = 8D1107320486CEB800E47090 /* Inside Job.app */;
@@ -272,12 +282,13 @@
Japanese,
French,
German,
fr,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* InsideJob */;
projectDirPath = "";
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* Inside Job */,
8D1107260486CEB800E47090 /* Inside Job-SMP */,
);
};
/* End PBXProject section */
@@ -294,7 +305,7 @@
66BCFC36125EA53E005A23F4 /* InsideJob.icns in Resources */,
66BCFE62125FCEC6005A23F4 /* DataValuesV110Transparent.png in Resources */,
66BC077312628257005A23F4 /* ItemPropertiesView.xib in Resources */,
663803B2131769E90015CFAD /* blockNotFound.png in Resources */,
BA24598B1297428900F8B9C2 /* blockNotFound.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -316,7 +327,8 @@
66BC033B1260CC59005A23F4 /* MAAttachedWindow.m in Sources */,
66BC03621260D095005A23F4 /* IJItemPropertiesViewController.m in Sources */,
66BC04F812619072005A23F4 /* NSColor+Additions.m in Sources */,
6697AD7212B86762001890C6 /* IJTableView.m in Sources */,
BA3329A9129889860079447B /* NSFileManager+DirectoryLocations.m in Sources */,
BA9186CB1328C1C600769DEC /* IJTableView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -327,6 +339,7 @@
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
D13FDB481322757D00D318D1 /* fr */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
@@ -363,6 +376,7 @@
GCC_PREFIX_HEADER = InsideJob_Prefix.pch;
INFOPLIST_FILE = "InsideJob-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_NAME = "Inside Job";
};
name = Debug;
@@ -377,6 +391,7 @@
GCC_PREFIX_HEADER = InsideJob_Prefix.pch;
INFOPLIST_FILE = "InsideJob-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_NAME = "Inside Job";
};
name = Release;
@@ -410,7 +425,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Inside Job" */ = {
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Inside Job-SMP" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,

View File

@@ -204,5 +204,6 @@
353,Sugar
354,Cake
355,Bed
356,Redstone Repeater
2256,Gold Record
2257,Green Record
1 1 Stone
204 353 Sugar
205 354 Cake
206 355 Bed
207 356 Redstone Repeater
208 2256 Gold Record
209 2257 Green Record

View File

@@ -1,17 +1,22 @@
## Inside Job
## Inside Job - SMP
### A Minecraft Alpha Inventory Editor for Mac OS X
![Inside Job Screenshot](http://adampreble.net/images/InsideJob.png)
![Inside Job Screenshot](http://godzil.net/projets/InsideJobs/InsideJobs-SMP.png)
Inside Job was written in early October 2010 by [Adam Preble](http://adampreble.net).
Management of SMP world added by [Manoel Trapier](http://www.godzil.net).
Features include:
- Native Cocoa interface.
- Drag and drop inventory editing with item images.
- Item list searchable by name or item number.
- Experimental "time of day" editing.
- Opening world from a folder
The goal of this fork of this application is to add support for SMP World, and by the way add support of new Beta 1.3 named worlds. This will never be the official version of InsideJobs, I have no pretention to add new functionnality other than the support of named world and edit SMP player.
### System Requirements
@@ -19,7 +24,9 @@ Mac OS X 10.6 Snow Leopard.
### Instructions
Inside Job operates on Minecraft's level.dat files, located in _~/Library/Application Support/minecraft/saves/World*_. While Inside Job was written to interact with Minecraft's data as safely as possible, it's entirely possible that it will destroy it completely. Please back up your Minecraft saves folder before using Inside Job.
Inside Job operates on Minecraft's level.dat files, located in _~/Library/Application Support/minecraft/saves/*_. While Inside Job was written to interact with Minecraft's data as safely as possible, it's entirely possible that it will destroy it completely. Please back up your Minecraft saves folder before using Inside Job.
Inside Job-SMP have the particularity to automaticaly detect if the world have been used on a minecraft server, and allow you to select the differents players found on the server (and you can select too the default player found in the world "level.dat")
Be sure to save and exit any open Minecraft worlds before running Inside Job. Once run, Inside Job will open the first world and display your inventory. You can change worlds using Command-1 thru 5, or using the segmented control at the top of the main window. Note that Inside Job can only edit existing worlds.
@@ -33,6 +40,19 @@ After changing your inventory you will need to save the currently open world usi
### Release Notes
#### 1.0.2-smp - March 11, 2011
- Now players .dat file are correctly listed and selectable, we even can save it!
- Merges changes from Nickloose, we are now able to list SSP worlds and open them.
- Minor other changes
#### 1.0.2-smp - March 5, 2011
- Major changes on world internal selection, we no longuer use World Index as ID, but the world path. We currently still have "slots" on the interface, but it should be changed soon to use a popup button with the list of worlds.
- Now we have separated level.dat from player.dat for beeing SMP friendly.
- Add missing Redstone repeater
- Forked from official version
#### 1.0.2 - February 25, 2011
- Inside Job presently only supports worlds named "World1" thru "World5". Support for worlds with other names will be added in a future release.
@@ -52,9 +72,10 @@ Inside Job uses [Matt Gemmell](http://mattgemmell.com/)'s MAAttachedWindow. Ite
### License
Inside Job is made available under the [MIT License](http://www.opensource.org/licenses/mit-license.html). Its source code can be found on GitHub: [http://github.com/preble/InsideJob]().
Inside Job is made available under the [MIT License](http://www.opensource.org/licenses/mit-license.html). Its source code can be found on GitHub: [http://github.com/godzil/InsideJob](). Original work can be found on GitHub: [http://github.com/preble/InsideJob]().
Copyright (c) 2010 Adam Preble
Copyright (c) 2010-2011 Adam Preble
Parts Copyright (c) 2011 Manoël Trapier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -0,0 +1,5 @@
/* Localized versions of Info.plist keys */
"No world loaded." = "Aucun monde chargé.";
"No world exists in that slot." = "Aucun mode dans ce slot";
"Dismiss" = "Annuler";
"Please create a new single player world in this slot using Minecraft and try again." = "Veuillez creer un monde en mode un joueur utilisant ce slot dans Minecraft, et essayez a nouveau.";