Moved -> Files & Fixed API

This screws up the history tab but save me soo much time
This commit is contained in:
Rseifert 2013-02-02 19:36:19 -05:00
parent a57f3f9268
commit 3c0a93ed22
121 changed files with 80 additions and 181 deletions

181
.gitignore vendored
View file

@ -1,163 +1,20 @@
################# *.bat
## Eclipse *.sh
################# *.db
*.exe
/*/
LICENSE.txt
CHANGELOG
*.pydevproject !/src/
.project /src/minecraft/*
.metadata !/src/minecraft/liquidmechanics/
bin/ !/resources/
tmp/ !/models/
*.tmp !info.txt
*.bak !AssemblyLineStandard.xml
*.swp !publish.bat
*~.nib !publish_obf.bat
local.properties !include.bat
.classpath !buildlocal.bat
.settings/ !/README
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
#################
## Visual Studio
#################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover
## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
# ReSharper is a .NET coding add-in
_ReSharper*
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
############
## Windows
############
# Windows image file caches
Thumbs.db
# Folder config file
Desktop.ini
#############
## Python
#############
*.py[co]
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
# Mac crap
.DS_Store

1
buildnumber.txt Normal file
View file

@ -0,0 +1 @@
14

14
info.txt Normal file
View file

@ -0,0 +1,14 @@
@ Fluid-Mechanics_v0.2.4.1.jar Fluid-Mechanics_v0.2.4.1_api.zip
@ Fluid-Mechanics_v0.2.4.2.jar Fluid-Mechanics_v0.2.4.2_api.zip
@ Fluid-Mechanics_v0.2.5.3.jar Fluid-Mechanics_v0.2.5.3_api.zip
@ Fluid-Mechanics_v0.2.5.4.jar Fluid-Mechanics_v0.2.5.4_api.zip
@ Fluid-Mechanics_v0.2.5.5.jar Fluid-Mechanics_v0.2.5.5_api.zip
x Fluid-Mechanics_v0.2.5.6.jar Fluid-Mechanics_v0.2.5.6_api.zip
@ Fluid-Mechanics_v0.2.5.7.jar Fluid-Mechanics_v0.2.5.7_api.zip
@ Fluid-Mechanics_v0.2.5.8.jar Fluid-Mechanics_v0.2.5.8_api.zip
@ Fluid-Mechanics_v0.2.5.9.jar Fluid-Mechanics_v0.2.5.9_api.zip
@ Fluid-Mechanics_v0.2.5.10.jar Fluid-Mechanics_v0.2.5.10_api.zip
@ Fluid-Mechanics_v0.2.5.11.jar Fluid-Mechanics_v0.2.5.11_api.zip
@ Fluid-Mechanics_v0.2.6.12.jar Fluid-Mechanics_v0.2.6.12_api.zip
@ Fluid-Mechanics_v0.2.6.13.jar Fluid-Mechanics_v0.2.6.13_api.zip
* Fluid-Mechanics_v0.2.6.14.jar Fluid-Mechanics_v0.2.6.14_api.zip

1
modversion.txt Normal file
View file

@ -0,0 +1 @@
0.2.6

1
recommendedversion.txt Normal file
View file

@ -0,0 +1 @@
0.2.6

View file

@ -4,6 +4,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.logging.Logger;
import cpw.mods.fml.common.FMLLog;
import liquidmechanics.api.helpers.ColorCode; import liquidmechanics.api.helpers.ColorCode;
@ -26,50 +29,61 @@ public class LiquidHandler
public static LiquidData waste; public static LiquidData waste;
public static LiquidData milk; public static LiquidData milk;
// public static LiquidData oil; TODO add public static Logger FMLog = Logger.getLogger("LiquidHandler");
// public static LiquidData fuel;
/** /**
* Called to add the default liquids to the allowed list * Called to add the default liquids to the allowed list
*/ */
public static void addDefaultLiquids() public static void addDefaultLiquids()
{ {
FMLog.setParent(FMLLog.getLogger());
water = new LiquidData("water", LiquidDictionary.getOrCreateLiquid("Water", new LiquidStack(Block.waterStill, 1)), ColorCode.BLUE, false, 60); water = new LiquidData("water", LiquidDictionary.getOrCreateLiquid("Water", new LiquidStack(Block.waterStill, 1)), ColorCode.BLUE, false, 60);
allowedLiquids.add(water); allowedLiquids.add(water);
lava = new LiquidData("Lava", LiquidDictionary.getOrCreateLiquid("Lava", new LiquidStack(Block.lavaStill, 1)), ColorCode.RED, false, 40); lava = new LiquidData("Lava", LiquidDictionary.getOrCreateLiquid("Lava", new LiquidStack(Block.lavaStill, 1)), ColorCode.RED, false, 40);
allowedLiquids.add(lava); allowedLiquids.add(lava);
unkown = new LiquidData("Unknown", LiquidDictionary.getOrCreateLiquid("Unknown", new LiquidStack(20, 1)), ColorCode.NONE, false, 32); unkown = new LiquidData("Unknown", LiquidDictionary.getOrCreateLiquid("Unknown", new LiquidStack(20, 1)), ColorCode.NONE, false, 32);
allowedLiquids.add(unkown); allowedLiquids.add(unkown);
for(LiquidData data : allowedLiquids)
{
FMLog.info(data.getName() + " registered as a liquid");
}
} }
@ForgeSubscribe @ForgeSubscribe
public void liquidRegisterEvent(LiquidRegisterEvent event) public void liquidRegisterEvent(LiquidDictionary.LiquidRegisterEvent event)
{ {
// TODO use this to add new liquid types to the data list // TODO use this to add new liquid types to the data list
// or something along the lines of IDing liquids for use // or something along the lines of IDing liquids for use
FMLog.info("LiquidRegistered: "+event.Name);
FMLog.setParent(FMLLog.getLogger());
if (event.Name.equalsIgnoreCase("methane")) if (event.Name.equalsIgnoreCase("methane"))
{ {
this.allowedLiquids.add(new LiquidData("methane", event.Liquid, ColorCode.LIME, true, 100)); allowedLiquids.add(new LiquidData("methane", event.Liquid, ColorCode.LIME, true, 100));
} }
else if (event.Name.equalsIgnoreCase("oil")) else if (event.Name.equalsIgnoreCase("oil"))
{ {
this.allowedLiquids.add(new LiquidData("oil", event.Liquid, ColorCode.BLACK, true, 50)); allowedLiquids.add(new LiquidData("oil", event.Liquid, ColorCode.BLACK, true, 50));
} }
else if (event.Name.equalsIgnoreCase("fuel")) else if (event.Name.equalsIgnoreCase("fuel"))
{ {
this.allowedLiquids.add(new LiquidData("fuel", event.Liquid, ColorCode.YELLOW, true, 50)); allowedLiquids.add(new LiquidData("fuel", event.Liquid, ColorCode.YELLOW, true, 50));
} }
else if (event.Name.equalsIgnoreCase("steam")) else if (event.Name.equalsIgnoreCase("steam"))
{ {
this.steam = new LiquidData("steam", event.Liquid, ColorCode.ORANGE, true, 100); steam = new LiquidData("steam", event.Liquid, ColorCode.ORANGE, true, 100);
}else if(event.Name.equalsIgnoreCase("Waste")) }else if(event.Name.equalsIgnoreCase("Waste"))
{ {
this.waste = new LiquidData("Waste", event.Liquid, ColorCode.BROWN, false, 40); waste = new LiquidData("Waste", event.Liquid, ColorCode.BROWN, false, 40);
this.allowedLiquids.add(waste); allowedLiquids.add(waste);
}else if(event.Name.equalsIgnoreCase("Milk")) }else if(event.Name.equalsIgnoreCase("Milk"))
{ {
this.milk = new LiquidData("Milk", event.Liquid, ColorCode.WHITE, false, 50); milk = new LiquidData("Milk", event.Liquid, ColorCode.WHITE, false, 50);
this.allowedLiquids.add(milk); allowedLiquids.add(milk);
FMLog.warning("FluidMechanics: Milk has been registered");
} }
} }

