mirror of
https://github.com/GTNewHorizons/ThaumicEnergistics.git
synced 2026-10-25 20:32:27 +00:00
Gas compatibility
Fixes #63: Essentia gas generation moved to post-init event. Fixes #57: Export buses not longer crash when attempting to export to empty jar. Adding build.gradle for diff visibility.
This commit is contained in:
1 parent
4b96a1a27c
commit
8c43ca614d
9 files changed
+111
-17
No files matched your search
+2
-1
@@ -4,4 +4,5 @@
|
||||
!/Features.md
|
||||
!/LICENSE
|
||||
!/README.md
|
||||
!/src
|
||||
!/src
|
||||
!build.gradle
|
||||
+8
-1
@@ -1,4 +1,11 @@
|
||||
10/12/2014 0.7.0b
|
||||
10/19/2014 0.7.1b
|
||||
Fixes #63: Essentia gas generation moved to post-init event.
|
||||
This should now support all TC addon essentia types.
|
||||
|
||||
10/13/2014 0.7.1b
|
||||
Fixes #57: Export buses not longer crash when attempting to export to empty jar.
|
||||
|
||||
10/12/2014 0.7.0b
|
||||
Dependency Changed: Thaumcraft 4.2.1.4
|
||||
Updated forge to 10.13.1.1225
|
||||
Fixes #47: Configurable Fluid conversion ratio.
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "0.7.1b"
|
||||
group= "thaumicenergistics" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "thaumicenergistics"
|
||||
|
||||
minecraft {
|
||||
version = "1.7.10-10.13.1.1225"
|
||||
assetDir = "eclipse/assets"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
//compile "some.group:artifact:version:classifier"
|
||||
//compile "some.group:artifact:version"
|
||||
|
||||
// real examples
|
||||
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||
|
||||
// for more info...
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
||||
}
|
||||
|
||||
processResources
|
||||
{
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,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;required-after:Thaumcraft;after:Waila;after:ForbiddenMagic;after:MagicBees")
|
||||
@Mod(modid = ThaumicEnergistics.MOD_ID, name = "Thaumic Energistics", version = ThaumicEnergistics.VERSION, dependencies = "required-after:appliedenergistics2;required-after:Thaumcraft;after:Waila")
|
||||
public class ThaumicEnergistics
|
||||
{
|
||||
/*
|
||||
@@ -48,7 +48,7 @@ public class ThaumicEnergistics
|
||||
/**
|
||||
* Current version of the mod.
|
||||
*/
|
||||
public static final String VERSION = "0.7.0b"; // Note: don't forget to change the build.gradle file as well
|
||||
public static final String VERSION = "0.7.1b"; // Note: don't forget to change the build.gradle file as well
|
||||
|
||||
/**
|
||||
* Singleton instance
|
||||
@@ -270,6 +270,9 @@ public class ThaumicEnergistics
|
||||
// Register TC research
|
||||
ThaumicEnergistics.proxy.registerResearch();
|
||||
|
||||
// Register fluids
|
||||
ThaumicEnergistics.proxy.registerFluids();
|
||||
|
||||
this.endLoadStageTracking( t );
|
||||
}
|
||||
|
||||
@@ -302,9 +305,6 @@ public class ThaumicEnergistics
|
||||
// Register items
|
||||
ThaumicEnergistics.proxy.registerItems();
|
||||
|
||||
// Register fluids
|
||||
ThaumicEnergistics.proxy.registerFluids();
|
||||
|
||||
// Register blocks
|
||||
ThaumicEnergistics.proxy.registerBlocks();
|
||||
|
||||
|
||||
@@ -455,11 +455,14 @@ public final class EssentiaTileContainerHelper
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get the aspect in the container
|
||||
AspectStack storedEssentia = this.getAspectStackFromContainer( container );
|
||||
|
||||
// Match types on jars
|
||||
if( ( container instanceof TileJarFillable ) )
|
||||
if( ( storedEssentia != null ) && ( container instanceof TileJarFillable ) )
|
||||
{
|
||||
// Do the aspects match?
|
||||
if( aspectToFill != this.getAspectStackFromContainer( container ).aspect )
|
||||
if( aspectToFill != storedEssentia.aspect )
|
||||
{
|
||||
// Aspects do not match;
|
||||
return 0;
|
||||
|
||||
@@ -65,6 +65,11 @@ public class HandlerEssentiaStorageBus
|
||||
*/
|
||||
public boolean isVoidAllowed = false;
|
||||
|
||||
/**
|
||||
* Set true when essentia was recently voided.
|
||||
*/
|
||||
public boolean didVoid = false;
|
||||
|
||||
/**
|
||||
* Creates the handler.
|
||||
*
|
||||
@@ -476,12 +481,23 @@ public class HandlerEssentiaStorageBus
|
||||
// Calculate how much was left over
|
||||
int remaining_FU = toFill.amount - filled_FU;
|
||||
|
||||
// Did we completely drain the input stack, or can we void the remainder?
|
||||
if( remaining_FU == 0 || canVoid )
|
||||
// Did we completely drain the input stack?
|
||||
if( remaining_FU == 0 )
|
||||
{
|
||||
// Nothing left over
|
||||
return null;
|
||||
}
|
||||
// Are we voiding the remainder?
|
||||
else if( canVoid )
|
||||
{
|
||||
// Mark that we are voiding
|
||||
this.didVoid = true;
|
||||
|
||||
// TODO: send changes to network here.
|
||||
|
||||
// Report that we accepted it all.
|
||||
return null;
|
||||
}
|
||||
|
||||
// Return what was left over
|
||||
return AEApi.instance().storage().createFluidStack( new FluidStack( toFill.getFluid(), remaining_FU ) );
|
||||
|
||||
@@ -5,8 +5,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.tiles.TileEssentiaReservoir;
|
||||
import thaumicenergistics.integration.tc.EssentiaTileContainerHelper;
|
||||
import thaumicenergistics.registries.AEPartsEnum;
|
||||
import thaumicenergistics.texture.BlockTextureManager;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -49,10 +47,9 @@ public class AEPartEssentiaExportBus
|
||||
@Override
|
||||
public boolean doWork( final int transferAmount )
|
||||
{
|
||||
EssentiaTileContainerHelper.instance.addTileToInjectWhitelist( TileEssentiaReservoir.class );
|
||||
|
||||
if( ( this.facingContainer != null ) )
|
||||
if( this.facingContainer != null )
|
||||
{
|
||||
// Attempt to extract essentia from the network
|
||||
return this.extractEssentiaFromNetwork( transferAmount );
|
||||
}
|
||||
|
||||
|
||||
@@ -248,6 +248,13 @@ public abstract class AEPartEssentiaIO
|
||||
|
||||
protected boolean extractEssentiaFromNetwork( final int amountToFillContainer )
|
||||
{
|
||||
// Ensure we have a container.
|
||||
if( this.facingContainer == null )
|
||||
{
|
||||
// Invalid container
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the aspect in the container
|
||||
Aspect aspectToMatch = EssentiaTileContainerHelper.instance.getAspectInContainer( this.facingContainer );
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ thaumicenergistics.item.material.coalescence.core.name=Coalescence Core
|
||||
thaumicenergistics.tooltip.essentia.cell.bytes=%d of %d bytes used.
|
||||
thaumicenergistics.tooltip.essentia.cell.types=%d of %d essentia types stored.
|
||||
thaumicenergistics.tooltip.button.clear.crafting=Deposit Crafting Grid
|
||||
thaumicenergistics.tooltip.button.void=Allow Void
|
||||
thaumicenergistics.tooltip.button.void=Allow Void?
|
||||
thaumicenergistics.tooltip.button.void.disabled=Do not void essentia
|
||||
thaumicenergistics.tooltip.button.void.allowed=Void essentia if jar is full
|
||||
thaumicenergistics.tooltip.button.void.note=Only applies to void jars
|
||||
|
||||
Reference in new issue
Block a user