Compare commits

...

9 Commits

Author SHA1 Message Date
yueh 0ee2ca72ac Merge pull request #1206 from yueh/fix-1068
Stops AEBaseItemBlock from modifying the metadata before placing.
2015-04-05 20:47:31 +02:00
thatsIch 881bb919da Merge pull request #1205 from thatsIch/b-npe-on-random-smashing-button
Fixes NPE on random button smashing
2015-04-05 20:18:10 +02:00
thatsIch 5ecd68d5b6 Merge pull request #1209 from thatsIch/b-integration-with-gradle
Fixes integration bug for Resources between Gradle and IntelliJ, does not affect Eclipse
2015-04-05 20:18:03 +02:00
thatsIch e2d0e5d424 Dont use instance reference for static references 2015-04-05 15:59:23 +02:00
thatsIch e3bf7d63c0 Split one liner declarations 2015-04-05 15:57:37 +02:00
thatsIch 3fedcf273b Remove random semicolons 2015-04-05 15:56:10 +02:00
thatsIch 8042dbb3db Fixes integration bug for Resources between Gradle and IntelliJ, does not affect Eclipse 2015-04-05 15:25:26 +02:00
yueh e7e397c412 Stops AEBaseItemBlock from modifying the metadata before placing. 2015-04-05 14:01:42 +02:00
thatsIch ecc472a692 Fixes NPE on random button smashing 2015-04-05 13:07:19 +02:00
7 changed files with 25 additions and 23 deletions
+3
View File
@@ -103,6 +103,9 @@ sourceSets {
"assets/appliedenergistics2/textures/models/*", "assets/appliedenergistics2/textures/models/*",
"assets/appliedenergistics2/textures/items/*" "assets/appliedenergistics2/textures/items/*"
} }
// IntelliJ and Gradle interaction bug
output.resourcesDir = output.classesDir
} }
} }
@@ -162,8 +162,6 @@ public class AEBaseItemBlock extends ItemBlock
forward = ForgeDirection.SOUTH; forward = ForgeDirection.SOUTH;
if( up.offsetY == 0 ) if( up.offsetY == 0 )
forward = ForgeDirection.UP; forward = ForgeDirection.UP;
ori.setOrientation( forward, up );
} }
if( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) ) if( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) )
@@ -301,19 +301,22 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
if( stack.getItem() == this ) if( stack.getItem() == this )
{ {
PartType pt = this.getTypeByStack( stack ); PartType pt = this.getTypeByStack( stack );
switch( pt ) if ( pt != null )
{ {
case ImportBus: switch( pt )
importBus = true; {
if( u == pt ) case ImportBus:
group = true; importBus = true;
break; if( u == pt )
case ExportBus: group = true;
exportBus = true; break;
if( u == pt ) case ExportBus:
group = true; exportBus = true;
break; if( u == pt )
default: group = true;
break;
default:
}
} }
} }
} }
@@ -116,7 +116,7 @@ public abstract class AERootPoweredItem extends AEBaseItem implements IAEItemPow
{ {
NBTTagCompound data = Platform.openNbtData( is ); NBTTagCompound data = Platform.openNbtData( is );
double currentStorage = data.getDouble( this.POWER_NBT_KEY ); double currentStorage = data.getDouble( POWER_NBT_KEY );
double maxStorage = this.getAEMaxPower( is ); double maxStorage = this.getAEMaxPower( is );
switch( op ) switch( op )
@@ -126,19 +126,19 @@ public abstract class AERootPoweredItem extends AEBaseItem implements IAEItemPow
if( currentStorage > maxStorage ) if( currentStorage > maxStorage )
{ {
double diff = currentStorage - maxStorage; double diff = currentStorage - maxStorage;
data.setDouble( this.POWER_NBT_KEY, maxStorage ); data.setDouble( POWER_NBT_KEY, maxStorage );
return diff; return diff;
} }
data.setDouble( this.POWER_NBT_KEY, currentStorage ); data.setDouble( POWER_NBT_KEY, currentStorage );
return 0; return 0;
case EXTRACT: case EXTRACT:
if( currentStorage > adjustment ) if( currentStorage > adjustment )
{ {
currentStorage -= adjustment; currentStorage -= adjustment;
data.setDouble( this.POWER_NBT_KEY, currentStorage ); data.setDouble( POWER_NBT_KEY, currentStorage );
return adjustment; return adjustment;
} }
data.setDouble( this.POWER_NBT_KEY, 0 ); data.setDouble( POWER_NBT_KEY, 0 );
return currentStorage; return currentStorage;
default: default:
break; break;
@@ -103,7 +103,6 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
private void updateHandler() private void updateHandler()
{ {
this.myHandler.setBaseAccess( AccessRestriction.WRITE ); this.myHandler.setBaseAccess( AccessRestriction.WRITE );
;
this.myHandler.setWhitelist( this.getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST ); this.myHandler.setWhitelist( this.getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST );
this.myHandler.setPriority( this.priority ); this.myHandler.setPriority( this.priority );
@@ -508,6 +508,4 @@ public final class MeteoritePlacer
{ {
return this.settings; return this.settings;
} }
;
} }
@@ -12,7 +12,8 @@ public class ChunkOnly extends StandardWorld
{ {
final Chunk target; final Chunk target;
final int cx, cz; final int cx;
final int cz;
int verticalBits = 0; int verticalBits = 0;
public ChunkOnly( World w, int cx, int cz ) public ChunkOnly( World w, int cx, int cz )