mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-25 22:34:31 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e2b2ef941 | ||
|
|
be6fc768f8 | ||
|
|
9a1a1bbf3f | ||
|
|
a97a032210 | ||
|
|
956fb3dca8 | ||
|
|
cf16727366 | ||
|
|
93a0751493 | ||
|
|
14115778d0 | ||
|
|
cb5ba100bf | ||
|
|
6c0f4cffa0 | ||
|
|
91fb7afded | ||
|
|
96d86b67f9 | ||
|
|
0e82f8617b | ||
|
|
cb086bbb11 | ||
|
|
3fa79927a4 | ||
|
|
9ad8b01686 | ||
|
|
3467c41bef | ||
|
|
ac7b3e0b7d | ||
|
|
31cd1cb543 | ||
|
|
860162cb6f | ||
|
|
16c7a830a6 | ||
|
|
dccd62b33a |
No files matched your search
+3
-1
@@ -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
|
||||
@@ -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
|
||||
+8
-1
@@ -10,6 +10,11 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
ext.configFile = file "build.properties"
|
||||
configFile.withReader {
|
||||
def prop = new Properties()
|
||||
@@ -24,7 +29,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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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.1
|
||||
mod_name=ElectroMagicTools
|
||||
Binary file not shown.
BIN
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;
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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).
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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,102 @@
|
||||
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.world.World;
|
||||
|
||||
public class BlockReflectedGen
|
||||
extends BlockBaseContainer
|
||||
{
|
||||
private int subtypes;
|
||||
public static short Set;
|
||||
|
||||
public BlockReflectedGen(String name, short Set)
|
||||
{
|
||||
super(name, Material.iron, soundTypeMetal, 16, 4.0F);
|
||||
this.Set = Set;
|
||||
if (Set * 16 < TileEntityReflexionGen.L.size()) {
|
||||
this.subtypes = 16;
|
||||
} else {
|
||||
this.subtypes = (-(TileEntityReflexionGen.L.size() - Set * 16));
|
||||
}
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
if (meta + Set * 16 < TileEntityReflexionGen.L.size()) {
|
||||
return TileEntityReflexionGen.Gens[(meta + 16 * Set)];
|
||||
}
|
||||
return TileEntityReflexionGen.Gens[(meta + 16 * (Set - 1))];
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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.storage/1000) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000000) + "/" + (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) {
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
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.storage > 0)
|
||||
{
|
||||
int l = this.tileentity.gaugeEnergyScaled(33);
|
||||
drawTexturedModalRect(h + 18, k + 23, 195, 0, l, 14);
|
||||
}
|
||||
if (this.tileentity.generating>0)
|
||||
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.storage/1000) + "/" + (this.tileentity.maxstorage/1000) +"kEU", 36, 22, 0);
|
||||
else if (10000000 <= this.tileentity.maxstorage && this.tileentity.maxstorage < 1000000000)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000) + "/" + (this.tileentity.maxstorage/1000000) +"MEU", 36, 22, 0);
|
||||
else if (1000000000 <= this.tileentity.maxstorage)
|
||||
this.fontRendererObj.drawString(storageString + (this.tileentity.storage/1000000000) + "/" + (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,132 @@
|
||||
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 int storage;
|
||||
public int fuel;
|
||||
public int generating;
|
||||
|
||||
public ConainerGenerator(InventoryPlayer inventoryplayer, TileEntityBaseGenerator tileentity)
|
||||
{
|
||||
this.storage = 0;
|
||||
this.fuel = 0;
|
||||
this.tileentity = tileentity;
|
||||
/* for (int j = 0; j < 4; j++) {
|
||||
addSlotToContainer(new Slot(this.tileentity, j, 17 + j * 18, 59));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int k = 0; k < 9; k++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, k + i * 9 + 9, 17 + k * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 9; j++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, j, 17 + j * 18, 144));
|
||||
}
|
||||
|
||||
addSlotToContainer(new Slot(this.tileentity, 5, 17 + 7 * 18, 59));*/
|
||||
}
|
||||
|
||||
public void addCraftingToCrafters(ICrafting icrafting)
|
||||
{
|
||||
super.addCraftingToCrafters(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
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, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
icrafting.sendProgressBarUpdate(this, 2, this.tileentity.fuel);
|
||||
}
|
||||
|
||||
this.generating = (int) this.tileentity.generating;
|
||||
this.tileentity.storage = ((int)this.tileentity.energySource.getEnergyStored());
|
||||
}
|
||||
|
||||
public void updateProgressBar(int i, int j)
|
||||
{
|
||||
if (i == 0) {
|
||||
this.tileentity.generating = j;
|
||||
}
|
||||
if (i == 1) {
|
||||
if (j<this.tileentity.maxstorage)
|
||||
this.tileentity.storage = j;
|
||||
else
|
||||
this.tileentity.storage=this.tileentity.maxstorage;
|
||||
}
|
||||
if (i == 2) {
|
||||
this.tileentity.fuel=j;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
|
||||
{
|
||||
int slot = par2;
|
||||
ItemStack stack = null;
|
||||
|
||||
Slot slotObject = (Slot)this.inventorySlots.get(par2);
|
||||
if ((slotObject != null) && (slotObject.getHasStack()))
|
||||
{
|
||||
ItemStack stackInSlot = slotObject.getStack();
|
||||
stack = stackInSlot.copy();
|
||||
if ((slot >= 0) && (slot <= 3))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 4, 40, true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if ((slot >= 4) && (slot < 31))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 4, false)) {
|
||||
if (!mergeItemStack(stackInSlot, 31, 40, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((slot >= 31) && (slot < 39))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
if (stackInSlot.stackSize == 0) {
|
||||
slotObject.putStack(null);
|
||||
} else {
|
||||
slotObject.onSlotChanged();
|
||||
}
|
||||
if (stack.stackSize != stackInSlot.stackSize) {
|
||||
slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
detectAndSendChanges();
|
||||
return this.tileentity.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
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.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerSolars
|
||||
extends Container
|
||||
{
|
||||
private TileEntitySolarBase tileentity;
|
||||
public int storage;
|
||||
|
||||
public ContainerSolars(InventoryPlayer inventoryplayer, TileEntitySolarBase tileentity)
|
||||
{
|
||||
this.storage = 0;
|
||||
this.tileentity = tileentity;
|
||||
/* for (int j = 0; j < 4; j++) {
|
||||
addSlotToContainer(new Slot(this.tileentity, j, 17 + j * 18, 59));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int k = 0; k < 9; k++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, k + i * 9 + 9, 17 + k * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 9; j++) {
|
||||
addSlotToContainer(new Slot(inventoryplayer, j, 17 + j * 18, 144));
|
||||
}
|
||||
|
||||
addSlotToContainer(new Slot(this.tileentity, 5, 17 + 7 * 18, 59));*/
|
||||
}
|
||||
|
||||
public void addCraftingToCrafters(ICrafting icrafting)
|
||||
{
|
||||
super.addCraftingToCrafters(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) this.tileentity.generating);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
}
|
||||
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
float help = (float) (this.tileentity.generating*1000);
|
||||
for (int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting)this.crafters.get(i);
|
||||
|
||||
icrafting.sendProgressBarUpdate(this, 0, (int) help);
|
||||
icrafting.sendProgressBarUpdate(this, 1, this.tileentity.storage);
|
||||
}
|
||||
this.tileentity.storage = ((int)this.tileentity.energySource.getEnergyStored());
|
||||
}
|
||||
|
||||
public void updateProgressBar(int i, int j)
|
||||
{
|
||||
if (i == 0) {
|
||||
float help = (float)j;
|
||||
this.tileentity.generating = help/1000;
|
||||
}
|
||||
if (i == 1) {
|
||||
if (j<this.tileentity.maxstorage)
|
||||
this.tileentity.storage = j;
|
||||
else
|
||||
this.tileentity.storage=(int) this.tileentity.maxstorage;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
|
||||
{
|
||||
int slot = par2;
|
||||
ItemStack stack = null;
|
||||
|
||||
Slot slotObject = (Slot)this.inventorySlots.get(par2);
|
||||
if ((slotObject != null) && (slotObject.getHasStack()))
|
||||
{
|
||||
ItemStack stackInSlot = slotObject.getStack();
|
||||
stack = stackInSlot.copy();
|
||||
if ((slot >= 0) && (slot <= 3))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 4, 40, true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if ((slot >= 4) && (slot < 31))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 4, false)) {
|
||||
if (!mergeItemStack(stackInSlot, 31, 40, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((slot >= 31) && (slot < 39))
|
||||
{
|
||||
if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!mergeItemStack(stackInSlot, 0, 30, false)) {
|
||||
return null;
|
||||
}
|
||||
if (stackInSlot.stackSize == 0) {
|
||||
slotObject.putStack(null);
|
||||
} else {
|
||||
slotObject.onSlotChanged();
|
||||
}
|
||||
if (stack.stackSize != stackInSlot.stackSize) {
|
||||
slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
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");
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package emt.client.renderer;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import emt.EMT;
|
||||
import emt.entity.EntityShield;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -9,10 +14,6 @@ import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
public class RenderShield extends Render {
|
||||
private static final ResourceLocation shieldTexture = new ResourceLocation(EMT.TEXTURE_PATH, "textures/models/shield.png");
|
||||
|
||||
Loaded 100 of 171 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user