Ranged Collector Localization, Crafting & Documentation

This commit is contained in:
Ellpeck 2015-10-10 03:39:42 +02:00
parent 02bc25c79b
commit ae6fc4ba33
8 changed files with 30 additions and 7 deletions

View file

@ -356,6 +356,7 @@ public class GuiBooklet extends GuiScreen{
this.searchField = new GuiTextField(this.fontRendererObj, guiLeft+148, guiTop+162, 66, 10); this.searchField = new GuiTextField(this.fontRendererObj, guiLeft+148, guiTop+162, 66, 10);
this.searchField.setMaxStringLength(30); this.searchField.setMaxStringLength(30);
this.searchField.setEnableBackgroundDrawing(false); this.searchField.setEnableBackgroundDrawing(false);
this.searchField.setCanLoseFocus(false);
this.currentPage = null; this.currentPage = null;
this.currentChapter = null; this.currentChapter = null;
@ -458,9 +459,9 @@ public class GuiBooklet extends GuiScreen{
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void openIndexEntry(BookletIndexEntry entry, int page, boolean resetTextField){ public void openIndexEntry(BookletIndexEntry entry, int page, boolean resetTextField){
if(resetTextField){
this.searchField.setVisible(entry instanceof BookletEntryAllSearch); this.searchField.setVisible(entry instanceof BookletEntryAllSearch);
this.searchField.setFocused(entry instanceof BookletEntryAllSearch); this.searchField.setFocused(entry instanceof BookletEntryAllSearch);
if(resetTextField){
this.searchField.setText(""); this.searchField.setText("");
if(entry instanceof BookletEntryAllSearch){ if(entry instanceof BookletEntryAllSearch){
entry.chapters = (ArrayList<BookletChapter>)((BookletEntryAllSearch)entry).allChapters.clone(); entry.chapters = (ArrayList<BookletChapter>)((BookletEntryAllSearch)entry).allChapters.clone();

View file

@ -71,6 +71,7 @@ public class InitBooklet{
new BookletChapter("feeder", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).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("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 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 //RF Using Blocks
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()); 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());

View file

@ -150,7 +150,8 @@ public enum ConfigCrafting{
MAGNET_RING("Magnet Ring", ConfigCategories.ITEMS_CRAFTING), MAGNET_RING("Magnet Ring", ConfigCategories.ITEMS_CRAFTING),
WATER_RING("Water Ring", ConfigCategories.ITEMS_CRAFTING), WATER_RING("Water Ring", ConfigCategories.ITEMS_CRAFTING),
GROWTH_RING("Growth Ring", ConfigCategories.ITEMS_CRAFTING), GROWTH_RING("Growth Ring", ConfigCategories.ITEMS_CRAFTING),
DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING); DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING),
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING);
public final String name; public final String name;
public final String category; public final String category;

View file

@ -167,7 +167,9 @@ public enum ConfigIntValues{
LEAF_GENERATOR_RANGE("Leaf Generator: Range", ConfigCategories.MACHINE_VALUES, 7, 1, 100, "The radius of a leaf generator"), LEAF_GENERATOR_RANGE("Leaf Generator: Range", ConfigCategories.MACHINE_VALUES, 7, 1, 100, "The radius of a leaf generator"),
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_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"); 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");
public final String name; public final String name;
public final String category; public final String category;

View file

@ -76,9 +76,20 @@ public class BlockCrafting{
public static IRecipe recipeLeafGen; public static IRecipe recipeLeafGen;
public static IRecipe recipeDirectionalBreaker; public static IRecipe recipeDirectionalBreaker;
public static IRecipe recipeDropper; public static IRecipe recipeDropper;
public static IRecipe recipeRangedCollector;
public static void init(){ public static void init(){
//Ranged Collector
if(ConfigCrafting.RANGED_COLLECTOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector),
"EHE", " C ",
'E', new ItemStack(Items.ender_pearl),
'H', new ItemStack(Blocks.hopper),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
recipeRangedCollector = Util.GetRecipes.lastIRecipe();
}
//Directional Breaker //Directional Breaker
if(ConfigCrafting.DIRECTIONAL_BREAKER.isEnabled()){ if(ConfigCrafting.DIRECTIONAL_BREAKER.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker),

View file

@ -82,6 +82,7 @@ public class CreativeTab extends CreativeTabs{
add(InitBlocks.blockFishingNet); add(InitBlocks.blockFishingNet);
add(InitBlocks.blockBreaker); add(InitBlocks.blockBreaker);
add(InitBlocks.blockDirectionalBreaker); add(InitBlocks.blockDirectionalBreaker);
add(InitBlocks.blockRangedCollector);
add(InitBlocks.blockPlacer); add(InitBlocks.blockPlacer);
add(InitBlocks.blockDropper); add(InitBlocks.blockDropper);
add(InitBlocks.blockFluidPlacer); add(InitBlocks.blockFluidPlacer);

View file

@ -10,6 +10,7 @@
package ellpeck.actuallyadditions.tile; package ellpeck.actuallyadditions.tile;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.network.gui.IButtonReactor; import ellpeck.actuallyadditions.network.gui.IButtonReactor;
import ellpeck.actuallyadditions.network.sync.IPacketSyncerToClient; import ellpeck.actuallyadditions.network.sync.IPacketSyncerToClient;
import ellpeck.actuallyadditions.network.sync.PacketSyncerToClient; import ellpeck.actuallyadditions.network.sync.PacketSyncerToClient;
@ -38,11 +39,11 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
public void updateEntity(){ public void updateEntity(){
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
int range = 8; int range = ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue();
ArrayList<EntityItem> items = (ArrayList<EntityItem>)this.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(this.xCoord-range, this.yCoord-range, this.zCoord-range, this.xCoord+range, this.yCoord+range, this.zCoord+range)); ArrayList<EntityItem> items = (ArrayList<EntityItem>)this.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(this.xCoord-range, this.yCoord-range, this.zCoord-range, this.xCoord+range, this.yCoord+range, this.zCoord+range));
if(!items.isEmpty()){ if(!items.isEmpty()){
for(EntityItem item : items){ for(EntityItem item : items){
if(item.getEntityItem() != null){ if(!item.isDead && item.getEntityItem() != null){
ItemStack toAdd = item.getEntityItem().copy(); ItemStack toAdd = item.getEntityItem().copy();
if(this.checkFilter(toAdd)){ if(this.checkFilter(toAdd)){
ArrayList<ItemStack> checkList = new ArrayList<ItemStack>(); ArrayList<ItemStack> checkList = new ArrayList<ItemStack>();

View file

@ -104,6 +104,7 @@ tile.actuallyadditions.blockXPSolidifier.name=Experience Solidifier
tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud
tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator
tile.actuallyadditions.blockDirectionalBreaker.name=Long-Range Breaker tile.actuallyadditions.blockDirectionalBreaker.name=Long-Range Breaker
tile.actuallyadditions.blockRangedCollector.name=Ranged Collector
#ESD #ESD
tile.actuallyadditions.blockInputter.name=ESD tile.actuallyadditions.blockInputter.name=ESD
@ -350,6 +351,7 @@ container.actuallyadditions.xpSolidifier.name=Experience Solidifier
container.actuallyadditions.oreMagnet.name=Magnetic Miner container.actuallyadditions.oreMagnet.name=Magnetic Miner
container.actuallyadditions.cloud.name=Smiley Cloud container.actuallyadditions.cloud.name=Smiley Cloud
container.actuallyadditions.directionalBreaker.name=Long-Range Breaker container.actuallyadditions.directionalBreaker.name=Long-Range Breaker
container.actuallyadditions.rangedCollector.name=Ranged Collector
#Update Information #Update Information
info.actuallyadditions.update.generic.desc=[{"text":"There is an "},{"text":"Update ","bold":"true"},{"text":"for ","bold":"false"},{"text":"Actually Additions ","color":"dark_green","bold":"true"},{"text":"available!","color":"none","bold":"false"}] info.actuallyadditions.update.generic.desc=[{"text":"There is an "},{"text":"Update ","bold":"true"},{"text":"for ","bold":"false"},{"text":"Actually Additions ","color":"dark_green","bold":"true"},{"text":"available!","color":"none","bold":"false"}]
@ -552,3 +554,6 @@ booklet.actuallyadditions.chapter.longRangeBreaker.text.2=<i>Sequence Breaking
booklet.actuallyadditions.chapter.dropper.name=Automatic Precision Dropper booklet.actuallyadditions.chapter.dropper.name=Automatic Precision Dropper
booklet.actuallyadditions.chapter.dropper.text.1=The <item>Automatic Precision Dropper<r> works much like a normal dropper, but it will drop items <imp>without needing a Redstone Signal<r>. <n>It also won't spit them out all over the ground, but it will <imp>drop them straight into the direction you point it at<r>! <n>It can be turned off with a Redstone Signal. booklet.actuallyadditions.chapter.dropper.text.1=The <item>Automatic Precision Dropper<r> works much like a normal dropper, but it will drop items <imp>without needing a Redstone Signal<r>. <n>It also won't spit them out all over the ground, but it will <imp>drop them straight into the direction you point it at<r>! <n>It can be turned off with a Redstone Signal.
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.