mirror of
https://github.com/GTNewHorizons/ThaumicEnergistics.git
synced 2026-10-25 20:32:27 +00:00
AE2-Rv3 support
Dependency Updated: AE2-rv3-9 Fixes #227: Storage bus void support restored, attaches to network when placed with pre-set filters, and condenser support restored. May address #234 Added EssentiaProvider to Thaumic Tinkerer blacklist, will be supported in the next release of Thaumic Tinkerer #228 Fixes #229: Storage bus can fully utilize the Essentia Reservoir without setting filters. Fixes #239: Essentia cells obey their filters when used in an IO port. Fixes #240: Added checks to not redraw the essentia storage monitor or send update packets if not needed.
This commit is contained in:
1 parent
8a65e51037
commit
be4cb0513f
14 files changed
+108
-62
No files matched your search
+9
-1
@@ -1,4 +1,12 @@
|
||||
8/3/2015 0.8.10.10
|
||||
10/13/2015 0.9.0.0 - Alpha
|
||||
Dependency Updated: AE2-rv3-9
|
||||
Fixes #227: Storage bus void support restored, attaches to network when placed with pre-set filters, and condenser support restored. May address #234
|
||||
Added EssentiaProvider to Thaumic Tinkerer blacklist, will be supported in the next release of Thaumic Tinkerer #228
|
||||
Fixes #229: Storage bus can fully utilize the Essentia Reservoir without setting filters.
|
||||
Fixes #239: Essentia cells obey their filters when used in an IO port.
|
||||
Fixes #240: Added checks to not redraw the essentia storage monitor or send update packets if not needed.
|
||||
|
||||
8/3/2015 0.8.10.10
|
||||
Fixed #226: Properly sided E.V.C. packet code.
|
||||
|
||||
7/30/2015 0.8.10.9
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "0.8.10.10"
|
||||
version = "0.9.0.0"
|
||||
group= "thaumicenergistics" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "thaumicenergistics"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
@Mod(modid = ThaumicEnergistics.MOD_ID, name = "Thaumic Energistics", version = ThaumicEnergistics.VERSION, dependencies = "required-after:appliedenergistics2@[rv2-stable-1,);required-after:Thaumcraft@[4.2.3.5,);after:Waila;after:extracells")
|
||||
@Mod(modid = ThaumicEnergistics.MOD_ID, name = "Thaumic Energistics", version = ThaumicEnergistics.VERSION, dependencies = "required-after:appliedenergistics2@[rv3-alpha-9,);required-after:Thaumcraft@[4.2.3.5,);after:Waila;after:extracells")
|
||||
public class ThaumicEnergistics
|
||||
{
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ public class ThaumicEnergistics
|
||||
/**
|
||||
* Current version of the mod.
|
||||
*/
|
||||
public static final String VERSION = "0.8.10.10"; // Note: don't forget to change the build.gradle file as well
|
||||
public static final String VERSION = "0.9.0.0"; // Note: don't forget to change the build.gradle file as well
|
||||
|
||||
/**
|
||||
* Singleton instance
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import thaumicenergistics.ThaumicEnergistics;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
import thaumicenergistics.blocks.BlockArcaneAssembler;
|
||||
import thaumicenergistics.tileentities.TileEssentiaProvider;
|
||||
import thaumicenergistics.util.EffectiveSide;
|
||||
import thaumicenergistics.util.ThELog;
|
||||
import appeng.api.config.Upgrades;
|
||||
@@ -122,6 +123,10 @@ public final class IntegrationCore
|
||||
|
||||
// Integrate with computer craft
|
||||
IntegrationCore.integrateWithMod( IntegrationCore.MODID_CC );
|
||||
|
||||
// Send a message to Thaumic Tinkerer to blacklist the essentia provider from its CC support
|
||||
FMLInterModComms.sendMessage( "Thaumic Tinkerer", "AddCCBlacklist", TileEssentiaProvider.class.getCanonicalName() );
|
||||
|
||||
}
|
||||
catch( Throwable e )
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ import thaumcraft.common.tiles.TileAlembic;
|
||||
import thaumcraft.common.tiles.TileCentrifuge;
|
||||
import thaumcraft.common.tiles.TileEssentiaReservoir;
|
||||
import thaumcraft.common.tiles.TileJarFillable;
|
||||
import thaumcraft.common.tiles.TileJarFillableVoid;
|
||||
import thaumcraft.common.tiles.TileTubeBuffer;
|
||||
import thaumicenergistics.api.IThETransportPermissions;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
@@ -384,6 +385,7 @@ public final class EssentiaTileContainerHelper
|
||||
|
||||
// Jars
|
||||
this.perms.addAspectContainerTileToBothPermissions( TileJarFillable.class, 64 );
|
||||
this.perms.addAspectContainerTileToBothPermissions( TileJarFillableVoid.class, 64 );
|
||||
|
||||
// Essentia buffer
|
||||
this.perms.addAspectContainerTileToExtractPermissions( TileTubeBuffer.class, 8 );
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package thaumicenergistics.inventory;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import thaumicenergistics.fluids.GaseousEssentia;
|
||||
import thaumicenergistics.integration.tc.EssentiaConversionHelper;
|
||||
import thaumicenergistics.parts.AEPartEssentiaStorageBus;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
@@ -98,9 +100,9 @@ public class HandlerEssentiaStorageBusCondenser
|
||||
// Inject the fluid
|
||||
this.condenser.fill( this.partStorageBus.getSide().getOpposite(), injectStack.getFluidStack(), ( mode == Actionable.MODULATE ) );
|
||||
|
||||
// Since the fluid is being voided, update the network so it doesn't think its stored
|
||||
injectStack.setStackSize( -input.getStackSize() );
|
||||
this.postAlterationToHostGrid( ImmutableList.of( injectStack ) );
|
||||
// Update the grid so that it doesn't thing we have stored the voided amount.
|
||||
this.postAlterationToHostGrid( ImmutableList.of( AEApi.instance().storage()
|
||||
.createFluidStack( new FluidStack( input.getFluid(), (int) -input.getStackSize() ) ) ) );
|
||||
|
||||
// All fluid accepted.
|
||||
return null;
|
||||
@@ -132,20 +134,10 @@ public class HandlerEssentiaStorageBusCondenser
|
||||
// Ignored.
|
||||
}
|
||||
|
||||
/**
|
||||
* Only valid for pass 2
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean validForPass( final int pass )
|
||||
{
|
||||
if( this.condenser != null )
|
||||
{
|
||||
return pass == 2;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -559,8 +559,8 @@ class HandlerEssentiaStorageBusContainer
|
||||
return( hasFilters || hasStored );
|
||||
}
|
||||
|
||||
// Valid if has no filters and container is empty.
|
||||
return( ( !hasFilters ) && ( !hasStored ) );
|
||||
// Valid if has no filters.
|
||||
return( !hasFilters );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,21 @@ public class HandlerEssentiaStorageBusDuality
|
||||
|
||||
AbstractHandlerEssentiaStorageBus newHandler = null;
|
||||
|
||||
if( tileEntity instanceof IAspectContainer )
|
||||
// These should be ordered most specific to most generic
|
||||
if( tileEntity instanceof TileCondenser )
|
||||
{
|
||||
// Create the interface if needed
|
||||
if( this.condenserHandler == null )
|
||||
{
|
||||
// Create the handler
|
||||
this.condenserHandler = new HandlerEssentiaStorageBusCondenser( this.partStorageBus );
|
||||
}
|
||||
|
||||
// Set the new handler
|
||||
newHandler = this.condenserHandler;
|
||||
|
||||
}
|
||||
else if( tileEntity instanceof IAspectContainer )
|
||||
{
|
||||
// Create the container handler if needed
|
||||
if( this.containerHandler == null )
|
||||
@@ -150,19 +164,6 @@ public class HandlerEssentiaStorageBusDuality
|
||||
// Set internal handler to the container handler
|
||||
newHandler = this.containerHandler;
|
||||
}
|
||||
else if( tileEntity instanceof TileInterface )
|
||||
{
|
||||
// Create the interface handler if needed
|
||||
if( this.interfaceHandler == null )
|
||||
{
|
||||
// Create the handler
|
||||
this.interfaceHandler = new HandlerEssentiaStorageBusInterface( this.partStorageBus );
|
||||
}
|
||||
|
||||
// Set the internal handler to the interface handler
|
||||
newHandler = this.interfaceHandler;
|
||||
|
||||
}
|
||||
else if( tileEntity instanceof IPartHost )
|
||||
{
|
||||
// Get the part
|
||||
@@ -182,17 +183,17 @@ public class HandlerEssentiaStorageBusDuality
|
||||
newHandler = this.interfaceHandler;
|
||||
}
|
||||
}
|
||||
else if( tileEntity instanceof TileCondenser )
|
||||
else if( tileEntity instanceof TileInterface )
|
||||
{
|
||||
// Create the interface if needed
|
||||
if( this.condenserHandler == null )
|
||||
// Create the interface handler if needed
|
||||
if( this.interfaceHandler == null )
|
||||
{
|
||||
// Create the handler
|
||||
this.condenserHandler = new HandlerEssentiaStorageBusCondenser( this.partStorageBus );
|
||||
this.interfaceHandler = new HandlerEssentiaStorageBusInterface( this.partStorageBus );
|
||||
}
|
||||
|
||||
// Set the new handler
|
||||
newHandler = this.condenserHandler;
|
||||
// Set the internal handler to the interface handler
|
||||
newHandler = this.interfaceHandler;
|
||||
|
||||
}
|
||||
|
||||
@@ -203,11 +204,14 @@ public class HandlerEssentiaStorageBusDuality
|
||||
if( this.internalHandler != null )
|
||||
{
|
||||
// Let the old handler know the neighbor changed
|
||||
doUpdate |= this.internalHandler.onNeighborChange();
|
||||
this.internalHandler.onNeighborChange();
|
||||
}
|
||||
|
||||
// Set the new handler
|
||||
this.internalHandler = newHandler;
|
||||
|
||||
// Mark for update
|
||||
doUpdate = true;
|
||||
}
|
||||
|
||||
// Pass to internal handler
|
||||
|
||||
@@ -724,6 +724,13 @@ public class HandlerItemEssentiaCell
|
||||
return input.copy();
|
||||
}
|
||||
|
||||
// Ensure the essentia can be accepted
|
||||
if( !this.canAccept( input ) )
|
||||
{
|
||||
// Can not accept this essentia
|
||||
return input.copy();
|
||||
}
|
||||
|
||||
// Get the aspect of the gas
|
||||
Aspect essentiaAspect = ( (GaseousEssentia)input.getFluid() ).getAspect();
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ import thaumicenergistics.integration.tc.EssentiaItemContainerHelper;
|
||||
import thaumicenergistics.integration.tc.EssentiaItemContainerHelper.AspectItemType;
|
||||
import thaumicenergistics.registries.AEPartsEnum;
|
||||
import thaumicenergistics.util.EffectiveSide;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.security.PlayerSource;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.core.WorldSettings;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -305,7 +305,7 @@ public class AEPartEssentiaConversionMonitor
|
||||
private void markFirstClick( final EntityPlayer player )
|
||||
{
|
||||
// Set the ID
|
||||
this.depositedPlayerID = WorldSettings.getInstance().getPlayerID( player.getGameProfile() );
|
||||
this.depositedPlayerID = AEApi.instance().registries().players().getID( player.getGameProfile() );
|
||||
|
||||
// Set the time
|
||||
this.depositedTick = MinecraftServer.getServer().getTickCounter();
|
||||
@@ -320,7 +320,7 @@ public class AEPartEssentiaConversionMonitor
|
||||
private boolean wasDoubleClick( final EntityPlayer player )
|
||||
{
|
||||
// Is this the same player that just used the monitor?
|
||||
if( ( this.depositedPlayerID != -1 ) && ( this.depositedPlayerID == WorldSettings.getInstance().getPlayerID( player.getGameProfile() ) ) )
|
||||
if( ( this.depositedPlayerID != -1 ) && ( this.depositedPlayerID == AEApi.instance().registries().players().getID( player.getGameProfile() ) ) )
|
||||
{
|
||||
// Was it a double click?
|
||||
if( MinecraftServer.getServer().getTickCounter() - this.depositedTick <= AEPartEssentiaConversionMonitor.DOUBLE_CLICK_TICKS )
|
||||
|
||||
@@ -132,19 +132,43 @@ public class AEPartEssentiaStorageMonitor
|
||||
* Sets what is being tracked, or clears the data if null.
|
||||
*
|
||||
* @param as
|
||||
* @return Returns true if the tracker was changed, false otherwise.
|
||||
*/
|
||||
public void setTracked( final AspectStack as )
|
||||
@SuppressWarnings("null")
|
||||
public Boolean setTracked( final AspectStack as )
|
||||
{
|
||||
if( as != null )
|
||||
Boolean didChange = false;
|
||||
Boolean trackedNull = ( this.asAspectStack == null );
|
||||
Boolean asNull = ( as == null );
|
||||
|
||||
// Are both not null?
|
||||
if( !( trackedNull || asNull ) )
|
||||
{
|
||||
// Set aspect
|
||||
// Check if anything changed
|
||||
didChange = ( ( this.asAspectStack.stackSize != as.stackSize ) || ( this.asAspectStack.aspect != as.aspect ) );
|
||||
if( didChange )
|
||||
{
|
||||
// Update
|
||||
this.asAspectStack.aspect = as.aspect;
|
||||
this.asAspectStack.stackSize = as.stackSize;
|
||||
}
|
||||
}
|
||||
// Is the tracked null, but input not?
|
||||
else if( trackedNull && !asNull )
|
||||
{
|
||||
// Set to the input stack
|
||||
this.asAspectStack = as;
|
||||
didChange = true;
|
||||
}
|
||||
else
|
||||
// Is the input stack null, but tracked not?
|
||||
else if( asNull && !trackedNull )
|
||||
{
|
||||
// Clear tracker
|
||||
// Clear the tracker
|
||||
this.asAspectStack = null;
|
||||
didChange = true;
|
||||
}
|
||||
|
||||
return didChange;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -718,11 +742,15 @@ public class AEPartEssentiaStorageMonitor
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the amount
|
||||
this.trackedEssentia.updateTrackedAmount( storedAmount );
|
||||
// Did the amount change?
|
||||
if( this.trackedEssentia.getAspectStack().stackSize != storedAmount )
|
||||
{
|
||||
// Update the amount
|
||||
this.trackedEssentia.updateTrackedAmount( storedAmount );
|
||||
|
||||
// Mark for sync
|
||||
this.markForUpdate();
|
||||
// Mark for sync
|
||||
this.markForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -766,11 +794,12 @@ public class AEPartEssentiaStorageMonitor
|
||||
// Read the tracked stack
|
||||
AspectStack as = AspectStack.loadAspectStackFromNBT( ByteBufUtils.readTag( stream ) );
|
||||
|
||||
// Update the tracker
|
||||
this.trackedEssentia.setTracked( as );
|
||||
|
||||
// Mark for screen redraw
|
||||
redraw |= this.updateDisplayList = true;
|
||||
// Did the stack change?
|
||||
if( this.trackedEssentia.setTracked( as ) )
|
||||
{
|
||||
// Mark for screen redraw
|
||||
redraw |= this.updateDisplayList = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,7 +40,6 @@ import appeng.api.parts.PartItemStack;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.core.WorldSettings;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -532,7 +531,7 @@ public abstract class AbstractAEPartBase
|
||||
public final void onPlacement( final EntityPlayer player, final ItemStack held, final ForgeDirection side )
|
||||
{
|
||||
// Set the owner
|
||||
this.ownerID = WorldSettings.getInstance().getPlayerID( player.getGameProfile() );
|
||||
this.ownerID = AEApi.instance().registries().players().getID( player.getGameProfile() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -568,7 +568,7 @@ public class AEAspectRegister
|
||||
{
|
||||
if( ing instanceof Ingredient )
|
||||
{
|
||||
if( ( (Ingredient)ing ).nameSpace.equalsIgnoreCase( "oreDictionary" ) )
|
||||
if( ( (Ingredient)ing ).getNameSpace().equalsIgnoreCase( "oreDictionary" ) )
|
||||
{
|
||||
currentIngredientStack = ( (Ingredient)ing ).getItemStackSet()[0];
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ public class TileArcaneAssembler
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void getDrops( final World world, final int x, final int y, final int z, final ArrayList<ItemStack> drops )
|
||||
public void getDrops( final World world, final int x, final int y, final int z, final List<ItemStack> drops )
|
||||
{
|
||||
if( !this.wasDismantled )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user