View file

@ -1,6 +1,7 @@
package liquidmechanics.common; package liquidmechanics.common;
import java.io.File; import java.io.File;
import java.util.logging.Logger;
import liquidmechanics.api.helpers.ColorCode; import liquidmechanics.api.helpers.ColorCode;
import liquidmechanics.api.liquids.LiquidData; import liquidmechanics.api.liquids.LiquidData;
@ -40,6 +41,7 @@ import net.minecraftforge.oredict.ShapedOreRecipe;
import universalelectricity.prefab.TranslationHelper; import universalelectricity.prefab.TranslationHelper;
import universalelectricity.prefab.network.PacketManager; import universalelectricity.prefab.network.PacketManager;
import cpw.mods.fml.common.DummyModContainer; import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Init;
@ -66,7 +68,7 @@ public class LiquidMechanics extends DummyModContainer
public static final String VERSION = "0.2.6"; public static final String VERSION = "0.2.6";
// Constants // Constants
public static final String NAME = "Liquid Mechanics"; public static final String NAME = "LiquidMechanics";
public static final String CHANNEL = "liquidMech"; public static final String CHANNEL = "liquidMech";
public static final String PATH = "/liquidmechanics/"; public static final String PATH = "/liquidmechanics/";
@ -104,13 +106,18 @@ public class LiquidMechanics extends DummyModContainer
@Instance(NAME) @Instance(NAME)
public static LiquidMechanics instance; public static LiquidMechanics instance;
public static Logger FMLog = Logger.getLogger(NAME);
@PreInit @PreInit
public void preInit(FMLPreInitializationEvent event) public void preInit(FMLPreInitializationEvent event)
{ {
FMLog.setParent(FMLLog.getLogger());
FMLog.info(this.NAME+": Initializing...");
MinecraftForge.EVENT_BUS.register(new LiquidHandler());
instance = this; instance = this;
CONFIGURATION.load(); CONFIGURATION.load();
// Blocks // Blocks
blockPipe = new BlockPipe(this.CONFIGURATION.getBlock("Pipes", BLOCK_ID_PREFIX).getInt()); blockPipe = new BlockPipe(this.CONFIGURATION.getBlock("Pipes", BLOCK_ID_PREFIX).getInt());
blockMachine = new BlockPumpMachine(this.CONFIGURATION.getBlock("Machines", BLOCK_ID_PREFIX + 1).getInt()); blockMachine = new BlockPumpMachine(this.CONFIGURATION.getBlock("Machines", BLOCK_ID_PREFIX + 1).getInt());
@ -141,11 +148,14 @@ public class LiquidMechanics extends DummyModContainer
GameRegistry.registerBlock(blockMachine, ItemLiquidMachine.class, "lmMachines"); GameRegistry.registerBlock(blockMachine, ItemLiquidMachine.class, "lmMachines");
GameRegistry.registerBlock(blockTank, ItemTank.class, "lmTank"); GameRegistry.registerBlock(blockTank, ItemTank.class, "lmTank");
GameRegistry.registerBlock(blockSink, "lmSink"); GameRegistry.registerBlock(blockSink, "lmSink");
} }
@Init @Init
public void Init(FMLInitializationEvent event) public void Init(FMLInitializationEvent event)
{ {
FMLog.info(this.NAME+": Loading...");
proxy.Init(); proxy.Init();
// TileEntities // TileEntities
GameRegistry.registerTileEntity(TileEntityPipe.class, "lmPipeTile"); GameRegistry.registerTileEntity(TileEntityPipe.class, "lmPipeTile");
@ -155,14 +165,15 @@ public class LiquidMechanics extends DummyModContainer
GameRegistry.registerTileEntity(TileEntityTank.class, "lmTank"); GameRegistry.registerTileEntity(TileEntityTank.class, "lmTank");
GameRegistry.registerTileEntity(TileEntityGenerator.class, "lmGen"); GameRegistry.registerTileEntity(TileEntityGenerator.class, "lmGen");
GameRegistry.registerTileEntity(TileEntitySink.class, "lmSink"); GameRegistry.registerTileEntity(TileEntitySink.class, "lmSink");
System.out.println("Fluid Mechanics Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " Languages."); FMLog.info("Fluid Mechanics Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " Languages.");
MinecraftForge.EVENT_BUS.register(LiquidHandler.class);
} }
@PostInit @PostInit
public void PostInit(FMLPostInitializationEvent event) public void PostInit(FMLPostInitializationEvent event)
{ {
FMLog.info(this.NAME+": Finalizing...");
proxy.postInit(); proxy.postInit();
TabLiquidMechanics.setItemStack(new ItemStack(blockPipe, 1, 4)); TabLiquidMechanics.setItemStack(new ItemStack(blockPipe, 1, 4));
// generator // generator
@ -309,8 +320,9 @@ public class LiquidMechanics extends DummyModContainer
OreDictionary.registerOre("bronzeTube", new ItemStack(itemParts, 1, Parts.Bronze.ordinal())); OreDictionary.registerOre("bronzeTube", new ItemStack(itemParts, 1, Parts.Bronze.ordinal()));
OreDictionary.registerOre("unfinishedTank", new ItemStack(itemParts, 1, Parts.Tank.ordinal())); OreDictionary.registerOre("unfinishedTank", new ItemStack(itemParts, 1, Parts.Tank.ordinal()));
// add Default Liquids to current list, done last to let other mods use // add Default Liquids to current list, done last to let other mods use
// there liquid data first if used // there liquid data first if used
LiquidHandler.addDefaultLiquids();
LiquidStack waste = LiquidDictionary.getOrCreateLiquid("Waste", new LiquidStack(LiquidMechanics.blockWasteLiquid, 1)); LiquidStack waste = LiquidDictionary.getOrCreateLiquid("Waste", new LiquidStack(LiquidMechanics.blockWasteLiquid, 1));
LiquidHandler.addDefaultLiquids();
FMLog.info(this.NAME+": Done Loading");
} }
} }

View file

@ -98,7 +98,6 @@ public class TileEntityPipe extends TileEntity implements ITankContainer, IReadO
} }
else else
{ {
stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true); stored.drain(((ITankContainer) connectedBlocks[i]).fill(dir.getOpposite(), stack, true), true);
} }
} }

View file

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 771 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 706 B

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

View file

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 643 B

View file

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

View file

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 791 B

View file

Before

Width:  |  Height:  |  Size: 932 B

After

Width:  |  Height:  |  Size: 932 B

View file

Before

Width:  |  Height:  |  Size: 933 B

After

Width:  |  Height:  |  Size: 933 B

View file

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 921 B

View file

Before

Width:  |  Height:  |  Size: 945 B

After

Width:  |  Height:  |  Size: 945 B

View file

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 939 B

View file

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 952 B

View file

Before

Width:  |  Height:  |  Size: 946 B

After

Width:  |  Height:  |  Size: 946 B

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 938 B

View file

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

View file

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 928 B

View file

Before

Width:  |  Height:  |  Size: 796 B

After

Width:  |  Height:  |  Size: 796 B

View file

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 930 B

View file

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 942 B

View file

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 919 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Some files were not shown because too many files have changed in this diff Show more