Added Laser Relay Crafting & Documentation, added Chest To Crate Upgrade Documentation & Crafting, Config Stuff

This commit is contained in:
Ellpeck 2015-10-28 20:35:39 +01:00
parent 8629b7acd4
commit 95361fcde5
8 changed files with 64 additions and 19 deletions

View file

@ -73,10 +73,11 @@ public class InitBooklet{
new BookletChapter("fishingNet", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
new BookletChapter("feeder", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
new BookletChapter("compost", entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)).addTextReplacement("<num>", ConfigIntValues.COMPOST_AMOUNT.getValue()), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood));
new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate));
new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeChestToCrateUpgrade));
new BookletChapter("rangedCollector", entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
//RF Using Blocks
new BookletChapter("laserRelays", entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.LASER_RELAY_MAX_DISTANCE.getValue()).addTextReplacement("<loss>", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PageCrafting(2, BlockCrafting.recipeLaserRelay).setNoText(), new PageCrafting(3, ItemCrafting.recipeLaserWrench).setNoText()).setImportant();
new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("<coffee>", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("<water>", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PageCrafting(3, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(4, ItemCrafting.recipeCup).setNoText()).setImportant();
new BookletChapter("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf1>", ConfigIntValues.GRINDER_ENERGY_USED.getValue()).addTextReplacement("<rf2>", ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeSugar).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(7, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
new BookletChapter("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).addTextReplacement("<rf>", ConfigIntValues.FURNACE_ENERGY_USED.getValue()));

View file

@ -152,7 +152,11 @@ public enum ConfigCrafting{
WATER_RING("Water Ring", ConfigCategories.ITEMS_CRAFTING),
GROWTH_RING("Growth Ring", ConfigCategories.ITEMS_CRAFTING),
DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING),
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING);
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING),
LASER_RELAY("Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
LASER_WRENCH("Laser Wrench", ConfigCategories.ITEMS_CRAFTING),
CHEST_TO_CRATE_UPGRADE("Chest To Crate Upgrade", ConfigCategories.ITEMS_CRAFTING);
public final String name;
public final String category;

View file

@ -171,7 +171,10 @@ public enum ConfigIntValues{
DIRECTIONAL_BREAKER_RF_PER_BLOCK("Directional Breaker: RF per Block", ConfigCategories.MACHINE_VALUES, 5, 0, 1000, "The amount of RF the Directional Breaker uses to break each block"),
DIRECTIONAL_BREAKER_RANGE("Directional Breaker: Range", ConfigCategories.MACHINE_VALUES, 8, 1, 1000, "The range of the Directional Breaker"),
RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector");
RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector"),
LASER_RELAY_LOSS("Laser Relay: Loss", ConfigCategories.MACHINE_VALUES, 5, 0, 80, "The Energy Loss of the Laser Relay per Transfer in Percent"),
LASER_RELAY_MAX_DISTANCE("Laser Relay: Max Distance", ConfigCategories.MACHINE_VALUES, 10, 3, 80, "The max distance between two connected Laser Relays");
public final String name;
public final String category;

View file

@ -77,9 +77,20 @@ public class BlockCrafting{
public static IRecipe recipeDirectionalBreaker;
public static IRecipe recipeDropper;
public static IRecipe recipeRangedCollector;
public static IRecipe recipeLaserRelay;
public static void init(){
//Laser Relay
if(ConfigCrafting.LASER_RELAY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay),
"ORO", "RCR", "ORO",
'O', new ItemStack(Blocks.obsidian),
'R', new ItemStack(Items.redstone),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLaserRelay = Util.GetRecipes.lastIRecipe();
}
//Ranged Collector
if(ConfigCrafting.RANGED_COLLECTOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector),

View file

@ -71,6 +71,8 @@ public class ItemCrafting{
public static IRecipe recipeLeafBlower;
public static IRecipe recipeLeafBlowerAdvanced;
public static ArrayList<IRecipe> recipesPotionRings = new ArrayList<IRecipe>();
public static IRecipe recipeChestToCrateUpgrade;
public static IRecipe recipeLaserWrench;
public static void init(){
@ -82,6 +84,24 @@ public class ItemCrafting{
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
//Chest To Crate Upgrade
if(ConfigCrafting.CHEST_TO_CRATE_UPGRADE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade),
"CWC", "WWW", "CWC",
'C', new ItemStack(Blocks.chest),
'W', "plankWood"));
recipeChestToCrateUpgrade = Util.GetRecipes.lastIRecipe();
}
//Laser Wrench
if(ConfigCrafting.LASER_WRENCH.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench),
"C ", " S ", " S",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'S', "ingotIron"));
recipeLaserWrench = Util.GetRecipes.lastIRecipe();
}
//Rice Stuff
if(ConfigCrafting.RICE_GADGETS.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.paper, 3),

View file

@ -16,6 +16,7 @@ import ellpeck.actuallyadditions.blocks.InitBlocks;
import ellpeck.actuallyadditions.tile.TileEntityGiantChest;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockChest;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@ -48,6 +49,7 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{
}
//Set New Block
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(world.getBlock(x, y, z))+(world.getBlockMetadata(x, y, z) << 12));
world.setBlock(x, y, z, InitBlocks.blockGiantChest, 0, 2);
//Copy Items into new Chest

View file

@ -11,6 +11,7 @@
package ellpeck.actuallyadditions.misc;
import cofh.api.energy.IEnergyReceiver;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
import ellpeck.actuallyadditions.util.WorldPos;
import ellpeck.actuallyadditions.util.WorldUtil;
@ -19,7 +20,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.ArrayList;
import java.util.Iterator;
public class LaserRelayConnectionHandler{
@ -84,20 +84,12 @@ public class LaserRelayConnectionHandler{
public void removeRelayFromNetwork(WorldPos relay){
ArrayList<ConnectionPair> network = this.getNetworkFor(relay);
if(network != null){
//Remove the relay from the network
Iterator<ConnectionPair> iterator = network.iterator();
while(iterator.hasNext()){
ConnectionPair next = iterator.next();
if(next.contains(relay)){
iterator.remove();
//System.out.println("Removed "+relay.toString()+" from Network "+network.toString());
}
}
//Setup new network (so that splitting a network will cause it to break into two)
this.networks.remove(network);
for(ConnectionPair pair : network){
this.addConnection(pair.firstRelay, pair.secondRelay);
if(!pair.contains(relay)){
this.addConnection(pair.firstRelay, pair.secondRelay);
}
}
}
WorldData.makeDirty();
@ -123,7 +115,7 @@ public class LaserRelayConnectionHandler{
*/
public boolean addConnection(WorldPos firstRelay, WorldPos secondRelay){
int distance = (int)firstRelay.toVec().distanceTo(secondRelay.toVec());
if(distance > 15 || firstRelay.isEqual(secondRelay) || firstRelay.getWorld() != secondRelay.getWorld()){
if(distance > ConfigIntValues.LASER_RELAY_MAX_DISTANCE.getValue() || firstRelay.isEqual(secondRelay) || firstRelay.getWorld() != secondRelay.getWorld()){
return false;
}
@ -188,8 +180,13 @@ public class LaserRelayConnectionHandler{
if(tile instanceof IEnergyReceiver && !(tile instanceof TileEntityLaserRelay)){
IEnergyReceiver receiver = (IEnergyReceiver)tile;
if(receiver.canConnectEnergy(side.getOpposite())){
//Transfer the energy
transmitted += ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), maxTransfer-transmitted, simulate);
//Transfer the energy (with the energy loss!)
int theoreticalReceived = ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), maxTransfer-transmitted, true);
//The amount of energy lost during a transfer
int deduct = (int)(theoreticalReceived*((double)ConfigIntValues.LASER_RELAY_LOSS.getValue()/100));
transmitted+=((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), theoreticalReceived-deduct, simulate);
transmitted+=deduct;
}
}
}

View file

@ -105,6 +105,7 @@ tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud
tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator
tile.actuallyadditions.blockDirectionalBreaker.name=Long-Range Breaker
tile.actuallyadditions.blockRangedCollector.name=Ranged Collector
tile.actuallyadditions.blockLaserRelay.name=Laser Relay
#ESD
tile.actuallyadditions.blockInputter.name=ESD
@ -276,6 +277,8 @@ item.actuallyadditions.itemChestQuartz.name=Black Quartz Chestplate
item.actuallyadditions.itemPantsQuartz.name=Black Quartz Pants
item.actuallyadditions.itemBootsQuartz.name=Black Quartz Boots
item.actuallyadditions.itemBooklet.name=Actually Additions Manual
item.actuallyadditions.itemLaserWrench.name=Laser Wrench
item.actuallyadditions.itemChestToCrateUpgrade.name=Chest To Storage Crate Upgrade
#Tooltips
tooltip.actuallyadditions.onSuffix.desc=On
@ -483,6 +486,7 @@ booklet.actuallyadditions.chapter.compost.text.3=<item>Mashed Food<r> can be cra
booklet.actuallyadditions.chapter.crate.name=Storage Crates
booklet.actuallyadditions.chapter.crate.text.1=<item>Storage Crates<r> are big. <imp>Really big<r>. They hold tons of items, more than 4 chests worth of them. <n><n><i>"F-in' gigantic"<rs><n> -Some Magazine
booklet.actuallyadditions.chapter.crate.text.2=The <item>Chest To Storage Crate Upgrade<r> allows you to <imp>convert any chest into a Storage Crate<r>, retaining its items! <n>Just <imp>shift-right-click<r> onto the chest to apply it.
booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine
booklet.actuallyadditions.chapter.coffeeMachine.text.1=The <item>Coffee Machine<r> is a block used to make <item>Coffee<r>, a <imp>potion-like<r> item that gives the user several buffs. <n>To use the coffee machine, you need a <item>Empty Cup<r>, <coffee> <item>Coffee Beans<r>, which can be found in the wild, harvested and <imp>planted on farmland<r> again, <rf> RF/t and <water>mB of Water per cup brewed. <n>On the coffee machine recipe pages at the back, to see what the item does, just hover over the Cup of Coffee.
@ -572,4 +576,7 @@ booklet.actuallyadditions.chapter.rangedCollector.name=Ranged Collector
booklet.actuallyadditions.chapter.rangedCollector.text.1=The <item>Ranged Collector<r> works much like a hopper, in that it <imp>collects items around it<r>, having the power, however, to pick up items that are in an area of <imp><range> blocks<r> around it. <n>It has a <imp>filter<r> that can be set to <imp>white- or blacklist<r>. <n>This comes with a disadvantage, however: It doesn't auto-output its items.
booklet.actuallyadditions.chapter.hairBalls.name=Ball of Fur-s
booklet.actuallyadditions.chapter.hairBalls.text.1=<item>Balls of Fur<r> are an item rarely dropped by <imp>cats<r> which have been <imp>tamed<r> by the player. <n>Cats are very mysterious creatures as they <imp>appear to get everything stuck in their fur<r>. <item>Balls of Fur<r> may seem disgusting at first, but when removing all of the hair by <imp>right-clicking<r>, they will reveal some <imp>valuable items<r>. <n>Or just some String. <n><n><n><i>FUURRRRRR!!
booklet.actuallyadditions.chapter.hairBalls.text.1=<item>Balls of Fur<r> are an item rarely dropped by <imp>cats<r> which have been <imp>tamed<r> by the player. <n>Cats are very mysterious creatures as they <imp>appear to get everything stuck in their fur<r>. <item>Balls of Fur<r> may seem disgusting at first, but when removing all of the hair by <imp>right-clicking<r>, they will reveal some <imp>valuable items<r>. <n>Or just some String. <n><n><n><i>FUURRRRRR!!
booklet.actuallyadditions.chapter.laserRelays.name=Laser Relays
booklet.actuallyadditions.chapter.laserRelays.text.1=The <item>Laser Relay<r> is a block that can <imp>wirelessly transfer RF<r> just by being connected with a <item>Laser Wrench<r>, generating a network. <n>When placing a Power Generator or Receiver next to the relay, it can receive Power <imp>from any other relay<r> in the network. <n>Two relays can be at most <range> blocks apart. <n>During an energy transfer, they have an <imp>Energy Loss<r> of <loss>%.