From 34bcc8d0685f2fa03c86e95b3eb30d47cac40562 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Mon, 25 Aug 2014 08:03:03 -0400 Subject: [PATCH] Updated IC2 API --- src/api/java/ic2/api/Direction.class | Bin 0 -> 3908 bytes src/api/java/ic2/api/Direction.java | 16 +- src/api/java/ic2/api/crops/BaseSeed.class | Bin 0 -> 658 bytes src/api/java/ic2/api/crops/BaseSeed.java | 56 ++ src/api/java/ic2/api/crops/CropCard.class | Bin 0 -> 5149 bytes src/api/java/ic2/api/crops/CropCard.java | 367 +++++++++++ src/api/java/ic2/api/crops/Crops.class | Bin 0 -> 1239 bytes src/api/java/ic2/api/crops/Crops.java | 117 ++++ src/api/java/ic2/api/crops/ICropTile.class | Bin 0 -> 1102 bytes src/api/java/ic2/api/crops/ICropTile.java | 264 ++++++++ src/api/java/ic2/api/crops/package-info.class | Bin 0 -> 255 bytes src/api/java/ic2/api/crops/package-info.java | 4 + src/api/java/ic2/api/energy/EnergyNet.class | Bin 0 -> 331 bytes src/api/java/ic2/api/energy/IEnergyNet.class | Bin 0 -> 727 bytes src/api/java/ic2/api/energy/IEnergyNet.java | 14 + src/api/java/ic2/api/energy/NodeStats.class | Bin 0 -> 675 bytes src/api/java/ic2/api/energy/NodeStats.java | 25 + .../api/energy/event/EnergyTileEvent.class | Bin 0 -> 611 bytes .../energy/event/EnergyTileLoadEvent.class | Bin 0 -> 442 bytes .../energy/event/EnergyTileUnloadEvent.class | Bin 0 -> 448 bytes .../ic2/api/energy/event/package-info.class | Bin 0 -> 262 bytes .../java/ic2/api/energy/package-info.class | Bin 0 -> 256 bytes .../ic2/api/energy/prefab/BasicSink.class | Bin 0 -> 5527 bytes .../java/ic2/api/energy/prefab/BasicSink.java | 373 +++++++++++ .../ic2/api/energy/prefab/BasicSource.class | Bin 0 -> 5604 bytes .../ic2/api/energy/prefab/BasicSource.java | 375 +++++++++++ .../ic2/api/energy/prefab/package-info.class | Bin 0 -> 263 bytes .../ic2/api/energy/prefab/package-info.java | 4 + .../ic2/api/energy/tile/IEnergyAcceptor.class | Bin 0 -> 288 bytes .../api/energy/tile/IEnergyConductor.class | Bin 0 -> 428 bytes .../ic2/api/energy/tile/IEnergyConductor.java | 53 ++ .../ic2/api/energy/tile/IEnergyEmitter.class | Bin 0 -> 282 bytes .../ic2/api/energy/tile/IEnergySink.class | Bin 0 -> 306 bytes .../java/ic2/api/energy/tile/IEnergySink.java | 1 + .../ic2/api/energy/tile/IEnergySource.class | Bin 0 -> 260 bytes .../ic2/api/energy/tile/IEnergyTile.class | Bin 0 -> 123 bytes .../ic2/api/energy/tile/IHeatSource.class | Bin 0 -> 281 bytes .../java/ic2/api/energy/tile/IHeatSource.java | 23 + .../ic2/api/energy/tile/IKineticSource.class | Bin 0 -> 305 bytes .../ic2/api/energy/tile/IKineticSource.java | 22 + .../ic2/api/energy/tile/IMetaDelegate.class | Bin 0 -> 289 bytes .../ic2/api/energy/tile/IMetaDelegate.java | 36 ++ .../ic2/api/energy/tile/package-info.class | Bin 0 -> 261 bytes .../event/LaserEvent$LaserExplodesEvent.class | Bin 0 -> 1128 bytes .../LaserEvent$LaserHitsBlockEvent.class | Bin 0 -> 1285 bytes .../LaserEvent$LaserHitsEntityEvent.class | Bin 0 -> 984 bytes .../event/LaserEvent$LaserShootEvent.class | Bin 0 -> 1003 bytes src/api/java/ic2/api/event/LaserEvent.class | Bin 0 -> 1415 bytes src/api/java/ic2/api/event/LaserEvent.java | 114 ++++ src/api/java/ic2/api/event/PaintEvent.class | Bin 0 -> 807 bytes src/api/java/ic2/api/event/PaintEvent.java | 32 + .../java/ic2/api/event/RetextureEvent.class | Bin 0 -> 1024 bytes .../java/ic2/api/event/RetextureEvent.java | 37 ++ src/api/java/ic2/api/event/package-info.class | Bin 0 -> 255 bytes src/api/java/ic2/api/event/package-info.java | 4 + .../ic2/api/info/IEnergyValueProvider.class | Bin 0 -> 195 bytes .../ic2/api/info/IEnergyValueProvider.java | 3 + .../ic2/api/info/IFuelValueProvider.class | Bin 0 -> 190 bytes src/api/java/ic2/api/info/Info.class | Bin 0 -> 1222 bytes src/api/java/ic2/api/info/package-info.class | Bin 0 -> 254 bytes src/api/java/ic2/api/item/ElectricItem.class | Bin 0 -> 1403 bytes .../api/item/IBackupElectricItemManager.class | Bin 0 -> 241 bytes .../ic2/api/item/IBlockCuttingBlade.class | Bin 0 -> 158 bytes .../java/ic2/api/item/IBlockCuttingBlade.java | 6 + src/api/java/ic2/api/item/IBoxable.class | Bin 0 -> 177 bytes src/api/java/ic2/api/item/IBoxable.java | 14 + src/api/java/ic2/api/item/IC2Items.class | Bin 0 -> 1797 bytes src/api/java/ic2/api/item/IC2Items.java | 598 ++++++++++++++++++ src/api/java/ic2/api/item/IDebuggable.class | Bin 0 -> 191 bytes src/api/java/ic2/api/item/IDebuggable.java | 22 + src/api/java/ic2/api/item/IElectricItem.class | Bin 0 -> 431 bytes .../ic2/api/item/IElectricItemManager.class | Bin 0 -> 627 bytes src/api/java/ic2/api/item/IItemHudInfo.class | Bin 0 -> 281 bytes src/api/java/ic2/api/item/IItemHudInfo.java | 24 + .../java/ic2/api/item/IKineticWindRotor.class | Bin 0 -> 318 bytes .../java/ic2/api/item/IKineticWindRotor.java | 15 + src/api/java/ic2/api/item/IMetalArmor.class | Bin 0 -> 217 bytes src/api/java/ic2/api/item/IMetalArmor.java | 20 + .../ic2/api/item/ISpecialElectricItem.class | Bin 0 -> 259 bytes .../java/ic2/api/item/ITerraformingBP.class | Bin 0 -> 226 bytes .../java/ic2/api/item/ITerraformingBP.java | 34 + src/api/java/ic2/api/item/ItemWrapper.class | Bin 0 -> 2443 bytes src/api/java/ic2/api/item/ItemWrapper.java | 50 ++ src/api/java/ic2/api/item/package-info.class | Bin 0 -> 254 bytes ...NetworkClientTileEntityEventListener.class | Bin 0 -> 245 bytes ...INetworkClientTileEntityEventListener.java | 17 + .../api/network/INetworkDataProvider.class | Bin 0 -> 248 bytes .../ic2/api/network/INetworkDataProvider.java | 18 + .../network/INetworkItemEventListener.class | Bin 0 -> 251 bytes .../network/INetworkItemEventListener.java | 19 + .../INetworkTileEntityEventListener.class | Bin 0 -> 191 bytes .../INetworkTileEntityEventListener.java | 14 + .../api/network/INetworkUpdateListener.class | Bin 0 -> 191 bytes .../api/network/INetworkUpdateListener.java | 14 + .../java/ic2/api/network/NetworkHelper.class | Bin 0 -> 4190 bytes .../java/ic2/api/network/NetworkHelper.java | 194 ++++++ .../java/ic2/api/network/package-info.class | Bin 0 -> 257 bytes .../java/ic2/api/network/package-info.java | 4 + src/api/java/ic2/api/package-info.class | Bin 0 -> 249 bytes src/api/java/ic2/api/reactor/IReactor.class | Bin 0 -> 794 bytes src/api/java/ic2/api/reactor/IReactor.java | 158 +++++ .../ic2/api/reactor/IReactorChamber.class | Bin 0 -> 214 bytes .../java/ic2/api/reactor/IReactorChamber.java | 20 + .../ic2/api/reactor/IReactorComponent.class | Bin 0 -> 720 bytes .../ic2/api/reactor/IReactorComponent.java | 98 +++ .../java/ic2/api/reactor/package-info.class | Bin 0 -> 257 bytes .../java/ic2/api/reactor/package-info.java | 4 + .../ICannerBottleRecipeManager$Input.class | Bin 0 -> 968 bytes .../recipe/ICannerBottleRecipeManager.class | Bin 0 -> 634 bytes .../ICannerEnrichRecipeManager$Input.class | Bin 0 -> 1143 bytes .../recipe/ICannerEnrichRecipeManager.class | Bin 0 -> 668 bytes .../api/recipe/ICraftingRecipeManager.class | Bin 0 -> 244 bytes .../IFluidHeatManager$BurnProperty.class | Bin 0 -> 540 bytes .../ic2/api/recipe/IFluidHeatManager.class | Bin 0 -> 581 bytes .../ic2/api/recipe/ILiquidAcceptManager.class | Bin 0 -> 321 bytes .../ic2/api/recipe/IListRecipeManager.class | Bin 0 -> 479 bytes .../api/recipe/IMachineRecipeManager.class | Bin 0 -> 487 bytes .../java/ic2/api/recipe/IPatternStorage.class | Bin 0 -> 299 bytes .../java/ic2/api/recipe/IRecipeInput.class | Bin 0 -> 314 bytes .../ic2/api/recipe/IScrapboxManager.class | Bin 0 -> 395 bytes .../ISemiFluidFuelManager$BurnProperty.class | Bin 0 -> 562 bytes .../api/recipe/ISemiFluidFuelManager.class | Bin 0 -> 601 bytes .../recipe/RecipeInputFluidContainer.class | Bin 0 -> 2669 bytes .../ic2/api/recipe/RecipeInputItemStack.class | Bin 0 -> 1899 bytes .../ic2/api/recipe/RecipeInputOreDict.class | Bin 0 -> 2799 bytes .../java/ic2/api/recipe/RecipeOutput.class | Bin 0 -> 1740 bytes src/api/java/ic2/api/recipe/RecipeOutput.java | 7 + src/api/java/ic2/api/recipe/Recipes.class | Bin 0 -> 1090 bytes src/api/java/ic2/api/recipe/Recipes.java | 4 +- .../java/ic2/api/recipe/package-info.class | Bin 0 -> 256 bytes .../ic2/api/tile/ExplosionWhitelist.class | Bin 0 -> 987 bytes .../java/ic2/api/tile/ExplosionWhitelist.java | 47 ++ .../java/ic2/api/tile/IEnergyStorage.class | Bin 0 -> 374 bytes src/api/java/ic2/api/tile/IWrenchable.class | Bin 0 -> 456 bytes src/api/java/ic2/api/tile/package-info.class | Bin 0 -> 254 bytes src/api/java/ic2/api/util/IKeyboard.class | Bin 0 -> 374 bytes src/api/java/ic2/api/util/IKeyboard.java | 14 + src/api/java/ic2/api/util/Keys.class | Bin 0 -> 309 bytes src/api/java/ic2/api/util/Keys.java | 6 + src/api/java/ic2/api/util/package-info.class | Bin 0 -> 254 bytes src/api/java/ic2/api/util/package-info.java | 4 + 141 files changed, 3357 insertions(+), 8 deletions(-) create mode 100644 src/api/java/ic2/api/Direction.class create mode 100644 src/api/java/ic2/api/crops/BaseSeed.class create mode 100644 src/api/java/ic2/api/crops/BaseSeed.java create mode 100644 src/api/java/ic2/api/crops/CropCard.class create mode 100644 src/api/java/ic2/api/crops/CropCard.java create mode 100644 src/api/java/ic2/api/crops/Crops.class create mode 100644 src/api/java/ic2/api/crops/Crops.java create mode 100644 src/api/java/ic2/api/crops/ICropTile.class create mode 100644 src/api/java/ic2/api/crops/ICropTile.java create mode 100644 src/api/java/ic2/api/crops/package-info.class create mode 100644 src/api/java/ic2/api/crops/package-info.java create mode 100644 src/api/java/ic2/api/energy/EnergyNet.class create mode 100644 src/api/java/ic2/api/energy/IEnergyNet.class create mode 100644 src/api/java/ic2/api/energy/NodeStats.class create mode 100644 src/api/java/ic2/api/energy/NodeStats.java create mode 100644 src/api/java/ic2/api/energy/event/EnergyTileEvent.class create mode 100644 src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class create mode 100644 src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class create mode 100644 src/api/java/ic2/api/energy/event/package-info.class create mode 100644 src/api/java/ic2/api/energy/package-info.class create mode 100644 src/api/java/ic2/api/energy/prefab/BasicSink.class create mode 100644 src/api/java/ic2/api/energy/prefab/BasicSink.java create mode 100644 src/api/java/ic2/api/energy/prefab/BasicSource.class create mode 100644 src/api/java/ic2/api/energy/prefab/BasicSource.java create mode 100644 src/api/java/ic2/api/energy/prefab/package-info.class create mode 100644 src/api/java/ic2/api/energy/prefab/package-info.java create mode 100644 src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class create mode 100644 src/api/java/ic2/api/energy/tile/IEnergyConductor.class create mode 100644 src/api/java/ic2/api/energy/tile/IEnergyConductor.java create mode 100644 src/api/java/ic2/api/energy/tile/IEnergyEmitter.class create mode 100644 src/api/java/ic2/api/energy/tile/IEnergySink.class create mode 100644 src/api/java/ic2/api/energy/tile/IEnergySource.class create mode 100644 src/api/java/ic2/api/energy/tile/IEnergyTile.class create mode 100644 src/api/java/ic2/api/energy/tile/IHeatSource.class create mode 100644 src/api/java/ic2/api/energy/tile/IHeatSource.java create mode 100644 src/api/java/ic2/api/energy/tile/IKineticSource.class create mode 100644 src/api/java/ic2/api/energy/tile/IKineticSource.java create mode 100644 src/api/java/ic2/api/energy/tile/IMetaDelegate.class create mode 100644 src/api/java/ic2/api/energy/tile/IMetaDelegate.java create mode 100644 src/api/java/ic2/api/energy/tile/package-info.class create mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class create mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class create mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class create mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class create mode 100644 src/api/java/ic2/api/event/LaserEvent.class create mode 100644 src/api/java/ic2/api/event/LaserEvent.java create mode 100644 src/api/java/ic2/api/event/PaintEvent.class create mode 100644 src/api/java/ic2/api/event/PaintEvent.java create mode 100644 src/api/java/ic2/api/event/RetextureEvent.class create mode 100644 src/api/java/ic2/api/event/RetextureEvent.java create mode 100644 src/api/java/ic2/api/event/package-info.class create mode 100644 src/api/java/ic2/api/event/package-info.java create mode 100644 src/api/java/ic2/api/info/IEnergyValueProvider.class create mode 100644 src/api/java/ic2/api/info/IFuelValueProvider.class create mode 100644 src/api/java/ic2/api/info/Info.class create mode 100644 src/api/java/ic2/api/info/package-info.class create mode 100644 src/api/java/ic2/api/item/ElectricItem.class create mode 100644 src/api/java/ic2/api/item/IBackupElectricItemManager.class create mode 100644 src/api/java/ic2/api/item/IBlockCuttingBlade.class create mode 100644 src/api/java/ic2/api/item/IBlockCuttingBlade.java create mode 100644 src/api/java/ic2/api/item/IBoxable.class create mode 100644 src/api/java/ic2/api/item/IBoxable.java create mode 100644 src/api/java/ic2/api/item/IC2Items.class create mode 100644 src/api/java/ic2/api/item/IC2Items.java create mode 100644 src/api/java/ic2/api/item/IDebuggable.class create mode 100644 src/api/java/ic2/api/item/IDebuggable.java create mode 100644 src/api/java/ic2/api/item/IElectricItem.class create mode 100644 src/api/java/ic2/api/item/IElectricItemManager.class create mode 100644 src/api/java/ic2/api/item/IItemHudInfo.class create mode 100644 src/api/java/ic2/api/item/IItemHudInfo.java create mode 100644 src/api/java/ic2/api/item/IKineticWindRotor.class create mode 100644 src/api/java/ic2/api/item/IKineticWindRotor.java create mode 100644 src/api/java/ic2/api/item/IMetalArmor.class create mode 100644 src/api/java/ic2/api/item/IMetalArmor.java create mode 100644 src/api/java/ic2/api/item/ISpecialElectricItem.class create mode 100644 src/api/java/ic2/api/item/ITerraformingBP.class create mode 100644 src/api/java/ic2/api/item/ITerraformingBP.java create mode 100644 src/api/java/ic2/api/item/ItemWrapper.class create mode 100644 src/api/java/ic2/api/item/ItemWrapper.java create mode 100644 src/api/java/ic2/api/item/package-info.class create mode 100644 src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class create mode 100644 src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java create mode 100644 src/api/java/ic2/api/network/INetworkDataProvider.class create mode 100644 src/api/java/ic2/api/network/INetworkDataProvider.java create mode 100644 src/api/java/ic2/api/network/INetworkItemEventListener.class create mode 100644 src/api/java/ic2/api/network/INetworkItemEventListener.java create mode 100644 src/api/java/ic2/api/network/INetworkTileEntityEventListener.class create mode 100644 src/api/java/ic2/api/network/INetworkTileEntityEventListener.java create mode 100644 src/api/java/ic2/api/network/INetworkUpdateListener.class create mode 100644 src/api/java/ic2/api/network/INetworkUpdateListener.java create mode 100644 src/api/java/ic2/api/network/NetworkHelper.class create mode 100644 src/api/java/ic2/api/network/NetworkHelper.java create mode 100644 src/api/java/ic2/api/network/package-info.class create mode 100644 src/api/java/ic2/api/network/package-info.java create mode 100644 src/api/java/ic2/api/package-info.class create mode 100644 src/api/java/ic2/api/reactor/IReactor.class create mode 100644 src/api/java/ic2/api/reactor/IReactor.java create mode 100644 src/api/java/ic2/api/reactor/IReactorChamber.class create mode 100644 src/api/java/ic2/api/reactor/IReactorChamber.java create mode 100644 src/api/java/ic2/api/reactor/IReactorComponent.class create mode 100644 src/api/java/ic2/api/reactor/IReactorComponent.java create mode 100644 src/api/java/ic2/api/reactor/package-info.class create mode 100644 src/api/java/ic2/api/reactor/package-info.java create mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class create mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class create mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class create mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class create mode 100644 src/api/java/ic2/api/recipe/ICraftingRecipeManager.class create mode 100644 src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class create mode 100644 src/api/java/ic2/api/recipe/IFluidHeatManager.class create mode 100644 src/api/java/ic2/api/recipe/ILiquidAcceptManager.class create mode 100644 src/api/java/ic2/api/recipe/IListRecipeManager.class create mode 100644 src/api/java/ic2/api/recipe/IMachineRecipeManager.class create mode 100644 src/api/java/ic2/api/recipe/IPatternStorage.class create mode 100644 src/api/java/ic2/api/recipe/IRecipeInput.class create mode 100644 src/api/java/ic2/api/recipe/IScrapboxManager.class create mode 100644 src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class create mode 100644 src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class create mode 100644 src/api/java/ic2/api/recipe/RecipeInputFluidContainer.class create mode 100644 src/api/java/ic2/api/recipe/RecipeInputItemStack.class create mode 100644 src/api/java/ic2/api/recipe/RecipeInputOreDict.class create mode 100644 src/api/java/ic2/api/recipe/RecipeOutput.class create mode 100644 src/api/java/ic2/api/recipe/Recipes.class create mode 100644 src/api/java/ic2/api/recipe/package-info.class create mode 100644 src/api/java/ic2/api/tile/ExplosionWhitelist.class create mode 100644 src/api/java/ic2/api/tile/ExplosionWhitelist.java create mode 100644 src/api/java/ic2/api/tile/IEnergyStorage.class create mode 100644 src/api/java/ic2/api/tile/IWrenchable.class create mode 100644 src/api/java/ic2/api/tile/package-info.class create mode 100644 src/api/java/ic2/api/util/IKeyboard.class create mode 100644 src/api/java/ic2/api/util/IKeyboard.java create mode 100644 src/api/java/ic2/api/util/Keys.class create mode 100644 src/api/java/ic2/api/util/Keys.java create mode 100644 src/api/java/ic2/api/util/package-info.class create mode 100644 src/api/java/ic2/api/util/package-info.java diff --git a/src/api/java/ic2/api/Direction.class b/src/api/java/ic2/api/Direction.class new file mode 100644 index 0000000000000000000000000000000000000000..6d7f09a14f85d0b684ebf0a8d25c7b1f6f66b9b8 GIT binary patch literal 3908 zcmb7G`*&1V75>i5ow+lUTONUg1_BO`NHPf-6M+^Ikpe-c9TMz7=s;B_Gna5-9`R<9 z2GrVWwZ66Dt3GSh)<@Me&?J(U;;TRSfA~MRmTQUMK6A}Hm@ew9b;t zpIf&94C0+I3|x)i8a`!W*uA%U5LhY6M@y*Jb#IiEokbj$KsP-JQIgna#xW znc`$TRd$`?%kcs&$hw(}<%@D2&z1^>QZYVLcJlH18}Fig{QpFu_Nj6v zd*x(i%Cj^$>=d2yA%#s%JeElGj4K%BOAf$bnr6^+GOW)`P35ni zE}eGr_DHepl&>lz8w`xoCfnAB@hTt9s&m7;a51CG6xa10nN3e0g^@-ro+`QdT>Pwz zLkXJq9uXC#x78%W$XwQ*@(LiJF%`BnVAYCZ9nA5gU(_{bc(zn>b9AZie1cuV#IH?E zu)tXxP=cMmJl zq#TK(!n$&)KGPHiD7P*u_f1ZP&~P^IB@!htC%S6ARh%gdHz~eDY#)(SX~xak$C(`p zYgQ|yU#i!_hop@TTlfur%QU;E{a84H-&q(EuGcL59!U#-z?6lL;Dm)y{L#Vz95gX+ z;dLxnxPgNfZp!e63{N0!;ggtR04ywG$-*-J#6DN;9IJ6w*j(Lxe1>^kuxk!CRSzr8 z=E#hb&)KdhF{2Q*UAN>$>GU!iQM8)>(M&m-a|%%lx3FU2O}u5|wuQGvyIZ)!bcynd zTlh2nB3OU5P!jw8hQA9rX7SbepoP6M?2}=?3=hfhundRrVS2Ty+z2C~&`}rNcuk@z z1hV;3k)hbgB&gmSo4Cvd&T#Fk?Gi`xnd#}F8n)F&TfHd~d2dgh$onM}6ZFjJW20kd z`IeY06{ncVOQXG4l%g1$5Y_?RuM3~XC~R#^@>(}g;o#g+DN-)3{%>*3TeM8% zOW7+UbIx>`H5}}gK5~womH5@jD#Y|beI+&5O~kQf*+q)m)5OTyNYtelFNUVv(k$N@ zKD9d=WYxs=l*hyi+v}axgo&u)F}^KHKO-u!2Y5i*v6#svOyZzJ=ce% zN35a8#$1Q5LPmP2!k|d1)9-$nGIV%=e^Lhc_bYt3Ly7_5%zDr>OG3}A3O%zh^vv4e z4WBdz&K=S~fOVUt-H^5rmcoI;VNyFd%P+D3wFuuG_~%I}Ji;-k&sxZT1V=soeZ-X; zEgN9OmJzrELoWF0E*#^I|mfH5W9(%K>o@8*b>%X80&op#oms9zrQ13@C)=WqV+|bZ`j%}e=xX$w)6_x z(@WUY`rslusO9FH*s_Su)~zH3L)P2$+NfCzX6GW_w}j~1YMv?{K!S1G=mlk)RyBcE zMsf#(aDcvll;$Prw-@Ls@#zWjBr$?>I8R^GuvPP~<4Jssn6meA`dI>e9iPx1m(>NX z3}Qcv3?}Fn3Gx>B?ove1MAk%3DP_V2hl~GaUMfuDQpJyaoP1i`Uh$duD>uyiJlS{q zkbl3?W^8>KTl(6JLGdaXw!DO3M_~RrL%n+UpRsDzwNospT!hL*sYV~?LFBYyhln3# zia1P`0M=j^F0&wgSdZMidpDvFTq# zQ}S?nmh2^_I4L5Qm{MP_k*clGg4U-}p%G7xPyQ-+2&+Y|^Jgk>$;dTA%+^4(cn}IM zrag#3&Z0z!g}HqhI~o)GTFw2CcRz$OX1x0=+L6HXD=^ZnJN^D8?7D$2O}*bRG__k( z-GP9ndNdUa1~t{IsXo)x)E-UsheDc)uM56KRR03HQfXrWyHn}F0(w&E-~xJ6X>$R4 zQt8kF;;9=@%lNmBn&J+GxL(WnZ9pd;WOO?DXJk9Gsf)$lf@knFeO+k)vv^8- Ge(t}Q`he&F literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/Direction.java b/src/api/java/ic2/api/Direction.java index 64350dd56..894e8979b 100644 --- a/src/api/java/ic2/api/Direction.java +++ b/src/api/java/ic2/api/Direction.java @@ -36,17 +36,19 @@ public enum Direction { */ ZP(5); - Direction(int dir1) { - this.dir = dir1; + public static Direction fromSideValue(int side) { + return directions[(side + 2) % 6]; } - /*public CoordinateTuple ApplyToCoordinates(CoordinateTuple coordinates) { - CoordinateTuple ret = new CoordinateTuple(coordinates); + public static Direction fromForgeDirection(ForgeDirection dir) { + if (dir == ForgeDirection.UNKNOWN) return null; - ret.coords[dir/2] += GetSign(); + return fromSideValue(dir.ordinal()); + } - return ret; - }*/ + private Direction(int dir1) { + this.dir = dir1; + } /** * Get the tile entity next to a tile entity following this direction. diff --git a/src/api/java/ic2/api/crops/BaseSeed.class b/src/api/java/ic2/api/crops/BaseSeed.class new file mode 100644 index 0000000000000000000000000000000000000000..08932067680276b2fd8446a6c786effea4781210 GIT binary patch literal 658 zcmZvZPfrt36vfY*PFwm13TP1ote`+U3r6a{g~o*>AW5T%HQm2XU*tiVAu|Ieej>Ik zCMGWY0DdUrxvv^G&f=WkeYtb*c{4wMeg6TVkD!hk9@a32Es<@JM5Vw>FqyEgHL$UHe|0f7=_fs&@??3CM0z^Xsg?TAp`V}HOks6kqkgC_Z5XA=Wfs2G znHd^0d8JUYlLLja#H2SQ&nzb^36mc)D7hv4FDXytPP3>|43n!gGDlXT%>SLgf2OZ> z6HDkdQAeYRrpUa=f=Ekb5eWK+T{Y3pj|0Y zy=A9|yVPy&2cE#k0dw?upQoJn3~P9f4qjjfFVSYlyV-QC;2taP!75WIM{6X{(S1_M V(K^X@v_UF6+9b(6AF%S!`3=UPa@zm^ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/crops/BaseSeed.java b/src/api/java/ic2/api/crops/BaseSeed.java new file mode 100644 index 000000000..de6296b39 --- /dev/null +++ b/src/api/java/ic2/api/crops/BaseSeed.java @@ -0,0 +1,56 @@ +package ic2.api.crops; + +/** + * Base agriculture seed. Used to determine the state of a plant once it is planted from an item. + */ +public class BaseSeed { + /** + * Plant ID. + */ + public int id; + + /** + * Plant size. + */ + public int size; + + /** + * Plant growth stat. + */ + public int statGrowth; + + /** + * Plant gain stat. + */ + public int statGain; + + /** + * Plant resistance stat. + */ + public int statResistance; + + /** + * For internal usage only. + */ + public int stackSize; + + /** + * Create a BaseSeed object. + * + * @param id1 plant ID + * @param size1 plant size + * @param statGrowth1 plant growth stat + * @param statGain1 plant gain stat + * @param statResistance1 plant resistance stat + * @param stackSize1 for internal usage only + */ + public BaseSeed(int id1, int size1, int statGrowth1, int statGain1, int statResistance1, int stackSize1) { + super(); + this.id = id1; + this.size = size1; + this.statGrowth = statGrowth1; + this.statGain = statGain1; + this.statResistance = statResistance1; + this.stackSize = stackSize1; + } +} diff --git a/src/api/java/ic2/api/crops/CropCard.class b/src/api/java/ic2/api/crops/CropCard.class new file mode 100644 index 0000000000000000000000000000000000000000..8b2eb0dbf72aae00bc15c2efdd8fb4939919dd2c GIT binary patch literal 5149 zcmbVP`F9i775<(ymSlUpf-%HqwOwo@qtpqI#9{LWq5@J(NP)CrB#rIC@<<(x45Ukz z(j`sP(!J0&Wl2h#Qc6-{O488u^qjV*e?;3~`$PIef6SrF_uh#dtihTd|T6_a%YVl2cD}ry!H{X#r-wkd5=eYXGyYFe+X)(0@A7|z7oP6|s zIs8BlXXT)t{ZL;0D2yN1paZW~<0m*@!{I_07sI$D5OK|uZox700&PbVw&}*EE!#{v z#<&|RxK<_>kEgQsfWV3a1>3cz%|lk+N@mQRww-ki*UH-5xh|2)orq0m)A`u=bSCDQ z8KYpQCQTy$-DOFN%PbwVGUh-}8T>p+YBHr%=7PHg>S^Ynr|?nY$p=pM zggZH0aFloj+7~fSs>3P6-o-78FFYd9c*3+MCf&F_PLc0s^U6eUbI`Du{RqvIj65III1-X%o-n&BBTNR8{biFd+ySI2Mho{n4ioxrln2NI=lhoJq*<7SG9FL~r0Ow5Im%dtxf z^mX5TmfU?d`6RPWB5rmLqrK88c4y^7^JBZOvw^~%J7wetgTTg$?#)M@*Uek!^HMwm zyguPI7=8$_c*B!khmq&u5!uAFoN9_nox`fhjCm)F?A-38Kpk~^z|8Xy^xBXvOPI|n zVa}Kt_1ZRhAeeqxcXf{q@^{bHQ)}hr8OEM!PbjnWMT)ZQdxMQ4V%c-HTgr|rDciiv zkE*TFEW3VNc{`k|uz{YqwwB+6-Td@p*s=^bZ{S@W=P3X8nb?RJ*6@;b$g!UMs5*QDp}tv!nP1o`sd|_@R^V~|+e#!x9wqZMC=J!5!U?(|B zVx7NkkSkXpbQ|?y3kG$azAtJZY!7DP(_M@2Jh23gq-&8YOA-4)7u$O=`otJ4q z8s5`OK5O5D{x<5gt?j+nQFrSSHp{tPOK(92ph(8m_5hI5Nn9v|kK-5B6a{eUw2~gVEKA51IW6 z!W4J{ANS+1h$nH@Z@7si07bpM^q)u?SV$1QwEZLw5nm=_D{adls!4H66aGATg*T*li}p1NeNNKtes}?{m?UAIhN!oHLkm#T zE%d`;S;&Mm+q;Q)fm_2iX)p=)6On>I$M3y3o-e z>abGOW0Po5F7?vHYM(-xj4j15xAMS{FiDrHZx^uDgm(bQQV&G#uZ|CYq3D%Fja4RRY1k zOXXQ8mlYxM#j-D^Tvba+y^ClGMx~Uy_jY4b2}C6~3isj0))I_LZp`3>&&Dy%GI34O z-=pI!YNPL?V-}rPO8S5*9kB~xv77ndqo6%0HWgWF@>wDf+wv(t+d)t!0?*z%=tCtA zR|@(w#lDp$woG5Auj317^W<_C^`2rHmoL!E#IX`9okia}ecuO(8bWYYa0mbB!e@E% ldb;eVJ^Aeuc?(^vm5-E_xj3#+y+dNIBMW?vI|BIp{{TgoFTMZ( literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/api/java/ic2/api/crops/CropCard.java new file mode 100644 index 000000000..63f9844f2 --- /dev/null +++ b/src/api/java/ic2/api/crops/CropCard.java @@ -0,0 +1,367 @@ +package ic2.api.crops; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * Base agriculture crop. + * + * Any crop extending this can be registered using registerCrop to be added into the game. + */ +public abstract class CropCard { + /** + * Plant name. Will be displayed to the player. + * + * @return Plant name + */ + public abstract String name(); + + /** + * Your name here, will be shown in "Discovered by:" when analyzing seeds. + * + * @return Your name + */ + public String discoveredBy() {return "Alblaka";} + + /** + * Description of your plant. Keep it short, a few characters per line for up to two lines. + * Default is showing attributes of your plant, 2 per line. + * + * @param i line to get, starting from 0 + * @return The line + */ + public String desc(int i) { + String[] att = attributes(); + if (att == null || att.length == 0) return ""; + if (i == 0) { + String s = att[0]; + if (att.length >= 2) { + s+=", "+att[1]; + if (att.length >= 3) s+=","; + } + return s; + } + if (att.length < 3) return ""; + String s = att[2]; + if (att.length >= 4) s+=", "+att[3]; + return s; + } + + /** + * Tier of the plant. Ranges from 1 to 16, 0 is Weed. + * Valuable and powerful crops have higher tiers, useless and weak ones have lower tiers. + * + * @return Tier + */ + public abstract int tier(); + + /** + * Describe the plant through a set of stats, influencing breeding. + * Plants sharing stats and attributes will tend to cross-breed more often. + * + * Stats: + * - 0: Chemistry (Industrial uses based on chemical plant components) + * - 1: Consumable (Food, potion ingredients, stuff meant to be eaten or similarly used) + * - 2: Defensive (Plants with defense capabilities (damaging, explosive, chemical) or special abilities in general) + * - 3: Colorful (How colorful/aesthetically/beautiful is the plant, like dye-plants or plants without actual effects) + * - 4: Weed (Is this plant weed-like and rather unwanted/quick-spreading? Rare super-breed plants should have low values here) + * + * @param n index of the requested stat + * @return The requested value of the stats + */ + public abstract int stat(int n); + + /** + * Additional attributes of the plant, also influencing breeding. + * Plants sharing stats and attributes will tend to cross-breed more often. + * + * @return Attributes as an array of strings + */ + public abstract String[] attributes(); + + /** + * Determine the max crop size. + * + * Currently only used for texture allocation. + */ + public abstract int maxSize(); + + /** + * Instantiate your Icons here. + * + * This method will get called by IC2, don't call it yourself. + */ + @SideOnly(Side.CLIENT) + public void registerSprites(IIconRegister iconRegister) { + textures = new IIcon[maxSize()]; + + for (int i = 1; i <= textures.length; i++) { + textures[i-1] = iconRegister.registerIcon("ic2:crop/blockCrop."+name()+"."+i); + } + } + + /** + * Sprite the crop is meant to be rendered with. + * + * @param crop reference to ICropTile + * @return 0-255, representing the sprite index on the crop's spritesheet. + */ + @SideOnly(Side.CLIENT) + public IIcon getSprite(ICropTile crop) { + if (crop.getSize() <= 0 || crop.getSize() > textures.length) return null; + + return textures[crop.getSize() - 1]; + } + + /** + * Get the crop's spritesheet. + * Per default crops_0.png of ic2-sprites + * @return Texture file path + */ + public String getTextureFile() { + return "/ic2/sprites/crops_0.png"; + } + + /** + * Amount of growth points needed to increase the plant's size. + * Default is 200 * tier. + */ + public int growthDuration(ICropTile crop) { + return tier()*200; + } + + /** + * Check whether the plant can grow further. + * + * Consider: + * - Humidity, nutrients and air quality + * - Current size + * - Light level + * - Special biomes or conditions, accessible through crop.worldObj + * + * This method will be called upon empty upgraded crops to check whether a neighboring plant can cross onto it! Don't check if the size is greater than 0 and if the ID is real. + * + * @param crop reference to ICropTile + * @return Whether the crop can grow + */ + public abstract boolean canGrow(ICropTile crop); + + /** + * Calculate the influence for the plant to grow based on humidity, nutrients and air. + * Normal behavior is rating the three stats "normal", with each of them ranging from 0-30. + * Basic rule: Assume everything returns 10. All together must equal 30. Add the factors to your likings, for example (humidity*0.7)+(nutrients*0.9)+(air*1.4) + * + * Default is humidity + nutrients + air (no factors). + * + * @param crop reference to ICropTile + * @param humidity ground humidity, influenced by hydration + * @param nutrients nutrient quality in ground, based on fertilizers + * @param air air quality, influences by open gardens and less crops surrounding this one + * @return 0-30 + */ + public int weightInfluences(ICropTile crop, float humidity, float nutrients, float air) { + return (int) (humidity+nutrients+air); + } + + /** + * Used to determine whether the plant can crossbreed with another crop. + * Default is allow crossbreeding if the size is greater or equal than 3. + * + * @param crop crop to crossbreed with + */ + public boolean canCross(ICropTile crop) { + return crop.getSize() >= 3; + } + + + /** + * Called when the plant is rightclicked by a player. + * Default action is harvesting. + * + * Only called Serverside. + * + * @param crop reference to ICropTile + * @param player player rightclicking the crop + * @return Whether the plant has changed + */ + public boolean rightclick(ICropTile crop, EntityPlayer player) { + return crop.harvest(true); + } + + /** + * Use in Crop Havester with insert Cropnalyzer to get best Output. + * + * @param crop reference to ICropTile + * @return need crop size for best output. + */ + + public abstract int getOptimalHavestSize(ICropTile crop); + + /** + * Check whether the crop can be harvested. + * + * @param crop reference to ICropTile + * @return Whether the crop can be harvested in its current state. + */ + public abstract boolean canBeHarvested(ICropTile crop); + + /** + * Base chance for dropping the plant's gains, specify values greater than 1 for multiple drops. + * Default is 0.95^tier. + * + * @return Chance to drop the gains + */ + public float dropGainChance() { + float base = 1F; + for (int i = 0; i < tier(); i++) {base*=0.95;} + return base; + } + + /** + * Item obtained from harvesting the plant. + * + * @param crop reference to ICropTile + * @return Item obtained + */ + public abstract ItemStack getGain(ICropTile crop); + + /** + * Get the size of the plant after harvesting. + * Default is 1. + * + * @param crop reference to ICropTile + * @return Plant size after harvesting + */ + public byte getSizeAfterHarvest(ICropTile crop) {return 1;} + + + /** + * Called when the plant is leftclicked by a player. + * Default action is picking the plant. + * + * Only called Serverside. + * + * @param crop reference to ICropTile + * @param player player leftclicked the crop + * @return Whether the plant has changed + */ + public boolean leftclick(ICropTile crop, EntityPlayer player) { + return crop.pick(true); + } + + /** + * Base chance for dropping seeds when the plant is picked. + * Default is 0.5*0.8^tier with a bigger chance for sizes greater than 2 and absolutely no chance for size 0. + * + * @param crop reference to ICropTile + * @return Chance to drop the seeds + */ + public float dropSeedChance(ICropTile crop) { + if (crop.getSize() == 1) return 0; + float base = 0.5F; + if (crop.getSize() == 2) base/=2F; + for (int i = 0; i < tier(); i++) {base*=0.8;} + return base; + } + + /** + * Obtain seeds dropped when the plant is picked. + * Multiple drops of the returned ItemStack can occur. + * Default action is generating a seed from this crop. + * + * @param crop reference to ICropTile + * @return Seeds + */ + public ItemStack getSeeds(ICropTile crop) { + return crop.generateSeeds(crop.getID(), crop.getGrowth(), crop.getGain(), crop.getResistance(), crop.getScanLevel()); + } + + /** + * Called when a neighbor block to the crop has changed. + * + * @param crop reference to ICropTile + */ + public void onNeighbourChange(ICropTile crop) { + // + } + + /** + * Check if the crop should emit redstone. + * + * @return Whether the crop should emit redstone + */ + public int emitRedstone(ICropTile crop) {return 0;} + + /** + * Called when the crop is destroyed. + * + * @param crop reference to ICropTile + */ + public void onBlockDestroyed(ICropTile crop) { + // + } + + /** + * Get the light value emitted by the plant. + * + * @param crop reference to ICropTile + * @return Light value emitted + */ + public int getEmittedLight(ICropTile crop) {return 0;} + + /** + * Default is true if the entity is an EntityLiving in jumping or sprinting state. + * + * @param crop reference to ICropTile + * @param entity entity colliding + * @return Whether trampling calculation should happen, return false if the plant is no longer valid. + */ + public boolean onEntityCollision(ICropTile crop, Entity entity) { + if (entity instanceof EntityLivingBase) { + return ((EntityLivingBase) entity).isSprinting(); + } + return false; + } + + + /** + * Called every time the crop ticks. + * Should be called every 256 ticks or around 13 seconds. + * + * @param crop reference to ICropTile + */ + public void tick(ICropTile crop) { + // + } + + /** + * Check whether this plant spreads weed to surrounding tiles. + * Default is true if the plant has a high growth stat (or is weeds) and size greater or equal than 2. + * + * @param crop reference to ICropTile + * @return Whether the plant spreads weed + */ + public boolean isWeed(ICropTile crop) { + return crop.getSize() >= 2 && (crop.getID() == 0 || crop.getGrowth() >= 24); + } + + + /** + * Get this plant's ID. + * + * @return ID of this CropCard or -1 if it's not registered + */ + public final int getId() { + return Crops.instance.getIdFor(this); + } + + @SideOnly(Side.CLIENT) + protected IIcon textures[]; +} diff --git a/src/api/java/ic2/api/crops/Crops.class b/src/api/java/ic2/api/crops/Crops.class new file mode 100644 index 0000000000000000000000000000000000000000..e0c5d9aec90d832f5375fea982e7e60809add604 GIT binary patch literal 1239 zcma)5ZBG+H5T1oXu@pfN5y2M_u?NB?Bqk;pqg2sLE|5^t5Bh1lHcY)s{?T5J=Iav}#$zKj|)7|dV#H4Hv7 zm^jn&rE4I@43_&7QVvrdl4&?0KT|pA=Y4(5f81VN;}-NqdFDw8%}_&G*XUTfX|Kr5 z3jYEO{t=aluN=3iW3*_w!!Itk$iq+?ed>#L(|6tMUap-=v8gge-StLm;|f*kfyGF6 zPIzkKj31;4sU;%U@{sfzD#l%%bSbK#W0B<4KM$@X`*yEK;k%uE8VxE)7;hVU<)cs+ zR2n9?61SC~f=V$q>qp{PRACs(45ls^D|#x=;EB*}zS}xN>B_LqVEwPDxVD)Y1pn<& zT7UtXd;kVFpaes-s?wT5Bs)SoPRIy{R=xrIN{ay^0ulV-I8?}b2O_|zcP~-z!dMS) z6*vh~1>WxAG~6lnGjO+uvjyIRxdP|met{3*At^s1?J>dy`Y$3ph9$b<2`tm`06Z;h Q4JHUHM7RmhVEpy$Z&}+_?*IS* literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/crops/Crops.java b/src/api/java/ic2/api/crops/Crops.java new file mode 100644 index 000000000..53cc3239f --- /dev/null +++ b/src/api/java/ic2/api/crops/Crops.java @@ -0,0 +1,117 @@ +package ic2.api.crops; + +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.world.biome.BiomeGenBase; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import net.minecraftforge.common.BiomeDictionary.Type; + +/** + * General management of the crop system. + */ +public abstract class Crops { + public static Crops instance; + + /** + * Adds a crop humidity and nutrient biome bonus. + * + * 0 indicates no bonus and negative values indicate a penalty. + * + * @param biome Biome to apply the bonus in + * @param humidityBonus Humidity stat bonus + * @param nutrientsBonus Nutrient stat bonus + */ + public abstract void addBiomeBonus(BiomeGenBase biome, int humidityBonus, int nutrientsBonus); + + /** + * Adds a crop humidity and nutrient biome bonus. + * + * 0 indicates no bonus and negative values indicate a penalty. + * + * @param type Forge biome type to apply the bonus in + * @param humidityBonus Humidity stat bonus + * @param nutrientsBonus Nutrient stat bonus + */ + public abstract void addBiomeBonus(Type type, int humidityBonus, int nutrientsBonus); + + /** + * Gets the humidity bonus for a biome. + * + * @param biome Biome to check + * @return Humidity bonus or 0 if none + */ + public abstract int getHumidityBiomeBonus(BiomeGenBase biome); + + /** + * Gets the nutrient bonus for a biome. + * + * @param biome Biome to check + * @return Nutrient bonus or 0 if none + */ + public abstract int getNutrientBiomeBonus(BiomeGenBase biome); + + /** + * Returns the list of registered crops. + * + * @return Registered crops by ID + */ + public abstract CropCard[] getCropList(); + + /** + * Auto-assign an ID to a plant and register it. + * Usage of this method is not recommended! Other plants could take your IDs and cause your plants to turn into other plants. + * + * @param crop plant to register + * @return The ID assigned to the plant + */ + public abstract short registerCrop(CropCard crop); + + /** + * Attempt to register a plant to an ID. + * If the ID is taken, the crop will not be registered and a console print will notify the user. + * + * @param crop plant to register + * @param i ID to register the plant to + * @return Whether the crop was registered + */ + public abstract boolean registerCrop(CropCard crop, int i); + + /** + * Registers a base seed, an item used to plant a crop. + * + * @param stack item + * @param id plant ID + * @param size initial size + * @param growth initial growth stat + * @param gain initial gain stat + * @param resistance initial resistance stat + * @return True if successful + */ + public abstract boolean registerBaseSeed(ItemStack stack, int id, int size, int growth, int gain, int resistance); + + /** + * Finds a base seed from the given item. + * + * @return Base seed or null if none found + */ + public abstract BaseSeed getBaseSeed(ItemStack stack); + + /** + * Execute registerSprites for all registered crop cards. + * + * This method will get called by IC2, don't call it yourself. + */ + @SideOnly(Side.CLIENT) + public abstract void startSpriteRegistration(IIconRegister iconRegister); + + /** + * Returns the ID for the given crop. + * + * @param crop Crop to look up + * @return ID, or -1 if not found + */ + public abstract int getIdFor(CropCard crop); +} diff --git a/src/api/java/ic2/api/crops/ICropTile.class b/src/api/java/ic2/api/crops/ICropTile.class new file mode 100644 index 0000000000000000000000000000000000000000..a7e6c5b7396c3e80c846975d743c3efd7ead4645 GIT binary patch literal 1102 zcmZWoU2_sK6uqfSX$!5isP(J0*48e5G>ZDvCzonvhN+{==uCZZ!fu3=C1G~6VEt)6 z_yhb=jyEA<2YA?%lXK6#H#gz;pP#<~pboE!@S+GW2^6|qH;)Ni@oOQnY{EQ0tbHO- zL@^XUxRnFsC{MWO2PR+{15Q#k);(OK_-}2DCrrqRWwKhuy^lN-nPxJ=l&ctjnU_tm zh{+Zo@q|Fx)cQ}2yOC#F4UU;+1or$|OL9#ILh>kO-!zpSO;3Y%n{^v%FjTpWj|gm_ z?KIb^;8KTLrK~$SOcNz6FeiC_)10e{ws#kC%Ct~&>Z_t-ez$_LpE-};e4hqZFmPt8 zWHROh5et2Rhr85PhND3GTBILxmRNboq*Q4V6WE$N=hz6;%6LGNx1}Q6D1n2y=v<40 zHhQ`2HK0~pMd9|)z0wNdMq9BOcPjltFJ7_*`pbI+QpzR zGt(EE4`>rVp=MDZ3lvh0Q?M@w2U^O9F`7}-cmZXR1&NCK0Z-JJz_ve=tYbuKLyk;4 z*sSDu89c-}pJ3z+L+B~*DD@wXzuqHE1Ys)lV`AD*)jKA}w!)hQba8sUCM zr!s+x37`p+UHZOr&Lh1@fWQL&a{zWcJQH{Thy_@*ScD~u%dldxH9IwJPo98;*u($~~E#7kcw&Qmkzw7vx%d_q9p2HouZ~eRQz~Y|s?ZZRM4;=bX av-}Y}w)n*1Q#iDo!ZVxzf#>*Lfcjs0LkR}} literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/crops/ICropTile.java b/src/api/java/ic2/api/crops/ICropTile.java new file mode 100644 index 000000000..09b46d79f --- /dev/null +++ b/src/api/java/ic2/api/crops/ICropTile.java @@ -0,0 +1,264 @@ +package ic2.api.crops; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +/** + * Interface implemented by the crop tile entity. + */ +public interface ICropTile { + /** + * Get the crop's plant ID. + * + * @return Plant ID, or -1 if there is no plant currently on the crop + */ + public short getID(); + + /** + * Set the crop's plant ID. + * + * @param id Plant ID, or -1 for no plant + */ + public void setID(short id); + + /** + * Get the crop's plant size. + * + * @return Plant size, starting with 1 and maximum varies depending on plant + */ + public byte getSize(); + + /** + * Set the crop's plant size. + * + * @param size Plant size + */ + public void setSize(byte size); + + /** + * Get the crop's plant growth stat. + * Higher values indicate faster growth. + * + * @return Plant growth stat + */ + public byte getGrowth(); + + /** + * Set the crop's plant growth stat. + * + * @param growth Plant growth stat + */ + public void setGrowth(byte growth); + + /** + * Get the crop's plant gain stat. + * Higher values indicate more drops. + * + * @return Plant gain stat + */ + public byte getGain(); + + /** + * Set the crop's plant gain stat. + * + * @param gain Plant gain stat + */ + public void setGain(byte gain); + + /** + * Get the crop's plant resistance stat. + * Higher values indicate more resistance against trampling. + * + * @return Plant resistance stat + */ + public byte getResistance(); + + /** + * Set the crop's plant resistance stat. + * + * @param resistance Plant resistance stat + */ + public void setResistance(byte resistance); + + /** + * Get the crop's plant scan level. + * Increases every time the seed is analyzed. + * + * @return Plant scan level + */ + public byte getScanLevel(); + + /** + * Set the crop's plant scan level. + * + * @param scanLevel Plant scan level + */ + public void setScanLevel(byte scanLevel); + + /** + * Get the crop's plant custom data, stored alongside the crop. + * Can be modified in place. + * + * @return Plant custom data + */ + public NBTTagCompound getCustomData(); + + /** + * Get the crop's nutrient storage. + * Ranges from 0 to 100. + * + * @return Crop nutrient storage + */ + public int getNutrientStorage(); + + /** + * Set the crop's nutrient storage. + * + * @param nutrientStorage Crop nutrient storage + */ + public void setNutrientStorage(int nutrientStorage); + + /** + * Get the crop's hydration storage. + * 0 indicates nothing, 1-10 indicate water hydration and 11-100 for hydration cells. + * + * @return Crop hydration storage + */ + public int getHydrationStorage(); + + /** + * Set the crop's hydration storage. + * + * @param hydrationStorage Crop hydration storage + */ + public void setHydrationStorage(int hydrationStorage); + + /** + * Get the crop's Weed-Ex storage. + * + * @return Crop Weed-Ex storage + */ + public int getWeedExStorage(); + + /** + * Set the crop's Weed-Ex storage. + * + * @param weedExStorage Crop Weed-Ex storage + */ + public void setWeedExStorage(int weedExStorage); + + /** + * Get the crop's humidity. + * Ranges from 0 (dry) to 10 (humid). + * Updates every couple of seconds or when an update is requested. + * + * @see #updateState() + * + * @return Crop humidity level + */ + public byte getHumidity(); + + /** + * Get the crop's nutrient level. + * Ranges from 0 (empty) to 10 (full). + * Updates every couple of seconds or when an update is requested. + * + * @see #updateState() + * + * @return Crop nutrient level + */ + public byte getNutrients(); + + /** + * Get the crop's air quality. + * Ranges from 0 (cluttered) to 10 (fresh). + * Updates every couple of seconds or when an update is requested. + * + * @see #updateState() + * + * @return Crop air quality + */ + public byte getAirQuality(); + + /** + * Get the crop's world. + * + * @return Crop world + */ + public World getWorld(); + + /** + * Get the crop's location. + * + * @return Crop location + */ + public ChunkCoordinates getLocation(); + + /** + * Get the crop's light level. + * + * @return Crop light level + */ + public int getLightLevel(); + + /** + * Pick the crop, removing and giving seeds for the plant. + * + * @param manual whether it was done by hand (not automated) + * @return true if successfully picked + */ + public boolean pick(boolean manual); + + /** + * Harvest the crop, turning it into gain and resetting its size. + * drop output on ground + * @param manual + * @return true if successfully harvested + */ + public boolean harvest(boolean manual); + + /** + * Harvest the crop, turning it into gain and resetting its size. + * drop output on ground + * @param Optimal force check getOptimalHavestSize() for harvest + * @return ItemStack[] of harvest output + */ + + ItemStack[] harvest_automated(boolean Optimal); + + /** + * Fully clears the crop without dropping anything. + */ + public void reset(); + + /** + * Request a texture and lighting update. + */ + public void updateState(); + + /** + * Check if a block is under the farmland containing the crop. + * Searches up to 2 blocks below the farmland or an air space, whichever appears first. + * + * @param block block to search + * @return Whether the block was found + */ + public boolean isBlockBelow(Block block); + + /** + * Generate plant seeds with the given parameters. + * + * @param plant plant ID + * @param growth plant growth stat + * @param gain plant gain stat + * @param resis plant resistance stat + * @param scan plant scan level + * @return Plant seed item + */ + public ItemStack generateSeeds(short plant, byte growth, byte gain, byte resis, byte scan); + + +} diff --git a/src/api/java/ic2/api/crops/package-info.class b/src/api/java/ic2/api/crops/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..1c2c0e11984088047c361a7591da7bbcffd08763 GIT binary patch literal 255 zcmYjM%}# z(%P0K7Uf=C+M6KDVpgFsPC}4qCbQ|I8r#HkpNn1+x)0-fLQnS5XWgbxHDQpl?0D(b zr>}sj2)FENqeA1dq+B0wbuZlqyHSLgYI8HLQm(FGJQp=f&q>T JhBzrW{RQACKiL2P literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/crops/package-info.java b/src/api/java/ic2/api/crops/package-info.java new file mode 100644 index 000000000..04b825392 --- /dev/null +++ b/src/api/java/ic2/api/crops/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.crops; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/energy/EnergyNet.class b/src/api/java/ic2/api/energy/EnergyNet.class new file mode 100644 index 0000000000000000000000000000000000000000..197104654adb0ed888e8f30094f0c97e2892663f GIT binary patch literal 331 zcmZ8c%T5A85UgGn7FPu1Wb_BrgA=)GxEM)DHgJG&pB*RIWSuq3VB%+aBJtn{_)*55 zjUk3hS66lQ>-*>P3&0SA6bFk&J-8`Cvj{B))fmlGBc%$9-Q8A&ue6%r#IE)3r&oy_@@ zjr|}9x(Bc!E;=sX$@CeNNq3AQex51K;O$WLZ`!{0Lg^TJq|#JLo)Lo&?TaTgMn)*v zKX#U;^{7mk_!4!z^;2OC&KY!$o2u(ED0#S|wxQ#-A2M>B;-grLS%L#8N!(7fX3!cf z!`F}}p^W*CLknr_4>8H)3rYqRyC*fr2`LbLaO6lM5%qYu5*(c+{wqP9>LhuuHmHYM zrBi{l|9mH~E-YdnEZ{0E;&lV^H&L06a7fo=Pz!z*HAZu5-7sh$wA&Ss=+5xnY)Pjn zFkq0QZw64zGdO`f0OeCCxLkxYLeCvuqFA8nvO_BWB2~C>6*Z{4d?WN=L}2aRuQ C0@Pao literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/IEnergyNet.java b/src/api/java/ic2/api/energy/IEnergyNet.java index 4d07b9838..8f656e505 100644 --- a/src/api/java/ic2/api/energy/IEnergyNet.java +++ b/src/api/java/ic2/api/energy/IEnergyNet.java @@ -42,7 +42,9 @@ public interface IEnergyNet { * @note call this twice with x ticks delay to get the avg. emitted power p = (call2 - call1) / x EU/tick * * @param tileEntity energy emitter + * @deprecated Discontinued, use getNodeStats instead. */ + @Deprecated double getTotalEnergyEmitted(TileEntity tileEntity); /** @@ -51,9 +53,21 @@ public interface IEnergyNet { * @note call this twice with x ticks delay to get the avg. sunken power p = (call2 - call1) / x EU/tick * * @param tileEntity energy emitter + * @deprecated Discontinued, use getNodeStats instead. */ + @Deprecated double getTotalEnergySunken(TileEntity tileEntity); + /** + * Retrieve statistics for the tile entity specified. + * + * The statistics apply to the last simulated tick. + * + * @param te Tile entity to check. + * @return Statistics for the tile entity. + */ + NodeStats getNodeStats(TileEntity te); + /** * Determine the typical power used by the specific tier, e.g. 128 eu/t for tier 2. * diff --git a/src/api/java/ic2/api/energy/NodeStats.class b/src/api/java/ic2/api/energy/NodeStats.class new file mode 100644 index 0000000000000000000000000000000000000000..8571830acfda8b768da6073907acb2a948d39714 GIT binary patch literal 675 zcmZ`#%TB^T6g@)=g;D`Q5b+gPLKik+t8pWmm=IWC*bmrX3A6?ZiC<+*BqlEW06)rj zrXUM~oBKF3=P~pB^Z5m!j#Co}lv9Y~K$VIrhX#%e91A2}-<=Fz?tKB#5J)Z8_AC@I z=D{eG16Lq%<@sKC&7s<8G-_P|{U&(iLAL4nZfiE~xswOk8xhGjgT5Sf<-}9_3e>|V zZz@n}di}a1pFL;k;0&77(n1<177QdUq*O7H6e$1aE|60!XC(cB)9wx3K3~rSU7Yc&68uCBd8NiFuLPq` zO?DlO4vTe%+n6^E_M-g(VV^G$vug`zb~(O){>FnCGOQ)aDyq(&qCtkFJ<4T?+C(XU z9Cq2&q>M#0DQhj7lzE(J9)*>)Lv3{{Zoeb;%3*1hh`@9tty1#BN?Ooz8(G^VXSb4z QTgmz+xv-U7it_FM0t&@qs{jB1 literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/NodeStats.java b/src/api/java/ic2/api/energy/NodeStats.java new file mode 100644 index 000000000..c55fd4e4f --- /dev/null +++ b/src/api/java/ic2/api/energy/NodeStats.java @@ -0,0 +1,25 @@ +package ic2.api.energy; + +public class NodeStats { + public NodeStats(double energyIn, double energyOut, double voltage) { + this.energyIn = energyIn; + this.energyOut = energyOut; + this.voltage = voltage; + } + + public double getEnergyIn() { + return energyIn; + } + + public double getEnergyOut() { + return energyOut; + } + + public double getVoltage() { + return voltage; + } + + private final double energyIn; + private final double energyOut; + private final double voltage; +} diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..58444696d5cbcb1f40c6db836d7f2ab8c5640248 GIT binary patch literal 611 zcmah`T}uK%6g{Kn`mtr2+IJvDxC#yVTJ#bI!B!86J+IqnBf1;gX!x^wsGx`FxgQnX zStC=T7`V*2_ntfF%zgiOc?D3zhJmFN81gB^QAlDAMFYzQRv1#k6G3OxkUharvZY(& z&aLF*ELW7~r}gia1BUpa^rSjs*eU-3sV zAT|C<#?+0xW7wS?Er!BVd?KW-F{w#U@JienPhGK7dul?08{&uCum6KS}g9smFU literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..9ccd40e3e27ccad43bee1cb2377b5491deda6c57 GIT binary patch literal 442 zcmah_O-sW-5PcKVMAI+rL3=HDs4aA{*Gex^K?q(fy>HV&S7K6PTIkR6BzW)#_@l(x zR1jjNvoJgF?aZ6m`TTnS05C)=zyX>*j(waEyepHKd`vj+h9(*+y)=pw&K@=@H!-W* zNdcx3k1l2e_c~oLp&6Ql?^e%q&Zc@E3)2eINXIjs8H;~NH-9uQgkD*i*PP_)S2|4f zVq&=wp}K8vJ6;kx<5rX@4l|_6b6@>N<)xncq>l$2C2;I^z{~bkEvM05e7#%pW yP-`SddWiP~jfHpQ_Imv{(5plaeDOiSo=ILChk{SHSvZmxYaXho6-&$S(u&ocIM6Oe0;vW1L&X`VGWHCJ0W%n!KJaL=n;;NW0Q20elm(J=XWovFe$5H zzXT(RyC-9Uf0a#{(1?xY>)GRk^O2sU!ZhP7(dk&{#^Dv|7x(6wa8{M(Iom>gOW)cw z)6>3VyM)?u0N3+^(5e>yn2QkIWV1Zsfm9Fc-m+2EqF?%h^=>t!7$8{1if>({MhA9&%DU)DSo ziP>f!B`NmgnjM9>O0*6&xfnten!d~*)YvwD!EI8eLH~YoXE2C6;a0c#V`(sI+SvIO ztItpmsxr9ot|S!_E3x_@?pQMYPi1hv&qcMBik_DncKHf0=;>Sg>Y@MF4=~VqsmM?- OMZyS&31b{39RC6>?Lw3Q literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/package-info.class b/src/api/java/ic2/api/energy/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..baaed208f9a33befaa16ebb85ab6260da0b3fd52 GIT binary patch literal 256 zcmYjM%}xSA4E_d$Meqj?ni!u!M)&H8n2?Z=U^L-A3}sW?nQnF#h_B|s2jHQM#S=ZW zX}_O*J^X(E0LXEj;WEROLH|RxwWkS}WN=eC|LF>PYi`i1YT5CM z)TgTlRT(_6&#ekADY5vnr+Ey9$3(Vtv9R;yhJ14e7_{`EW3|x!?`P=fyj7&Dmn@-& K^MpPI2^W7eLO?wL literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.class b/src/api/java/ic2/api/energy/prefab/BasicSink.class new file mode 100644 index 0000000000000000000000000000000000000000..711723de29f469dfda2c8860379c140320d90e81 GIT binary patch literal 5527 zcmb7HYkVA4760GeO(wgYBs7$k(zH#JLN}Yjl*-dUZJP(ABt=Nt(rCrWW|B<1I}>*| zX^Wyf#QIhQr7aHuAE*?eNYc^@h$1RJ@GbbwulmuC`UC&x&g^D)yGZ$vd+*+R?m7Q+ z&i|Y{dF`!JF9O(zzbCK(cf?`gP8sf!;cgi|o#1d!0-wPl89tl9=kWOizJM>vjW3DF zm*ZT0MOGX(;H$FYumShVio@4%pMm=mSc0!7@C`g5HxG;6BL4g@e`zmwkHKtgCQTZC&GfZef!`DtT7M1_nBJ(n60v z?kF@56595e?3j}qvBxspX&Lm>c4nuYbLDrq87oY=d4)BDZhE6-PrFtC%$m+Q6ZV+3 z)y})=Vb|M7PmI9zOBLcppSZ3Qhd7%v)8lp_^jjgC6fBLy1v|ZO$es?ZHTd43Z_`bM zgzL@P8CUL5&i8tzX1sknybO;Si=1PR_vifV_N^lfb+!B6Si$1Sh&|ckXQ%xcZ@gQq zMGN+%LVH!LY6vq(v}+T@{+wHIMtp5X5lHLcUVGNIGPXBq-8{n_W}UtRX=l3N`d&9V zL}-&vp{JBmy2+$2%9roOk~$9t1xIwU4IT%pX6`Y+Wtpb}=DwK{mHV+|ueeliXXzgK zV5V(vN1ox8%f!!PG9*5;uoWM7^XVx&H%T|zt0P7)v(^9yosjMUxm=f*OlV&=ZzvW@_xG8& z440d@LWZmHeiPTD-@uPdJcl_G^EhGPq>1No%D`z8KgKB&FW^NJFX1O9UY1)wmEmW& z+`ua)evVfal2uK|nPmsH0=K1!O0VdXJ%RBH1HUx!E4*f6Krn4XKRe^QXb2igsN)6< zk~9N78%sW#_%(jRDsyyMnfNV!XW~j+W#WS(d%-(51BJHA{(okhG4VQnZ{iR5qlsJb zQ3HQ6@n`&n6=Y%ze>Kr35&WBpH}Iyy>MBpF8?Zu0rNNp^K2wi~Spz{#CFksMm3k`6 zolij#NN~`XAro_MTAIg@?U6sE{Mz*Nek<#b=dFosrdTQcLxXI`teNXc=8T9nxE_0q zmnN^0$+!ij96$UCQeW>`Yp}P_LPT$VH?IX8t-7&1tRWrD{o~D9q zSh@(d&g2PnZL<2gFK3BVo_mT1wat<9uX`GD~a71P`vf)dFQh4T-9xhDg{= zf_N=2QA%Fh^1|VB!44nPPDd&B?^s}T=%T8gZ&j9QckjUH=%{r0riC6gWEZAL@2q`* zZ+2210j%LS>;@=YiaIQoHqKA=m~?VIvzhCe9Z%2f>ztQUz8lwYyq3Q*i0}rmBy|ER z)isAms&x+0)XF);j&nbPO&pg}KQKwjDa7HT343ua_TdBEO$GO{8C&>^ny{5PlwS1^ zK}4^5xr%a^O)<3G!&#)v)N`mi3L`a-da)SQ78Cm33>INlTQLLK(8_gMPA%dl-zkpb z%98{l3P%HlJ5IuwN5eegM=@{`i6iJq@gy>jMRPPN%jeKIho*4ZJco0_<>EQCJd1Nr zW65rY<-B<;-Ia>Xp>6?QI~r)|b_Vkfti_#7!(9yS-E{9BjNlM<^PeCIP5^tf40avV ze|W6ql?#D)a~9xn8e7INoWBtGCWZsJm!926i}#o5jE6dvyp*9LJB&cPMBoTkYOj}R zPnL@(7idqS6`r){^gV<|Jc3p{N=iLmW~IFhIn%d>hWN~u%tbZ4WvQ+cSkcweI**k@ zsr4L%Q*+1F75))4|*jFu3XFwj8cdIQ6tu@USDQCgg}aUzNyqf}5q z^?LL5ve4F*61Wq)!poZ|9pRn&)Cv~iLI8tmc!TKQ)EbrsQYC!#kV+H7x6}j@s|NCq znm~5f22$1t0wDh+kbk`c5Giy4GKvpzl)AJCwiuDNr>i3J@0vh9j6LDyP0XJpy*{HsHw^2vUQfOyJmGOzMvN@dNeW1!lceHh3Y$wIZbqO` z5?_Z%<7Uxqmvryrrr>N(t((WXBUn+^eVS9d#o#0zh#f04r^`Z}izR9aR;i_EQ|FhN zE|wm3mYHS|w$bny(xFptkY~Sldxyl!$!(oYhaZ-$)<@9TdZ_d8 zL#S^(wC!0WyE-Wl<8}~*SoC>xHej2^+L(qMOq%P6;gBM{>DRg@<4u^0F5)-6HgoWO(eTqWD*^P#T`Y&3djc?-|#0*Rtm{L($ zxd!$|)!P(W*sd#Xs}-9i3Hzuls+lIwPQbKzq^hb%U5S{wO5+Qfa> + + /** + * Forward for the base TileEntity's updateEntity(), used for creating the energy net link. + * Either updateEntity or onLoaded have to be used. + */ + @Override + public void updateEntity() { + if (!addedToEnet) onLoaded(); + } + + /** + * Notification that the base TileEntity finished loaded, for advanced uses. + * Either updateEntity or onLoaded have to be used. + */ + public void onLoaded() { + if (!addedToEnet && + !FMLCommonHandler.instance().getEffectiveSide().isClient() && + Info.isIc2Available()) { + worldObj = parent.getWorldObj(); + xCoord = parent.xCoord; + yCoord = parent.yCoord; + zCoord = parent.zCoord; + + MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); + + addedToEnet = true; + } + } + + /** + * Forward for the base TileEntity's invalidate(), used for destroying the energy net link. + * Both invalidate and onChunkUnload have to be used. + */ + @Override + public void invalidate() { + super.invalidate(); + + onChunkUnload(); + } + + /** + * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link. + * Both invalidate and onChunkUnload have to be used. + */ + @Override + public void onChunkUnload() { + if (addedToEnet && + Info.isIc2Available()) { + MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); + + addedToEnet = false; + } + } + + /** + * Forward for the base TileEntity's readFromNBT(), used for loading the state. + * + * @param tag Compound tag as supplied by TileEntity.readFromNBT() + */ + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + + NBTTagCompound data = tag.getCompoundTag("IC2BasicSink"); + + energyStored = data.getDouble("energy"); + } + + /** + * Forward for the base TileEntity's writeToNBT(), used for saving the state. + * + * @param tag Compound tag as supplied by TileEntity.writeToNBT() + */ + @Override + public void writeToNBT(NBTTagCompound tag) { + try { + super.writeToNBT(tag); + } catch (RuntimeException e) { + // happens if this is a delegate, ignore + } + + NBTTagCompound data = new NBTTagCompound(); + + data.setDouble("energy", energyStored); + + tag.setTag("IC2BasicSink", data); + } + + // << in-world te forwards + // methods for using this adapter >> + + /** + * Get the maximum amount of energy this sink can hold in its buffer. + * + * @return Capacity in EU. + */ + public int getCapacity() { + return capacity; + } + + /** + * Set the maximum amount of energy this sink can hold in its buffer. + * + * @param capacity1 Capacity in EU. + */ + public void setCapacity(int capacity1) { + this.capacity = capacity1; + } + + /** + * Get the IC2 energy tier for this sink. + * + * @return IC2 Tier. + */ + public int getTier() { + return tier; + } + + /** + * Set the IC2 energy tier for this sink. + * + * @param tier1 IC2 Tier. + */ + public void setTier(int tier1) { + this.tier = tier1; + } + + /** + * Determine the energy stored in the sink's input buffer. + * + * @return amount in EU, may be above capacity + */ + public double getEnergyStored() { + return energyStored; + } + + /** + * Set the stored energy to the specified amount. + * + * This is intended for server -> client synchronization, e.g. to display the stored energy in + * a GUI through getEnergyStored(). + * + * @param amount + */ + public void setEnergyStored(double amount) { + energyStored = amount; + } + + /** + * Determine if the specified amount of energy is available. + * + * @param amount in EU + * @return true if the amount is available + */ + public boolean canUseEnergy(double amount) { + return energyStored >= amount; + } + + /** + * Use the specified amount of energy, if available. + * + * @param amount amount to use + * @return true if the amount was available + */ + public boolean useEnergy(double amount) { + if (canUseEnergy(amount) && !FMLCommonHandler.instance().getEffectiveSide().isClient()) { + energyStored -= amount; + + return true; + } + return false; + } + + /** + * Discharge the supplied ItemStack into this sink's energy buffer. + * + * @param stack ItemStack to discharge (null is ignored) + * @param limit Transfer limit, values <= 0 will use the battery's limit + * @return true if energy was transferred + */ + public boolean discharge(ItemStack stack, int limit) { + if (stack == null || !Info.isIc2Available()) return false; + + double amount = capacity - energyStored; + if (amount <= 0) return false; + + if (limit > 0 && limit < amount) amount = limit; + + amount = ElectricItem.manager.discharge(stack, amount, tier, limit > 0, true, false); + + energyStored += amount; + + return amount > 0; + } + + // << methods for using this adapter + + // backwards compatibility (ignore these) >> + + @Deprecated + public void onUpdateEntity() { + updateEntity(); + } + + @Deprecated + public void onInvalidate() { + invalidate(); + } + + @Deprecated + public void onOnChunkUnload() { + onChunkUnload(); + } + + @Deprecated + public void onReadFromNbt(NBTTagCompound tag) { + readFromNBT(tag); + } + + @Deprecated + public void onWriteToNbt(NBTTagCompound tag) { + writeToNBT(tag); + } + + // << backwards compatibility + + // ****************************** + // *** Methods for use by ic2 *** + // ****************************** + + // energy net interface >> + + @Override + public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) { + return true; + } + + @Override + public double getDemandedEnergy() { + return Math.max(0, capacity - energyStored); + } + + @Override + public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage) { + energyStored += amount; + + return 0; + } + + @Override + public int getSinkTier() { + return tier; + } + + // << energy net interface + + + public final TileEntity parent; + + protected int capacity; + protected int tier; + protected double energyStored; + protected boolean addedToEnet; +} diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/api/java/ic2/api/energy/prefab/BasicSource.class new file mode 100644 index 0000000000000000000000000000000000000000..e387d5c3c7b41ff4cc747257aafe84120678173b GIT binary patch literal 5604 zcmb7HYj_-08Gg^+CcBxYH1v|v7TTuJ?WQmgunNJ_Hc4$TX_2I@Eh-Ks)}F;qbvUuE&QO@nPJM#(B6=hMQ!#S%#0ua7%{6M>F^sJ}$$p8GHht z%-~b_v@p0$NIsM1>a()q(2m<>#i1RalNEf5d%jRQloa+@hS>u_IggmD!HDMFWW;EtKt?N9=MeQ)&Q5?dfB1Skhe$e zJhv58mqMcAI%O_<6q2Lq1vu+n9b@~NIVSX zTbGa1ttF@X>bx^raec3Y5k+XjPNlQzWvWF#H;zU364@?6V~}t_`=3ON0E0xqcOt8O zHlGCadn6j>lVt8r$}UkohK3MtEj!Mv=rltoAf`GLNgS#Ch+Q708mnq8MlDNL4+rh8 zj&%&QQ;)pe8 z?=YrJ-|LCEf4=YSm>U2Lh|6a}V36wb!tT&j@;T2bxs|a%`vG5Jcdfql6LhYoLq2U~ z<^590_pEW=u(rxhmrLEWzr{)o{BYa}N!@f|=0w4IldKd@p#yge4LMBv8LwpuWqWew zV;;|goC|^^6MSrCdEwY?o45dPF|h$}HSsoFXyPJS zU5vMz*e=wM3-uEwp2SlIo;L9eo;C1o6W_tJCcca3OneW|n|ML4eqV+k;6ejGH1Q&S zq>!yC7S04KpcVRnC?&DGWlylZWZ=gpeuAHx*nvJ1m!Xdp?f-BHvOnbUE?myg>*;Kd zsBYqCc$s1D=&UjEbNs?YhbXyAs84(2+*MdPw}PKo6-@jRzcTS_{KmjpRiw4(Y4tse9 z$gyV9{%*4{2VMSI-Kk2qyZD0pl69PTyeVui8JqRY6` zO@=AEU`AWl8}h9l4h$rBtS8^TdBS#!L0^G~K(pw+~#oWoN%aTV3Po*km=EP-`-vbT)-W3+8s_9TJm=F&v-&h%!sX@w2h zNH6HGlwEJQqt@mp<|H*rlT(*Jt{*dt>M>!Yrr9@VXcpI@(fv3j{a2uzTZf{?sUZ@U zp1@w!1k%m1yT}MGyLsuS?CT}lvxg-UX5Ujm4~^3G1w>S+T0Y*8sLqQgpsn`ruAaSn zrQtWtR=hsDGQtet8vP z=spmUvO0pC246)%d>&NA#WlPoxwd0Cy{-9-X{_wat#4j6jnz|Voz)_c@d)GPFiaf5 zVjR^nRtDEY8Q?$8ep-)jPP%<3S23>nz6izLO{8LtRuQ*`0pIr|&f0SfYx^jY8n;d( zOAza)vF-@3F#Kq;GkIk**Fg$A#l2^_`!v#gdo93oScc~ryDw-sISNRVb~oOwqp!6J ztThC-0L>vVi9iFfZ3cZwVS8~!h|cIElz2W6Op^6LF z^0pzFE%UbATBi1F@C8Bf3YzdLPQ`1Q=VFa`VHNR0NYW~upmbalm+!-sp%{y^HW0a| z90;C)s%AA>U4xcM3F0bJffm#7z+aHTU(tfUVFmt9 zv;RYj3ZfutY^gH*i^%MfDihO6(18C!3su2jU0b)-+WOyh^~hIky^)b2;gk~VMuJsW z9+gH?Wg?bMRV|xBL0eYAsRFrx77>GH#1j0q4%eVj%@H)2s^^DTkb~lNEjxvvX|GnT zgGe?VmN*C)-o+HHer(I_p^&wC0$(eVf*99nrk0~gt-x9844kW0MKoxyYS12PATgXk ztZ4}`jIb>PNN!_Xi+?w?y?`_;$RQ--4H-IPD@NR7b?nGbvUgD8S=S($MFuFj|-8*|jV$A+rk+H|`r zVqdeGZr4> + + /** + * Forward for the base TileEntity's updateEntity(), used for creating the energy net link. + * Either updateEntity or onLoaded have to be used. + */ + @Override + public void updateEntity() { + if (!addedToEnet) onLoaded(); + } + + /** + * Notification that the base TileEntity finished loading, for advanced uses. + * Either updateEntity or onLoaded have to be used. + */ + public void onLoaded() { + if (!addedToEnet && + !FMLCommonHandler.instance().getEffectiveSide().isClient() && + Info.isIc2Available()) { + worldObj = parent.getWorldObj(); + xCoord = parent.xCoord; + yCoord = parent.yCoord; + zCoord = parent.zCoord; + + MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); + + addedToEnet = true; + } + } + + /** + * Forward for the base TileEntity's invalidate(), used for destroying the energy net link. + * Both invalidate and onChunkUnload have to be used. + */ + @Override + public void invalidate() { + super.invalidate(); + + onChunkUnload(); + } + + /** + * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link. + * Both invalidate and onChunkUnload have to be used. + */ + @Override + public void onChunkUnload() { + if (addedToEnet && + Info.isIc2Available()) { + MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); + + addedToEnet = false; + } + } + + /** + * Forward for the base TileEntity's readFromNBT(), used for loading the state. + * + * @param tag Compound tag as supplied by TileEntity.readFromNBT() + */ + @Override + public void readFromNBT(NBTTagCompound tag) { + super.readFromNBT(tag); + + NBTTagCompound data = tag.getCompoundTag("IC2BasicSource"); + + energyStored = data.getDouble("energy"); + } + + /** + * Forward for the base TileEntity's writeToNBT(), used for saving the state. + * + * @param tag Compound tag as supplied by TileEntity.writeToNBT() + */ + @Override + public void writeToNBT(NBTTagCompound tag) { + try { + super.writeToNBT(tag); + } catch (RuntimeException e) { + // happens if this is a delegate, ignore + } + + NBTTagCompound data = new NBTTagCompound(); + + data.setDouble("energy", energyStored); + + tag.setTag("IC2BasicSource", data); + } + + // << in-world te forwards + // methods for using this adapter >> + + /** + * Get the maximum amount of energy this source can hold in its buffer. + * + * @return Capacity in EU. + */ + public double getCapacity() { + return capacity; + } + + /** + * Set the maximum amount of energy this source can hold in its buffer. + * + * @param capacity1 Capacity in EU. + */ + public void setCapacity(double capacity1) { + if (capacity1 < power) capacity1 = power; + + this.capacity = capacity1; + } + + /** + * Get the IC2 energy tier for this source. + * + * @return IC2 Tier. + */ + public int getTier() { + return tier; + } + + /** + * Set the IC2 energy tier for this source. + * + * @param tier1 IC2 Tier. + */ + public void setTier(int tier1) { + double power = EnergyNet.instance.getPowerFromTier(tier1); + + if (capacity < power) capacity = power; + + this.tier = tier1; + this.power = power; + } + + + /** + * Determine the energy stored in the source's output buffer. + * + * @return amount in EU + */ + public double getEnergyStored() { + return energyStored; + } + + /** + * Set the stored energy to the specified amount. + * + * This is intended for server -> client synchronization, e.g. to display the stored energy in + * a GUI through getEnergyStored(). + * + * @param amount + */ + public void setEnergyStored(double amount) { + energyStored = amount; + } + + /** + * Determine the free capacity in the source's output buffer. + * + * @return amount in EU + */ + public double getFreeCapacity() { + return capacity - energyStored; + } + + /** + * Add some energy to the output buffer. + * + * @param amount maximum amount of energy to add + * @return amount added/used, NOT remaining + */ + public double addEnergy(double amount) { + if (FMLCommonHandler.instance().getEffectiveSide().isClient()) return 0; + if (amount > capacity - energyStored) amount = capacity - energyStored; + + energyStored += amount; + + return amount; + } + + /** + * Charge the supplied ItemStack from this source's energy buffer. + * + * @param stack ItemStack to charge (null is ignored) + * @return true if energy was transferred + */ + public boolean charge(ItemStack stack) { + if (stack == null || !Info.isIc2Available()) return false; + + double amount = ElectricItem.manager.charge(stack, energyStored, tier, false, false); + + energyStored -= amount; + + return amount > 0; + } + + // << methods for using this adapter + + // backwards compatibility (ignore these) >> + + @Deprecated + public void onUpdateEntity() { + updateEntity(); + } + + @Deprecated + public void onInvalidate() { + invalidate(); + } + + @Deprecated + public void onOnChunkUnload() { + onChunkUnload(); + } + + @Deprecated + public void onReadFromNbt(NBTTagCompound tag) { + readFromNBT(tag); + } + + @Deprecated + public void onWriteToNbt(NBTTagCompound tag) { + writeToNBT(tag); + } + + // << backwards compatibility + + // ****************************** + // *** Methods for use by ic2 *** + // ****************************** + + // energy net interface >> + + @Override + public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction) { + return true; + } + + @Override + public double getOfferedEnergy() { + return Math.min(energyStored, power); + } + + @Override + public void drawEnergy(double amount) { + energyStored -= amount; + } + + @Override + public int getSourceTier() { + return tier; + } + + // << energy net interface + + + public final TileEntity parent; + + protected double capacity; + protected int tier; + protected double power; + protected double energyStored; + protected boolean addedToEnet; +} diff --git a/src/api/java/ic2/api/energy/prefab/package-info.class b/src/api/java/ic2/api/energy/prefab/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..52651b15adb54ce6146d24edb6714f9508e6b5d0 GIT binary patch literal 263 zcmYjM$w~u35PhAPOpIGRD0ua5O6Te+2!VhQQOLcgQ!{j&Ug(}A_-h{g06$8sc(M*v zRK0~)-#?#U07_gGI4f|jFn$Z$WO!~{R=AAXyz7SVtgpj#qjy^2=5^~k>v(0ety-RW zA3ELH;Im-QChp0Fb*9?2WP)?S)9hvOD8@S46{jprh5p0zUSSaSo|9~gr&3`QQ`p%x zi_cIFqEfiErX&#(3$gj2n7Gyz{g0(EIRv9t`-Ya)hD~=3DD>p7L-o-A>qi*Kyb@$6 Pmm*_?N#aQchiT2`-9^VS#%C+oq+{-d$wxmoafe!caD&|85flCgyDv#G4+ zhcsit@pu*Fhu_T9LJ=-gJ&>wMCD%En^KSXqONfJ8W-3qQ(`3fl5iT}#4z=dOg%IZ( sT%&pF9NUOMX!+Mh$6q??5VjBjUPYtZjqWts#cs{_g8J@#|F>}P4L6i_y#N3J literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java b/src/api/java/ic2/api/energy/tile/IEnergyConductor.java new file mode 100644 index 000000000..08dab8896 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/IEnergyConductor.java @@ -0,0 +1,53 @@ +package ic2.api.energy.tile; + +/** + * Tile entities which conduct energy pulses without buffering (mostly cables) have to implement this + * interface. + * + * See ic2/api/energy/usage.txt for an overall description of the energy net api. + */ +public interface IEnergyConductor extends IEnergyAcceptor, IEnergyEmitter { + /** + * Energy loss for the conductor in EU per block. + * + * @return Energy loss + */ + double getConductionLoss(); + + /** + * Amount of energy the insulation will handle before shocking nearby players and mobs. + * + * @return Insulation energy absorption in EU + */ + double getInsulationEnergyAbsorption(); + + /** + * Amount of energy the insulation will handle before it is destroyed. + * Ensure that this value is greater than the insulation energy absorption + 64. + * + * @return Insulation-destroying energy in EU + */ + double getInsulationBreakdownEnergy(); + + /** + * Amount of energy the conductor will handle before it melts. + * + * @return Conductor-destroying energy in EU + */ + double getConductorBreakdownEnergy(); + + /** + * Remove the conductor's insulation if the insulation breakdown energy was exceeded. + * + * @see #getInsulationBreakdownEnergy() + */ + void removeInsulation(); + + /** + * Remove the conductor if the conductor breakdown energy was exceeded. + * + * @see #getConductorBreakdownEnergy() + */ + void removeConductor(); +} + diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class new file mode 100644 index 0000000000000000000000000000000000000000..eab917d66683b4b916efa52fa5457a7bd83f9271 GIT binary patch literal 282 zcmaKn!D_-l5QhKJ)M!K~^Z^70ySS;h*{b`T4zl1K41iVw_@Z!GxBN zQRcneKANu17sA@rwX@vB4c>K=SK~zo>hh(H*`8pi)AAtZR}6h^TRkp2M(2voKJ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.class b/src/api/java/ic2/api/energy/tile/IEnergySink.class new file mode 100644 index 0000000000000000000000000000000000000000..bcb05cee7a3ae96c354b2abbce5720b606ae05f9 GIT binary patch literal 306 zcmaJ-%Sr=55UkF|teW`x0uNr|#fIR`lQ0GXf`|A6~q*f&eK^lrv>>sk6htVY6rXeug1Zf$7z>7^thT>T@ucTToBrV)WK(5mzg)sQg6 T0ibh)x}S$Q(v2q6KEU_~F#u8p literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.java b/src/api/java/ic2/api/energy/tile/IEnergySink.java index 9676bff1b..4ae8e7954 100644 --- a/src/api/java/ic2/api/energy/tile/IEnergySink.java +++ b/src/api/java/ic2/api/energy/tile/IEnergySink.java @@ -24,6 +24,7 @@ public interface IEnergySink extends IEnergyAcceptor { * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. * * @note Modifying the energy net from this method is disallowed. + * @note Return Integer.MAX_VALUE to allow any voltage. * * @return tier of this energy sink */ diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.class b/src/api/java/ic2/api/energy/tile/IEnergySource.class new file mode 100644 index 0000000000000000000000000000000000000000..41ca6cff4a692202e1cf28888067c0857dab97b1 GIT binary patch literal 260 zcmaKnO%4G;5QSfvq5Ts#U}ZKsaRww-7R0{Ilt~LiI*quRg#$R0C^NCJv8bx#)%Q}b zp0E1@z!)8crb0`hP3WfV7uzj6PNo^V^hOAV(S%S>oVk9ba5#z9gqFa|N}{HYck&KcT&#`UjLCA5`y6mg>c3$FV02{@A7m>pi;) cfl!hP-*SyrC^vVz*PcJL6ERm5x zJ~P=!Kd~TFKNT#aUjmfUM^XmV1X8GdN9~lOOajmXi&W-$pm8h^a`bfy9Yb$|kV?}$l4}0fJVeRVLS#E-< zc$vt;c+tT)`!y>F!xs(V^Ib)e9D|K(yq2Y@gfJ@7q9>Uj)I|{{M(3JZxK0P%Lwi-eFRj{ZM~gi+7{ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.java b/src/api/java/ic2/api/energy/tile/IHeatSource.java new file mode 100644 index 000000000..2e5db4111 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/IHeatSource.java @@ -0,0 +1,23 @@ +package ic2.api.energy.tile; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IHeatSource { + + /* + * Return max heat transmission peer Tick (only theoretical bandwidth not available amount) + */ + int maxrequestHeatTick(ForgeDirection directionFrom); + + /* + * @param requested amount of heat to transfer + * + * @return transmitted amount of heat + * + * example: You Request 100 units of heat but the Source have only 50 units left + * + * requestHeat(100) : return 50 : so 50 units of heat remove from HeatSource + */ + + int requestHeat(ForgeDirection directionFrom, int requestheat); +} diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.class b/src/api/java/ic2/api/energy/tile/IKineticSource.class new file mode 100644 index 0000000000000000000000000000000000000000..225191cc3f787f9d6a872998973eefd07a5fafab GIT binary patch literal 305 zcmb7=v1$TA6h-ed#!XBkn9eR$(&WLWv=w1du+Sfv4A151?o2Y74au)r;v|&68?}2v{=7_#>y+4FwsGr2 zDQtaRd&f=GisvnvX%HLLyXi|oc)Yepc>C{G(T)w*z6n<5S_xrXEIP*yzV6JoAv~$g v*?cH>=A5*IFPnr>+vUo*l2`A$WIG@bdg&QJuTQu^A4vBWgG2~f%W-!GmSS8` literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.java b/src/api/java/ic2/api/energy/tile/IKineticSource.java new file mode 100644 index 000000000..a65140876 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/IKineticSource.java @@ -0,0 +1,22 @@ +package ic2.api.energy.tile; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IKineticSource { + /* + * Return max kinetic energy transmission peer Tick (only theoretical bandwidth not available amount) + */ + int maxrequestkineticenergyTick(ForgeDirection directionFrom); + + /* + * @param requested amount of kinetic energy to transfer + * + * @return transmitted amount of kineticenergy + * + * example: You Request 100 units of kinetic energy but the Source have only 50 units left + * + * requestkineticenergy(100) : return 50 : so 50 units of kinetic energy remove from KineticSource + */ + + int requestkineticenergy(ForgeDirection directionFrom, int requestkineticenergy); +} diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.class b/src/api/java/ic2/api/energy/tile/IMetaDelegate.class new file mode 100644 index 0000000000000000000000000000000000000000..98228465c6f22f55ac88812d4a0ca305daf6db9a GIT binary patch literal 289 zcmZusOG*Pl5Pg-zOg;*d3y3@2Sdg7WvPuMDLKfo%dWN#;Ft#$O3FK-nJU|X5*7Q!| zqTp5Wes%i!`UWt^Rfb81X@*O})Qc8v`5J236J~e!`OY02w;F2B!(JDJaS?oU+BQOX zJR>~iQIy|9l&W!W$|e+v8uZAW={mv1(tIYxN842LY*$Nq*@(K8)Z(4WLl;W84b`08 zXJCoa_+#?oKSaWH>Q}qyd0XzJQo_x@vUT$4It&Sfo=xB0rvYJr3)_aa^^h4FB{cp8 D(z;Mt literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java b/src/api/java/ic2/api/energy/tile/IMetaDelegate.java new file mode 100644 index 000000000..f7319d0e1 --- /dev/null +++ b/src/api/java/ic2/api/energy/tile/IMetaDelegate.java @@ -0,0 +1,36 @@ +package ic2.api.energy.tile; + +import java.util.List; + +import net.minecraft.tileentity.TileEntity; + +/** + * Interface for grouping multi-block structures to a single energy net delegate. + * + * The energy net uses TileEntity to refer to a specific xyz+world position. If multiple of those + * positions should belong to the same functional structure, i.e. they consume or produce energy + * only once for the whole multi-block instead of once per every single block, this interface + * allows to do so. + * + * The tile entity implementing IMetaDelegate has to be added/removed to/from the energy net + * instead of every single sub-TileEntity. The energy net interaction will be handled by the + * IMetaDelegate TileEntity as well. + * + * The sub tile array TileEntity[] just provides optional connectivity (IEnergyAcceptor, + * IEnergyEmitter) and mandatory position (x, y, z, World) data. + * If the connectivity data on the sub tile is missing, the meta delegate is queried instead. + * + * See ic2/api/energy/usage.txt for an overall description of the energy net api. + */ +public interface IMetaDelegate extends IEnergyTile { + /** + * Get the sub-TileEntities belonging to this Meta TileEntity. + * + * @note The list has to be consistent between the EnergyNet Load and Unload events. + * @note The list must have at least 1 element. + * @note The parent te implementing IMetaDelegate isn't automatically included. + * + * @return sub-TileEntity array + */ + List getSubTiles(); +} diff --git a/src/api/java/ic2/api/energy/tile/package-info.class b/src/api/java/ic2/api/energy/tile/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..fdee4a7722bb0bb10b3c1e810e23cc2cb4aafa3c GIT binary patch literal 261 zcmYjM%}xSA4E_d$Mf}5qCf&~I|=JJ-q@WrxOv@%ES?vVWLfhh zgqUrX7?NVouGy21t3+#GlZ)QRK$Dl*qZ->r7ThLf8gw7V_XfSV58UcDdnyeEO&fQz zV)g0kK~)B~;!08>u@b8f${LIQhcXx)Vo_~FMf2r`UA_hkI{MY2I_UoOBlL7$Dbm+V Nkubn35~}%=#jjj*q>_6R~}NRhMK@p^lX9C?m1 zd1t!Cz{;Py8?>Led@is)XYs0g0gL)dN5^4I>c$+E;%w+;H>ep-SQ3d_*AcIDhFi1@ z28vrU$u$z#M}F8lZE7V?BQC{0i@3PLu_1~>lB1#WO-04o$t>vAX8ZLrQ8>YS~-7?RIO~CW1&_q zoFo02ycCu=uJRP%6_(LN87*w!H8#;kk0}CuBeRLDDgCdR>@8!XbpE*qlw*R zRp|t+6B*qK?orXWsNg;x(1$?}iA?yZu#`t0Hx=Acu&m&=f;$TC zD!7-!{TwO+VxMn~?*ZRKfpqL|N`XQo+hJF(w8G{NHyQ%@%_!^~`G(@F+g{LQsHh5L zT|e-XhXTP&J&=jh_5<0By!VN-7e=j3=b6IFi7go;mk-S7Ir)`}O)O0`;R zG-`aRjYfH${jP?p-(sC7KHhC_$mprJ(c;Q*J#2cdbuaRjf3%oRw*6ROq|Q>&BR`4t zKxR>w!8@F1 z)W@Ia;sT@8EvRb^#(LsVD6x14q1^s+@P1jBF1SAcBj-IL;eSOP9yRF literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..627a8ea49dd37e0e85f31217441ad42097c22fa6 GIT binary patch literal 984 zcmcgq!EVz)5PcimI5wt%(ljomK%od)C>Fg2acI?uNER1RkaF9&+hnQZjn>-)?tBVA zzyTp~-~;$5#O$VmHiAlAxOnHyyf-uZyx)I({RUtc_d|HN6W|gyeBAYMk0BUJBMKwU zdxrJ25GEPPLS&jBnPiqv4qUm#P<J)|0`#CR5L98T|*>1weG7+|(IFX}n{z-4maUMKnSex7XtTzlHO%S>q zDnrz&n$l1T9?WUZnRdn(l4xEG1W8z%z*tS4KI-QxJKocRAD6b)p+Vx^I9H{dIC783 zdf_>I~ZuI4+H28AZZ zxJ>A1rbUE0A?kvwRA(+)qG=TuUB|N1#%N&0Z4*<6723xtVywEoV%)$QxovYdDXO_> XooWH~xkadg+gPMCqzU#`R}lOJ00;xj literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..368dc061ccf5f3c01163015a84e0b04a9e848ad4 GIT binary patch literal 1003 zcmcgr%We}f6g>`Uk_n-OLdcZTLZLt#9wQ37AQr6}DN@9yRgkiCrfy;~8AmhI1U`U2 z;RjeCBo=%CAB8w}Sd@{dSfSC__i^s^xkvVopWnU%*u%prirDgS3HQplU&gk87s*s5 zI#UyY&2Fr+V4`CcCh{~3Y&7U_Im%=>ZV8lL=~!p41wQWNpmUQ%C&630wsI*IXFB^3 z9J=koWLM90JlrRtR=eHl_j8SMbas0J#RGGq1XjA_{N`*jP|2|zM2xI(DOtkfX z2aDNArxtBTJ{lR59nQ#3pw@|Fl^jrtR1whZ>ToZRQynOq4;w{xXd6F2&Ef%P2S z^O6Wu*<2;*$Yg|WgovE3-`r05e;dnn$a-7;+ zheXu-X=GA8bKpL~=|n}A)q76cWQNs#7cEMHV?O8rnah;Xcx`Dc@^>LGxmW|J^K|a=6 l!!5_l$2xA4nT>7GsyJ(tIgfqr&@13Bmbq7Xf}QFLyk8!_2wVUF literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/event/LaserEvent.class b/src/api/java/ic2/api/event/LaserEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..fa1a1b08eeb55aadf6c51851db687eef702608e6 GIT binary patch literal 1415 zcmah}TTc@~7(G+kE-kCbrE(JxL@op@dR4;-pq3!!w*BA)CCWTa{|avRF?fSyrJdh92? z?fPy^LQa;iRBQ&JcVxd;dh5#3<)(Wbc6C}R?HwGfR0NVm5~g?}32)A8hcbNU9D1}2 zmxHR~Rh-aO`;IXgpSql3vg}qjZKv+qQr(o@CSO5Pkk-9!2uxk+rF#Z}?8QCMHLZzO zK=Y@7CXc}EVvpPG1$D|v^QNr(!FgDfC0BLczH@!u>mQwlBQWvyoHtvO6*qD@%#QB| zu@k$2&sp;2YQ1UKf}_Yju6cGfsMP|$J=dw@A9*sgi;iEFo}yvP#BCHzj3Q^^CdN#R zW5UFwQd78PVj43hW-%i${x6CIRxW*Y$3b`^J4AL-)cIWV|4Or%rfgBv*vg*g$3^JVu>Dk>IM3KXjh_jkvrC;eVKhIw8E%_Mi!^((`c1*BsE$i zN@fgc5Pj>!4oL$cg+SXRZE2xtTw04>gOE@KqEdtqpdfMEIvcvk-i;imU;l_B z2MdV|!mRPnHi8+gR9#n5BeX6Q4773@^- zSU{Z7KBRq4`$C{R(_%XeiR6vYNPXK0-M`Iqw*-#M#Y(&5vza-FJ?o@w&;+!&k7Tw6o-c8BrwG)nDw7ERJ5ifx)&b7}QhnsK7C=s=oSCEVGd zjz#R&aU0D#YFMbF&Ty0A7DEFI0!#mESfKyUlqWX(q^`#D*TCIy1Xizmll}+~=-I3E ze*|c<7g9~OWr>KS%YQ9YcJEXc;$11k4hI^Fp>aslUQ!cL_mMKR# l)h1(}Qyo$zr@ExdPOXyiomwLmQ06*C9<{zf98ir-;5TGRql5qe literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/event/PaintEvent.java b/src/api/java/ic2/api/event/PaintEvent.java new file mode 100644 index 000000000..c6565c229 --- /dev/null +++ b/src/api/java/ic2/api/event/PaintEvent.java @@ -0,0 +1,32 @@ +package ic2.api.event; + +import net.minecraft.world.World; + +import cpw.mods.fml.common.eventhandler.Cancelable; + +import net.minecraftforge.event.world.WorldEvent; + +@Cancelable +public class PaintEvent extends WorldEvent { + // target block + public final int x; + public final int y; + public final int z; + public final int side; + + // color to paint the block + public final int color; + + // set to true to confirm the operation + public boolean painted = false; + + public PaintEvent(World world1, int x1, int y1, int z1, int side1, int color1) { + super(world1); + + this.x = x1; + this.y = y1; + this.z = z1; + this.side = side1; + this.color = color1; + } +} diff --git a/src/api/java/ic2/api/event/RetextureEvent.class b/src/api/java/ic2/api/event/RetextureEvent.class new file mode 100644 index 0000000000000000000000000000000000000000..e3df863a47226a008f75d6488846a833644f34ea GIT binary patch literal 1024 zcmaJ=TTc@~7(KJ}P5}X{R;~p^x?EO3eZgpyXwszm0H!9!mt{MZ(Y-X=Ew_K=!^Xr1 ze}HfPA>)~W#1<2_ne(0b=G&R`ot^&r^W!Ig9Xu^z6m}6MtZUfNu&H57gQMY*hHVWy zdFI{oFkof%;KKF z_`mwMGI56zhi1pT+wJ;Fwt37)f!s3{s^q!Ai?wU}o<_0Xc0Op_Yw)?YJa}xQQEyT4 zeqO{Q4-44(;-1jN z>OntDR3KZbr`W>FFpLs6QBlYaHk)4e)CrsVNYjzuB0<$-{BTyf@3Y{qaEU$bVaK|`Fr*Hbe z^%iQpjibE41!|x&vPmt@MCvn<5>2E^6Dib0YGo9_d0D zs;g4{{qy++pu|;yivpJh!-eb{Pp@2&!AC)I7U+6qjvrnQRq zy7Iz2{qaw>>GYNDx|E&tV_GF7@0zs98~O(d%zBh6X$m@CN>(ls5D5HDK!gGVgnh%% HXMpGn`MNdi literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/info/IEnergyValueProvider.java b/src/api/java/ic2/api/info/IEnergyValueProvider.java index 178a95431..1e7b2cc57 100644 --- a/src/api/java/ic2/api/info/IEnergyValueProvider.java +++ b/src/api/java/ic2/api/info/IEnergyValueProvider.java @@ -7,6 +7,9 @@ public interface IEnergyValueProvider { * Determine the energy value for a single item in the supplied stack. * The value is used by most machines in the discharge slot. * + * This only applies to basic single use items, others are to be queried + * through e.g. ElectricItem.manager.getCharge(). + * * @param itemStack ItemStack containing the item to evaluate. * @return energy in EU */ diff --git a/src/api/java/ic2/api/info/IFuelValueProvider.class b/src/api/java/ic2/api/info/IFuelValueProvider.class new file mode 100644 index 0000000000000000000000000000000000000000..57f9f4bfc06dcf15caa31b662b682c186e9ed89c GIT binary patch literal 190 zcmZXOu?oU46h-f=wN-I&a}=C(G0@e$P!JRf4sJ2NmejPBkoMyo`~W{nOcxiI!yV3n z`~Ey%01`}N#4#p>dC4yA*qo*5n6Ta)8g`=A4J#`PC$!^QWFEPb>b}2hGr}xyJF7U= z#uv-%m!E9g>l@o$C3{I&X_W~1&_XvwEB-aYVi1LqO(~Aoij|89gup)pC?t#!4hv(? G0MQqP2s5kz literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/info/Info.class b/src/api/java/ic2/api/info/Info.class new file mode 100644 index 0000000000000000000000000000000000000000..7099fae6c95c6f68ed87490f8f5dbac846ea45aa GIT binary patch literal 1222 zcmah|TT|0e5dKaJqz&O#phA_KAQn`jco#&W6eeS68Cn>J7v?k#a4=1nG{y0!_#b!? zXOQv1M<4u6j^m!RAmA`OxZ9p?)cqUWsoAT(cOc5PKf@4{ zDN8lmVHmlTAibBv+X-{UD;sV#;I3seB+Na2z;%baJ9@sfXIlY*YKtq&TUj%kDXtkA z3GCW|UJ zuKzePbY9*Dh5d6ihC~Z0)yEaCmmy{Cf7B~pxvFnh9NqFN70=a8*_F@GDyp>c(4roD z)8~d>2z=r0%*Y|c#MzY?Oi!3s1JWFauKr8Y3uro8CZ8)5*VZ#dBeyIs&@~wZ+Of;4 zYc{ub?Q#QTEPZX7WUd^@Cz0P~NTxR@&UJTsr7%K|u$3OAf;cp^krqcgIzriru23e> z9m<}D>C4--u%Xr4Ji%Mp}g#6Ck!ogn@dk<=l@Mnn80nn~}W29iXsk1+c& vPSsB9b)%PBy-hKr^eKq6{YD>c7Gr132g1_CoDsBS&dxC(BI^$MA{hS*+u0d| literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/info/package-info.class b/src/api/java/ic2/api/info/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..96b88b7d9e79330b89895f7cada08f0a8ecae099 GIT binary patch literal 254 zcmYjM%Sr=55Ufc|Hpcfs!H+Pld-W6qAs{FUxlbmY&~aya+1Vuj=D`o}qa?ka>_azQ z)m2pg{C<4{C~;BXtiZX$_(Qi%;Ag4W;i~rG)35nX(n=>Azw-{a@7vT$d zTi=SNY}`wz_Y`%RX%#C98lxtfzRe!Z*w-@WCflV$|6y|PFwlMC#Qt$zTk+;+7SO(iEnNGcYfFI!( z_=@^K(8T!cU-%owsB5OhwgkL9^qjNz?7jBd>+I7nKR$c{kiuF78WLedF&o7klHM{O z#R7D1xvXL_3Kc08S0V@_q2j8FB>}Z8ZCNxOfyta@q;$Dw>6UAj_3XWpX}FGMWNEF} zgVF*KM?P;@0^NCOJgx0D?5aR-ZdX2ⅆ;;dd{l4ObBmUMO(Tx#}r5(`3zt&5c?)Z#oZUzC_QNT*Z*3E$LXE-Eaoo9g74< z+bgz~VueA+ERwb9)QSA=GZ}AB%brfuW0v^mXew4T-DB0V@tkeCdYOG0j(p-a?t|B` z=~AHd|G+EOl)ylX?7U4!x)q1rhN>Q%z}TP533T~&*X5qCrHX3;of)IlxQ)nWrREss zeaq9nuT{|nZx}QTU{FIZ`cz!ka0AO4ZX!(-4H?|hu!7qHGwri?s=gZTU{#>MIcBSl zBVT&6CNSIv(#nK7`xzx^7xf4ET~0RVqzQ7Q3P-x>tb+z*p}@(A*EMVbNGG19wMONQ4=DBjVjL4b*Lj{N xnKi|qhQN1(RZNe4V^k-J9?3H4lV@ii5q^At$a^SWXTmR77iXE)41EgXzW~2xP*?x} literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IBackupElectricItemManager.class b/src/api/java/ic2/api/item/IBackupElectricItemManager.class new file mode 100644 index 0000000000000000000000000000000000000000..fc7f1ad23a6e5659818e779d524c95e50f79e38c GIT binary patch literal 241 zcmZ`!%MJlS5UgeykBdJLCtOUjS2qcXggCglwb9nBH8yMbI0ql#qr`0DBH_@LPNk~4 z>-oAr0K{l3G!&W&ErL3*+huYg^acwjUZ1QJQ}Etv>*b{90oI<)aXj1*TI=(*Ffy~5 z5W4e8;IH{K6XOeOO6igvCsK@3zA>S1O{_V$pQyibLZ>w7j9sEv+ce~bf4uG9&H TN|MG+xFt=v!#Sb=&2v(H22 literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IBlockCuttingBlade.class b/src/api/java/ic2/api/item/IBlockCuttingBlade.class new file mode 100644 index 0000000000000000000000000000000000000000..8654649e7e6d85e2ac5b5fce6e8977824b84828a GIT binary patch literal 158 zcmX^0Z`VEs1_mPrPId-%b_Nbc2JZCKl8nTnl)Tj9VnzmL4NXr*2Cm@z(xT*4x6GVW zMh0)kdE=m9Z literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IBoxable.java b/src/api/java/ic2/api/item/IBoxable.java new file mode 100644 index 000000000..bca2cc0dc --- /dev/null +++ b/src/api/java/ic2/api/item/IBoxable.java @@ -0,0 +1,14 @@ +package ic2.api.item; + +import net.minecraft.item.ItemStack; + + +public interface IBoxable { + /** + * Determine whether an item can be stored in a toolbox or not. + * + * @param itemstack item to be stored + * @return Whether to store the item in the toolbox or not + */ + public abstract boolean canBeStoredInToolbox(ItemStack itemstack); +} diff --git a/src/api/java/ic2/api/item/IC2Items.class b/src/api/java/ic2/api/item/IC2Items.class new file mode 100644 index 0000000000000000000000000000000000000000..267272d0bba15ab291df1b209d5b47422980a04a GIT binary patch literal 1797 zcma)6ZBrXn6n<_JvYTar5Fns^acON0i6j!=fFRmp(MU?EDaHD}Nj70&*<>~wM}La{ z0_#lLsWXm#(HZ}P|D>Zn`w|j59d$Cfckj99D_KgAW=12w(j;ELtysV`;F`-RpJ|_ zZMvHR(ah3)f!J2NLFK86X&bw}lbYe&(`yzbsY<)9TlaOx^v@dY4*;>){h9W=7&yUB|RrrKO5(xP=pjsylkq4XvqOb@lo&&7+RtdZCAz z-KiZJb(dFynC3<E{rHJ;rqU=cl;DcqJ(|&E}#(V9>eM_ zn$BjHMtq+ck9PuvUEhDSbKDY`8Bq-FOA<(>Qf>E~y0L9~^i2#%$$OYoT*74)FW^Oz z_bkYpJ=1C!j*8c?qT&Fb2u$YdZO6zDiml=SRwR6?;xl}%;tPB!;VTtiLl?OCZR4FF&`hh8BU7kW==C z?6wDfr-oYoz_4AJVo=*_|KWBpVKO<|HVx~4AaRVQ#ojIW>O?Y9_;XhzhfW2qk3tCh zezYskMqz}->UUj#+M?|qJ%saNwhMclHkb!au5C2q|CB+d$q1V>jLRaxjYI#^otcfj0=16 z3U5xhzC=lZyWl>SeFX7?ucC2{`@$p^`K<;DxPq%ZCGaw?QQ{f@NoNu62M-bX9hZMX z^uZ&<9%HPJcuL~Zhx{0c9}%HKwhu-0F<#023iW%)xnH23iqpzNOooQ3DVk8tGwUNM zPJQRAC}9F?SoilRGzPo^nd=3@yM$#zd4tk5N=t;eL4fuNK<4;XgsJur^U++L!E_&~o$PN|Ak>*kE}H9O zHZ{kk(MS3;HGfK%0n9YU$axu3WC!Ds3X+jsXpy@ metadata 0 + block, no resin spot -> metadata 0 or 1 + block, wet resin spot -> metadata 2-5 (according to the side) + block, dry resin spot -> metadata 8-11 (wet state + 6) + + rubberWood; + rubberLeaves; // Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber = false + rubberSapling; // Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber = false + resinSheet; // Resin Sheet block, currently not meta sensitive + rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 + + // building/storage + ironFence; // Iron Fence block, currently not meta sensitive + + reinforcedStone; // Reinforced Stone block, currently not meta sensitive + reinforcedGlass; // Reinforced Glass block, currently not meta sensitive + reinforcedDoorBlock; // Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 + + constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive + constructionFoam; // Construction Foam block, currently not meta sensitive + constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock + scaffold; // Scaffold block, meta reflects internal physical model data + ironScaffold; // Scaffold block, meta reflects internal physical model data + + bronzeBlock; // Bronze block, meta sensitive + copperBlock; // Copper block, meta sensitive + tinBlock; // Tin block, meta sensitive + uraniumBlock; // Uranium block, meta sensitive + leadBlock; // Uranium block, meta sensitive + + // cables (when placed as a block, inventory items are different; TE implements IEnergyConductor) + + copperCableBlock; // Copper Cable block, meta sensitive + insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive + + goldCableBlock; // Gold Cable block, meta sensitive + insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive + doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive + + ironCableBlock; // Iron Cable block, meta sensitive + insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive + doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive + trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive + + glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive + + tinCableBlock; // Tin Cable block, meta sensitive + insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive + detectorCableBlock; // Detector Cable block, meta sensitive + splitterCableBlock; // Splitter Cable block, meta sensitive + + // generators + related (TE implements IEnergySource ex. reactorChamber) + + generator; // Generator block, meta sensitive + geothermalGenerator; // Geothermal Generator block, meta sensitive + waterMill; // Water Mill block, meta sensitive + solarPanel; // Solar Panel block, meta sensitive + windMill; // Wind Mill block, meta sensitive + nuclearReactor; // Nuclear Reactor block, meta sensitive + reactorChamber; // Reactor Chamber block, currently not meta sensitive + RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive + semifluidGenerator; // Semifluid Generator block, meta sensitive + + + // energy storages (TE implements IEnergySource and IEnergyConductor) + + batBox; // BatBox block, meta sensitive + cesuUnit; // CESU Unit block, meta sensitive + mfeUnit; // MFE Unit block, meta sensitive + mfsUnit; // MFS Unit block, meta sensitive + + // transformers (TE implements IEnergySource and IEnergyConductor) + + lvTransformer; // LV Transformer block, meta sensitive + mvTransformer; // MV Transformer block, meta sensitive + hvTransformer; // HV Transformer block, meta sensitive + evTransformer; // EV Transformer block, meta sensitive + + // machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) + + machine; // Machine block, meta sensitive + advancedMachine; // Advanced Machine block, meta sensitive + + ironFurnace; // Iron Furnace block, meta sensitive + electroFurnace; // Electro Furnace block, meta sensitive + macerator; // Macerator block, meta sensitive + extractor; // Extractor block, meta sensitive + compressor; // Compressor block, meta sensitive + canner; // Canner block, meta sensitive + miner; // Miner block, meta sensitive + pump; // Pump block, meta sensitive + magnetizer; // Magnetizer block, meta sensitive + electrolyzer; // Electrolyzer block, meta sensitive + recycler; // Recycler block, meta sensitive + inductionFurnace; // Induction Furnace block, meta sensitive + massFabricator; // Mass Fabricator block, meta sensitive + terraformer; // Terraformer block, meta sensitive + teleporter; // Teleporter block, meta sensitive + teslaCoil; // Tesla Coil block, meta sensitive + luminator; // Passive (dark) Luminator block, meta = facing + activeLuminator; // Active (bright) Luminator block, meta = facing + centrifuge; // Centrifuge block, meta sensitive + metalformer; // MetalFormer block , meta sensitive + orewashingplant; // Ore Wasching Plant, Meta sensitive + patternstorage; // Pattern Storage, Meta sensitive + scanner; // Scanner, Meta sensitive + replicator; // Replicator, Meta sensitive + + miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 + miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 + + + // personal blocks + + personalSafe; // Personal Safe block, meta sensitive + tradeOMat; // Trade-O-Mat block, meta sensitive + energyOMat; // Energy-O-Mat block, meta sensitive + + // explosives + + industrialTnt; // Industrial TNT block, currently not meta sensitive + nuke; // Nuke block, currently not meta sensitive + dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0 + dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 + + // Agriculture Stuff + + crop; // Crop Block, empty, not meta sensitive + cropmatron; // Cropmatron machien block, meta sensititve + + // ----- items ----- + + // rubber + related + resin; // Resin item, currently not meta sensitive + rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber + + FluidCell; + + // Lithium -> Tritium + + reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value + TritiumCell; // Tritium, currently not meta sensitive + + // Nuclear Fuel + + UranFuel; // , currently not meta sensitive + MOXFuel; // , currently not meta sensitive + Plutonium; // , currently not meta sensitive + smallPlutonium; // , currently not meta sensitive + Uran235; // , currently not meta sensitive + smallUran235; // , currently not meta sensitive + Uran238; // , currently not meta sensitive + + reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive + reactorDepletedUraniumDual; + reactorDepletedUraniumQuad; + reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorDepletedMOXDual; + reactorDepletedMOXQuad; + reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorMOXDual; + reactorMOXQuad; + RTGPellets; + + + // Recipe Parts + + coil; // Coil, meta sensitive + elemotor; // electric motor, meta sensitive + powerunit; // Item Power Unit, meta sensitive + powerunitsmall; // Item Power Unit, meta sensitive + + + // ItemCasing + + casingcopper; // Copper ItemCasing, meta sensitive + casingtin; // Tin ItemCasing, meta sensitive + casingbronze; // Bronze ItemCasing, meta sensitive + casinggold; // Gold ItemCasing, meta sensitive + casingiron; // Iron ItemCasing, meta sensitive + @Deprecated + casingadviron; // Refined Iron ItemCasing, meta sensitive + casinglead; // Lead ItemCasing, meta sensitive + + // Crushed Ore + crushedIronOre; // Crushed Iron Ore, meta sensitive + crushedCopperOre; // Crushed Copper Ore, meta sensitive + crushedGoldOre; // Crushed Gold Ore, meta sensitive + crushedTinOre; // Crushed Tin Ore, meta sensitive + crushedUraniumOre; // Crushed Uranium Ore, meta sensitive + crushedSilverOre; // Crushed Silver Ore, meta sensitive + crushedLeadOre; // Crushed Lead Ore, meta sensitive + + + //Purify Crushed Ore + purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive + purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive + purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive + purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive + purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive + purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive + purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive + + // dusts + stoneDust; + bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze + clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay + coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal + copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper + goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold + ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron + silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver + tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin + hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive + leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead + obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian + lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi + sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur + lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium + + // small dusts + + smallIronDust; // Small Iron Dust item, meta sensitive + smallCopperDust; // Small Copper Dust item, meta sensitive + smallGoldDust; // Small Gold Dust item, meta sensitive + smallTinDust; // Small Tin Dust item, meta sensitive + smallSilverDust; // Small Silver Dust item, meta sensitive + smallLeadDust; // Small Lead Dust item, meta sensitive + smallSulfurDust; // Small Sulfur Dust item, meta sensitive + smallLithiumDust; // Small Lithium Dust item, meta sensitive + + + // ingots + @Deprecated + refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron + copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper + tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin + bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze + mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive + leadIngot; // Lead Ingot item, currently not meta sensitive + + + // tools/weapons (without electric tools) + treetap; // Treetap item, meta = damage value + wrench; // Wrench item, meta = damage value + cutter; // Insulation Cutter item, meta = damage value + constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45) + + bronzePickaxe; // Bronze Pickaxe item, meta = damage value + bronzeAxe; // Bronze Axe item, meta = damage value + bronzeSword; // Bronze Sword item, meta = damage value + bronzeShovel; // Bronze Shovel item, meta = damage value + bronzeHoe; // Bronze Hoe item, meta = damage value + + ForgeHammer; // Refine Iron Hammer item, meta = damage value + + // el. tools/devices/weapons + miningDrill; // Mining Drill item, meta = damage value for charge level + diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level + iridiumDrill; // Iridium Tipped Mining Drill item, meta = damage value for charge level + chainsaw; // Chainsaw item, meta = damage value for charge level + electricWrench; // Electric Wrench item, meta = damage value for charge level + electricTreetap; // Electric Treetap item, meta = damage value for charge level + miningLaser; // Mining Laser item, meta = damage value for charge level + + ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45) + odScanner; // Ore Density Scanner item, meta = damage value for charge level + ovScanner; // Ore Value Scanner item, meta = damage value for charge level + obscurator; // Obscurator item, meta = damage value for charge level + + frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45) + + nanoSaber; // Idle Nano Saber item, meta = damage value for charge level + enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level + + toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1) + + // armor/wearable + hazmatHelmet; // Hazmat Helmet item, meta = damage value + hazmatChestplate; // Hazmat Chestplate item, meta = damage value + hazmatLeggings; // Hazmat Leggings item, meta = damage value + hazmatBoots; // Hazmat Boots item, meta = damage value + + bronzeHelmet; // Bronze Helmet Armor item, meta = damage value + bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value + bronzeLeggings; // Bronze Leggings Armor item, meta = damage value + bronzeBoots; // Bronze Boots Armor item, meta = damage value + + compositeArmor; // Composite Armor item, meta = damage value for charge level + + nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level + nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level + nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level + nanoBoots; // Nano Boots Armor item, meta = damage value for charge level + + quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level + quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level + quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level + quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level + + jetpack; // Jetpack item, meta = damage value for fuel level + electricJetpack; // Electric Jetpack item, meta = damage value for charge level + + batPack; // BatPack item, meta = damage value for charge level + advbatPack; // Adv.BatPack item, meta = damage value for charge level + lapPack; // LapPack item, meta = damage value for charge level + energyPack; // EnergyPack item, meta = damage value for charge level + + cfPack; // CF Pack item, meta = charges (as of v1.45) + solarHelmet; // Solar Helmet, currently not meta sensitive + staticBoots; // Static Boots, currently not meta sensitive + nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level + + // batteries + reBattery; // Empty RE Battery item, currently not meta sensitive + chargedReBattery; // RE Battery item, meta = damage value for charge level + advBattery; // Adv Batteryitem, meta = damage value for charge level + energyCrystal; // Energy Crystal item, meta = damage value for charge level + lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level + suBattery; // SU Battery item, meta = damage value for charge level + + // cables + copperCableItem; // Copper Cable item, meta sensitive + insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive + + goldCableItem; // Gold Cable item, meta sensitive + insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive + + @Deprecated + doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive + + ironCableItem; // Iron Cable item, meta sensitive + insulatedIronCableItem; // Insulated Iron Cable item, meta sensitive + + @Deprecated + doubleInsulatedIronCableItem; // Double Insulated Iron Cable item, meta sensitive + @Deprecated + trippleInsulatedIronCableItem; // Tripple Insulated Iron Cable item, meta sensitive + insulatedTinCableItem; + glassFiberCableItem; // Glass Fiber Cable item, meta sensitive + tinCableItem; // Tin Cable item, meta sensitive + + + detectorCableItem; // Detector Cable item, meta sensitive + splitterCableItem; // Splitter Cable item, meta sensitive + + // cells/containers (without reactor components) + + cell; // Empty Cell item, meta sensitive + lavaCell; // Lava Cell item, meta sensitive + waterCell; // Water Cell item, meta sensitive + UuMatterCell; // UUMatter Cell item, meta sensitive + CFCell; // constructionFoam Cell item, meta sensitive + + + fuelRod; // Empy Fuel Rod item, currently not meta sensitive + hydratedCoalCell; // Hydrated Coal Cell item, currently not meta sensitive + bioCell; // Bio Cell item, currently not meta sensitive + coalfuelCell; // Coalfuel Cell item, currently not meta sensitive + biofuelCell; // Biofuel Cell item, currently not meta sensitive + electrolyzedWaterCell; // Electrolyzed Water Cell item, currently not meta sensitive + airCell; // Compressed Air item, currently not meta sensitive + + fuelCan; // Empty Fuel Can item, currently not meta sensitive + filledFuelCan; // Fuel Can item, meta = fuel value (as of v1.45) + + tinCan; // Empty Tin Can item, currently not meta sensitive + filledTinCan; // Filled Tin Can item, currently not meta sensitive + + // reactor components + reactorUraniumSimple; // Uranium Cell items, meta = consumed uranium ticks + reactorUraniumDual; + reactorUraniumQuad; + + reactorCoolantSimple; + reactorCoolantTriple ; // Coolant Cell item, NBT for heat-storage, meta is 0-10000 for display + reactorCoolantSix; + + reactorPlating; // Integrated Reactor Plating item, currently not meta sensitive + reactorPlatingHeat; + reactorPlatingExplosive; + + reactorHeatSwitch; // Integrated Heat Disperser item, NBT for heat-storage, meta is 0-10000 for display + reactorHeatSwitchCore; + reactorHeatSwitchSpread; + reactorHeatSwitchDiamond; + + reactorVent; // Heat Venting component, NBT for heat-storage, meta is 0-10000 for display + reactorVentCore; + reactorVentGold; + reactorVentSpread;// Special: Does not store heat + reactorVentDiamond; + + reactorReflector; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorReflectorThick; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorCondensator; // Consumes redstone to absorb heat, NBT for storage, meta is 0-10000 for display + reactorCondensatorLap; // Consumes redstone/lapis to absorb heat, mNBT for storage, meta is 0-10000 for display + + // terraformer blueprints + terraformerBlueprint; // Empty Terraformer Blueprint item, currently not meta sensitive + cultivationTerraformerBlueprint; // Cultivation Terraformer Blueprint item, currently not meta sensitive + irrigationTerraformerBlueprint; // Irrigation Terraformer Blueprint item, currently not meta sensitive + chillingTerraformerBlueprint; // Chilling Terraformer Blueprint item, currently not meta sensitive + desertificationTerraformerBlueprint; // Desertification Terraformer Blueprint item, currently not meta sensitive + flatificatorTerraformerBlueprint; // Flatificator Terraformer Blueprint item, currently not meta sensitive + mushroomTerraformerBlueprint; // Mushroom Terraformer Blueprint item, currently not meta sensitive + + // diamond chain + coalBall; // Coal Ball item, currently not meta sensitive + compressedCoalBall; // Compressed Coal Ball item, currently not meta sensitive + coalChunk; // Coal Chunk item, currently not meta sensitive + industrialDiamond; // Industrial Diamond item, currently not meta sensitive, DEPRECATED + + // recycler chain + scrap; // Scrap item, currently not meta sensitive + scrapBox; // Scrap Box item, currently not meta sensitive + + // fuel production chain + hydratedCoalClump; // Hydrated Coal Clump item, currently not meta sensitive + plantBall; // Plant Ball item, currently not meta sensitive + compressedPlantBall; // Compressed Plant Ball item, currently not meta sensitive + + // painting + painter; // Painter item, currently not meta sensitive + + blackPainter; // Black Painter item, meta = damage value + redPainter; // Red Painter item, meta = damage value + greenPainter; // Green Painter item, meta = damage value + brownPainter; // Brown Painter item, meta = damage value + bluePainter; // Blue Painter item, meta = damage value + purplePainter; // Purple Painter item, meta = damage value + cyanPainter; // Cyan Painter item, meta = damage value + lightGreyPainter; // Light Grey Painter item, meta = damage value + darkGreyPainter; // Dark Grey Painter item, meta = damage value + pinkPainter; // Pink Painter item, meta = damage value + limePainter; // Lime Painter item, meta = damage value + yellowPainter; // Yellow Painter item, meta = damage value + cloudPainter; // Cloud Painter item, meta = damage value + magentaPainter; // Magenta Painter item, meta = damage value + orangePainter; // Orange Painter item, meta = damage value + whitePainter; // White Painter item, meta = damage value + + // explosives + related + dynamite; // Throwable Dynamite item, currently not meta sensitive + stickyDynamite; // Throwable Sticky Dynamite item, currently not meta sensitive + + remote; // Dynamite Remote item, currently not meta sensitive + + // misc intermediate recipe ingredients + electronicCircuit; // Electronic Circuit item, currently not meta sensitive + advancedCircuit; // Advanced Circuit item, currently not meta sensitive + + advancedAlloy; // Advanced Alloy item, currently not meta sensitive + + carbonFiber; // Raw Carbon Fiber item, currently not meta sensitive + carbonMesh; // Raw Carbon Mesh item, currently not meta sensitive + carbonPlate; // Carbon Plate item, currently not meta sensitive + + matter; // UUA item, currently not meta sensitive + iridiumOre; // Iridium Ore item, currently not meta sensitive + iridiumPlate; // Iridium Plate item, currently not meta sensitive + + + // Metal Plates + + platecopper; // Metal plate item, meta sensitive + platetin; // Metal plate item, meta sensitive + platebronze; // Metal plate item, meta sensitive + plategold; // Metal plate item, meta sensitive + plateiron; // Metal plate item, meta sensitive + platelead; // Metal plate item, meta sensitive + platelapi; // Metal plate item, meta sensitive + plateobsidian; // Metal plate item, meta sensitive + plateadviron; // Metal plate item, meta sensitive + + // Metal Dense Plates + denseplatecopper; // Metal dense plate item, meta sensitive + denseplatetin; // Metal dense plate item, meta sensitive + denseplatebronze; // Metal dense plate item, meta sensitive + denseplategold; // Metal dense plate item, meta sensitive + denseplateiron; // Metal dense plate item, meta sensitive + @Deprecated + denseplateadviron; // Metal dense plate item, meta sensitive + denseplatelead; // Metal dense plate item, meta sensitive + denseplatelapi; // Metal dense plate item, meta sensitive + denseplateobsidian; // Metal dense plate item, meta sensitive + + + // upgrade modules + overclockerUpgrade; // overclocker upgrade item, meta sensitive + transformerUpgrade; // transformer upgrade item, meta sensitive + energyStorageUpgrade; // energy storage upgrade item, meta sensitive + ejectorUpgrade; // ejector upgrade item, meta sensitive + + // misc + coin; // Coin item, currently not meta sensitive + reinforcedDoor; // Reinforced Door item, currently not meta sensitive + constructionFoamPowder; // Construction Foam Powder item, currently not meta sensitive + grinPowder; // Poisonous ingrident, currently not meta sensitive + debug; // Debug item, currently not meta sensitive + boatCarbon; // Carbon Fiber Canoe item, meta sensitive + boatRubber; // Rubber Dinghy item, meta sensitive + boatRubberBroken; // Damaged Rubber Dinghy item, meta sensitive + boatElectric; // Electric Boat item, meta sensitive + + //Agriculture + cropSeed; // Crop seeds, stuff stored in NBT, don't use for crafting recipes! + cropnalyzer; // Cropnalyzer handheld device + fertilizer; // Basic IC2Item, used to provide nutrients toCropBlocks + hydratingCell; // Cell used to hydrate Crops, meta = Content, 0= Full, 9999 = Near empty + electricHoe; // Electric Hoe, Metadata indicates charge level + terraWart; // Mystic opposite of NEtherWart, cures StatusEffects, simply consumeable + weedEx; // Spraying can of WEED-EX, meta indicates usages left + + //Boozeception + mugEmpty; // Simple stone mug + coffeeBeans; // Harvested CoffeeBeans + coffeePowder; // Processed Coffee Beans, used to craft drinkable Coffee + mugCoffee; // Mug of Coffee, Meta indicates status 0 = cold, 1 = Normal, 2 = Sugar'd + hops; // Hops, harvested freshly from crop + barrel; // Carried Barrel, metadata encrypts the information about the liquid inside + blockBarrel; // Unobtainable "placed barrel", TileEntity controlling the Fermentation process + mugBooze; // Mug filled with booze, metadata encrypts the information about the liquid inside + + */ + + /** + * Get the base IC2 package name, used internally. + * + * @return IC2 package name, if unable to be determined defaults to ic2 + */ + private static String getPackage() { + Package pkg = IC2Items.class.getPackage(); + + if (pkg != null) { + String packageName = pkg.getName(); + + return packageName.substring(0, packageName.length() - ".api.item".length()); + } + + return "ic2"; + } + + private static Class Ic2Items; +} + diff --git a/src/api/java/ic2/api/item/IDebuggable.class b/src/api/java/ic2/api/item/IDebuggable.class new file mode 100644 index 0000000000000000000000000000000000000000..13c992baf8f97543f6017e2e6d95905ae026ca91 GIT binary patch literal 191 zcmX^0Z`VEs1_mPrZgvJvb_Om+2A<4fm(--v^z_7}oK!{zW)00KpkR7x30O2FwW5TP zK}18-Co8cmQ9ma!FI_*lq$o2l-I|esD>%QjC^^+F6QohV6Jd-VNHHUWL}s#)equqU zer8E(u0E1HP&L9h|D>$c=rATa%R~TYr@6l(6U#RST;`2yb{lq%EOp= zZC?6UkAzOa{`OhBf~WC;aPwd3FJ_<64zR3R`t=4C?Y(~A;CEQ(j*y1RgRt8norgci zwA1!=#%?H;ctUHkcyopaQZnHz&q_AliHQqc&-F?Z&c*bUUdr|wzY~ENGpf|KP@|`L n=q3b0Bb*vYnuI+xfuQ?HYE8F#fWz9ia8zqM`p`TMvw_YJhv#=a literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IElectricItemManager.class b/src/api/java/ic2/api/item/IElectricItemManager.class new file mode 100644 index 0000000000000000000000000000000000000000..978eb9147f0ce600a2623c5d997d99aac731137d GIT binary patch literal 627 zcma)4O;5r=6r4qD1wX*AgGWp>a&Z%`oKPS(!FVWo=xtrsy4Y^XvXJ=KJop3rQO4JT zF)=3P^5(EJ^WMC-pI`4E06IAKap>cS!ILk-#){$WVq}!#sWwVl@$9&ED&+x{&PM|>YsedIPKo} zpn#EHXcJ$Fnd;__jb*~2&C;GtGs|#O;=Zo=14EsbG0w7Ntfvf}65sY{A{K%t!o)mu zmWJ$-LzvC2R70Im?vr4UC`nH;Kh~`~JyFt7HB{WN7|2xO<$ClgGeN op>G2CRoX790O2OQ0)1>1SVO(QZR`}di@gFHXp)j)pK1jM-_bI-xBvhE literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IItemHudInfo.class b/src/api/java/ic2/api/item/IItemHudInfo.class new file mode 100644 index 0000000000000000000000000000000000000000..82e7f8297922343be25be779e5f6cc6beea73f8e GIT binary patch literal 281 zcmb7hZkY0Zh>i&q@AjsO4v literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IItemHudInfo.java b/src/api/java/ic2/api/item/IItemHudInfo.java new file mode 100644 index 000000000..da9731876 --- /dev/null +++ b/src/api/java/ic2/api/item/IItemHudInfo.java @@ -0,0 +1,24 @@ +package ic2.api.item; + +import java.util.List; + +import net.minecraft.item.ItemStack; + +public interface IItemHudInfo { + /* + Add Info to Nano- and Quantum-Suit Helm Hud + for itemStack + + @Override + public List getHudInfo(ItemStack itemStack) { + List info = new LinkedList(); + info.add("i am a Cool Item"); + info.add("and have Cool info"); + return info; + } + + + */ + + public List getHudInfo(ItemStack itemStack); +} diff --git a/src/api/java/ic2/api/item/IKineticWindRotor.class b/src/api/java/ic2/api/item/IKineticWindRotor.class new file mode 100644 index 0000000000000000000000000000000000000000..684dd536e041168aef8c77a97e6365d104d6833e GIT binary patch literal 318 zcmZXQ!Ab)`5JYQYlGVhh2zvBta&aJ6uM!9bgpJ^Nob;|8c4uVlmH2BO`~W{n>|JsZ zFJ17ct}gof=kp7|9H$v38BPqwCCMGTnuLQX%ZP+PiLz@ zVrvfMlPknF!j;YGEjG#1Dtadz!>z$Y6R0TIGX?+ACv8#TGfrQ&K{0`0dD?NrvLx| literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IKineticWindRotor.java b/src/api/java/ic2/api/item/IKineticWindRotor.java new file mode 100644 index 000000000..62f1fdc36 --- /dev/null +++ b/src/api/java/ic2/api/item/IKineticWindRotor.java @@ -0,0 +1,15 @@ +package ic2.api.item; + +import net.minecraft.util.ResourceLocation; + +public interface IKineticWindRotor { + public int getDiameter(); + + public ResourceLocation getRotorRenderTexture(); + + public float getefficiency(); + + int getminWindStrength(); + + int getmaxWindStrength(); +} diff --git a/src/api/java/ic2/api/item/IMetalArmor.class b/src/api/java/ic2/api/item/IMetalArmor.class new file mode 100644 index 0000000000000000000000000000000000000000..426278ae3f8ae70040b8b67ea394f3c7bcaa0388 GIT binary patch literal 217 zcmZ9GJqp4=6olu+n5bA-dIW7;NSn$+A*d*%vs;&^Y|J0)D&%Sw9>7D1Ne}`y!wlcR z%=`0v0SGYk;rkd6#`?BnE7PUP3Pae;wmDmo>7133XDhVjOhmQBR;p|GM>)6JR-#O0 z#YU{!bZA33KN3c9aW{(BI%UEn>V_7Hd`QAnt3b$7|5iF)x0{AYWquL+Q^Lx61cFna P2goJ#;5H8ZS{-;_nNvO= literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/IMetalArmor.java b/src/api/java/ic2/api/item/IMetalArmor.java new file mode 100644 index 000000000..16ffd24e5 --- /dev/null +++ b/src/api/java/ic2/api/item/IMetalArmor.java @@ -0,0 +1,20 @@ +package ic2.api.item; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; + +/** + * Armor items implementing this can be considered metal armor. + * + * Currently used for determining which boots can be used to slide up a magnetic pole. + */ +public interface IMetalArmor { + /** + * Determine if the given armor piece is metal armor. + * + * @param itemstack Armor piece as worn by the player + * @param player The player + * @return Whether the armor piece is metal armor + */ + public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player); +} diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.class b/src/api/java/ic2/api/item/ISpecialElectricItem.class new file mode 100644 index 0000000000000000000000000000000000000000..ca93ed27787f6869d60018ba3201e86253b67b28 GIT binary patch literal 259 zcmZvXy9xq93`K9&$M|S$wX@U4fo&~CK~OCA3*r!$S!Y)nMnBHN5AdVJS+H=yB9}l; zPRQ&1cmhZB2ly!QBs7|tWZul1 zdA{xs07EnrWCgV&_ dQL9j6V5rb)Ac|=tVt}~%erH^Kk_ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/item/ITerraformingBP.java b/src/api/java/ic2/api/item/ITerraformingBP.java new file mode 100644 index 000000000..59b46baec --- /dev/null +++ b/src/api/java/ic2/api/item/ITerraformingBP.java @@ -0,0 +1,34 @@ +package ic2.api.item; + +import net.minecraft.world.World; + +/** + * Allows an item to act as a terraformer blueprint. + */ +public interface ITerraformingBP { + /** + * Get the energy consumption per operation of the blueprint. + * + * @return Energy consumption in EU + */ + public abstract int getConsume(); + + /** + * Get the maximum range of the blueprint. + * Should be a divisor of 5. + * + * @return Maximum range in blocks + */ + public abstract int getRange(); + + /** + * Perform the terraforming operation. + * + * @param world world to terraform + * @param x X position to terraform + * @param z Z position to terraform + * @param yCoord Y position of the terraformer + * @return Whether the operation was successful and the terraformer should consume energy. + */ + public abstract boolean terraform(World world, int x, int z, int yCoord); +} diff --git a/src/api/java/ic2/api/item/ItemWrapper.class b/src/api/java/ic2/api/item/ItemWrapper.class new file mode 100644 index 0000000000000000000000000000000000000000..30dd16e141592ee187c8544f49e7d43f38ca1ac1 GIT binary patch literal 2443 zcmb_dZBrXn6n<`ASduJ-(m;VCl?sv<=qjz%Hi!ak6`Q135Nv(Dq-(l$vzu8qPWdVP z0>AW&bwg#wn6cpJ-V_D%}#VkL!Dtf}FuhHEJ#a9z2+r{Vn+bgU=w0d8n0YA6ZlyY2(I zYn$u7S=$qsDOTK?QFYy_Z5o``T!$~)HY>hSYS_M2ll6i?V$-TR(rfF zZ`3Tuta$P(->{g?P$>&VtFmawx)m<1HqjK8nPjkL`qEzUYOWWeyZwKrDjh`+vh^)l zj^!^4L^IiKf!LaRm&FYhiMiaU?V8?}qDf%5=vJh?Ej>%w;bP3cXOX>$W7V+09Z%Nl zrl-pB%&N8Ln_gI>z=h0<(h?w3j8xt z${KEx-4;ph(-FAT6Vq||w09L0RdK1r(|s--ZtMVSuWbw5=$WjE{8(M4<6Hi|QMcv3 z=^57oYa=iMs*<%Ml?n7Uy##X4A4H&ksbYuHOm4ajuVP-eln{qhQ-tz5ug*fpX^iPO ziD3;JIzGfL4VyZ)@R5#f>}dE{$8Fpp&pJNAr#e2v=K>?oY(O0|nAI_YVS%xKd$h^Y z@j4bYe4*n@$S%J&I${m9VoRrL+}yp-%Y@48aU)Oz-NF($_uuytTesd|$Qkz$jC;od~1VVcI>pS2iCoBX24e5px0~-SY1&TOi+?w-wKm`$b+!t&5!st$3#N zDK3N2USMYd)BM8>@#hr5gi;^`P6bw)HdS boxableItems = ArrayListMultimap.create(); + private static final Multimap metalArmorItems = ArrayListMultimap.create(); + + public static void registerBoxable(Item item, IBoxable boxable) { + boxableItems.put(item, boxable); + } + + public static boolean canBeStoredInToolbox(ItemStack stack) { + Item item = stack.getItem(); + // use customs first to allow for overriding behavior + for (IBoxable boxable : boxableItems.get(item)) { + if (boxable.canBeStoredInToolbox(stack)) return true; + } + + if (item instanceof IBoxable && ((IBoxable) item).canBeStoredInToolbox(stack)) return true; + + return false; + } + + public static void registerMetalArmor(Item item, IMetalArmor armor) { + metalArmorItems.put(item, armor); + } + + public static boolean isMetalArmor(ItemStack stack, EntityPlayer player) { + Item item = stack.getItem(); + // use customs first to allow for overriding behavior + for (IMetalArmor metalArmor : metalArmorItems.get(item)) { + if (metalArmor.isMetalArmor(stack, player)) return true; + } + + if (item instanceof IMetalArmor && ((IMetalArmor) item).isMetalArmor(stack, player)) return true; + + return false; + } +} diff --git a/src/api/java/ic2/api/item/package-info.class b/src/api/java/ic2/api/item/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..222a18333dc77be1148e0d023dd78741b2457dda GIT binary patch literal 254 zcmYjM%T5A85Uc@V5np)F#E+21y?P=hBqSypOt=q2LmGBwHai3Sn+HF@k1{lz>_d0D zs;g4{`}h3=pu}B)n*z56{ja!d98aWTgZtXLtzGl8gjF1F?A{tY&2}M+=eZ2A zK80Kssfdi`A`O?epe((^ZnFy=TA^30<6j1m8`gh4Z_ eq3n;DicOb5XxX0tatLiW)_1IHp=*`fsNM?&aYTCn literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.java b/src/api/java/ic2/api/network/INetworkDataProvider.java new file mode 100644 index 000000000..c3f283e5f --- /dev/null +++ b/src/api/java/ic2/api/network/INetworkDataProvider.java @@ -0,0 +1,18 @@ +package ic2.api.network; + +import java.util.List; + +/** + * Tile entities which want to synchronized specific fields between client and server have to implement this. + * + * The fields don't update themselves, a field update must be sent every time a synchronized field changes. + */ +public interface INetworkDataProvider { + /** + * Get the list of synchronized fields. + * + * @return Names of the synchronized fields + */ + List getNetworkedFields(); +} + diff --git a/src/api/java/ic2/api/network/INetworkItemEventListener.class b/src/api/java/ic2/api/network/INetworkItemEventListener.class new file mode 100644 index 0000000000000000000000000000000000000000..30dcc22e0979c10999c8caadba4e6b439bfb43a9 GIT binary patch literal 251 zcmZ{f!HU8_5JamrYt)1I1)kT74PHG*2!vG-yw47;OcEzDwu-;D2S31%T6Pllw6K?= zi{^DzzrMeo0G1e~NK*_6lg59D-kVTmH}Og+-U~0vC+Ecmb5M3FC(fhn)YxkEXB!!( z4?frCA%U~bZ9B8d=X=6<*Ia{@wX20N%YU=lb6sBHE-GHaqBJ){m^-^H7XjS*gh-Y>W(y3`{^LGB7Z*FfuSRuz*+$tU!{9feio-*fo&= literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java b/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java new file mode 100644 index 000000000..fbb4753c5 --- /dev/null +++ b/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java @@ -0,0 +1,14 @@ +package ic2.api.network; + +/** + * Allows a tile entity to receive network events received from the server. + */ +public interface INetworkTileEntityEventListener { + /** + * Called when a network event is received. + * + * @param event Event ID + */ + void onNetworkEvent(int event); +} + diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.class b/src/api/java/ic2/api/network/INetworkUpdateListener.class new file mode 100644 index 0000000000000000000000000000000000000000..db801296f1c3662237736515c3dfc0612bfb7b9b GIT binary patch literal 191 zcmX^0Z`VEs1_mPrPId-%b_Nbc2LAj!ztocQ{G#m8f|SIPR7M6-4WF#UvPAuy#JqI< z;F6-uymV{LFh&Nh;QZ2} literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.java b/src/api/java/ic2/api/network/INetworkUpdateListener.java new file mode 100644 index 000000000..09414ae38 --- /dev/null +++ b/src/api/java/ic2/api/network/INetworkUpdateListener.java @@ -0,0 +1,14 @@ +package ic2.api.network; + +/** + * Allows a tile entity to receive field sync updates received from the server. + */ +public interface INetworkUpdateListener { + /** + * Called when a field is synchronized. + * + * @param field field synchronized + */ + void onNetworkUpdate(String field); +} + diff --git a/src/api/java/ic2/api/network/NetworkHelper.class b/src/api/java/ic2/api/network/NetworkHelper.class new file mode 100644 index 0000000000000000000000000000000000000000..85ff02b4763faf73c6cd1f066bc3b24425e9d4ca GIT binary patch literal 4190 zcmbVPYjYgM6+Nw8?d;Buu`OA`fNX?i6Ir&k0TU8i4h9PuZ!F1*B|l_AoY86|jWwFx zjAmCjBmu-D56FWA!YgmWBX1)rYZVmmEw0MfROMgf7bKO+>7LQ<%!)OxNLAC_)3%xaj^k$|OhFfV&{8kc0dpd$+>jiVYCHMkmz@Awrh=+7pE<6!kl&#NyUQcoHadLj>DHpf8JgaxP90z z+?_K^cFqk*%Z0(7u$+?Rk%^8b^d0UU=91hZcPn`2te^8qF!7M!TpiOugyeDGv)#D? z8LMDe9g(S_M+;WTw~H<}Z1Fj{=Z2gMw9W>H85KgfkHDsJ-z-oDC54%46}Y+SLH6Ak zp8N$Ff2$RozQ_ycj=gC6rzt_kEiMRbUEd>eRwIqxL#9fOdD-%ELyEUCH5h1sZc|A) z=}Ms)2m(k23kCWbtgqu&AR~P#Hv&5w7B*}nuwxxY6P@mDg!IV*$VEp$+SFny#@+?BJl%Y&$cSXJ8T+ z4EzKy3Uu`sik{UU=3sy5Ff3pOUXq4C#mmg@y0byYTw(_I+&~rzY^kpcf-vw3UN!Jp z+-2Y*z8bR#7|`&Vf!Faf(pXUYtqO-lGbH*gOQYWRhLU*cC9er@14 zctbvZYv6N|nBI8g&6P`j;-+zp7`PV)4SZhu+;QD z;CJ{v)k81Lmf%qGgY0VzK;9_^{(wJf_>+M@<1aC0Y6@Wis54VjZOSZ_ESJ~Lf!>HH zL-lSHbf^)Q!?a%vtQf>>(F^3g=Tn?0ZE$ghIuGtNf%`vU%~T|oU`;fX4Y%U(s13XKy~bf9Q~Wb@pC}PJ~N2(Ge>;>$QYFNpNr^DaUf>{CRa7^H#_# zm8X}~g{QWQ?H8UpbB?PYvJZ`1oBF z$9YVlox92?cS7UyFzd+xjxoOTjBJWgKFk;`JfNcQrtQOw`T<(B$XGFm2ieNr5RTL5 zL+odeyf=GZ!-)*Ld3-4Z_%8xXa=NmL&TBZ-6yVLN2*6crAD?Vp#VrBM&Nxgtq;&}M zwl&;Jxh`xvnk0+xqUsR6Fw zB!(4<6^vk%bcE24WT!*ur!W>k7p;We%H=Do=(>iZO`-45Lg+iy+1{?8lYmr>fUYzBcb5`g{LTX2ygw2POl7(B6bs9VZjGw#B6TL(j4m=b&yNG4DcoHQ=!##|CnMonf zT^`{IDLc(p_Qpw>6#a@KM5qM43o*~D9-2WNM-Cjla_2hm> zRPIs@O77ip8sxApccp_Sil4$)8jwFu#Xmt@D^&Y4oPCO)1W!{8&(;)wF%*ErX4eE@ zhXSZ6ekwfnb4;BL7^}HgKmuobot>HhTzew zRN(%2UUB>Nnz_G<1EPxlD<@?pusU~qtXABCT`bx`OgFIw{>nF1^x&$BMONz`b^2x) R0c$zadz$YHeA9xN{{bnMBI^JE literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/network/NetworkHelper.java b/src/api/java/ic2/api/network/NetworkHelper.java new file mode 100644 index 000000000..5f9138d30 --- /dev/null +++ b/src/api/java/ic2/api/network/NetworkHelper.java @@ -0,0 +1,194 @@ +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; + +/** + * Provides methods to initiate events and synchronize tile entity fields in SMP. + * + * The methods are transparent between singleplayer and multiplayer - if a method is called in + * singleplayer, the associated callback will be locally executed. The implementation is different + * between the client and server versions of IC2. + * + * You'll usually want to use the server->client methods defined here to synchronize information + * which is needed by the clients outside the GUI, such as rendering the block, playing sounds or + * producing effects. Anything which is only visible inside the GUI should be synchronized through + * the Container class associated to the GUI in Container.updateProgressBar(). + */ +public final class NetworkHelper { + // server -> client + + + /** + * Schedule a TileEntity's field to be updated to the clients in range. + * + * The updater will query the field's value during the next update, updates happen usually + * every 2 ticks. If low latency is important use initiateTileEntityEvent instead. + * + * IC2's network updates have to get triggered every time, it doesn't continuously poll/send + * the field value. Just call updateTileEntityField after every change to a field which needs + * network synchronization. + * + * The following field data types are currently supported: + * - int, int[], short, short[], byte, byte[], long, long[] + * - float, float[], double, double[] + * - boolean, boolean[] + * - String, String[] + * - ItemStack + * - NBTBase (includes NBTTagCompound) + * - Block, Item, Achievement, Potion, Enchantment + * - ChunkCoordinates, ChunkCoordIntPair + * - TileEntity (does not sync the actual tile entity, instead looks up the tile entity by its position in the client world) + * - World (does not sync the actual world, instead looks up the world by its dimension ID) + * + * Once the update has been processed by the client, it'll call onNetworkUpdate on the client- + * side TileEntity if it implements INetworkUpdateListener. + * + * If this method is being executed on the client (i.e. Singleplayer), it'll just call + * INetworkUpdateListener.onNetworkUpdate (if implemented by the te). + * + * @param te TileEntity to update + * @param field Name of the field to update + */ + public static void updateTileEntityField(TileEntity te, String field) { + try { + if (NetworkManager_updateTileEntityField == null) NetworkManager_updateTileEntityField = Class.forName(getPackage() + ".core.network.NetworkManager").getMethod("updateTileEntityField", TileEntity.class, String.class); + if (instance == null) instance = getInstance(); + + NetworkManager_updateTileEntityField.invoke(instance, te, field); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Immediately send an event for the specified TileEntity to the clients in range. + * + * If this method is being executed on the client (i.e. Singleplayer), it'll just call + * INetworkTileEntityEventListener.onNetworkEvent (if implemented by the te). + * + * @param te TileEntity to notify, should implement INetworkTileEntityEventListener + * @param event Arbitrary integer to represent the event, choosing the values is up to you + * @param limitRange Limit the notification range to (currently) 20 blocks instead of the + * tracking distance if true + */ + public static void initiateTileEntityEvent(TileEntity te, int event, boolean limitRange) { + try { + if (NetworkManager_initiateTileEntityEvent == null) NetworkManager_initiateTileEntityEvent = Class.forName(getPackage() + ".core.network.NetworkManager").getMethod("initiateTileEntityEvent", TileEntity.class, Integer.TYPE, Boolean.TYPE); + if (instance == null) instance = getInstance(); + + NetworkManager_initiateTileEntityEvent.invoke(instance, te, event, limitRange); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Immediately send an event for the specified Item to the clients in range. + * + * The item should implement INetworkItemEventListener to receive the event. + * + * If this method is being executed on the client (i.e. Singleplayer), it'll just call + * INetworkItemEventListener.onNetworkEvent (if implemented by the item). + * + * @param player EntityPlayer holding the item + * @param itemStack ItemStack containing the item + * @param event Arbitrary integer to represent the event, choosing the values is up to you + * @param limitRange Limit the notification range to (currently) 20 blocks instead of the + * tracking distance if true + */ + public static void initiateItemEvent(EntityPlayer player, ItemStack itemStack, int event, boolean limitRange) { + try { + if (NetworkManager_initiateItemEvent == null) NetworkManager_initiateItemEvent = Class.forName(getPackage() + ".core.network.NetworkManager").getMethod("initiateItemEvent", EntityPlayer.class, ItemStack.class, Integer.TYPE, Boolean.TYPE); + if (instance == null) instance = getInstance(); + + NetworkManager_initiateItemEvent.invoke(instance, player, itemStack, event, limitRange); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + + // client -> server + + /** + * Immediately send an event for the specified TileEntity to the server. + * + * This method doesn't do anything if executed on the server. + * + * @param te TileEntity to notify, should implement INetworkClientTileEntityEventListener + * @param event Arbitrary integer to represent the event, choosing the values is up to you + */ + public static void initiateClientTileEntityEvent(TileEntity te, int event) { + try { + if (NetworkManager_initiateClientTileEntityEvent == null) NetworkManager_initiateClientTileEntityEvent = Class.forName(getPackage() + ".core.network.NetworkManager").getMethod("initiateClientTileEntityEvent", TileEntity.class, Integer.TYPE); + if (instance == null) instance = getInstance(); + + NetworkManager_initiateClientTileEntityEvent.invoke(instance, te, event); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Immediately send an event for the specified Item to the clients in range. + * + * The item should implement INetworkItemEventListener to receive the event. + * + * This method doesn't do anything if executed on the server. + * + * @param itemStack ItemStack containing the item + * @param event Arbitrary integer to represent the event, choosing the values is up to you + */ + public static void initiateClientItemEvent(ItemStack itemStack, int event) { + try { + if (NetworkManager_initiateClientItemEvent == null) NetworkManager_initiateClientItemEvent = Class.forName(getPackage() + ".core.network.NetworkManager").getMethod("initiateClientItemEvent", ItemStack.class, Integer.TYPE); + if (instance == null) instance = getInstance(); + + NetworkManager_initiateClientItemEvent.invoke(instance, itemStack, event); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Get the base IC2 package name, used internally. + * + * @return IC2 package name, if unable to be determined defaults to ic2 + */ + private static String getPackage() { + Package pkg = NetworkHelper.class.getPackage(); + + if (pkg != null) { + String packageName = pkg.getName(); + + return packageName.substring(0, packageName.length() - ".api.network".length()); + } + + return "ic2"; + } + + /** + * Get the NetworkManager instance, used internally. + * + * @return NetworkManager instance + */ + private static Object getInstance() { + try { + return Class.forName(getPackage() + ".core.IC2").getDeclaredField("network").get(null); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + + private static Object instance; + private static Method NetworkManager_updateTileEntityField; + private static Method NetworkManager_initiateTileEntityEvent; + private static Method NetworkManager_initiateItemEvent; + private static Method NetworkManager_initiateClientTileEntityEvent; + private static Method NetworkManager_initiateClientItemEvent; +} + diff --git a/src/api/java/ic2/api/network/package-info.class b/src/api/java/ic2/api/network/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..f4f18429ed0df94ead3e6bc06934d1c9dc78545a GIT binary patch literal 257 zcmYjM!A?Rk5S)VW5EbqdKCC%y5Nw(LCzJ(tkB^mP?T-BdD&hJMkcB|L literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/network/package-info.java b/src/api/java/ic2/api/network/package-info.java new file mode 100644 index 000000000..25ea29e1e --- /dev/null +++ b/src/api/java/ic2/api/network/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.network; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/package-info.class b/src/api/java/ic2/api/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..7caf6997842f48e97402f4b55bb54dced3669925 GIT binary patch literal 249 zcmYjM%Sr=55Ufs2HpW*375oS@x>rv@5CVchA@|9o6FTlpFFTv$-#qvMew5hpWFNZe zs;;8?`{(luK#7Y2X9dm)!*|^_fuE&f!e#BlhhOuZq?L|0e&-3dZ`;&LYx15PdF7(k*RGi2debdvbdQSm*R_{m8krfi@D-0-!#V@Q8vSL!c0z+70SK>SJzxVH0h?$AY~x12PR!qo`CAb;u@(5+ vxD#+Y#$D`$_%3z>-oyQX5AZPH9v%gJ9P2*8euxin81Si&Y0_u(UBmO=0!qEv literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/reactor/IReactor.java b/src/api/java/ic2/api/reactor/IReactor.java new file mode 100644 index 000000000..55191ccf3 --- /dev/null +++ b/src/api/java/ic2/api/reactor/IReactor.java @@ -0,0 +1,158 @@ +package ic2.api.reactor; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +/** + * Interface implemented by the tile entity of nuclear reactors. + */ +public interface IReactor { + /** + * Get the reactor's position in the world. + * + * @return Position of the reactor + */ + public ChunkCoordinates getPosition(); + + /** + * Get the reactor's corresponding world. + * + * @return The reactor's world + */ + public World getWorld(); + + /** + * Get the reactor's heat. + * + * @return The reactor's heat + */ + public int getHeat(); + + /** + * Set the reactor's heat. + * + * @param heat reactor heat + */ + public void setHeat(int heat); + + /** + * Increase the reactor's heat. + * + * Use negative values to decrease. + * + * @param amount amount of heat to add + * @return The reactor's heat after adding the specified amount + */ + public int addHeat(int amount); + + /** + * Get the reactor's maximum heat before exploding. + * + * @return Maximum heat value + */ + public int getMaxHeat(); + + /** + * Set the reactor's stored maxHeat variable. + * Used by plating to increase the reactors MaxHeat capacity. + * Needs to be called during each cycle process. + */ + public void setMaxHeat(int newMaxHeat); + + /** + * add Heat to a EmitHeat Buffer + * for use in Reactor operation.. need to be use + * for all Componetents with self-cooling + * no more magic heat disappear + */ + + + public void addEmitHeat(int heat); + + /** + * Get's the reactor's HEM (Heat Effect Modifier) + * Basic value is 1.0F. + * Reducing the value causes a weakening/reduction of the heat-based sideeffects of reactors + * (F.e. water evaporation, melting, damaging entitys, etc) + * + * @return HEM + */ + public float getHeatEffectModifier(); + + /** + * Set's the reactor's HEM + * Needs to be called during each cycle process. + */ + public void setHeatEffectModifier(float newHEM); + + /** + * Get the reactor's energy output. + * + * @return Energy output, not multiplied by the base EU/t value + */ + public float getReactorEnergyOutput(); + + /** + * Get the reactor's energy output. + * + * @return Energy output, multiplied with base EU/t value and MainConfig.get().getFloat("balance/energy/generator/nuclear") + */ + public double getReactorEUEnergyOutput(); + + /** + * Add's the given amount of energy to the Reactor's output. + * + * @return Energy output after adding the value, not multiplied by the base EU/t value + */ + public float addOutput(float energy); + + /** + * Get the item at the specified grid coordinates. + * + * @param x X position of the item, out of bounds returns null + * @param y Y position of the item, out of bounds returns null + * @return The item or null if there is no item + */ + public ItemStack getItemAt(int x, int y); + + /** + * Set the item at the specified grid coordinates. + * + * @param x X position of the item, out of bounds is a no-op + * @param y Y position of the item, out of bounds is a no-op + * @param item The item to set. + */ + public void setItemAt(int x, int y, ItemStack item); + + /** + * Explode the reactor. + */ + public void explode(); + + /** + * Get the reactor's tick rate (game ticks per reactor tick). + * + * @return Tick rate + */ + public int getTickRate(); + + /** + * Get whether the reactor is active and supposed to produce energy + * @return Whether the reactor is active + */ + public boolean produceEnergy(); + + /** + * Set Redstone Signal without direct contact + * + */ + + public void setRedstoneSignal(boolean redstone); + + /** + * @return true if the reactor is FluidCooled + */ + + public boolean isFluidCooled(); +} diff --git a/src/api/java/ic2/api/reactor/IReactorChamber.class b/src/api/java/ic2/api/reactor/IReactorChamber.class new file mode 100644 index 0000000000000000000000000000000000000000..e0e206c46f250daf8b321b9d10839b71b3e38caf GIT binary patch literal 214 zcmZ{eu?oU46h-f=wb8mLI0~-qVxX&|AP9nB!NDz!p{CSU(&)!I_yK;Dm|`8BE}VDX z<-XpJCx8Sah9N^p2yYHVGpROgi_34U~p z53VMyZ$_%ME)`+=`&pgEB~xZmh`S)n|5bMyVcd$m6jjc5S)rs22n5e920Wk8gAcgu LBXESkT8_a7H260Y literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/reactor/IReactorChamber.java b/src/api/java/ic2/api/reactor/IReactorChamber.java new file mode 100644 index 000000000..4611a6af5 --- /dev/null +++ b/src/api/java/ic2/api/reactor/IReactorChamber.java @@ -0,0 +1,20 @@ +package ic2.api.reactor; + +/** + * Interface implemented by the reactor chamber tile entity. + */ +public interface IReactorChamber { + /** + * Get the chamber's reactor. + * + * @return The reactor + */ + public IReactor getReactor(); + + /** + * Set Redstone Signal without direct contact + * + */ + + public void setRedstoneSignal(boolean redstone); +} diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.class b/src/api/java/ic2/api/reactor/IReactorComponent.class new file mode 100644 index 0000000000000000000000000000000000000000..beacfceaf364849f031b2e785d84bae7eaf1aac3 GIT binary patch literal 720 zcmb`F&rSj{5XQeEvVw?;#=AGU*n}(53z66aqmk%=gUQegSlsPyx?RJwdGG;zC}UaF zn=wHz^G%cKZ~nf$zq|tI;xIxx!ht|5bE)P$?>|y9VJC2YGBmm?DKpYBX`ec&ZdXok zXxYoeSk{iFUK-DdRKbiq>8GAj{k9?=B+w`-Zpj`7i=|OEV4Mw zO=<;tYxmz7gziUa;WQ6S99DPqwf=sZWT_2JoX+W)1de~YlkY%*y=AD3$0 to indicate the 'remaining' heat which couldn't be absorbed (and vice versa for <0) + */ + public int alterHeat(IReactor reactor, ItemStack yourStack, int x, int y, int heat); + + /** + * Called upon reactor explosion + * Alter the explosion size. + * Returning a float 0 < f < 1 will be counted as multiplier. + * Anything else will be counted as a flat addition (in case of <0 = reduction). + * + * @param reactor Reference to the Reactor + * @param yourStack Reference to the specific instance of iterated ItemStack + * @return your explosion modifier + */ + public float influenceExplosion(IReactor reactor, ItemStack yourStack); +} diff --git a/src/api/java/ic2/api/reactor/package-info.class b/src/api/java/ic2/api/reactor/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..a94d26ff42fa195d4292ce8bdde7c5b059e2b0ee GIT binary patch literal 257 zcmYjM%}# z=}c!b{r>s<0#M_k!dZoLgWTuOFeO^Gcb%B2~r! L#~DMMWSss2hsZ#r literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/reactor/package-info.java b/src/api/java/ic2/api/reactor/package-info.java new file mode 100644 index 000000000..5194aee03 --- /dev/null +++ b/src/api/java/ic2/api/reactor/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.reactor; +import cpw.mods.fml.common.API; + diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class b/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class new file mode 100644 index 0000000000000000000000000000000000000000..89a9b2f1762623f20cbde6a1300d09e51e40fe4e GIT binary patch literal 968 zcmah{+iuf95It)FV@J-0f8h&w z;RT5b!2=(_Mi1;!TJ&P_EO*mL#781i#x9(WK2<}8Qr-=N7betnClX`u!4Io z?lbVomz)YUo(99Bf#k7BPWVCZOh%f)ZkbnForJoy6b#M(49Se4J&7>288m4@%e1u? zmJBh{mJGMt!-(%Z=;g_JLlHKewcs0AuyqbA*gl8-B@bL6xeSNoCdn27v~dLi{eVAC zLyaQLSHo3;XSr4<%_4mT*NQT#DB}lTVQqbfW8ov}WZ2t<;X0q-*qbf;ZmR-o4jxWz1SFKM;UFmYAfK=a`~tdohyOo zV4{@#CT%`UV_Qd zl;h}P5!U5YQY(f?pv!bsh`SsF;bcW0BnziAIi;K*_;Z~aa)ss2sgB>(tH&eS&+TF3 zT&AkJQ!}IH=8n)mx5utF5M%C z_oWjESN4TdJB`+w-yeoFy7*N3GJM8REzXDjUp(uaL9g_hM4YbEIbROD4H3NN4Uan6 zde7zFIS-_&$4x!#$N@==&ck5Vd|w0=j}Hcd+K2zJRk#{B_5iDi4>L%6iryL4U|l5qHN$XgA>2onUEuQ7%~dl@wnf1UNtU+ z8!~7`b!+)4xig*?-H#kZFYWmKkb4Z)oMtM!w&I7q@emnuF{HSg3c-pa%#@29{YeJ> zUJ0xz3n^PuE=CUQuT%=G+NX4S1`MDjf7pkhW05MOjFE4r)W{M38qAw%E(Y> zZ?uhI*Qp`^+@|j=$~K57LHQ=`jA?pfnu7fqiJw?iOX&;rE38whmA_#jfh!pL2k6>I w0?`N%q(K2XHwX(8!oq~GfDPOwf_u>pEt`4HsM?|`f%~{cYl?6dktZ?9Kky16Qvd(} literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class new file mode 100644 index 0000000000000000000000000000000000000000..f32226dce7b182acd4577a1bbc0581cbdb4fff86 GIT binary patch literal 668 zcmb7?y-ve06orrb7g7qe@Bl0f&4Q(_MJyGSBBiQCC5CRsb%RUlMvlY7G4KF96yheH zh*YTz_O*QNbH01+@1M^v02AB<7zP*xxMt|aCNCYsAT~zXStg1?6%3)+Y@U_Wxnju1 ziBXR4wNcWFt=k@Ks`xf5^`_wSDy*E4@6$xf2^YEMw!X+?FHjpyPm_pVh$K~RSvsPc zA1s49)%_16*G}zuOp|9@ucIcOr}IuzhCbQ)Eh>LBj*^}D5WI9c;|r0~fpDc$BV1{z zCA((+p{X9vMAgtIW3_zqx(i`Ms_fl=8uD0?tq!G?YOXVKzCA8{UlB7z&1X1D!Z56h z%!En#@^z;qeFT2;bzex2fuTkJ3TSs2dI$iDX9(-q$2sK(lx^XH#$~;_LYHEnGHn_i FguhZ+&X@oI literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/ICraftingRecipeManager.class b/src/api/java/ic2/api/recipe/ICraftingRecipeManager.class new file mode 100644 index 0000000000000000000000000000000000000000..877dcf4e7ca3df9ecee157276ab1a8fb85f8711d GIT binary patch literal 244 zcmZvXu?oUK5Jcxwjtp#m75Iajj5EQ|Hjn#Tt<7qrYa@zY_7Jh&qC0-O8vDty0 z<<0EldAkD`pb?@LqApOUI9{^S84C=%Gs9LMwPBUh)=F*pD5q{jmegUip6%&EG9{D9 z#b(dSj(RJBmP154$~fhs__7+&>6|N`=+uGR({ahuCi&QNGL&%MFL44Ltp<`ZE%SE| f`Ttm;`I{aH2zc%v!1J%Dzz3XGOLb0A?h(EKkwZlR literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class b/src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class new file mode 100644 index 0000000000000000000000000000000000000000..6367f30bfd08e07ee3460375cd91fd9b94bc23df GIT binary patch literal 540 zcmb7B%Sr=55Ukle*2LAAs4*r{6gu#821wYF}5Ipz+ zew0{4JO~~{2D-ayx@(G_kI%Pv03B==kwdkBEY@tOxv0Bn2;}8slExDO5eQ`Om1LPe z(y^W#3*=fsusa~%O>UJysjp*oo<0thxt7C-Or@WMG8#yuE&e96lY2cD@J><_Uz%j3 z%;cFch+}2CksOZ|Z~eXwJH8xg->6WJlppk>RNtP`z?qEYoiaN==MM$knbQN>vNoBE zS4nC@)zj8W^_Rf@gM5-63TS%B!}Tx+*Tsgw-oKs}Sh7NXB;z~(V)&p!t|-&8d)fL+ z2;1CsjvwHlY(20lTN}*WIIR^K=ZS9Ekzp>iUm@C!DV%n5ip&cs2OeXELO_jionv(@ kqJaf6TeC6ZG7$yX=~C2I%d8xp6(R?#SYoyhT8$D4Us_{xS^xk5 literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager.class b/src/api/java/ic2/api/recipe/IFluidHeatManager.class new file mode 100644 index 0000000000000000000000000000000000000000..30a7fee0ddb2b88ae21510bdbcd7477423882e0d GIT binary patch literal 581 zcmb7CT}uK%6g{Kns#$8EuR%TNLk;+91QkdND@8`{(|TP-wsD=E4f<<6^aJ`)(RCwA zg`$Vcotbm*x#u3{?fvByKo`3nS{}AMY*oyfify0d-RjDC(v3Pqv!fs?arsF%;{JTRKj)Dp^l7lnI(a{ zW&Ct?iGK(U1^}uJ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.class b/src/api/java/ic2/api/recipe/ILiquidAcceptManager.class new file mode 100644 index 0000000000000000000000000000000000000000..2ccadae702c1cc01b8cf7e0c8e1138af09f4e2b0 GIT binary patch literal 321 zcmah_u}T9$5PcJ4&cp~>T5FLsE(E)XU=t8dEUvQ~H*?E`b93(P`EeG0fFC99t(^!~ z^LX#gd&7Kwy?+2$;iSNEfjME$)=C?@P1Ea^aJeYGMDwCvY~VW9`{2aXgV>quSudXm zXHMc>UX*QSyTmP)<&NLj^idmANn8`Al{(L{4??*9t>64xb(E4p4SQ!EpLb&8gg_XjrvRfd;Q(VG%|lEQ NUkogc5}IZ-`v!ssT8RJv literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/IListRecipeManager.class b/src/api/java/ic2/api/recipe/IListRecipeManager.class new file mode 100644 index 0000000000000000000000000000000000000000..77f1a930a6f99b5cc6f6d0f1d36b3b90df0e5ca7 GIT binary patch literal 479 zcmaix%}T>S5XWcR*tGSlR>7;@l8cMIM!Z!BL<9pKyiK=j*qUrZG7)?=4?choB~CVo z#eyDYXLk6{>~Cg2KHuH}UL1NTQVrgWhl_|B1@12ir*-#Wd z2pFohB{a4ca2_O9lPrwYs=_CdhIAogK2k#U9EFbpd{fVhl3w|RpuLYWO|BW&PlGU7 z;S0)!OfC~sQ^bPQWEQEZw1CSk!PTF9*IYmETIOgodAC?;MbSov;VN9@`u{%Tblp@+ z--2XN>zlP`FMf>{6n literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManager.class b/src/api/java/ic2/api/recipe/IMachineRecipeManager.class new file mode 100644 index 0000000000000000000000000000000000000000..5476c9df299b20aba54da9647f597126bae04f06 GIT binary patch literal 487 zcmaJ;Jx{|h5Pfb#LrVEtnHiD=OI?FHfK(|`LM2i$z;ty?a7mmfIPCl_27UlP3gISG zBgEo6-Ftrb?(X~N^9#Tnr!J0NoG^HlW%p93S~8FyD>3I(E8cV^9`#V9>(+#^mWG!~ zOVQA?;d*2E-OYMU`E6C!Rjae`X+Tj%mOQdgYDm0>!2`oAmuA%(tGBEghK2wCm&age zsdv;%gbY)w*O%TH&ix?X(mV0isDdX{TY{IWT$5=VJ76-zuZQaU0}r;b*LtyQo>pxm z)aQlbH3Var7#l)hLJrPFm^sLh66YZ V2bgrx#i7MLi;gh0*-@9xegWh9l5hY3 literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/IPatternStorage.class b/src/api/java/ic2/api/recipe/IPatternStorage.class new file mode 100644 index 0000000000000000000000000000000000000000..5b72100649e53fc4c3bd7dbc8b0e24ede174fa8f GIT binary patch literal 299 zcmaJ+v1$TQ5S%r}i)VxoQVZ#{@xir*lmX!&!gcA^=jK>FpYq(x$EC;zG%zpoTegP;j%rMAsOUQY(TCkbKKzJONLCkG6h>!ekPEEFMom z4-SO;@uXby2fNm^aitz?M(9^s2evi}p|}t{{h#ri4DxE%MlUbgB!`FjIj*u@{Kw^6i7Aq z4rkQ^c^)W5UhTpRF4&jW4Q$6m+20a_)3j0NLTm4z*5qYwU@*}y0MnVCff=BIFVYxOs h_6dZJycOv72wn65(F62bO)wCDC~gNM=?>fO=m${qa1HC?EY1m;^hQWr_Tqs+DJg!B|!aUjDRX|%P!o$1lN9twCTiHWXE zJWyuzM6(%1%AAIBI8=-tv~;lV%YpWd3iLqv&9>_6MwsYsBT?bGjO3j%m7hHh1>7&n zb#k2WCCIho#009LEuYe_UG{qNL3+qx!^0F@57WrH*c7P$n}a~!HuFOn-T9ZDo(j0X zRMjr2@|R}V;RP~0i-UsYLR7GHsJVMmoT2n+-6F+IV7~SOQ7ez()T(2op6PNhOIe(R sSM5PrUcwy8{J=H~S;kkSwrGK4!~`ue)8Sj9+{Hd0@03pP5=M^ literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class b/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class new file mode 100644 index 0000000000000000000000000000000000000000..562181cd57f72cc478dfa967e445dfaa2d61f4d5 GIT binary patch literal 601 zcmbVKT}uK%6g{Kns#$6u1ij{izBJ^k5%hr|tQ0IruhV*6M%HngoelbHJ@fE^YZ%i44{X74=oQn9(FzK3Dhq#Yi{f!A?qIbIy8ptWvtSaQh|z^ zOa^hLCjti@f2JOkjFpLG;H)-Le|Xg$3p65ft1RP=Z^+5HHWXSlb<>57NKThTsm%HM zU0;VisS+(Mg*qWQ3}~)%Y>-hrQbt8&+h2M60Ar84IUUQ9N_egs=*TFS zSrWKi$4|c-`NuM6EK>^>nGI>6W7awR(ZTUDG=cVC+zK>5Bfh?yQRoDY)?fPio^w18 zLrUC7OadqCQ@^HJ77!?K75Q5fO9CD$0QV|tdEZ2x(Je*`*yd{FrzXnWYmAh*Hc)*7 DkA<=n literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.class b/src/api/java/ic2/api/recipe/RecipeInputFluidContainer.class new file mode 100644 index 0000000000000000000000000000000000000000..74e0273f89110c633f8e0f7203d4690ac2d475ec GIT binary patch literal 2669 zcmb_eT~ixn6n@_9hE2jkAV4WLK(Q3_0S%?vYQeOW7KsL`&{AprT9Qpznrz}`+7wKKhS#vkCF_x=Pg9P9IL!nZYbrZ?yPI_Ej(JnuR0?yrCU{2ag(+z?LS zgAn?$5acW)#fKq$glq_lSkiDa1Pu#v=i?ytKapa&9V@t{;dTfeSO{QMj(4Q^G=Q}b z?&4kmpUL&-8oto*rG~Er{Do58$_tESZPQJaE!)gFM!_vqoT8cX&T6T7sWL6lW|S*+ z+Z7NQE@mv-a?=8%v6iOsRRMLbk~amyS-M!Nm)A|_ma$&qP9$5&8KqUjvE;hBsk$3h zO(2oAa#JazYNZ@AXI0JAvNvSxYTfmsnyc8ZK}3h)ooyXRMnK;S%V=EESm0Y zlVc?oC(Clj%a+KISUkIFd}E~Qu2o89t(wcE)x6;v8rFGyn2_t-7tk{{$(bt|wVF)$ zMyufV_*^!Nbl_}_9!Hg44aXT3n7{YB@JgmlJfB6OI3~&NI-cr@!-cX{-7S{MBf2w( zqdIy~>1nV2a~dv@;1#QA8*bfUB~Be9xFwQ6z^$yfj%61GdUx$hhFwfGc1c!frBZit z=Da1VedwhXd`{l2jzNq{k=HSRH*}mrRD-FbfFeso#|A8cp8YbIbsS?$)`E^r+?PfP z9VNsxVY|2sV{#l0=o_b&alc_M988Wra_~JO~=e1Z(@OkSp0RhZ@A#)yvI73 zH1c`U5^Hp(SA2~E@ZQumqgpj>Doh+yXf{mqkvm?n%qkko{MYet3tsq|la?i;Y+{6; z)P4w@gb&@a)%fAgFnDO0}99iAik3>{3lGZNlLm*j36-H}LRu56=+vq&$+Hu_|82U$ITfYoF( WNFQ!^TJw0DV~8%M_}6#=!G8eRTABI) literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/RecipeInputItemStack.class b/src/api/java/ic2/api/recipe/RecipeInputItemStack.class new file mode 100644 index 0000000000000000000000000000000000000000..6fd10a58b3d76ff64d5d5f4ddbd7ebeb8a14ec4d GIT binary patch literal 1899 zcma)6O?TTw6ulGKmaWRMIHyTC^Z-lF;YU&48>x+5(zKfyz0sR{@4N3w|NQ&=p8yu{Wd=6hwQvmY zS(w10MdAALg=u&jI)t_Yke z9e%I8A&|JxX?Oy;8i8Nyx3|3Drrc`LNukzpWottQisSe&5pJuV!0DQD7aZADPT;w! z>pAOstFqc*S^7v|`Z-FfEX9<47T!v7MM54UxN0McQn z9tO&93XDI#-;#dQiB2ga+2h^`SoKanaJ|clO+S8+k>^;Rjcb^+F@@K7xo+bIJ|$nZ zat&N1##2Fiiq5BSg4UB1t-+uiz^cs7 zK7iQ6$gdQQ;8i};Z){|cMUmo(D3j2qDdP7tgiKSw10CaiM|cLko2l%`j9;)_+6xm#1K+2VinB%UKQb}_!sHL6>27HO2IL1oPuxiJ@WrfCk|if7_&&Hv7Sc;}=l literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/recipe/RecipeInputOreDict.class b/src/api/java/ic2/api/recipe/RecipeInputOreDict.class new file mode 100644 index 0000000000000000000000000000000000000000..a068e8fc910c8113d815716b38ae62bd047cb17d GIT binary patch literal 2799 zcma)7SyLQU6#gzVLk~j(VOWyLlGO+UWCA8p10f*`kvM=tBofzV=nPF}OVblWT;i^O z!58&Os;oT3sszMTSw5L6|AOV4e?m)x-|6ld27-wXbNb$M&ppd`zH{f-2S5GVgUB4S#@r3k9=s)*MjcpYzOcvEcNil7dL ztY$PMBWS>Q7_;&$_tuW^0dqqQ9LqS$g}Q{5 zHOC5>8PmRC%%rJ_CUQw5J!ROI?0sd>nX?uY_9d)jU);!BaobEcyum<^i|^)GHT@A2587>$dhpjRVmXM@>vk*=p+wB z<92{qMLRk-#iFm!f`G!7=WGElV4EzYYSKz&4X0qU<$Vv``X3pFot#G}qE@`Wk*$%* zT)|G7!W@C=Aze00%`J5^+_>ZtT&q7yESV$CDat9Sd*>fQ|yL5d|G@$r&_4vRZfZhMDp+gOy&>G%Lc68u9QAK_!Bx_R--Js7{PfiPKx$(67{k3LME+;8~0h(vgz7L8F;k9t{Cq>?XiddJ?&7~g#hYhF!*0pFSFr(IUf9KJU@V^C_A`2LCXr!#=3$l zP~US|flkVZtJYD88pOD7_RP?QZtlcQ58acwbav2pb{;{x1H!ScR<(kP&EB^0R=w+O zw`W)K7WTdIF5*nL!u5N|_nYQENWYD-6$D~kcM*)W-bE|(QH3Vd zGUoBtfETc zOH6VRQTQ3v$AUY9%h2zma%t@kT36mjwPJOhKYHSJCm8tv5C@|L1sA2v!|&K@pp=~ z9j1>uOydZSx=7ELDxb$QJSEXFgJpMmtdP&ny%>Xs+(EdT4hT|Fr|311F zO?Rzgo5Bj}N4Y8oeD7w!e}Ue;Gq{Rq1uibF{nmY(t~~raKJ>EEJ~H7jyLtp?S+ihv zm?3+~#WOBaZA_$y)Hy%JFh}Do@!=~)%i$7IG6&vSf9b4Xmc?W*!Bxf=NPR5 z&(oF?k5_VML4$Q@dwgWDCTuqijrH8bCYDAsMwO1xa156TeO`O zY0ghCE%DVEw^DU|r$qX_!@O3rJtRZC74z&r;NEXZXG;|o z%>He3sLs+YN>4be41MX*F#TojteT-zbwb`M*DDxJD^R`Y`krN95vm3~&3Qehy3oL0 zj2qaEJ(M8>H&I|14B9imo!V%V%bw?Y26keXfqo2Vm@_bs1!caEVaKLL$Yk0V<&y0Y zpT)3}j_TP=&!Xj%GA8aM`%VfSB3uc2sQ33q5_Ha#q?JhCmxFtl|nes6S!&cLcM zXhg?y9m$15J=dRZ%3p|?8>I;dJq0#Xp2we(YMj^9oHC50@BhK5bqth2wQ4&wQb(Je z)Qj|c-Rjw*@@>)IAl2k@OLj@WYcnk~WtwT4ijrLuo?U8Gj)p<{^g!)!599RF>Z7k* z6g{eppwiJTf{aN-2(FmTS{R?7u z*U|PZGxh=TO!fn`Hvzy9tpjMIRee9(3AO_V(22w7q8%6tA#o6g=tkfeCJHP#jgV!8 zGy$U_86?ROlBB?X5?EA2TEnP@49UVU#_)_tXURg5E)c#Vt!KuvACXu`Qt^tAU&Saw zYYIv9HgVA#T=WJP9V0kO+Dx@;9eFXh1L-f&DfIS~v4)P!duVIuOm&6lxH@;!c?~_U z8-C+KG&=&HVPxsL&jgNBc|ztBffn)WMQRPbFQCO items1) { + assert !items1.contains(null); + this.metadata = metadata1; this.items = items1; } @@ -16,6 +18,11 @@ public final class RecipeOutput { this(metadata1, Arrays.asList(items1)); } + @Override + public String toString() { + return "ROutput<"+items+","+metadata+">"; + } + public final List items; public final NBTTagCompound metadata; } diff --git a/src/api/java/ic2/api/recipe/Recipes.class b/src/api/java/ic2/api/recipe/Recipes.class new file mode 100644 index 0000000000000000000000000000000000000000..559ffe86538a8a6271ee6f9efd10918472acd264 GIT binary patch literal 1090 zcmZ`&+iuf95FMwvG;T`T5K6g|7D_J&OML|)(a-==3Q~jG=kaEfY`gYa>vdH=izg%= z_y9f%F?O~|WUI2YXXnhEnVs?O-+#aV0Kg%GOp1m?Z8f7utN_c z;c3o9#Jw*k$R;A>r-9Ix=Tq4P%Y{dsXSz_is5K_taUq@AtCOk?D$>yKJR zu>+mLVFor}KHK%1!5m3smr}&Wf$f5>Pkg@qOnE*LhEJ6)4zH$hRQ^>VO;_V69c(^T zE9Qad$wUl4aT?}r*JE%K)l0aXx6sOzpE;TZ^;V(yENZT-z7wG^?;Tj$-8*xj+*L#R zhs{3S!LLc+bNwCt^sl!1ilID1EmGT(Wit`fi|z$lRsFW&>3Ae}VIp dh!SkmS|vJd;RUUYY+r$wutOHz8(K@S`yUR39GU_vCF zs;g4{{qy++pvFaovkK=1!}qw&j-RDrgUe*yhh6iXgjF1G?9Lk8ylq1(p660z(eNaM z*xFWND9XLKv?m{zg;u^H7rl>xCbQ|I8rvju&P6W`x)0-fgI?SR&bm#XYJ)+_aVJYw zpS}XBGPo62lL{%blf?8tkHP4Wh#DK#^t#xvYp(%=jy`m#4!VE+2tA!w%Jdbf3I;eX J7~-Vh^cO9RKq~+M literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.class b/src/api/java/ic2/api/tile/ExplosionWhitelist.class new file mode 100644 index 0000000000000000000000000000000000000000..0fbd082df4f40a62a349f58a919581382c2e2a9a GIT binary patch literal 987 zcmah{O>fgc5Pj=>ICfl;rt|{}O+)!eOp8Uu1tsbM1ma-9A*dDHHqO#)aqP-=3O|Yq zaHs%@AJ89FF9-!ccP$_z`y|iS(VmNV=5m%l&{SlSnXZ{+sQ&fk>RO41^c)4~aAI zL+_*WEVbPoDlPY9Ad?-2Lc6oeP<$Q^38dyy!RyI*AfmT?;8UdGh938Kc_dRm4;GV= zj2T+4^tK&-C>^3CoEM)D{VDng@>ux zgv~HN-PS7}k7#2I%_|1RP*+tx5B8lmg9G7F(cBbBffQ(@42$h-;WJOW9THK_W*-W0;5B(O}~S7ug8 CiOmfF literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.java b/src/api/java/ic2/api/tile/ExplosionWhitelist.java new file mode 100644 index 000000000..fa4a474a5 --- /dev/null +++ b/src/api/java/ic2/api/tile/ExplosionWhitelist.java @@ -0,0 +1,47 @@ +package ic2.api.tile; + +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. + * + * The explosion code by default ignores blocks which absorb more than 1000 explosion power to + * prevent abusing personal safes, Trade-O-Mats and other blocks to serve as a cheap and + * invulnerable reactor chambers. Said blocks will not shield the explosion and won't get + * destroyed. + */ +public final class ExplosionWhitelist { + /** + * Add a block to the whitelist. + * + * @param block block to add + */ + public static void addWhitelistedBlock(Block block) { + whitelist.add(block); + } + + /** + * Remove a block from the whitelist. + * + * @param block block to remove + */ + public static void removeWhitelistedBlock(Block block) { + whitelist.remove(block); + } + + /** + * Check if a block is on the whitelist. + * + * @param block block to check if whitelisted + * @return Whether the block is whitelisted + */ + public static boolean isBlockWhitelisted(Block block) { + return whitelist.contains(block); + } + + private static Set whitelist = new HashSet(); +} + diff --git a/src/api/java/ic2/api/tile/IEnergyStorage.class b/src/api/java/ic2/api/tile/IEnergyStorage.class new file mode 100644 index 0000000000000000000000000000000000000000..e03e23fce274df43d8d939027126be830357e617 GIT binary patch literal 374 zcmY+A%}xR_6opR_83BJ#5;wj8Y;3~TB}g)f2_~QmccpWg6ldB=>6rLxE_?tV%6K~v zjhmk4%Q@%X_UrrO6Tk$+1eXb}1iCqeWpJJ{fuqqlWwQGt?NK^@W~8$0-jdJX1tMZs zpL0`HDQyD7*s`cYRR@8a-}^rDWKGyTl3yA9+RT^g zOF@>#lJ;s7HqPfHwJS?!WgSc*=aI~eCmoElcjFg<-qO`x)7->{VY(k1AEk1--Ksam zOBp?psxp!*NdC7745CRE%I0#h-g0wCK%m7x1te`=8f}2}7@bBFoHW`!@ZLfDIBobD M&N(S?!DkDDA0G)_&;S4c literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/tile/IWrenchable.class b/src/api/java/ic2/api/tile/IWrenchable.class new file mode 100644 index 0000000000000000000000000000000000000000..3bc6fff8c266ae7b1f199a5fe5b732bc70753e97 GIT binary patch literal 456 zcmb7BK~BRk5FD3~&_bat7oLzDsHI+e1R@0?ff@-UZmzWim&A#JDeBia@Bki#*cyof zw_bL%yR$p9_Q&VjJAes}BMc*q1V*ndS^apXY)&p!+So#19A8;-vND!*s~(&r>x^5; zrc^6x<%Q2~d@{|Fdx37T8QzJLoGZ_pN)YGCt-#Tb)QqZnNdl)^=&WUiEOY1mp0{-~ zQ;v7ATq@B2(-FAbX7j&ejiX9t9CD}h(^R0B*DtN6)Re3@$i5w@c}e4iS}K7PqbE`| zMmlE5Uwvk;8M0Kikk|7CX%`9zbodW|Fktrx0LEQ}9wY2|?4sv!9|s=$IOGX_LyjE` Fz5o$He;NP) literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/tile/package-info.class b/src/api/java/ic2/api/tile/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..226d45541037da6f5eb4672f34e5f1254370a83b GIT binary patch literal 254 zcmYjM%T5A85Uc@V5np)F#E+21y?P=hBqSypOt=q2Lk4!HH#-CTn+HF@k1{lz>_d0D zs;g4{`}h3=pu}B)n*z56{V&-yjwiligZtXLtzGl8k1H8&?A{tY&2};Sz;mDcqT+Fk zl5O@9lXCB_K2VTlqE)EKNeB{Y{5gG9V_W+q(aJ?hyJHA7@YD@W#gJY78`c?5in@!JEv-)eeM_N=zLJ7t4NX1!(~Dr HR|(fghIl_; literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/util/IKeyboard.class b/src/api/java/ic2/api/util/IKeyboard.class new file mode 100644 index 0000000000000000000000000000000000000000..1e52c66c8a6cf6a29b614fe9064d9b0b89ddf02e GIT binary patch literal 374 zcmYL_O-{ow5QWF3G^Mm95>n3q3$WBJD-cxtv;rwRcCItP6xWVyr%|rPf&*|Ugi~2& z<4^BB`ORp4e!so}U=Dc((+o}+jLBUq|Ag(WX*7e2v!zDQx1>>8@#Z;dPrl`q5-nPO zw^uKFadrO6U`p=B824Y0lUo?u2wSGk3Ax95TP1x;Ze>a=8uIcZxifMFl}LIQMjG3u zAT-|BW%nalVQQgKd?sU5nA%EQkixLjL-5xotZ=yzJHcQ^a?V9Xy!NDcN*Ux`&Xv&b r{CT}W=?4rL^umPzhJ6MH&<6-Sj2uK}k;BNN$Wi2R$IvtmZx1GaY*}Cn literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/util/IKeyboard.java b/src/api/java/ic2/api/util/IKeyboard.java new file mode 100644 index 000000000..ff6eaea5e --- /dev/null +++ b/src/api/java/ic2/api/util/IKeyboard.java @@ -0,0 +1,14 @@ +package ic2.api.util; + +import net.minecraft.entity.player.EntityPlayer; + +public interface IKeyboard { + boolean isAltKeyDown(EntityPlayer player); + boolean isBoostKeyDown(EntityPlayer player); + boolean isForwardKeyDown(EntityPlayer player); + boolean isJumpKeyDown(EntityPlayer player); + boolean isModeSwitchKeyDown(EntityPlayer player); + boolean isSideinventoryKeyDown(EntityPlayer player); + boolean isHudModeKeyDown(EntityPlayer player); + boolean isSneakKeyDown(EntityPlayer player); +} diff --git a/src/api/java/ic2/api/util/Keys.class b/src/api/java/ic2/api/util/Keys.class new file mode 100644 index 0000000000000000000000000000000000000000..0e5ff7fba04b7194a7a606cf39083cbb14bde8f2 GIT binary patch literal 309 zcmY*UyH3ME5S(?KIG8{lG_-U;!AWUBG)PDYD-@vg>&po?GG}C;k@zesBnm!&k3#H0 znl!t!vooXJ@1M^v0CUW8^f1ma$uK1h#kYaIb%eu0?A-8+m@Y_VZf@OMS#z^GCk!sc zOSmNTj!%|^^r~K|VO)rJi|)B}%>$Q}GP9z#TrIhgIB&=_JV{G9*pAoqR+IDlx@)Yv zmT2FJ6HsA<}z659hQuP0j-i%C{p-x6SY44wY bfZi1(DufCmnIhLZ`WIkVQ4HGCnqdDIWCB0l literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/util/Keys.java b/src/api/java/ic2/api/util/Keys.java new file mode 100644 index 000000000..84d175676 --- /dev/null +++ b/src/api/java/ic2/api/util/Keys.java @@ -0,0 +1,6 @@ +package ic2.api.util; + + +public class Keys { + public static IKeyboard instance; +} \ No newline at end of file diff --git a/src/api/java/ic2/api/util/package-info.class b/src/api/java/ic2/api/util/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..4c91d9186aca2be1a632a781e1c0fa52adfefd8b GIT binary patch literal 254 zcmYjM%T5C^44kyITgv+Y5+6YWd*xIiAyq;Gfz*4Nx|K^3uQu8C-#G9Ad=#q72_I~E z#xolK{C<4{sBux@tirj$_(QtZ(=!J$xN4mLbZfffw35ljZJojGdzT7FnseqwplM1{ zTwzIBxfkE;Y?NiTs~D`87$w>1+w4(|UBh!~vtAnXA13z(1KA~Nb(=la2BW5xEiXxZ zh6<=k4cXULg|;gk?Ef?dmxnwyxU{yfiw*g50~qx5okR7||LaE>=)6{Ds7RGD!g0nJ HCmE-Ei>^O! literal 0 HcmV?d00001 diff --git a/src/api/java/ic2/api/util/package-info.java b/src/api/java/ic2/api/util/package-info.java new file mode 100644 index 000000000..4dd2d93b1 --- /dev/null +++ b/src/api/java/ic2/api/util/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion="1.0", owner="IC2", provides="IC2API") +package ic2.api.util; +import cpw.mods.fml.common.API; +