mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Compare commits
9
Commits
1.2.8.29-pre
...
1.3.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf496967aa | ||
|
|
5e1a996798 | ||
|
|
29144cfe3e | ||
|
|
78b68dec47 | ||
|
|
5053be782b | ||
|
|
c5a72c0dff | ||
|
|
e20ae4f103 | ||
|
|
fe84247b9e | ||
|
|
0a55e842b1 |
No files matched your search
@@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# bashsupport disable=BP5006 # Global environment variables
|
||||
RUNDIR="run" \
|
||||
CRASH="crash-reports" \
|
||||
SERVERLOG="server.log"
|
||||
|
||||
# enable nullglob to get 0 results when no match rather than the pattern
|
||||
shopt -s nullglob
|
||||
|
||||
# store matches in array
|
||||
crash_reports=("$RUNDIR/$CRASH/crash"*.txt)
|
||||
|
||||
# if array not empty there are crash_reports
|
||||
if [ "${#crash_reports[@]}" -gt 0 ]; then
|
||||
# get the latest crash_report from array
|
||||
latest_crash_report="${crash_reports[-1]}"
|
||||
{
|
||||
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}"
|
||||
cat "$latest_crash_report"
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then
|
||||
{
|
||||
printf 'Fatal errors detected:\n'
|
||||
cat server.log
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \
|
||||
"$SERVERLOG"; then
|
||||
{
|
||||
printf 'Server force stopped:'
|
||||
cat server.log
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then
|
||||
{
|
||||
printf 'Server did not finish startup:'
|
||||
cat server.log
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf 'No crash reports detected'
|
||||
exit 0
|
||||
+399
-210
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -1,9 +1,9 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.195:dev'
|
||||
compile 'com.github.GTNewHorizons:Baubles:1.0.1.14:dev'
|
||||
api 'com.github.GTNewHorizons:GT5-Unofficial:5.09.44.35:dev'
|
||||
api 'com.github.GTNewHorizons:Baubles:1.0.1.16:dev'
|
||||
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
compile 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -85,9 +85,6 @@ done
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
@@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
||||
+1
-25
@@ -1,28 +1,4 @@
|
||||
// Add any additional repositiroes for your dependencies here
|
||||
// Add any additional repositories for your dependencies here
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'GTNH Maven'
|
||||
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
|
||||
allowInsecureProtocol
|
||||
}
|
||||
mavenCentral()
|
||||
maven {
|
||||
name 'ic2'
|
||||
url 'https://maven.ic2.player.to/'
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url 'https://cursemaven.com'
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,12 @@ import emt.network.PacketEMTKeys;
|
||||
import emt.network.PacketNodeInfo;
|
||||
import emt.proxy.CommonProxy;
|
||||
import emt.tile.solar.Solars;
|
||||
import emt.util.*;
|
||||
import emt.util.EMTClientEventHandler;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTCreativeTab;
|
||||
import emt.util.EMTDungeonChestGenerator;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTEventHandler;
|
||||
|
||||
@Mod(
|
||||
modid = EMT.MOD_ID,
|
||||
|
||||
@@ -10,12 +10,12 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXSparkle;
|
||||
|
||||
public class BlockElectricCloud extends BlockBase {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.gtnewhorizons.modularui.api.UIInfos;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.gthandler.common.implementations.automation.EssentiaFiller;
|
||||
import emt.tile.TileEntityEtherealMacerator;
|
||||
import emt.tile.TileEntityIndustrialWandRecharge;
|
||||
import ic2.api.item.IC2Items;
|
||||
@@ -73,8 +72,6 @@ public class BlockMachines extends BlockBaseContainer {
|
||||
return new TileEntityIndustrialWandRecharge();
|
||||
} else if (meta == 1) {
|
||||
return new TileEntityEtherealMacerator();
|
||||
} else if (meta == 2) {
|
||||
return new EssentiaFiller();
|
||||
}
|
||||
return super.createTileEntity(world, meta);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.tile.TileEntityPortableNode;
|
||||
import thaumcraft.common.blocks.BlockAiry;
|
||||
|
||||
public class BlockPortableNode extends BlockAiry {
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class CommandOutputs extends CommandBase {
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
public class EntityEnergyBall extends Entity implements IProjectile, IEntityAdditionalSpawnData {
|
||||
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
package emt.gthandler.common.implementations;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
|
||||
|
||||
public class EssentiaHatch extends GT_MetaTileEntity_Hatch_Input {
|
||||
|
||||
private static int ApTe = (int) Math.ceil(Aspect.aspects.size() / GT_Values.V.length);
|
||||
private AspectList current = new AspectList();
|
||||
|
||||
public EssentiaHatch(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier);
|
||||
}
|
||||
|
||||
public EssentiaHatch(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public EssentiaHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public boolean addAspectList(final AspectList A) {
|
||||
|
||||
if ((this.mTier + 1) * ApTe > A.size() + current.size()) {
|
||||
if (current.visSize() + A.visSize() < (this.mTier + 1) * ApTe * 64) current.add(A);
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
public void setCurrent(AspectList List) {
|
||||
this.current = List;
|
||||
}
|
||||
|
||||
public AspectList getAspects() {
|
||||
return current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new EssentiaHatch(
|
||||
"Essentia Hatch " + GT_Values.VN[this.mTier],
|
||||
this.mTier,
|
||||
this.getDescription(),
|
||||
this.mTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getInfoData() {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
list.add("This Essentia-Hatch contains:");
|
||||
for (final Aspect A : this.current.aspects.keySet())
|
||||
list.add(A.getName() + ": " + Integer.toString(current.getAmount(A)));
|
||||
|
||||
String[] ret = new String[list.size()];
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ret[i] = list.get(i);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* String[] old = super.getInfoData(); if (old.length!=0) { String[] newDescription = new String[old.length +
|
||||
* 1]; for (int i = 0; i < old.length; i++) { newDescription[i] = old[i]; } newDescription[old.length] =
|
||||
* "This Contains: " + current.size() + " different Aspects"; return newDescription; }else return new
|
||||
* String[]{"This Contains: " + current.size() + " different Aspects"};
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() { // this is the fucking tooltip -_-'
|
||||
return new String[] { "Essentia Hatch for usage in Multiblocks", "Can only be filled with the Essentia Filler",
|
||||
"Can hold " + Integer.toString((ApTe * (mTier + 1))) + " Different Essentia Types",
|
||||
"Can hold " + Integer.toString((64 * ApTe * (mTier + 1))) + " Essentia in total" };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGivingInformation() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound var1) {
|
||||
|
||||
NBTTagList tlist = new NBTTagList();
|
||||
Aspect[] aspectA = current.getAspects();
|
||||
for (int i = 0; i < aspectA.length; ++i) {
|
||||
Aspect aspect = aspectA[i];
|
||||
if (aspect != null) {
|
||||
NBTTagCompound f = new NBTTagCompound();
|
||||
f.setString("key", aspect.getTag());
|
||||
f.setInteger("amount", current.getAmount(aspect));
|
||||
tlist.appendTag(f);
|
||||
}
|
||||
}
|
||||
var1.setTag("Aspects", tlist);
|
||||
super.saveNBTData(var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound var1) {
|
||||
current = new AspectList();
|
||||
NBTTagList tlist = var1.getTagList("Aspects", 10);
|
||||
|
||||
for (int j = 0; j < tlist.tagCount(); ++j) {
|
||||
NBTTagCompound rs = tlist.getCompoundTagAt(j);
|
||||
if (rs.hasKey("key")) {
|
||||
current.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount"));
|
||||
}
|
||||
}
|
||||
|
||||
super.loadNBTData(var1);
|
||||
}
|
||||
|
||||
public int fuelleft() {
|
||||
int ret = 0;
|
||||
for (final Aspect A : current.aspects.keySet()) {
|
||||
ret += current.getAmount(A);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFluidInputAllowed(FluidStack aFluid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,246 +0,0 @@
|
||||
package emt.gthandler.common.implementations.automation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.tile.TileEntityEMT;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
|
||||
public class EssentiaFiller extends TileEntityEMT implements IAspectContainer, IEssentiaTransport {
|
||||
|
||||
private AspectList current = new AspectList();
|
||||
private byte tick = 0;
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeToNBT(tagCompound);
|
||||
NBTTagList tlist = new NBTTagList();
|
||||
Aspect[] aspectA = current.getAspects();
|
||||
for (int i = 0; i < aspectA.length; ++i) {
|
||||
Aspect aspect = aspectA[i];
|
||||
if (aspect != null) {
|
||||
NBTTagCompound f = new NBTTagCompound();
|
||||
f.setString("key", aspect.getTag());
|
||||
f.setInteger("amount", current.getAmount(aspect));
|
||||
tlist.appendTag(f);
|
||||
}
|
||||
}
|
||||
tagCompound.setTag("Aspects", tlist);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound) {
|
||||
super.readFromNBT(tagCompound);
|
||||
current = new AspectList();
|
||||
NBTTagList tlist = tagCompound.getTagList("Aspects", 10);
|
||||
for (int j = 0; j < tlist.tagCount(); ++j) {
|
||||
NBTTagCompound rs = tlist.getCompoundTagAt(j);
|
||||
if (rs.hasKey("key")) {
|
||||
current.add(Aspect.getAspect(rs.getString("key")), rs.getInteger("amount"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
++tick;
|
||||
fillfrompipe();
|
||||
if (tick % 20 == 0) {
|
||||
TileEntity T = this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord + 1, yCoord, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord + 1);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord - 1, yCoord, zCoord);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
if (T == null) T = this.worldObj.getTileEntity(xCoord, yCoord, zCoord - 1);
|
||||
if (checkTE(T)) {
|
||||
tick = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkTE(final TileEntity T) {
|
||||
if (T == null) return false;
|
||||
if (this.current.visSize() > 0) if (T instanceof IGregTechTileEntity) {
|
||||
IMetaTileEntity M = ((IGregTechTileEntity) T).getMetaTileEntity();
|
||||
if (M instanceof EssentiaHatch) {
|
||||
if (((EssentiaHatch) M).addAspectList(current)) this.current = new AspectList();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void fillfrompipe() {
|
||||
TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length];
|
||||
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
|
||||
te[i] = ThaumcraftApiHelper.getConnectableTile(
|
||||
this.worldObj,
|
||||
this.xCoord,
|
||||
this.yCoord,
|
||||
this.zCoord,
|
||||
ForgeDirection.VALID_DIRECTIONS[i]);
|
||||
if (te[i] != null) {
|
||||
IEssentiaTransport pipe = (IEssentiaTransport) te[i];
|
||||
if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) {
|
||||
return;
|
||||
}
|
||||
if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]) != null)
|
||||
&& (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i])
|
||||
< getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) {
|
||||
addToContainer(
|
||||
pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]),
|
||||
pipe.takeEssentia(
|
||||
pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]),
|
||||
1,
|
||||
ForgeDirection.VALID_DIRECTIONS[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getAspects() {
|
||||
return current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAspects(AspectList aspectList) {
|
||||
this.current.add(aspectList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerAccept(Aspect aspect) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addToContainer(Aspect aspect, int i) {
|
||||
current.add(aspect, i);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean takeFromContainer(Aspect aspect, int i) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean takeFromContainer(AspectList aspectList) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerContainAmount(Aspect aspect, int i) {
|
||||
return current.aspects.containsKey(aspect) && i <= current.getAmount(aspect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerContain(AspectList aspectList) {
|
||||
ArrayList<Boolean> ret = new ArrayList<Boolean>();
|
||||
for (Aspect a : aspectList.aspects.keySet()) if (current.aspects.containsKey(a)) {
|
||||
ret.add(true);
|
||||
} else ret.add(false);
|
||||
return !ret.contains(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int containerContains(Aspect aspect) {
|
||||
return current.aspects.containsKey(aspect) ? current.getAmount(aspect) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnectable(ForgeDirection forgeDirection) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInputFrom(ForgeDirection forgeDirection) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOutputTo(ForgeDirection forgeDirection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSuction(Aspect aspect, int i) {}
|
||||
|
||||
@Override
|
||||
public Aspect getSuctionType(ForgeDirection forgeDirection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSuctionAmount(ForgeDirection forgeDirection) {
|
||||
return 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int takeEssentia(Aspect aspect, int i, ForgeDirection forgeDirection) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addEssentia(Aspect aspect, int i, ForgeDirection forgeDirection) {
|
||||
current.add(aspect, i);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Aspect getEssentiaType(ForgeDirection forgeDirection) {
|
||||
return current.getAspects()[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEssentiaAmount(ForgeDirection forgeDirection) {
|
||||
int ret = 0;
|
||||
for (final Aspect A : current.aspects.keySet()) {
|
||||
ret += current.getAmount(A);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinimumSuction() {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderExtendedTube() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,9 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
import emt.gthandler.common.tileentities.machines.multi.DE_Fusion_Crafter;
|
||||
import emt.gthandler.common.tileentities.machines.multi.generator.EMT_Large_Essentia_Gen;
|
||||
import emt.tile.GT_MetaTileEntity_ResearchCompleter;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
@@ -23,32 +19,20 @@ import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class EMT_GT_Loader implements Runnable {
|
||||
|
||||
public static final int TIERS = GT_Values.VN.length - 1;
|
||||
public static int aIDoffset = 13000 - GT_Values.VN.length - 1;
|
||||
public static ItemStack[] EHatch = new ItemStack[TIERS];
|
||||
public static ItemStack LEG;
|
||||
public static ItemStack DECC;
|
||||
public static ItemStack ResearchMultiblock;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
for (int i = 0; i < TIERS; i++) {
|
||||
EHatch[i] = new EssentiaHatch(
|
||||
aIDoffset + i,
|
||||
"Essentia Hatch " + GT_Values.VN[i],
|
||||
"Essentia Hatch " + GT_Values.VN[i],
|
||||
i).getStackForm(1L);
|
||||
}
|
||||
|
||||
LEG = new EMT_Large_Essentia_Gen(
|
||||
aIDoffset + GT_Values.VN.length + 1,
|
||||
"Large Essentia Generator",
|
||||
"Large Essentia Generator").getStackForm(1L);
|
||||
|
||||
// Dragonblood recipe for magics haters
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
GT_Values.RA.addMixerRecipe(
|
||||
|
||||
@@ -16,6 +16,7 @@ import emt.init.EMTItems;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.MaterialsUEVplus;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
@@ -130,7 +131,7 @@ public class EMT_RecipeAdder {
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "awakenedCore", 4, 0),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaosFragment", 2, 2),
|
||||
new ItemStack(EMTItems.itemEMTItems, 0, 19) },
|
||||
Materials.SpaceTime.getMolten(1440),
|
||||
MaterialsUEVplus.SpaceTime.getMolten(1440),
|
||||
GT_ModHandler.getModItem("DraconicEvolution", "chaoticCore", 1, 0),
|
||||
GT_Values.NF,
|
||||
3200,
|
||||
|
||||
+4
-4
@@ -11,6 +11,7 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
@@ -138,10 +139,9 @@ public class DE_Fusion_Crafter extends GT_MetaTileEntity_EnhancedMultiBlockBase<
|
||||
return tt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
||||
int colorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (side == facing) {
|
||||
if (aActive) return new ITexture[] { TextureFactory.of(MACHINE_CASING_MAGIC),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_TELEPORTER_ACTIVE_GLOW).extFacing().glow().build() };
|
||||
|
||||
-408
@@ -1,408 +0,0 @@
|
||||
package emt.gthandler.common.tileentities.machines.multi.generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import emt.gthandler.common.implementations.EssentiaHatch;
|
||||
import emt.gthandler.common.items.EMT_CasingBlock;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.objects.XSTR;
|
||||
|
||||
public class EMT_Large_Essentia_Gen extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
private static final byte CASING_INDEX = 2;
|
||||
public ArrayList<EssentiaHatch> mEssentiaHatches = new ArrayList();
|
||||
private byte tick = 0;
|
||||
private boolean has_lube = false;
|
||||
|
||||
public EMT_Large_Essentia_Gen(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public EMT_Large_Essentia_Gen(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[] { "Controller Block for the Large Essentia Generator.",
|
||||
"Produces energy from magical essentia decay.", "Size(WxHxD): 7x4x7, Controller (Bottom, Center)",
|
||||
"Top-Middle 5x1x5 layer are Muffler Hatches", "Middle 5x2x5 layer are Essentia Diffusion Cells",
|
||||
"Everything from here on goes either in the bottom or on the sides", "1x Fluid Input Hatch",
|
||||
"1x Essentia Input Hatch", "1x Dynamo Hatches", "1x Maintenance Hatch",
|
||||
"The outer hull is made out of Magic Containing Casings",
|
||||
"Produces 20x more than the singleblock generator per essentia",
|
||||
"Causes magical and serious conventional pollution",
|
||||
"Needs 1L Lubricant per second or will cause way more conventional pollution",
|
||||
"Needs 10 " + EMTTextHelper.LIGHT_BLUE
|
||||
+ "Aqua"
|
||||
+ EMTTextHelper.LIGHT_GRAY
|
||||
+ " cVis per second or will cause way more magical pollution",
|
||||
"Added by EMT", "Made by bartimaeusnek" };
|
||||
}
|
||||
|
||||
public int getCurrentEfficiency(ItemStack itemStack) {
|
||||
return this.mEfficiency
|
||||
- (this.getIdealStatus() - this.getRepairStatus()) * this.getMaxEfficiency(itemStack) / 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
||||
new GT_RenderedTexture(
|
||||
aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE
|
||||
: Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER) };
|
||||
}
|
||||
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity arg0) {
|
||||
return new EMT_Large_Essentia_Gen(this.mName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
// TODO Auto-generated method stub
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int p_70301_1_) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int p_70304_1_) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
// TODO Auto-generated method stub
|
||||
return this.mName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer p_70300_1_) {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack arg1) {
|
||||
|
||||
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
|
||||
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
|
||||
|
||||
for (int x = -3; x <= 3; x++) {
|
||||
for (int z = -3; z <= 3; z++) {
|
||||
for (int h = 0; h <= 3; h++) {
|
||||
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
|
||||
.getIGregTechTileEntityOffset(xDir + x, h, zDir + z);
|
||||
|
||||
if (!(Math.abs(x) == 3 || Math.abs(z) == 3)) {
|
||||
// Muffler on top.
|
||||
if ((h == 3)) {
|
||||
if (!this.addMufflerToMachineList(tTileEntity, CASING_INDEX)) {
|
||||
return false;
|
||||
}
|
||||
} else if (h != 0) {
|
||||
// inside Special Blocks
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 1)) return false;
|
||||
} else if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
// ground still casings
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) return false;
|
||||
|
||||
} else if (h != 0) {
|
||||
// walls
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) return false;
|
||||
} else if (h == 0) {
|
||||
// top and bottom corners
|
||||
if (!(this.addEssetiaHatchToList(tTileEntity, CASING_INDEX)
|
||||
|| this.addDynamoToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addMaintenanceToMachineList(tTileEntity, CASING_INDEX)
|
||||
|| this.addInputToMachineList(tTileEntity, CASING_INDEX)))
|
||||
if (((xDir + x) != 0) || ((zDir + z) != 0)) // controller
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + x, h, zDir + z)
|
||||
!= EMT_CasingBlock.EMT_GT_BLOCKS[0])
|
||||
return false;
|
||||
else if ((aBaseMetaTileEntity.getMetaIDOffset(xDir + x, h, zDir + z) != 0)) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mDynamoHatches.size() != 1) return false;
|
||||
|
||||
if (this.mInputHatches.size() != 1) return false;
|
||||
|
||||
if (this.mMaintenanceHatches.size() != 1) return false;
|
||||
|
||||
/*
|
||||
* //repair shit debug shit this.mWrench = true; this.mScrewdriver = true; this.mSoftHammer = true;
|
||||
* this.mHardHammer = true; this.mSolderingTool = true; this.mCrowbar = true;
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity instanceof EssentiaHatch) return addEssetiaHatchToList(aTileEntity, aBaseCasingIndex);
|
||||
return super.addInputToMachineList(aTileEntity, aBaseCasingIndex);
|
||||
}
|
||||
|
||||
private boolean addEssetiaHatchToList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
|
||||
if (aTileEntity == null) {
|
||||
return false;
|
||||
} else {
|
||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
||||
if (aMetaTileEntity == null) {
|
||||
return false;
|
||||
} else if (aMetaTileEntity instanceof EssentiaHatch) {
|
||||
((EssentiaHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
|
||||
return this.mEssentiaHatches.add((EssentiaHatch) aMetaTileEntity);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void make_energy() {
|
||||
AspectList fuel = this.mEssentiaHatches.get(0).getAspects();
|
||||
double cached = 0;
|
||||
|
||||
++tick;
|
||||
|
||||
// make energy
|
||||
for (final Aspect A : fuel.aspects.keySet()) {
|
||||
if (fuel.getAmount(A) > 0) {
|
||||
double burnvalue = EMTEssentiasOutputs.outputs.get(A.getTag()).doubleValue();
|
||||
cached += (burnvalue / 20D);
|
||||
cached = Math.ceil(cached);
|
||||
|
||||
if (tick % 20 == 0) { // every second consume 1 essentia
|
||||
// consume essentia and remove it from the Aspect List if its 0
|
||||
this.mEssentiaHatches.get(0).getAspects().reduce(A, 1);
|
||||
if (this.mEssentiaHatches.get(0).getAspects().getAmount(A) == 0)
|
||||
this.mEssentiaHatches.get(0).getAspects().remove(A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tick % 20 == 0) {
|
||||
// consume lubricant
|
||||
if (has_lube) this.mInputHatches.get(0).getFluid().amount -= 1;
|
||||
|
||||
tick = 0; // reset ticktimer
|
||||
}
|
||||
|
||||
// transfer energy into mEU
|
||||
this.mEUt = (int) Math.ceil(cached);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack arg0) {
|
||||
/*
|
||||
* if (!this.getBaseMetaTileEntity().isActive()) if (this.mEfficiency > 100) this.mEfficiency -= 8; else
|
||||
* this.mEfficiency = 100;
|
||||
*/
|
||||
if (this.mEssentiaHatches.get(0).fuelleft() > 0) {
|
||||
this.mMaxProgresstime = 1;
|
||||
this.mProgresstime = 0;
|
||||
}
|
||||
|
||||
return this.mEssentiaHatches.get(0).fuelleft() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
|
||||
if (tick % 20 == 0) { // every second
|
||||
// highers eff to max by 0.16% every running tick = 3,2% every second
|
||||
if (this.mEfficiency < this.getMaxEfficiency(null) - 320) this.mEfficiency += 320;
|
||||
else this.mEfficiency = getMaxEfficiency(null);
|
||||
|
||||
// check for Lubricant
|
||||
this.has_lube = this.mInputHatches.get(0).getFluid() != null
|
||||
&& this.mInputHatches.get(0).getFluid().isFluidEqual(Materials.Lubricant.getFluid(1L))
|
||||
&& this.mInputHatches.get(0).getFluidAmount() > 0;
|
||||
}
|
||||
|
||||
if (tick % 2 == 0) { // every 2nd tick
|
||||
|
||||
final XSTR R = new XSTR();
|
||||
final World WORLD = this.getBaseMetaTileEntity().getWorld();
|
||||
int x = this.getBaseMetaTileEntity().getXCoord();
|
||||
int y = this.getBaseMetaTileEntity().getYCoord();
|
||||
int z = this.getBaseMetaTileEntity().getZCoord();
|
||||
|
||||
// if out of aqua, make much flux but to not stop.
|
||||
boolean outOfcVis = VisNetHandler.drainVis(WORLD, x, y, z, Aspect.WATER, 10) <= 9;
|
||||
|
||||
// Random Change of a bit of Flux Gas.
|
||||
final int RANDOMHATCH = R.nextInt(this.mMufflerHatches.size());
|
||||
|
||||
// gets a chanche to release flux gas based on missing efficiency, min 1%
|
||||
if ((R.nextInt(getMaxEfficiency(null)) > (this.mEfficiency > 100 ? this.mEfficiency : 100)) || outOfcVis) {
|
||||
x = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getXCoord();
|
||||
y = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getYCoord() + 1;
|
||||
z = this.mMufflerHatches.get(RANDOMHATCH).getBaseMetaTileEntity().getZCoord();
|
||||
WORLD.setBlock(x, y, z, ConfigBlocks.blockFluxGas, R.nextInt(8), 3);
|
||||
}
|
||||
}
|
||||
|
||||
make_energy();
|
||||
++this.mProgresstime;
|
||||
return super.onRunningTick(aStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack arg0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageToComponent(ItemStack arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEfficiency(ItemStack arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack arg0) {
|
||||
return has_lube ? 50 : 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCorrectMachinePart(ItemStack arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGivingInformation() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getInfoData() {
|
||||
String[] old = super.getInfoData();
|
||||
old[2] = "Produces " + EMTTextHelper.RED + mEUt + EMTTextHelper.WHITE + "EU/t";
|
||||
return old;
|
||||
}
|
||||
|
||||
/*
|
||||
* @Override public void explodeMultiblock() { final World WORLD=this.getBaseMetaTileEntity().getWorld(); final int
|
||||
* xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX * 3; final int zDir =
|
||||
* ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ * 3; for (int x = -3; x <= 3;
|
||||
* x++) for (int z = -3; z <= 3; z++) for (int h = 0; h <= 3; h++) WORLD.setBlock(xDir+x,
|
||||
* this.getBaseMetaTileEntity().getYCoord()+h, zDir+z, ConfigBlocks.blockFluxGas, 8, 3); super.explodeMultiblock();
|
||||
* }
|
||||
*/
|
||||
}
|
||||
@@ -4,16 +4,21 @@ import static thaumcraft.api.ThaumcraftApi.registerObjectTag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.block.*;
|
||||
import emt.block.BlockElectricCloud;
|
||||
import emt.block.BlockEssentiaGenerators;
|
||||
import emt.block.BlockMachines;
|
||||
import emt.block.BlockPortableNode;
|
||||
import emt.block.BlockShield;
|
||||
import emt.block.BlockSolars;
|
||||
import emt.item.block.ItemBlockElectricCloud;
|
||||
import emt.item.block.ItemBlockEssentiaGenerators;
|
||||
import emt.item.block.ItemBlockMachines;
|
||||
import emt.item.block.ItemBlockSolars;
|
||||
import emt.tile.solar.Solars;
|
||||
import ic2.api.item.IC2Items;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
public class EMTBlocks {
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.item.ItemElectricScribingTools;
|
||||
@@ -25,7 +24,13 @@ import emt.item.armor.wings.ItemFeatherWing;
|
||||
import emt.item.armor.wings.ItemNanoWing;
|
||||
import emt.item.armor.wings.ItemQuantumWing;
|
||||
import emt.item.armor.wings.ItemThaumiumReinforcedWing;
|
||||
import emt.item.focus.*;
|
||||
import emt.item.focus.ItemChargeFocus;
|
||||
import emt.item.focus.ItemChristmasFocus;
|
||||
import emt.item.focus.ItemEnergyBallFocus;
|
||||
import emt.item.focus.ItemExplosionFocus;
|
||||
import emt.item.focus.ItemMaintenanceFocus;
|
||||
import emt.item.focus.ItemShieldFocus;
|
||||
import emt.item.focus.ItemWandChargingFocus;
|
||||
import emt.item.tool.ItemElectricHoeGrowth;
|
||||
import emt.item.tool.ItemElectricThorHammer;
|
||||
import emt.item.tool.ItemThorHammer;
|
||||
@@ -39,6 +44,7 @@ import emt.item.tool.omnitool.ItemOmnitoolDiamond;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolIron;
|
||||
import emt.item.tool.omnitool.ItemOmnitoolThaumium;
|
||||
import ic2.core.init.InternalName;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
|
||||
public class EMTItems {
|
||||
|
||||
@@ -58,6 +64,7 @@ public class EMTItems {
|
||||
public static Item christmasFocus;
|
||||
public static Item shieldFocus;
|
||||
public static Item energyBallFocus;
|
||||
public static Item maintenanceFocus;
|
||||
public static Item electricGoggles;
|
||||
public static Item streamChainsaw;
|
||||
public static Item rockbreakerDrill;
|
||||
@@ -197,5 +204,8 @@ public class EMTItems {
|
||||
|
||||
energyBallFocus = new ItemEnergyBallFocus();
|
||||
GameRegistry.registerItem(energyBallFocus, "EnergyBallFocus");
|
||||
|
||||
maintenanceFocus = new ItemMaintenanceFocus();
|
||||
GameRegistry.registerItem(maintenanceFocus, "MaintenanceFocus");
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,18 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTCraftingAspects;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.api.recipe.IRecipeInput;
|
||||
import ic2.api.recipe.RecipeInputItemStack;
|
||||
import ic2.api.recipe.Recipes;
|
||||
import ic2.core.BasicMachineRecipeManager;
|
||||
import ic2.core.Ic2Items;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.CrucibleRecipe;
|
||||
@@ -21,17 +33,6 @@ import thaumcraft.api.crafting.ShapelessArcaneRecipe;
|
||||
import thaumcraft.common.blocks.ItemJarNode;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTCraftingAspects;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import ic2.api.item.IC2Items;
|
||||
import ic2.api.recipe.IRecipeInput;
|
||||
import ic2.api.recipe.RecipeInputItemStack;
|
||||
import ic2.api.recipe.Recipes;
|
||||
import ic2.core.BasicMachineRecipeManager;
|
||||
import ic2.core.Ic2Items;
|
||||
|
||||
public class EMTRecipes {
|
||||
|
||||
@@ -67,6 +68,7 @@ public class EMTRecipes {
|
||||
public static InfusionRecipe thaumicNanoHelmet;
|
||||
public static InfusionRecipe explosionFocus;
|
||||
public static InfusionRecipe shieldFocus;
|
||||
public static InfusionRecipe maintenanceFocus;
|
||||
public static InfusionRecipe potentiaGenerator;
|
||||
public static InfusionRecipe streamChainsaw;
|
||||
public static InfusionRecipe rockbreakerDrill;
|
||||
@@ -534,6 +536,18 @@ public class EMTRecipes {
|
||||
new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.obsidian),
|
||||
new ItemStack(Blocks.obsidian) });
|
||||
|
||||
maintenanceFocus = addInfusionCraftingRecipe(
|
||||
"Wand Focus: Maintenance",
|
||||
new ItemStack(EMTItems.maintenanceFocus),
|
||||
6,
|
||||
EMTCraftingAspects.maintenanceFocus,
|
||||
new ItemStack(EMTItems.chargeFocus),
|
||||
new ItemStack[] { new ItemStack(ConfigItems.itemShard, 1, 5),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 3),
|
||||
new ItemStack(EMTItems.itemEMTItems, 1, 9), new ItemStack(ConfigItems.itemShard, 1, 2),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 0),
|
||||
ItemList.Duct_Tape.get(1) });
|
||||
|
||||
potentiaGenerator = addInfusionCraftingRecipe(
|
||||
"Potentia Generator",
|
||||
new ItemStack(EMTBlocks.essentiaGens, 1, 0),
|
||||
|
||||
@@ -3,13 +3,13 @@ package emt.init;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTResearchAspects;
|
||||
import emt.util.EMTResearchItem;
|
||||
import ic2.api.item.IC2Items;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
public class EMTResearches {
|
||||
|
||||
@@ -648,6 +648,17 @@ public class EMTResearches {
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.chargeFocus));
|
||||
}
|
||||
|
||||
if (!EMTConfigHandler.maintenanceFocusResearch) {
|
||||
new EMTResearchItem(
|
||||
"Wand Focus: Maintenance",
|
||||
EMTResearchAspects.maintenanceFocus,
|
||||
7,
|
||||
4,
|
||||
4,
|
||||
new ItemStack(EMTItems.maintenanceFocus)).setParents("Wand Focus: Charging").setConcealed()
|
||||
.registerResearchItem()
|
||||
.setPages(new ResearchPage(""), new ResearchPage(EMTRecipes.maintenanceFocus));
|
||||
}
|
||||
if (!EMTConfigHandler.wandChargeFocusResearch) {
|
||||
new EMTResearchItem(
|
||||
"Wand Focus: Wand Charging",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package emt.init;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import emt.gthandler.common.implementations.automation.EssentiaFiller;
|
||||
import emt.tile.TileElectricCloud;
|
||||
import emt.tile.TileEntityEtherealMacerator;
|
||||
import emt.tile.TileEntityIndustrialWandRecharge;
|
||||
@@ -28,7 +27,6 @@ public class EMTTiles {
|
||||
// Machinery
|
||||
GameRegistry.registerTileEntity(TileEntityIndustrialWandRecharge.class, "tileentityindustrialwandrecharge");
|
||||
GameRegistry.registerTileEntity(TileEntityEtherealMacerator.class, "tileentityetherealmacerator");
|
||||
GameRegistry.registerTileEntity(EssentiaFiller.class, "EssentiaFillerTE");
|
||||
|
||||
// Solars
|
||||
// legacy support
|
||||
|
||||
@@ -14,6 +14,13 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
@@ -23,13 +30,6 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.crafting.ShapedArcaneRecipe;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTResearchItem;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
|
||||
public class EMT_GTNH_Recipes_And_Researches implements Runnable {
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.common.items.ItemInkwell;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.common.items.ItemInkwell;
|
||||
|
||||
public class ItemElectricScribingTools extends ItemInkwell implements IElectricItem, IScribeTools {
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -20,6 +19,7 @@ import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemIC2Baubles extends ItemBase implements IBauble, IRunicArmor {
|
||||
|
||||
|
||||
@@ -12,17 +12,22 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.lib.utils.InventoryUtils;
|
||||
|
||||
public class ItemMaterials extends Item {
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@ import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.IBauble;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
|
||||
public class ItemOneRing extends ItemBase implements IBauble, IWarpingGear, IRunicArmor {
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -33,6 +28,11 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -37,6 +36,7 @@ import ic2.core.audio.PositionSpec;
|
||||
import ic2.core.init.InternalName;
|
||||
import ic2.core.item.armor.ItemArmorElectric;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemInfusedQuantumChestplate extends ItemArmorElectric implements IRunicArmor {
|
||||
|
||||
|
||||
@@ -15,11 +15,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
@@ -28,6 +23,11 @@ import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import ic2.api.item.IMetalArmor;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
|
||||
public class ItemElectricGoggles extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IGoggles, IRevealer, IMetalArmor, ISpecialArmor {
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
@@ -19,6 +18,7 @@ import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.util.StackUtil;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
|
||||
public class ItemFeatherWing extends ItemArmor implements IRunicArmor {
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemThaumiumReinforcedWing extends ItemFeatherWing implements IVisDiscountGear, IRepairable {
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class ItemBlockEssentiaGenerators extends ItemBlock {
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.ItemFocusBasic;
|
||||
|
||||
public abstract class ItemBaseFocus extends ItemFocusBasic {
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
|
||||
public class ItemChargeFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.entity.EntityLaser;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.entity.EntityLaser;
|
||||
|
||||
public class ItemExplosionFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package emt.item.focus;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.metatileentity.BaseMetaTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ItemMaintenanceFocus extends ItemBaseFocus {
|
||||
|
||||
private static final AspectList visCost = new AspectList().add(Aspect.FIRE, 2500).add(Aspect.EARTH, 2500)
|
||||
.add(Aspect.ORDER, 2500);
|
||||
|
||||
public ItemMaintenanceFocus() {
|
||||
super("maintenance");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack stack) {
|
||||
return 0xC0C0C0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack focusstack) {
|
||||
return visCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSortingHelper(ItemStack itemstack) {
|
||||
return "MAINTENANCE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack focusstack, int rank) {
|
||||
return new FocusUpgradeType[] { FocusUpgradeType.frugal };
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemStack, World world, EntityPlayer player,
|
||||
MovingObjectPosition mop) {
|
||||
if (mop == null) return itemStack;
|
||||
|
||||
ItemWandCasting wand = (ItemWandCasting) itemStack.getItem();
|
||||
|
||||
if (!world.isRemote) {
|
||||
if (!player.isSneaking()) {
|
||||
return itemStack;
|
||||
}
|
||||
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
if (hatchCandidateTile instanceof BaseMetaTileEntity) {
|
||||
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
|
||||
if (hatchCandidateMetaTile instanceof GT_MetaTileEntity_Hatch_Maintenance) {
|
||||
GT_MetaTileEntity_Hatch_Maintenance hatch = (GT_MetaTileEntity_Hatch_Maintenance) hatchCandidateMetaTile;
|
||||
if (player.capabilities.isCreativeMode
|
||||
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, true)) {
|
||||
hatch.mCrowbar = true;
|
||||
hatch.mScrewdriver = true;
|
||||
hatch.mHardHammer = true;
|
||||
hatch.mSolderingTool = true;
|
||||
hatch.mWrench = true;
|
||||
hatch.mSoftHammer = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
player.swingItem();
|
||||
return itemStack;
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,11 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.entity.EntityShield;
|
||||
import ic2.core.IC2;
|
||||
|
||||
public class ItemShieldFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import java.util.Map.Entry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.FocusUpgradeType;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
|
||||
public class ItemWandChargingFocus extends ItemBaseFocus {
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import ic2.api.item.IElectricItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.blocks.BlockCustomPlant;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
public class ItemElectricHoeGrowth extends ItemHoe implements IElectricItem {
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
public class ItemThorHammer extends ItemSword implements IRepairable {
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.entities.projectile.EntityAlumentum;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.entities.projectile.EntityAlumentum;
|
||||
|
||||
public class ItemThorHammerBroken extends ItemSword implements IRepairable {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package emt.item.tool.chainsaw;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -10,15 +10,15 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXBlockBubble;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
public class ItemStreamChainsaw extends ItemThaumiumChainsaw {
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.entities.EntityFollowingItem;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
public class ItemRockbreakerDrill extends ItemThaumiumDrill {
|
||||
|
||||
|
||||
@@ -11,17 +11,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
|
||||
|
||||
@@ -37,6 +26,16 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMul
|
||||
import gregtech.api.render.TextureFactory;
|
||||
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
import thaumcraft.common.lib.research.ResearchNoteData;
|
||||
import thaumcraft.common.tiles.TileNode;
|
||||
|
||||
public class GT_MetaTileEntity_ResearchCompleter
|
||||
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
|
||||
@@ -132,9 +131,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) {
|
||||
if (aBaseMetaTileEntity.isActive()) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
||||
double xCoord = aBaseMetaTileEntity.getXCoord() + 0.5;
|
||||
double yCoord = aBaseMetaTileEntity.getYCoord() + 0.5;
|
||||
double zCoord = aBaseMetaTileEntity.getZCoord() + 0.5;
|
||||
@@ -167,9 +166,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
syncTimer--;
|
||||
|
||||
IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
int xDir = aBaseMetaTileEntity.getBackFacing().offsetX;
|
||||
int yDir = aBaseMetaTileEntity.getBackFacing().offsetY;
|
||||
int zDir = aBaseMetaTileEntity.getBackFacing().offsetZ;
|
||||
int i = 1;
|
||||
|
||||
// Loop through node spaces and drain them from front to back
|
||||
@@ -331,9 +330,9 @@ public class GT_MetaTileEntity_ResearchCompleter
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
|
||||
boolean aActive, boolean aRedstone) {
|
||||
if (aSide == aFacing) {
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
|
||||
int ColorIndex, boolean aActive, boolean aRedstone) {
|
||||
if (side == facing) {
|
||||
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX),
|
||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE).extFacing().build(),
|
||||
TextureFactory.builder().addIcon(OVERLAY_FRONT_RESEARCH_COMPLETER_ACTIVE_GLOW).extFacing().glow()
|
||||
|
||||
@@ -2,13 +2,13 @@ package emt.tile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.client.fx.ParticleEngine;
|
||||
import thaumcraft.client.fx.particles.FXWisp;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
public class TileElectricCloud extends TileEntity {
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.forge.InvWrapper;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -24,6 +22,7 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import gregtech.api.gui.modularui.GT_UITextures;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class TileEntityEtherealMacerator extends TileEntityEMT
|
||||
implements ISidedInventory, IWrenchable, ITileWithModularUI {
|
||||
|
||||
@@ -8,10 +8,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.forge.InvWrapper;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -27,6 +23,9 @@ import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class TileEntityIndustrialWandRecharge extends TileEntityEMT
|
||||
implements IInventory, IWrenchable, IEnergySink, ITileWithModularUI {
|
||||
|
||||
@@ -13,11 +13,6 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.*;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.drawable.Text;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -40,6 +35,14 @@ import gregtech.api.interfaces.tileentity.IEnergyConnected;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IAspectSource;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.fx.PacketFXEssentiaSource;
|
||||
|
||||
public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory, IAspectContainer, IEssentiaTransport,
|
||||
IHasWorldObjectAndCoords, IEnergyConnected, IBasicEnergyContainer, ITileWithModularUI {
|
||||
@@ -397,7 +400,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
drainEnergyUnits(ForgeDirection.DOWN, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,7 +472,7 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public boolean drainEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage,
|
||||
this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
@@ -511,17 +514,17 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte aSide) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte aSide) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -575,22 +578,22 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public TileEntity getTileEntityAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public TileEntity getTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getTileEntityAtSide(aSide);
|
||||
return getTileEntityAtSide(side);
|
||||
}
|
||||
return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getTileEntity(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -604,12 +607,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSide(byte aSide) {
|
||||
public IInventory getIInventoryAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IInventory getIInventoryAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -624,12 +627,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSide(byte aSide) {
|
||||
public IFluidHandler getITankContainerAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -648,8 +651,8 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(aSide);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(ForgeDirection side) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(side);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -657,8 +660,8 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(side, aDistance);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -676,22 +679,22 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public Block getBlockAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getBlock(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getBlockAtSide(aSide);
|
||||
return getBlockAtSide(side);
|
||||
}
|
||||
return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getBlock(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -705,19 +708,19 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(byte aSide) {
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return (byte) this.worldObj.getBlockMetadata(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(aSide);
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getMetaID(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -731,12 +734,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSide(byte aSide) {
|
||||
public byte getLightLevelAtSide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getLightLevelAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -751,12 +754,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSide(byte aSide) {
|
||||
public boolean getOpacityAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getOpacityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -777,12 +780,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSide(byte aSide) {
|
||||
public boolean getSkyAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getSkyAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -797,13 +800,13 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSide(byte aSide) {
|
||||
return getAirAtSideAndDistance(aSide, 1);
|
||||
public boolean getAirAtSide(ForgeDirection side) {
|
||||
return getAirAtSideAndDistance(side, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSideAndDistance(byte aSide, int aDistance) {
|
||||
return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
public boolean getAirAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return getAir(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -817,18 +820,18 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetX(byte aSide, int aMultiplier) {
|
||||
return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
public int getOffsetX(ForgeDirection side, int aMultiplier) {
|
||||
return this.xCoord + side.offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getOffsetY(byte aSide, int aMultiplier) {
|
||||
return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
public short getOffsetY(ForgeDirection side, int aMultiplier) {
|
||||
return (short) (this.yCoord + side.offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetZ(byte aSide, int aMultiplier) {
|
||||
return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
public int getOffsetZ(ForgeDirection side, int aMultiplier) {
|
||||
return this.zCoord + side.offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -859,12 +862,12 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte b, boolean b1) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side, boolean b1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte b, boolean b1) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side, boolean b1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.tile.DefinitelyNotAIC2Source;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public abstract class TileEntityCompressedGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import emt.init.EMTBlocks;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
// Solar Factory
|
||||
public enum Solars {
|
||||
|
||||
@@ -14,9 +14,6 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
|
||||
import com.gtnewhorizons.modularui.api.ModularUITextures;
|
||||
import com.gtnewhorizons.modularui.api.drawable.Text;
|
||||
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
|
||||
@@ -39,6 +36,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
|
||||
import gregtech.api.net.GT_Packet_Block_Event;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.visnet.VisNetHandler;
|
||||
|
||||
public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IWrenchable, IHasWorldObjectAndCoords,
|
||||
IEnergyConnected, IBasicEnergyContainer, ITileWithModularUI {
|
||||
@@ -389,7 +388,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
drainEnergyUnits(ForgeDirection.DOWN, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +485,7 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean drainEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public boolean drainEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return decreaseStoredEnergyUnits(
|
||||
aVoltage * aAmperage,
|
||||
this.energySource.getEnergyStored() > aVoltage * aAmperage);
|
||||
@@ -528,17 +527,17 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
|
||||
public long injectEnergyUnits(ForgeDirection side, long aVoltage, long aAmperage) {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte aSide) {
|
||||
public boolean inputEnergyFrom(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte aSide) {
|
||||
public boolean outputsEnergyTo(ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -592,22 +591,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public TileEntity getTileEntityAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getTileEntity(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public TileEntity getTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getTileEntityAtSide(aSide);
|
||||
return getTileEntityAtSide(side);
|
||||
}
|
||||
return getTileEntity(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getTileEntity(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -621,12 +620,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSide(byte aSide) {
|
||||
public IInventory getIInventoryAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getIInventoryAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IInventory getIInventoryAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -641,12 +640,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSide(byte aSide) {
|
||||
public IFluidHandler getITankContainerAtSide(ForgeDirection side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public IFluidHandler getITankContainerAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -665,8 +664,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(byte aSide) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(aSide);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSide(ForgeDirection side) {
|
||||
TileEntity tTileEntity = getTileEntityAtSide(side);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -674,8 +673,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(aSide, aDistance);
|
||||
public IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
TileEntity tTileEntity = getTileEntityAtSideAndDistance(side, aDistance);
|
||||
if ((tTileEntity instanceof IGregTechTileEntity)) {
|
||||
return (IGregTechTileEntity) tTileEntity;
|
||||
}
|
||||
@@ -693,22 +692,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSide(byte aSide) {
|
||||
if ((aSide < 0) || (aSide >= 6)) {
|
||||
public Block getBlockAtSide(ForgeDirection side) {
|
||||
if (side == ForgeDirection.UNKNOWN) {
|
||||
return null;
|
||||
}
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return this.worldObj.getBlock(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlockAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getBlockAtSide(aSide);
|
||||
return getBlockAtSide(side);
|
||||
}
|
||||
return getBlock(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getBlock(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -722,19 +721,19 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSide(byte aSide) {
|
||||
int tX = getOffsetX(aSide, 1);
|
||||
int tY = getOffsetY(aSide, 1);
|
||||
int tZ = getOffsetZ(aSide, 1);
|
||||
public byte getMetaIDAtSide(ForgeDirection side) {
|
||||
int tX = getOffsetX(side, 1);
|
||||
int tY = getOffsetY(side, 1);
|
||||
int tZ = getOffsetZ(side, 1);
|
||||
return (byte) this.worldObj.getBlockMetadata(tX, tY, tZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getMetaIDAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
if (aDistance == 1) {
|
||||
return getMetaIDAtSide(aSide);
|
||||
return getMetaIDAtSide(side);
|
||||
}
|
||||
return getMetaID(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
return getMetaID(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -748,12 +747,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSide(byte aSide) {
|
||||
public byte getLightLevelAtSide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLightLevelAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public byte getLightLevelAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -768,12 +767,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSide(byte aSide) {
|
||||
public boolean getOpacityAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOpacityAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getOpacityAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -794,12 +793,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSide(byte aSide) {
|
||||
public boolean getSkyAtSide(ForgeDirection side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSkyAtSideAndDistance(byte aSide, int aDistance) {
|
||||
public boolean getSkyAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -814,13 +813,13 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSide(byte aSide) {
|
||||
return getAirAtSideAndDistance(aSide, 1);
|
||||
public boolean getAirAtSide(ForgeDirection side) {
|
||||
return getAirAtSideAndDistance(side, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getAirAtSideAndDistance(byte aSide, int aDistance) {
|
||||
return getAir(getOffsetX(aSide, aDistance), getOffsetY(aSide, aDistance), getOffsetZ(aSide, aDistance));
|
||||
public boolean getAirAtSideAndDistance(ForgeDirection side, int aDistance) {
|
||||
return getAir(getOffsetX(side, aDistance), getOffsetY(side, aDistance), getOffsetZ(side, aDistance));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -834,18 +833,18 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetX(byte aSide, int aMultiplier) {
|
||||
return this.xCoord + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
|
||||
public int getOffsetX(ForgeDirection side, int aMultiplier) {
|
||||
return this.xCoord + side.offsetX * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getOffsetY(byte aSide, int aMultiplier) {
|
||||
return (short) (this.yCoord + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
|
||||
public short getOffsetY(ForgeDirection side, int aMultiplier) {
|
||||
return (short) (this.yCoord + side.offsetY * aMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffsetZ(byte aSide, int aMultiplier) {
|
||||
return this.zCoord + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
|
||||
public int getOffsetZ(ForgeDirection side, int aMultiplier) {
|
||||
return this.zCoord + side.offsetZ * aMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -876,12 +875,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean outputsEnergyTo(byte b, boolean b1) {
|
||||
public boolean outputsEnergyTo(ForgeDirection b, boolean b1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean inputEnergyFrom(byte b, boolean b1) {
|
||||
public boolean inputEnergyFrom(ForgeDirection b, boolean b1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ public class EMTConfigHandler {
|
||||
public static boolean christmasFocusResearch;
|
||||
public static boolean energyBallFocusResearch;
|
||||
public static boolean shieldFocusResearch;
|
||||
public static boolean maintenanceFocusResearch;
|
||||
public static boolean shieldBlockResearch;
|
||||
public static boolean potentiaGeneratorResearch;
|
||||
public static boolean ignisGeneratorResearch;
|
||||
@@ -390,6 +391,8 @@ public class EMTConfigHandler {
|
||||
christmasFocusResearch = config.get(RESEARCH, "Kris-tmas Focus", false).getBoolean(christmasFocusResearch);
|
||||
energyBallFocusResearch = config.get(RESEARCH, "EnergyBall Focus", false).getBoolean(christmasFocusResearch);
|
||||
shieldFocusResearch = config.get(RESEARCH, "Shield Focus", false).getBoolean(shieldFocusResearch);
|
||||
maintenanceFocusResearch = config.get(RESEARCH, "Maintenance Focus", false)
|
||||
.getBoolean(maintenanceFocusResearch);
|
||||
shieldBlockResearch = config.get(RESEARCH, "Shield Block", false).getBoolean(shieldBlockResearch);
|
||||
potentiaGeneratorResearch = config.get(RESEARCH, "Potentia Generator", false)
|
||||
.getBoolean(potentiaGeneratorResearch);
|
||||
|
||||
@@ -83,6 +83,8 @@ public class EMTCraftingAspects {
|
||||
.add(Aspect.MECHANISM, 32);
|
||||
public static AspectList wandChargeFocus = new AspectList().add(Aspect.ENERGY, 48).add(Aspect.AURA, 32)
|
||||
.add(Aspect.EXCHANGE, 48).add(Aspect.GREED, 64);
|
||||
public static AspectList maintenanceFocus = new AspectList().add(Aspect.CRAFT, 32).add(Aspect.EXCHANGE, 48)
|
||||
.add(Aspect.TOOL, 64).add(Aspect.MAGIC, 64).add(Aspect.MECHANISM, 32).add(Aspect.ENERGY, 32);
|
||||
public static AspectList inventoryChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.CRYSTAL, 32)
|
||||
.add(Aspect.MAGIC, 48);
|
||||
public static AspectList armorChargingRing = new AspectList().add(Aspect.ENERGY, 64).add(Aspect.ARMOR, 32)
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -24,6 +22,8 @@ import emt.init.EMTBlocks;
|
||||
import emt.init.EMTItems;
|
||||
import emt.item.armor.wings.ItemFeatherWing;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.entities.monster.EntityTaintChicken;
|
||||
|
||||
public class EMTEventHandler {
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public class EMTResearchAspects {
|
||||
.add(Aspect.LIFE, 6);
|
||||
public static AspectList shieldFocusResearch = new AspectList().add(Aspect.ARMOR, 5).add(Aspect.AIR, 2)
|
||||
.add(Aspect.CRYSTAL, 3).add(Aspect.TRAP, 2);
|
||||
public static AspectList maintenanceFocus = new AspectList().add(Aspect.MECHANISM, 5).add(Aspect.FIRE, 3)
|
||||
.add(Aspect.ORDER, 3).add(Aspect.ENERGY, 5).add(Aspect.MAGIC, 5).add(Aspect.TOOL, 5);
|
||||
public static AspectList electricGogglesResearch = new AspectList().add(Aspect.ARMOR, 8).add(Aspect.ENERGY, 5)
|
||||
.add(Aspect.SENSES, 6);
|
||||
public static AspectList potentiaGeneratorResearch = new AspectList().add(Aspect.ENERGY, 4).add(Aspect.EXCHANGE, 4)
|
||||
|
||||
@@ -3,12 +3,12 @@ package emt.util;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.api.research.ResearchPage.PageType;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EMTResearchItem extends ResearchItem {
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@ item.EMT.focus.christmas.name=Wand Focus: Kris-tmas
|
||||
item.EMT.focus.shield.name=Wand Focus: Shield
|
||||
item.EMT.focus.charge.name=Wand Focus: Charging
|
||||
item.EMT.focus.chargeWand.name=Wand Focus: Wand Charging
|
||||
item.EMT.focus.maintenance.name=Wand Focus: Maintenance
|
||||
item.EMT.focus.electricCloud.name=Electric Cloud
|
||||
item.EMT.focus.energyBall.name=Energy Ball Focus
|
||||
|
||||
@@ -121,7 +122,7 @@ tile.EMT.essentia.aer.name=Aer Generator
|
||||
tile.EMT.essentia.lucrum.name=Lucrum Generator
|
||||
tile.EMT.machine.wandrecharge.name=Industrial Wand Charging Station
|
||||
tile.EMT.machine.etheralprocessor.name=Ethereal Processor
|
||||
tile.EMT.machine.essentiafiller.name=Essentia Filler
|
||||
tile.EMT.machine.essentiafiller.name=Essentia Filler - Marked for deprecation
|
||||
tile.EMT.solar.compressed.name=Compressed Solar Panel
|
||||
tile.EMT.solar.doublecompressed.name=Double Compressed Solar Panel
|
||||
tile.EMT.solar.triplecompressed.name=Triple Compressed Solar Panel
|
||||
@@ -180,12 +181,12 @@ tile.EMT.Septuple_Compressed_Terra_Solar.name=Septuple Compressed Terra Solar
|
||||
tile.EMT.Octuple_Compressed_Terra_Solar.name=Octuple Compressed Terra Solar
|
||||
|
||||
#===============Gregtech Compat===============
|
||||
EMT_GTBLOCK_CASEING.0.name=Magic Containing Casing
|
||||
EMT_GTBLOCK_CASEING.1.name=Essentia Diffusion Cell
|
||||
EMT_GTBLOCK_CASEING.0.name=Magic Containing Casing - Marked for deprecation
|
||||
EMT_GTBLOCK_CASEING.1.name=Essentia Diffusion Cell - Marked for deprecation
|
||||
EMT_GTBLOCK_CASEING.2.name=Iridium Ruridit Framebox
|
||||
EMT_GTBLOCK_CASEING.3.name=Indium Tungsten Framebox
|
||||
EMT_GTBLOCK_CASEING.4.name=Raw Magic Containing Casing
|
||||
EMT_GTBLOCK_CASEING.5.name=Raw Essentia Diffusion Cell
|
||||
EMT_GTBLOCK_CASEING.5.name=Raw Essentia Diffusion Cell - Marked for deprecation
|
||||
EMT_GTBLOCK_CASEING.7.name=Naquadah Alloy Fusion Casing
|
||||
EMT_GTBLOCK_CASEING.8.name=Bloody Ichorium Fusion Casing
|
||||
EMT_GTBLOCK_CASEING.9.name=Draconium Fusion Casing
|
||||
@@ -251,6 +252,10 @@ emt.rsname.Shield Focus=Shield Focus
|
||||
emt.tag.Shield Focus=S.H.I.E.L.D.
|
||||
emt.text.Shield Focus=With some experimentation with the Portable Hole, you have found out more about the transportation of objects to alternate dimensions. You believe you can reverse these effects to summon a swath of blocks from a dimension full of matter to shield you from any oncoming disaster. Caution is to be taken when using this focus, as when bringing these blocks into our dimension, it will transpose any blocks in the way into the dimension it came from, never to return again. You will also be unable to move while this shield is in existence.
|
||||
|
||||
emt.rsname.Wand Focus: Maintenance=Thaumic Maintenance
|
||||
emt.tag.Wand Focus: Maintenance=Who needs a toolbox when you have magic?
|
||||
emt.text.Wand Focus: Maintenance=After intense study of the supposedly mechanical nature of your apparati, you've finally done it, you've discovered a method allowing the use of vis in repair. <BR> What are a few exploded cleanrooms in the face of sheer progress? Now you can get rid of those dastardly mundane tools...
|
||||
|
||||
emt.rsname.Potentia Generator=Potentia Generator
|
||||
emt.tag.Potentia Generator=Harnessing the power-producing potential of Essentia
|
||||
emt.text.Potentia Generator=After much studying and research, you have finally discovered how to create electricity from your leftover Essentia.<BR><BR>Simply place a Warded Jar containing Potentia in a 8 blocks radius of the machine and it will draw it in to create EU.<BR><BR>While Potentia seems like the most logical choice for producing Essentia with EU, you believe you will be able to generate electricity from different Essentia in the near future with a bit of tinkering.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 522 B |
Reference in new issue
Block a user