Compare commits

..
25 Commits
Author SHA1 Message Date
bartimaeusnek 63f04556e2 fixed weird behavior of GUIs due to short Overflows
fixed Aqua Infused Gen not working underwater
did some changes to the reflected gens, still don't work.
2018-07-21 20:23:27 +02:00
Namikon d229201b90 SignJar 2018-05-03 23:35:22 +02:00
bartimaeusnek 5869418115 LV -> HV scribing tools
https://github.com/GTNewHorizons/NewHorizons/issues/2752
2018-03-25 14:34:15 +02:00
LOKKO12 2e2b2ef941 + Solar rework
+ update to Java 8
+ added GUI for Solars (in different colors)
+ changed Terra/Aer solar beeing dynamic (from y=5 to y=220|x1 to x3)
+ changed Ordo/Perditio solar generating at night/day (x0.75/x2)
+ changed Aqua solar generation (x1 at day, x2 under water, x3 while rain x6 while thunderstorm)
+ changed Ignis solar generation (x1 at day, x2 in Nether, x3 when fed with 10Ignis Centivis)
+ version number increase (1.2.7.0 -> 1.2.7.1)
2018-03-02 17:33:19 +01:00
LOKKO12 be6fc768f8 Essentia Gen update 2.0
+ changed Generators outputting GTEU
+ renamed "tileentityperditiogenerator" -> "tileentitylucrumgenerator"
+ created WiP autogeneratedgens (not working, disabled atm)
2018-02-26 21:22:00 +01:00
Martin Robertz 9a1a1bbf3f Essentia gen rework (#6)
+Added GUI for Essentia Gens
+Added Essentia Pipe Support for Essentia Gens
+Added Tooltip for Essentia Gens
+Added CFG for Essentia Gen EU Storage
+Added Lucrum Gen with Infusion Recipe, Thaumonomicon Entry etc.
+Updated ru_RU.lang (ty Cinobi)
+Added WiP de_DE.lang
+Removed unused .java
+Added Essentia Storage for Essentia Gens
+Rescaled Ticktime for Essentia Gens to 20Ticks(was 30Tick before)
+Version number increase
2018-02-21 14:12:11 +01:00
Martin Robertz a97a032210 Merge pull request #5 from GTNewHorizons/oneRingRework
Redid some stuff on the one ring, mostly to prevent problems with pla…
2018-02-07 20:38:57 +01:00
Namikon 956fb3dca8 Redid some stuff on the one ring, mostly to prevent problems with player profiles. 2018-02-07 12:49:17 +01:00
Martin Robertz cf16727366 Merge pull request #4 from GTNewHorizons/devBootsFix
Possible solution for GTNewHorizons/NewHorizons#2535
2018-01-31 17:38:31 +01:00
Namikon 93a0751493 Possible solution for GTNewHorizons/NewHorizons#2535 2018-01-31 12:15:54 +01:00
Dream-Master 14115778d0 removed unused imports 2017-07-24 13:01:19 +02:00
Dream-Master cb5ba100bf unused import remove. Jenkins not building 2017-06-16 09:40:42 +02:00
fewizz 6c0f4cffa0 Close #35 , Close #36 2017-06-15 19:01:02 +02:00
fewizz 91fb7afded Close #35 , Close #36 2017-06-14 11:17:28 +03:00
Hazeev Aidar 96d86b67f9 Merge pull request #33 from GTNewHorizons/master
Make Wings have so much Eu Charge then IC2 Armor
2017-06-14 09:40:12 +03:00
Daniel 0e82f8617b Poison instead? 2017-05-29 09:16:30 +02:00
Daniel cb086bbb11 Well it never incremented it. 2017-05-29 09:00:19 +02:00
Daniel 3fa79927a4 that should remain 2017-05-29 08:55:01 +02:00
Daniel 9ad8b01686 Remove invincibility. 2017-05-29 07:31:17 +02:00
Technus 3467c41bef Merge branch 'master' of https://github.com/GTNewHorizons/Electro-Magic-Tools
# Conflicts:
#	src/api/java/baubles/api/package-info.java
2017-01-15 21:29:11 +01:00
Technus ac7b3e0b7d rework 2017-01-15 21:28:06 +01:00
Technus 31cd1cb543 Revert "optimize imports"
This reverts commit 62438e890a.
2017-01-15 20:26:57 +01:00
Dream-Master 860162cb6f this should work !? 2017-01-15 17:55:14 +01:00
Dream-Master 16c7a830a6 This should work 2017-01-15 17:30:44 +01:00
Martin Robertz dccd62b33a Update README.md 2017-01-15 16:30:56 +01:00
173 changed files with 3639 additions and 810 deletions

No files matched your search

+3 -1
View File
@@ -1,3 +1,4 @@
/bin/
#General use .gitignore for Minecraft modding.
#Folders
@@ -25,6 +26,7 @@
*.classpath
*.project
*.lock
*.log
#Specific files
MCFPost.txt
@@ -42,4 +44,4 @@ Thumbs.db
#Vim backups
*~
*.bat
*.bat
+7 -1
View File
@@ -19,4 +19,10 @@ Before posting to the issue tracker, make sure you meet the following criteria:
- You've gone through the effort to isolate EMT from other mods that aren't related to the issue.
- You've gone through the effort to find what conditions are necessary to reproduce the issue.
- The issue is subtle enough and has been around long enough that you think we might have missed it.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
- You speak English or Russian well enough to explain yourself without wondering whether you will be understood.
# Fork
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 Branch.
The up-to-date Master branch can be found on our Jenkins:
http://jenkins.usrv.de
+24 -1
View File
@@ -9,6 +9,12 @@ buildscript {
}
apply plugin: 'forge'
apply plugin: 'signing'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.configFile = file "build.properties"
configFile.withReader {
@@ -24,7 +30,9 @@ archivesBaseName = config.mod_name
minecraft {
version = config.mc_version + "-" + config.forge_version + "-" + config.mc_version
runDir = "run"
replaceIn "EMT.java"
replace "@version@", config.mod_version
if (project.hasProperty('mappings_version'))
mappings = project.mappings_version
}
@@ -61,4 +69,19 @@ tasks.build.dependsOn sourceJar, deobfJar
tasks.withType(JavaCompile) { task ->
task.options.encoding = 'UTF-8'
}
task signJar(dependsOn: 'reobf'){
doLast {
ant.signjar(
destDir: jar.destinationDir,
jar: jar.getArchivePath(),
alias: findProperty('keyStoreAlias') ?: '',
keystore: findProperty('keyStore') ?: '',
storepass: findProperty('keyStorePass') ?: '',
digestalg: findProperty('signDigestAlg') ?: '',
tsaurl: findProperty('signTSAurl') ?: '',
verbose: true
)
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
package_group=emt
mc_version=1.7.10
forge_version=10.13.4.1614
mod_version=1.2.6.5
mod_version=1.2.7.1a
mod_name=ElectroMagicTools
+1 -1
View File
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
Binary file not shown.
@@ -1,2 +1,3 @@
@API(apiVersion = "1.7.10-1.0.1.5", owner = "Baubles", provides = "Baubles|API") package baubles.api;
import cpw.mods.fml.common.API;
+5 -4
View File
@@ -1,12 +1,13 @@
package ic2.api;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
import java.util.Set;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Represents the 6 possible directions along the axis of a block.
*/
+5 -4
View File
@@ -1,9 +1,5 @@
package ic2.api.crops;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -11,6 +7,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* Base agriculture crop.
*
+6 -4
View File
@@ -1,13 +1,15 @@
package ic2.api.crops;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Collection;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.BiomeDictionary.Type;
import java.util.Collection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.BiomeDictionary.Type;
/**
* General management of the crop system.
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.crops;
import cpw.mods.fml.common.API;
@@ -2,6 +2,7 @@ package ic2.api.energy;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -1,9 +1,11 @@
package ic2.api.energy.event;
import ic2.api.energy.tile.IEnergyTile;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.event.world.WorldEvent;
import ic2.api.energy.tile.IEnergyTile;
/**
* Base class for energy net events, don't use it directly.
*
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.energy.event;
import cpw.mods.fml.common.API;
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.energy;
import cpw.mods.fml.common.API;
@@ -1,16 +1,19 @@
package ic2.api.energy.prefab;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
import ic2.api.energy.event.EnergyTileLoadEvent;
import ic2.api.energy.event.EnergyTileUnloadEvent;
import ic2.api.energy.tile.IEnergySink;
import ic2.api.info.Info;
import ic2.api.item.ElectricItem;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
/**
* BasicSink is a simple adapter to provide an ic2 energy sink.
@@ -1,17 +1,20 @@
package ic2.api.energy.prefab;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
import ic2.api.energy.EnergyNet;
import ic2.api.energy.event.EnergyTileLoadEvent;
import ic2.api.energy.event.EnergyTileUnloadEvent;
import ic2.api.energy.tile.IEnergySource;
import ic2.api.info.Info;
import ic2.api.item.ElectricItem;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
/**
* BasicSource is a simple adapter to provide an ic2 energy source.
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.energy.prefab;
import cpw.mods.fml.common.API;
@@ -1,6 +1,7 @@
package ic2.api.energy.tile;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -1,6 +1,7 @@
package ic2.api.energy.tile;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
/**
@@ -1,9 +1,9 @@
package ic2.api.energy.tile;
import net.minecraft.tileentity.TileEntity;
import java.util.List;
import net.minecraft.tileentity.TileEntity;
/**
* Interface for grouping multi-block structures to a single energy net delegate.
*
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.energy.tile;
import cpw.mods.fml.common.API;
@@ -1,9 +1,11 @@
package ic2.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraftforge.event.world.WorldEvent;
@Cancelable
+3 -1
View File
@@ -1,10 +1,12 @@
package ic2.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraftforge.event.world.WorldEvent;
/**
+3 -1
View File
@@ -1,7 +1,9 @@
package ic2.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraftforge.event.world.WorldEvent;
@Cancelable
@@ -1,8 +1,10 @@
package ic2.api.event;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraftforge.event.world.WorldEvent;
@Cancelable
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.event;
import cpw.mods.fml.common.API;
+3 -2
View File
@@ -1,9 +1,10 @@
package ic2.api.info;
import net.minecraft.potion.Potion;
import net.minecraft.util.DamageSource;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.LoaderState;
import net.minecraft.potion.Potion;
import net.minecraft.util.DamageSource;
public class Info {
public static IEnergyValueProvider itemEnergy;
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.info;
import cpw.mods.fml.common.API;
+2 -2
View File
@@ -1,10 +1,10 @@
package ic2.api.item;
import net.minecraft.item.ItemStack;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack;
/**
* Allows for charging, discharging and using electric items (IElectricItem).
*/
+2 -2
View File
@@ -1,9 +1,9 @@
package ic2.api.item;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
public interface IItemHudInfo {
/*
Add Info to Nano- and Quantum-Suit Helm Hud
+3 -2
View File
@@ -1,9 +1,10 @@
package ic2.api.item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
/**
* Interface used for Items that can be processed in the Turning Table
+3 -2
View File
@@ -1,11 +1,12 @@
package ic2.api.item;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
/**
* Wrapper for inserting interfaces into items you don't own.
*
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.item;
import cpw.mods.fml.common.API;
@@ -1,11 +1,11 @@
package ic2.api.network;
import java.lang.reflect.Method;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import java.lang.reflect.Method;
/**
* Provides methods to initiate events and synchronize tile entity fields in SMP.
*
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.network;
import cpw.mods.fml.common.API;
+2
View File
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api;
import cpw.mods.fml.common.API;
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.reactor;
import cpw.mods.fml.common.API;
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import java.util.Map;
import net.minecraft.item.ItemStack;
public interface ICannerBottleRecipeManager {
/**
* Adds a recipe to the machine.
@@ -1,10 +1,11 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import java.util.Map;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public interface ICannerEnrichRecipeManager {
/**
* Adds a recipe to the machine.
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraftforge.fluids.Fluid;
import java.util.Map;
import net.minecraftforge.fluids.Fluid;
public interface IFluidHeatManager extends ILiquidAcceptManager {
/**
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraftforge.fluids.Fluid;
import java.util.Set;
import net.minecraftforge.fluids.Fluid;
public interface ILiquidAcceptManager {
boolean acceptsFluid(Fluid fluid);
Set<Fluid> getAcceptedFluids();
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraftforge.fluids.Fluid;
import java.util.Map;
import net.minecraftforge.fluids.Fluid;
public interface ILiquidHeatExchangerManager extends ILiquidAcceptManager {
/**
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
/**
* Recipe manager interface for basic lists.
*
@@ -1,10 +1,10 @@
package ic2.api.recipe;
import java.util.Map;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import java.util.Map;
/**
* Recipe manager interface for basic machines.
*
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
public interface IPatternStorage {
boolean addPattern(ItemStack itemstack);
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
public interface IRecipeInput {
/**
* Check if subject matches this recipe input, ignoring the amount.
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import java.util.Map;
import net.minecraft.item.ItemStack;
public interface IScrapboxManager {
void addDrop(ItemStack drop, float rawChance);
@@ -1,9 +1,9 @@
package ic2.api.recipe;
import net.minecraftforge.fluids.Fluid;
import java.util.Map;
import net.minecraftforge.fluids.Fluid;
public interface ISemiFluidFuelManager extends ILiquidAcceptManager {
/**
@@ -1,14 +1,15 @@
package ic2.api.recipe;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import java.util.List;
public class RecipeInputFluidContainer implements IRecipeInput {
public RecipeInputFluidContainer(Fluid fluid) {
this(fluid, FluidContainerRegistry.BUCKET_VOLUME);
@@ -1,11 +1,12 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.Arrays;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class RecipeInputItemStack implements IRecipeInput {
public RecipeInputItemStack(ItemStack aInput) {
this(aInput, aInput.stackSize);
@@ -1,13 +1,14 @@
package ic2.api.recipe;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class RecipeInputOreDict implements IRecipeInput {
public RecipeInputOreDict(String input1) {
this(input1, 1);
@@ -1,12 +1,12 @@
package ic2.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public final class RecipeOutput {
public RecipeOutput(NBTTagCompound metadata1, List<ItemStack> items1) {
assert !items1.contains(null);
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.recipe;
import cpw.mods.fml.common.API;
@@ -1,10 +1,10 @@
package ic2.api.tile;
import net.minecraft.block.Block;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.block.Block;
/**
* Blocks on this whitelist will not resist an explosion but won't be destroyed.
*
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.tile;
import cpw.mods.fml.common.API;
@@ -1,2 +1,4 @@
@API(apiVersion="1.0", owner="IC2", provides="IC2API")
package ic2.api.util;
import cpw.mods.fml.common.API;
+2 -2
View File
@@ -1,11 +1,11 @@
package thaumcraft.api;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import java.util.ArrayList;
public interface IArchitect {
/**
+1 -1
View File
@@ -1,9 +1,9 @@
package thaumcraft.api;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.FMLLog;
/**
* @author Azanor
+16 -8
View File
@@ -1,5 +1,11 @@
package thaumcraft.api;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.EntityPlayer;
@@ -11,17 +17,19 @@ import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.*;
import thaumcraft.api.crafting.CrucibleRecipe;
import thaumcraft.api.crafting.InfusionEnchantmentRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.api.crafting.ShapedArcaneRecipe;
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
import thaumcraft.api.internal.DummyInternalMethodHandler;
import thaumcraft.api.internal.IInternalMethodHandler;
import thaumcraft.api.internal.WeightedRandomLoot;
import thaumcraft.api.research.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import thaumcraft.api.research.IScanEventHandler;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchCategoryList;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
/**
@@ -1,5 +1,8 @@
package thaumcraft.api;
import java.util.HashMap;
import java.util.Iterator;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@@ -16,9 +19,6 @@ import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.aspects.IEssentiaTransport;
import java.util.HashMap;
import java.util.Iterator;
public class ThaumcraftApiHelper {
public static AspectList cullTags(AspectList temp) {
@@ -1,13 +1,14 @@
package thaumcraft.api.aspects;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.commons.lang3.text.WordUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.commons.lang3.text.WordUtils;
public class Aspect {
String tag;
@@ -1,13 +1,13 @@
package thaumcraft.api.aspects;
import java.io.Serializable;
import java.util.LinkedHashMap;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import thaumcraft.api.ThaumcraftApiHelper;
import java.io.Serializable;
import java.util.LinkedHashMap;
public class AspectList implements Serializable {
public LinkedHashMap<Aspect,Integer> aspects = new LinkedHashMap<Aspect,Integer>();//aspects associated with this object
@@ -1,10 +1,10 @@
package thaumcraft.api.aspects;
import cpw.mods.fml.common.FMLLog;
import java.lang.reflect.Method;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import java.lang.reflect.Method;
import cpw.mods.fml.common.FMLLog;
public class AspectSourceHelper {
@@ -1,6 +1,7 @@
package thaumcraft.api.aspects;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
/**
*
@@ -1,13 +1,13 @@
package thaumcraft.api.crafting;
import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import java.util.ArrayList;
public class CrucibleRecipe {
private ItemStack recipeOutput;
@@ -1,5 +1,9 @@
package thaumcraft.api.crafting;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
@@ -9,10 +13,6 @@ import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
public class InfusionEnchantmentRecipe
{
@@ -1,5 +1,7 @@
package thaumcraft.api.crafting;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -7,8 +9,6 @@ import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import java.util.ArrayList;
public class InfusionRecipe
{
protected AspectList aspects;
@@ -1,5 +1,8 @@
package thaumcraft.api.crafting;
import java.util.ArrayList;
import java.util.HashMap;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -10,9 +13,6 @@ import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import java.util.ArrayList;
import java.util.HashMap;
public class ShapedArcaneRecipe implements IArcaneRecipe
{
//Added in for future ease of change, but hard coded for now.
@@ -1,5 +1,8 @@
package thaumcraft.api.crafting;
import java.util.ArrayList;
import java.util.Iterator;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -10,9 +13,6 @@ import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
import java.util.ArrayList;
import java.util.Iterator;
public class ShapelessArcaneRecipe implements IArcaneRecipe
{
private ItemStack output = null;
@@ -1,10 +1,10 @@
package thaumcraft.api.internal;
import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandom;
import java.util.ArrayList;
public class WeightedRandomLoot extends WeightedRandom.Item {
@@ -1,3 +1,4 @@
@API(owner = "Thaumcraft", apiVersion = "4.2.2.0", provides = "Thaumcraft|API")
package thaumcraft.api;
import cpw.mods.fml.common.API;
@@ -1,7 +1,5 @@
package thaumcraft.api.potions;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -9,6 +7,8 @@ import net.minecraft.potion.Potion;
import net.minecraft.util.ResourceLocation;
import thaumcraft.api.damagesource.DamageSourceThaumcraft;
import thaumcraft.api.entities.ITaintedMob;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PotionFluxTaint extends Potion
{
@@ -1,11 +1,11 @@
package thaumcraft.api.potions;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.Potion;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PotionVisExhaust extends Potion
{
@@ -1,13 +1,15 @@
package thaumcraft.api.research;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.logging.log4j.Level;
import java.util.Collection;
import java.util.LinkedHashMap;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.logging.log4j.Level;
import cpw.mods.fml.common.FMLLog;
public class ResearchCategories {
//Research
@@ -1,10 +1,10 @@
package thaumcraft.api.research;
import net.minecraft.util.ResourceLocation;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.util.ResourceLocation;
public class ResearchCategoryList {
/** Is the smallest column used on the GUI. */
@@ -1,5 +1,7 @@
package thaumcraft.api.research;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
@@ -11,8 +13,6 @@ import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.crafting.InfusionEnchantmentRecipe;
import thaumcraft.api.crafting.InfusionRecipe;
import java.util.List;
public class ResearchPage {
public static enum PageType
{
@@ -1,13 +1,13 @@
package thaumcraft.api.visnet;
import thaumcraft.api.TileThaumcraft;
import thaumcraft.api.WorldCoordinates;
import thaumcraft.api.aspects.Aspect;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import thaumcraft.api.TileThaumcraft;
import thaumcraft.api.WorldCoordinates;
import thaumcraft.api.aspects.Aspect;
/**
* @author Azanor
*
@@ -1,5 +1,9 @@
package thaumcraft.api.visnet;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.util.Vec3;
@@ -9,10 +13,6 @@ import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.WorldCoordinates;
import thaumcraft.api.aspects.Aspect;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
public class VisNetHandler {
// NODE DRAINING
@@ -2,7 +2,9 @@ package thaumcraft.api.wands;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.apache.logging.log4j.LogManager;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
@@ -1,7 +1,9 @@
package thaumcraft.api.wands;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.text.DecimalFormat;
import java.util.LinkedHashMap;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -16,10 +18,8 @@ import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import java.text.DecimalFormat;
import java.util.LinkedHashMap;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemFocusBasic extends Item {
@@ -1,12 +1,12 @@
package thaumcraft.api.wands;
import java.util.LinkedHashMap;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import thaumcraft.api.aspects.Aspect;
import java.util.LinkedHashMap;
import java.util.List;
/**
* This class is used to keep the material information for the various caps.
* It is also used to generate the wand recipes ingame.
@@ -1,10 +1,10 @@
package thaumcraft.api.wands;
import java.util.LinkedHashMap;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import java.util.LinkedHashMap;
/**
*
* @author Azanor
@@ -1,14 +1,14 @@
package thaumcraft.api.wands;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
/**
* This class serves a similar function to IWandable in that it allows wands to interact
* with object in the world. In this case it is most useful for adding interaction with non-mod
+88 -72
View File
@@ -9,6 +9,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.EventBus;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;
@@ -18,7 +19,12 @@ import emt.init.EMTResearches;
import emt.init.Registry;
import emt.network.PacketEMTKeys;
import emt.proxy.CommonProxy;
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;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.LogManager;
@@ -31,75 +37,85 @@ import org.apache.logging.log4j.Logger;
guiFactory = EMT.GUI_FACTORY,
dependencies = EMT.DEPENDS
)
public class EMT {
public static final String NAME = "Electro-Magic Tools";
public static final String MOD_ID = "EMT";
public static final String VERSION = "1.2.6.4";
public static final String TEXTURE_PATH = "emt";
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
public static final String CHANNEL = "EMT";
public static final String DEPENDS = "required-after:Thaumcraft ; required-after:IC2";
@SidedProxy(
clientSide = CLIENT_PROXY,
serverSide = COMMON_PROXY
)
public static CommonProxy proxy;
public static final CreativeTabs TAB = new EMTCreativeTab(MOD_ID + ".creativeTab");
public static final Logger LOGGER = LogManager.getLogger(NAME);
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(CHANNEL);
@Instance(MOD_ID)
public static EMT instance;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
LOGGER.info("Starting planning the world domination");
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
if(FMLCommonHandler.instance().getSide().isClient())
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
Registry.register();
EMTEssentiasOutputs.addPrimalOutputs();
EMTEssentiasOutputs.addOutputs();
registerPackets();
LOGGER.info("Planning complete");
}
@EventHandler
public void load(FMLInitializationEvent event) {
LOGGER.info("Gathering allies");
LOGGER.info("Loading the proxies");
proxy.load();
LOGGER.info("Making mobs drop additional items");
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
if(FMLCommonHandler.instance().getSide().isClient())
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
LOGGER.info("Adding dungeon loot");
EMTDungeonChestGenerator.generateLoot();
LOGGER.info("Registering entities");
EMTEntities.registerEMTEntities();
LOGGER.info("Registering the GUI Handler");
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
LOGGER.info("Allies gathered.");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
LOGGER.info("Starting the world takeover");
Registry.registerLate();
EMTResearches.register();
LOGGER.info("World takeover complete. Enjoy!");
}
@EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
event.registerServerCommand(new CommandOutputs());
}
public void registerPackets() {
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
}
public class EMT
{
public static final String NAME = "Electro-Magic Tools";
public static final String MOD_ID = "EMT";
public static final String VERSION = "@version@";
public static final String TEXTURE_PATH = "emt";
public static final String GUI_FACTORY = "emt.client.gui.config.EMTGuiFactory";
public static final String CLIENT_PROXY = "emt.proxy.ClientProxy";
public static final String COMMON_PROXY = "emt.proxy.CommonProxy";
public static final String CHANNEL = "EMT";
public static final String DEPENDS = "required-after:Thaumcraft ; required-after:IC2; required-after:gregtech";
@SidedProxy(clientSide="emt.proxy.ClientProxy", serverSide="emt.proxy.CommonProxy")
public static CommonProxy proxy;
public static final CreativeTabs TAB = new EMTCreativeTab("EMT.creativeTab");
public static final Logger LOGGER = LogManager.getLogger("Electro-Magic Tools");
public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("EMT");
@Mod.Instance("EMT")
public static EMT instance;
public boolean isSimulating()
{
return !FMLCommonHandler.instance().getEffectiveSide().isClient();
}
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
LOGGER.info("Starting planning the world domination|start preinit");
EMTConfigHandler.init(event.getSuggestedConfigurationFile());
FMLCommonHandler.instance().bus().register(new EMTEventHandler());
if (FMLCommonHandler.instance().getSide().isClient()) {
FMLCommonHandler.instance().bus().register(new EMTClientEventHandler());
}
Registry.registerPreInit();
EMTEssentiasOutputs.addPrimalOutputs();
EMTEssentiasOutputs.addOutputs();
registerPackets();
LOGGER.info("Planning complete|end preinit");
}
@Mod.EventHandler
public void load(FMLInitializationEvent event)
{
LOGGER.info("Execute the plan|start init");
Registry.registerInit();
//LOGGER.info("Gathering allies");
//LOGGER.info("Loading the proxies");
proxy.load();
//LOGGER.info("Making mobs drop additional items");
MinecraftForge.EVENT_BUS.register(new EMTEventHandler());
if (FMLCommonHandler.instance().getSide().isClient()) {
MinecraftForge.EVENT_BUS.register(new EMTClientEventHandler());
}
//LOGGER.info("Adding dungeon loot");
EMTDungeonChestGenerator.generateLoot();
//LOGGER.info("Registering entities");
EMTEntities.registerEMTEntities();
//LOGGER.info("Registering the GUI Handler");
NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);
LOGGER.info("Allies gathered.|end init");
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
LOGGER.info("Starting the world takeover|start postinit");
Registry.registerLate();
EMTResearches.register();
LOGGER.info("World takeover complete. Enjoy!|end postinit");
}
@Mod.EventHandler
public void onFMLServerStart(FMLServerStartingEvent event)
{
event.registerServerCommand(new CommandOutputs());
}
public void registerPackets()
{
INSTANCE.registerMessage(PacketEMTKeys.class, PacketEMTKeys.class, 0, Side.SERVER);
}
}
@@ -1,5 +1,7 @@
package emt.block;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
@@ -14,8 +16,6 @@ import net.minecraft.world.World;
import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXSparkle;
import java.util.Random;
public class BlockElectricCloud extends BlockBase {
public IIcon icon;
@@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntitySmokeFX;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -19,8 +20,10 @@ import java.util.Random;
public class BlockEssentiaGenerators extends BlockBaseContainer {
private static int subtypes=6;
public BlockEssentiaGenerators(String name) {
super(name, Material.iron, soundTypeMetal, 5, 4.0F);
super(name, Material.iron, soundTypeMetal, subtypes, 4.0F);
}
@Override
@@ -29,7 +32,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
super.registerBlockIcons(ir);
this.blockIcon = ir.registerIcon(EMT.TEXTURE_PATH + ":machines/top");
for (int meta = 0; meta < 5; meta++) {
for (int meta = 0; meta < subtypes; meta++) {
iconSets[meta].top = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
iconSets[meta].bottom = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/top");
iconSets[meta].side = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/side");
@@ -40,6 +43,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
iconSets[2].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/auramfront");
iconSets[3].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/arborfront");
iconSets[4].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
iconSets[5].frontOff = ir.registerIcon(EMT.TEXTURE_PATH + ":essentiagenerator/aerfront");
}
@SideOnly(Side.CLIENT)
@@ -49,6 +53,7 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
list.add(new ItemStack(id, 1, 2));
list.add(new ItemStack(id, 1, 3));
list.add(new ItemStack(id, 1, 4));
list.add(new ItemStack(id, 1, 5));
}
@Override
@@ -64,6 +69,8 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
return new TileEntityArborGenerator();
case 4:
return new TileEntityAerGenerator();
case 5:
return new TileEntityLucrumGenerator();
}
return super.createTileEntity(world, meta);
}
@@ -82,4 +89,19 @@ public class BlockEssentiaGenerators extends BlockBaseContainer {
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3)
{
if (player.isSneaking()) {
return false;
}
if (world.isRemote) {
return true;
}
TileEntity tileentity = world.getTileEntity(i, j, k);
if (tileentity != null) {
player.openGui(emt.EMT.instance, 1, world, i, j, k);
}
return true;
}
}
+9 -8
View File
@@ -1,11 +1,10 @@
package emt.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.tile.TileEntityEtherealMacerator;
import emt.tile.TileEntityIndustrialWandRecharge;
import ic2.api.item.IC2Items;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -18,9 +17,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.tile.TileEntityEtherealMacerator;
import emt.tile.TileEntityIndustrialWandRecharge;
public class BlockMachines extends BlockBaseContainer {
@@ -0,0 +1,111 @@
package emt.block;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import emt.EMT;
import emt.tile.generator.TileEntityBaseGenerator;
import emt.tile.generator.TileEntityReflexionGen;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntitySmokeFX;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
public class BlockReflectedGen
extends BlockBaseContainer
{
private int subtypes;
private static int overalltypes = TileEntityReflexionGen.L.size();
public static short Set;
private int[] posInList;
public BlockReflectedGen(String name, short Set)
{
super(name, Material.iron, soundTypeMetal, 16, 4.0F);
this.Set = Set;
this.subtypes = 16;
if ((Set*16) > overalltypes)
subtypes= ((Set-1)*16)+overalltypes-((Set-1)*16);
posInList= new int[subtypes];
if ((Set*16) < overalltypes)
for (int i=0; i<subtypes;++i) {
posInList[i]=(Set*16)+i;
}
else if ((Set*16) > overalltypes)
for (int i=0; i<subtypes;++i) {
posInList[i]=((Set-1)*16)+overalltypes-((Set-1)*16)+i;
}
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister ir)
{
super.registerBlockIcons(ir);
this.blockIcon = ir.registerIcon("emt:machines/top");
for (int meta = 0; meta < this.subtypes; meta++)
{
this.iconSets[meta].top = ir.registerIcon("emt:essentiagenerator/top");
this.iconSets[meta].bottom = ir.registerIcon("emt:essentiagenerator/top");
this.iconSets[meta].side = ir.registerIcon("emt:essentiagenerator/side");
}
for (int i = 0; i < this.subtypes; i++) {
this.iconSets[i].frontOff = ir.registerIcon("emt:essentiagenerator/side");
}
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item id, CreativeTabs tab, List list)
{
for (int i = 0; i < this.subtypes; i++) {
list.add(new ItemStack(id, 1, i));
}
}
public TileEntity createTileEntity(World world, int meta)
{
return TileEntityReflexionGen.Gens[posInList[meta]];
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random random)
{
TileEntityBaseGenerator te = (TileEntityBaseGenerator)world.getTileEntity(x, y, z);
if (te.isActive)
{
int color = te.aspect.getColor();
float r = (color >> 16 & 0xFF) / 255.0F;
float g = (color >> 8 & 0xFF) / 255.0F;
float b = (color & 0xFF) / 255.0F;
EntitySmokeFX fx = new EntitySmokeFX(world, x + 0.5F, y + 1.1D, z + 0.5F, 0.0D, 0.1D, 0.0D, 3.0F);
fx.setRBGColorF(r, g, b);
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3)
{
if (player.isSneaking()) {
return false;
}
if (world.isRemote) {
return true;
}
TileEntity tileentity = world.getTileEntity(i, j, k);
if (tileentity != null) {
player.openGui(EMT.instance, 1, world, i, j, k);
}
return true;
}
}
+17
View File
@@ -28,6 +28,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -223,4 +224,20 @@ public class BlockSolars extends BlockBaseContainer {
world.removeTileEntity(x, y, z);
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int s, float f1, float f2, float f3)
{
if (player.isSneaking()) {
return false;
}
if (world.isRemote) {
return true;
}
TileEntity tileentity = world.getTileEntity(i, j, k);
if (tileentity != null) {
player.openGui(emt.EMT.instance, 1, world, i, j, k);
}
return true;
}
}
+2 -1
View File
@@ -1,9 +1,10 @@
package emt.client;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.client.registry.ClientRegistry;
import emt.util.EMTTextHelper;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
public class EMTKeys {
public static KeyBinding keyUnequip;
@@ -1,15 +1,16 @@
package emt.client.gui;
import emt.EMT;
import emt.client.gui.container.ContainerEtheralMacerator;
import emt.tile.TileEntityEtherealMacerator;
import emt.util.EMTTextHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import emt.EMT;
import emt.client.gui.container.ContainerEtheralMacerator;
import emt.tile.TileEntityEtherealMacerator;
import emt.util.EMTTextHelper;
public class GuiEtherealMacerator extends GuiContainer {
public GuiEtherealMacerator(InventoryPlayer inventory, TileEntityEtherealMacerator te) {
@@ -0,0 +1,75 @@
package emt.client.gui;
import emt.EMT;
import emt.client.gui.container.ConainerGenerator;
import emt.tile.generator.TileEntityBaseGenerator;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GuiGenerator extends GuiContainer {
private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/generator.png");
TileEntityBaseGenerator tileentity;
private boolean allowUserInput;
private int xSize;
private int ySize;
public GuiGenerator(InventoryPlayer invPlayer, TileEntityBaseGenerator entity) {
super(new ConainerGenerator(invPlayer, entity));
this.tileentity = entity;
this.allowUserInput = false;
this.xSize = 194;
this.ySize = 168;
}
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]);
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
this.fontRendererObj.drawStringWithShadow(formatPanelName, nmPos, 7, 6618118);
String storageString = I18n.format("emt.Storage", new Object[0]);
String fuel=I18n.format("emt.Fuel", new Object[0]);
if (this.tileentity.maxstorage<1000)
this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage +"EU", 36, 22, 0);
else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000)
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage/1000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
else if (1000000000 <= this.tileentity.maxstorage)
this.fontRendererObj.drawString(storageString + (this.tileentity.mpshownstroage/1000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0);
if(this.tileentity.isActive)
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating/20/20)+" EU/t", 36, 35, 0);
else
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"0 EU/t",36, 35, 0);
this.fontRendererObj.drawString(fuel+": "+Integer.toString(this.tileentity.fuel),36,48,0);
this.fontRendererObj.drawString(fuel+"/t: "+Integer.toString((this.tileentity.fuel*20*20)-this.tileentity.tick),36,63,0);
}
@Override
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
// GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(tex);
int h = (this.width - this.xSize) / 2;
int k = (this.height - this.ySize) / 2;
drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize);
if (this.tileentity.storage > 0)
{
int l = this.tileentity.gaugeEnergyScaled(33);
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
}
if (this.tileentity.fuel > 0)
{
int l = this.tileentity.gaugeFuelScaled(33);
drawTexturedModalRect(h + 18, k + 42, 195, 0, l, 14);
}
}
}
@@ -1,15 +1,16 @@
package emt.client.gui;
import emt.EMT;
import emt.client.gui.container.ContainerIndustrialWandRecharge;
import emt.tile.TileEntityIndustrialWandRecharge;
import emt.util.EMTTextHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import emt.EMT;
import emt.client.gui.container.ContainerIndustrialWandRecharge;
import emt.tile.TileEntityIndustrialWandRecharge;
import emt.util.EMTTextHelper;
public class GuiIndustrialWandRecharger extends GuiContainer {
public GuiIndustrialWandRecharger(InventoryPlayer inventory, TileEntityIndustrialWandRecharge te) {
+118
View File
@@ -0,0 +1,118 @@
package emt.client.gui;
import org.lwjgl.opengl.GL11;
import emt.EMT;
import emt.client.gui.container.ConainerGenerator;
import emt.client.gui.container.ContainerSolars;
import emt.tile.generator.TileEntityBaseGenerator;
import emt.tile.solar.TileEntitySolarBase;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GuiSolar extends GuiContainer {
private static ResourceLocation tex = new ResourceLocation(EMT.TEXTURE_PATH, "textures/guis/solar.png");
TileEntitySolarBase tileentity;
private boolean allowUserInput;
private int xSize;
private int ySize;
private String color;
private int cColor;
public GuiSolar(InventoryPlayer invPlayer, TileEntitySolarBase entity) {
super(new ContainerSolars(invPlayer, entity));
this.tileentity = entity;
this.allowUserInput = false;
this.xSize = 194;
this.ySize = 168;
}
@Override
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
color = this.tileentity.getInventoryName().replaceAll("Solar", "").replaceAll("Compressed", "").replaceAll("Triple", "").replaceAll("Double", "").trim();
if (color != null)
switch (color)
{
case "Aer": {
GL11.glColor4f(1.0f, 0.86f, 0.0f, 1.0f);
break;
}
case "Terra": {
GL11.glColor4f(0.0f, 0.66f, 0.08f, 1.0f);
cColor=8224255;
break;
}
case "Ordo": {
GL11.glColor4f(0.8f, 0.8f, 0.8f, 1.0f);
break;
}
case "Perditio": {
GL11.glColor4f(0.33F, 0.33F, 0.33F, 1.0F);
break;
}
case "Ignis": {
GL11.glColor4f(0.82f, 0.11f, 0.11f, 1.0f);
break;
}
case "Aqua": {
GL11.glColor4f(0.27f, 0.65f, 1.0f, 1.0f);
break;
}
default: {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
break;
}
}
else
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(tex);
int h = (this.width - this.xSize) / 2;
int k = (this.height - this.ySize) / 2;
drawTexturedModalRect(h, k, 0, 0, this.xSize, this.ySize);
if (this.tileentity.mp_storage > 0)
{
int l = this.tileentity.gaugeEnergyScaled(33);
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
}
if (this.tileentity.generating>9)
drawTexturedModalRect(h + 18, k + 42, 195, 20, 11, 14);
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
String formatPanelName = I18n.format(this.tileentity.getInventoryName(), new Object[0]);
int nmPos = (this.xSize - this.fontRendererObj.getStringWidth(formatPanelName)) / 2;
if(!color.equals("Terra"))
this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, 6618118);
else
this.fontRendererObj.drawStringWithShadow(formatPanelName, 0, 7, cColor);
String storageString = I18n.format("emt.Storage", new Object[0]);
if (this.tileentity.maxstorage<1000)
this.fontRendererObj.drawString(storageString + this.tileentity.storage + "/" + this.tileentity.maxstorage +"EU", 36, 22, 0);
else if (10000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 10000000)
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage/1000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
else if (1000000000 <= this.tileentity.maxstorage)
this.fontRendererObj.drawString(storageString + (this.tileentity.mp_storage/1000000) + "/" + (this.tileentity.maxstorage/1000000000) +"GEU", 36, 22, 0);
if(this.tileentity.isActive)
if (Double.toString(this.tileentity.generating).length()>5)
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating).substring(0, 4)+" EU/t", 36, 35, 0);
else
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+Double.toString(this.tileentity.generating)+" EU/t", 36, 35, 0);
else
this.fontRendererObj.drawString(I18n.format("emt.Generating",new Object[0])+"0 EU/t",36, 35, 0);
}
}
@@ -8,12 +8,12 @@ import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.ConfigElement;
import static emt.util.EMTConfigHandler.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import static emt.util.EMTConfigHandler.*;
public class EMTGuiConfig extends GuiConfig {
public EMTGuiConfig(GuiScreen parentScreen) {
@@ -0,0 +1,68 @@
package emt.client.gui.container;
import emt.tile.generator.TileEntityBaseGenerator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ConainerGenerator
extends Container
{
private TileEntityBaseGenerator tileentity;
public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity)
{
this.tileentity = tileentity;
}
public void addCraftingToCrafters(ICrafting icrafting)
{
super.addCraftingToCrafters(icrafting);
icrafting.sendProgressBarUpdate(this, 0, (short) (this.tileentity.generating/400));
icrafting.sendProgressBarUpdate(this, 1, (byte) this.tileentity.fuel);
icrafting.sendProgressBarUpdate(this, 2, (short) this.tileentity.mpshownstroage);
}
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.crafters.size(); i++)
{
ICrafting icrafting = (ICrafting)this.crafters.get(i);
icrafting.sendProgressBarUpdate(this, 0, (short) (this.tileentity.generating/400));
icrafting.sendProgressBarUpdate(this, 1, (byte) this.tileentity.fuel);
icrafting.sendProgressBarUpdate(this, 2, (short) (this.tileentity.storage/1000));
}
}
public void updateProgressBar(int i, int j)
{
if (i == 0) {
this.tileentity.generating = (((int)j)*400);
}
if (i == 1) {
this.tileentity.fuel=((byte) j);
}
if (i == 2) {
this.tileentity.mpshownstroage=(short) j;
}
}
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
{
return null;
}
public boolean canInteractWith(EntityPlayer entityplayer)
{
this.detectAndSendChanges();
return this.tileentity.isUseableByPlayer(entityplayer);
}
}
@@ -0,0 +1,72 @@
package emt.client.gui.container;
import emt.tile.solar.TileEntitySolarBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.item.ItemStack;
public class ContainerSolars
extends Container
{
private TileEntitySolarBase tileentity;
public ContainerSolars(InventoryPlayer inventoryplayer, TileEntitySolarBase tileentity)
{
this.tileentity = tileentity;
}
public void addCraftingToCrafters(ICrafting icrafting)
{
super.addCraftingToCrafters(icrafting);
icrafting.sendProgressBarUpdate(this, 0, (short) this.tileentity.generating);
icrafting.sendProgressBarUpdate(this, 1, (short) this.tileentity.mp_storage);
}
public void detectAndSendChanges()
{
super.detectAndSendChanges();
short help = 0;
if (this.tileentity.generating < 326D && this.tileentity.generating > 9D)
help = (short) (this.tileentity.generating*100*-1);
else
help = (short) (this.tileentity.generating);
for (int i = 0; i < this.crafters.size(); i++)
{
ICrafting icrafting = (ICrafting)this.crafters.get(i);
icrafting.sendProgressBarUpdate(this, 0, help);
icrafting.sendProgressBarUpdate(this, 1, (short) (this.tileentity.energySource.getEnergyStored()/1000));
}
}
public void updateProgressBar(int i, int j)
{
if (i == 0) {
if (j < 0) {
double help= j;
help=help/100*-1;
this.tileentity.generating = help;
}
else
this.tileentity.generating=j;
}
if (i == 1) {
this.tileentity.mp_storage = (short) (j);
}
}
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
{
return null;
}
public boolean canInteractWith(EntityPlayer entityplayer)
{
this.detectAndSendChanges();
return this.tileentity.isUseableByPlayer(entityplayer);
}
}
@@ -1,7 +1,5 @@
package emt.client.renderer;
import emt.EMT;
import emt.entity.EntityLaser;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
@@ -9,6 +7,9 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import emt.EMT;
import emt.entity.EntityLaser;
public class RenderLaser extends Render {
private static final ResourceLocation laserTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/lasermodel.png");
Loaded 100 of 173 files, more files were not shown because too many files have changed in this diff. Show more