mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-21 04:22:09 +00:00
Essentia Gen update 2.0
+ changed Generators outputting GTEU + renamed "tileentityperditiogenerator" -> "tileentitylucrumgenerator" + created WiP autogeneratedgens (not working, disabled atm)
This commit is contained in:
1 parent
9a1a1bbf3f
commit
be6fc768f8
18 files changed
+1198
-548
No files matched your search
@@ -5,47 +5,49 @@ import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class TileEntityEMT extends TileEntity {
|
||||
|
||||
public int facing;
|
||||
public boolean isOn;
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound) {
|
||||
super.readFromNBT(tagCompound);
|
||||
|
||||
facing = tagCompound.getInteger("facing");
|
||||
isOn = tagCompound.getBoolean("isOn");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
tagCompound.setInteger("facing", facing);
|
||||
tagCompound.setBoolean("isOn", isOn);
|
||||
super.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbt);
|
||||
return packet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
readFromNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
super.markDirty();
|
||||
if (worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
public class TileEntityEMT
|
||||
extends TileEntity
|
||||
{
|
||||
public int facing;
|
||||
public boolean isOn;
|
||||
|
||||
public void readFromNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
super.readFromNBT(tagCompound);
|
||||
|
||||
this.facing = tagCompound.getInteger("facing");
|
||||
this.isOn = tagCompound.getBoolean("isOn");
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
tagCompound.setInteger("facing", this.facing);
|
||||
tagCompound.setBoolean("isOn", this.isOn);
|
||||
super.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
public final Packet getDescriptionPacket()
|
||||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
return packet;
|
||||
}
|
||||
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
|
||||
{
|
||||
NBTTagCompound nbt = pkt.func_148857_g();
|
||||
readFromNBT(nbt);
|
||||
}
|
||||
|
||||
public void markDirty()
|
||||
{
|
||||
super.markDirty();
|
||||
if (this.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAerGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAerGenerator() {
|
||||
aspect = Aspect.AIR;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.aer.name");
|
||||
}
|
||||
}
|
||||
public class TileEntityAerGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityAerGenerator()
|
||||
{
|
||||
super(Aspect.AIR);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityArborGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityArborGenerator() {
|
||||
aspect = Aspect.TREE;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.arbor.name");
|
||||
}
|
||||
public class TileEntityArborGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityArborGenerator()
|
||||
{
|
||||
super(Aspect.TREE);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityAuramGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityAuramGenerator() {
|
||||
aspect = Aspect.AURA;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.auram.name");
|
||||
}
|
||||
public class TileEntityAuramGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityAuramGenerator()
|
||||
{
|
||||
super(Aspect.AURA);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,17 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTConfigHandler;
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public abstract class TileEntityCompressedGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityCompressedGenerator(Aspect aspect)
|
||||
{
|
||||
super(aspect);
|
||||
this.energySource = new BasicSource(this, 1000000.0D, 3);
|
||||
this.energySource.setCapacity(EMTConfigHandler.EssentiaGeneratorStorage * 10.0D);
|
||||
this.maxfuel *= 10;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityIgnisGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityIgnisGenerator() {
|
||||
aspect = Aspect.FIRE;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.ignis.name");
|
||||
}
|
||||
public class TileEntityIgnisGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityIgnisGenerator()
|
||||
{
|
||||
super(Aspect.FIRE);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityLucrumGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityLucrumGenerator() {
|
||||
aspect = Aspect.GREED;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.lucrum.name");
|
||||
}
|
||||
public class TileEntityLucrumGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityLucrumGenerator()
|
||||
{
|
||||
super(Aspect.GREED);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityPotentiaGenerator extends TileEntityBaseGenerator {
|
||||
|
||||
public TileEntityPotentiaGenerator() {
|
||||
aspect = Aspect.ENERGY;
|
||||
generating = EMTEssentiasOutputs.outputs.get(aspect.getTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return StatCollector.translateToLocal("tile.EMT.essentia.potentia.name");
|
||||
}
|
||||
public class TileEntityPotentiaGenerator
|
||||
extends TileEntityBaseGenerator
|
||||
{
|
||||
public TileEntityPotentiaGenerator()
|
||||
{
|
||||
super(Aspect.ENERGY);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package emt.tile.generator;
|
||||
|
||||
import emt.util.EMTEssentiasOutputs;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class TileEntityReflexionGen
|
||||
{
|
||||
public static List L = new ArrayList(EMTEssentiasOutputs.outputs.keySet());
|
||||
public static Class<? extends TileEntity>[] GensS = new Class[L.size()];
|
||||
public static TileEntityBaseGenerator[] Gens = new TileEntityBaseGenerator[L.size()];
|
||||
|
||||
public TileEntityReflexionGen()
|
||||
{
|
||||
for (int i = 0; i < L.size(); i++)
|
||||
{
|
||||
GensS[i] = TileEntityBaseGenerator.class;
|
||||
Gens[i] = new TileEntityBaseGenerator((Aspect)Aspect.aspects.get(L.get(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user