Add custom banner patterns

This commit is contained in:
Ellpeck 2016-05-13 23:19:30 +02:00
parent 796fc2de43
commit 30d493d513
9 changed files with 127 additions and 6 deletions

View file

@ -28,10 +28,7 @@ import de.ellpeck.actuallyadditions.mod.items.ItemCoffee;
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials;
import de.ellpeck.actuallyadditions.mod.misc.DispenserHandlerFertilize;
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import de.ellpeck.actuallyadditions.mod.misc.WorldData;
import de.ellpeck.actuallyadditions.mod.misc.*;
import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
import de.ellpeck.actuallyadditions.mod.ore.InitOreDict;
import de.ellpeck.actuallyadditions.mod.proxy.IProxy;
@ -59,7 +56,7 @@ public class ActuallyAdditions{
@Instance(ModUtil.MOD_ID)
public static ActuallyAdditions instance;
@SidedProxy(clientSide = "de.ellpeck.actuallyadditions.mod.proxy.ClientProxy", serverSide = "de.ellpeck.actuallyadditions.mod.proxy.ServerProxy")
@SidedProxy(clientSide = ModUtil.PROXY_CLIENT, serverSide = ModUtil.PROXY_SERVER)
public static IProxy proxy;
static{
@ -79,6 +76,7 @@ public class ActuallyAdditions{
InitFluids.init();
InitItems.init();
FuelHandler.init();
BannerHelper.init();
SoundHandler.init();
UpdateChecker.init();
InitBooklet.preInit();

View file

@ -31,6 +31,7 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.tile.*;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.init.Items;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.Loader;
@ -68,6 +69,7 @@ public class InitBooklet{
//Miscellaneous
new BookletChapter("reconstructorLenses", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeColorLens), new PageReconstructor(4, LensRecipeHandler.recipeExplosionLens), new PageReconstructor(5, LensRecipeHandler.recipeDamageLens), new PageReconstructor(6, LensRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(7, LensRecipeHandler.recipeLeather).setNoText(), new PageReconstructor(8, LensRecipeHandler.recipeNetherWart).setNoText()).setImportant();
new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BANNER, 1, 15), new PageTextOnly(1));
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", OreGen.QUARTZ_MIN).addTextReplacement("<highest>", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText().setPageStacksWildcard()).setSpecial();

View file

@ -0,0 +1,45 @@
package de.ellpeck.actuallyadditions.mod.misc;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityBanner.EnumBannerPattern;
import net.minecraftforge.common.util.EnumHelper;
import java.util.Locale;
public class BannerHelper{
public static void init(){
addCraftingPattern("Drill", new ItemStack(InitItems.itemDrill));
addCraftingPattern("LeafBlo", new ItemStack(InitItems.itemLeafBlower));
addCraftingPattern("PhanCon", new ItemStack(InitItems.itemPhantomConnector));
addCraftingPattern("Book", new ItemStack(InitItems.itemBooklet));
}
/**
* (Excerpted from Additional Banners by Darkhax with permission, thanks!)
*
* Adds a new banner pattern to the game. This banner pattern will be applied by using the
* provided item in a crafting recipe with the banner.
*
* @param name The name of the banner pattern. This is used for the texture file, and is
* also converted into upper case and used for the enum entry. Given how this
* system works, it's critical that this value is unique, consider adding the
* mod id to the name.
* //@param id A small string used to represent the pattern without taking up much space. An
* example of this is "bri". Given how the system works, it is critical that
* this is a unique value. please consider adding the mod id to the pattern id.
* @param craftingStack An ItemStack which is used in the crafting recipe for this pattern.
* An example of this would be the creeper skull being used for the creeper
* pattern.
* @return EnumBannerPattern: A reference to the new EnumBannerPattern entry that has been
* created.
*/
public static EnumBannerPattern addCraftingPattern(String name, ItemStack craftingStack){
Class<?>[] paramTypes = {String.class, String.class, ItemStack.class};
Object[] paramValues = {ModUtil.MOD_ID+name, ModUtil.MOD_ID+name, craftingStack};
return EnumHelper.addEnum(EnumBannerPattern.class, name.toUpperCase(Locale.ROOT), paramTypes, paramValues);
}
}

View file

@ -21,5 +21,9 @@ public class ModUtil{
public static final String MOD_ID = ActuallyAdditionsAPI.MOD_ID;
public static final String NAME = "Actually Additions";
private static final String PROXY_BASE = "de.ellpeck.actuallyadditions.mod.proxy.";
public static final String PROXY_CLIENT = PROXY_BASE+"ClientProxy";
public static final String PROXY_SERVER = PROXY_BASE+"ServerProxy";
public static final Logger LOGGER = LogManager.getLogger(NAME);
}

View file

@ -7,6 +7,75 @@ actuallyadditions.lolWutHowUDoDis.name=This is bugged. Throw it away. Please.
fluid.actuallyadditions.oil=Oil
fluid.actuallyadditions.canolaoil=Canola Oil
#Banners
item.banner.actuallyadditionsBook.black=Black Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.red=Red Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.green=Green Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.brown=Brown Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.blue=Blue Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.purple=Purple Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.cyan=Cyan Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.silver=Silver Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.gray=Gray Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.pink=Pink Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.lime=Lime Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.yellow=Yellow Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.lightBlue=LightBlue Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.magenta=Magenta Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.orange=Orange Actually Additions Manual Pattern
item.banner.actuallyadditionsBook.white=White Actually Additions Manual Pattern
item.banner.actuallyadditionsPhanCon.black=Black Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.red=Red Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.green=Green Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.brown=Brown Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.blue=Blue Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.purple=Purple Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.cyan=Cyan Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.silver=Silver Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.gray=Gray Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.pink=Pink Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.lime=Lime Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.yellow=Yellow Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.lightBlue=LightBlue Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.magenta=Magenta Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.orange=Orange Phantom Connector Pattern
item.banner.actuallyadditionsPhanCon.white=White Phantom Connector Pattern
item.banner.actuallyadditionsLeafBlo.black=Black Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.red=Red Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.green=Green Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.brown=Brown Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.blue=Blue Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.purple=Purple Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.cyan=Cyan Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.silver=Silver Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.gray=Gray Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.pink=Pink Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.lime=Lime Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.yellow=Yellow Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.lightBlue=LightBlue Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.magenta=Magenta Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.orange=Orange Leaf Blower Pattern
item.banner.actuallyadditionsLeafBlo.white=White Leaf Blower Pattern
item.banner.actuallyadditionsDrill.black=Black Drill Pattern
item.banner.actuallyadditionsDrill.red=Red Drill Pattern
item.banner.actuallyadditionsDrill.green=Green Drill Pattern
item.banner.actuallyadditionsDrill.brown=Brown Drill Pattern
item.banner.actuallyadditionsDrill.blue=Blue Drill Pattern
item.banner.actuallyadditionsDrill.purple=Purple Drill Pattern
item.banner.actuallyadditionsDrill.cyan=Cyan Drill Pattern
item.banner.actuallyadditionsDrill.silver=Silver Drill Pattern
item.banner.actuallyadditionsDrill.gray=Gray Drill Pattern
item.banner.actuallyadditionsDrill.pink=Pink Drill Pattern
item.banner.actuallyadditionsDrill.lime=Lime Drill Pattern
item.banner.actuallyadditionsDrill.yellow=Yellow Drill Pattern
item.banner.actuallyadditionsDrill.lightBlue=LightBlue Drill Pattern
item.banner.actuallyadditionsDrill.magenta=Magenta Drill Pattern
item.banner.actuallyadditionsDrill.orange=Orange Drill Pattern
item.banner.actuallyadditionsDrill.white=White Drill Pattern
#NEI Integration
container.nei.actuallyadditions.crushing.name=Crusher
container.nei.actuallyadditions.crushingDouble.name=Double Crusher
@ -796,4 +865,7 @@ booklet.actuallyadditions.chapter.spawnerChanger.text.1=The <item>Spawner Change
booklet.actuallyadditions.chapter.itemStorage.name=Laser Relay Item Storage
booklet.actuallyadditions.chapter.itemStorage.text.1=Additionally to the <item>Laser Relays<r> that transfer RF, there are also <item>Item Laser Relays<r> that are able to transfer items. This works in a <imp>verry different way<r> though. <n>To connect <item>Item Laser Relays<r> together works the same as connecting normal ones, however, you need an <item>Item Interface<r> to be able to interact with them. <n>You can place <imp>any inventories<r> (such as chests and furnaces) next to the <item>Item Laser Relays<r>, but to be pulled out from or inputted into, there needs to be an <item>Item Interface<r> connected
booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the <item>Item Laser Relay<r>s. To input or output items in the system, just <imp>pipe them into the interface<r>. <n>If you want a way to make a storage system with this, there are also <item>Advanced Item Laser Relays<r>, in which, by <imp>sneak-right-clicking<r> them, you can specify which items are <imp>allowed and disallowed<r> to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an <item>Item Interface<r>, this effect also applies.
booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the <item>Item Laser Relay<r>s. To input or output items in the system, just <imp>pipe them into the interface<r>. <n>If you want a way to make a storage system with this, there are also <item>Advanced Item Laser Relays<r>, in which, by <imp>sneak-right-clicking<r> them, you can specify which items are <imp>allowed and disallowed<r> to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an <item>Item Interface<r>, this effect also applies.
booklet.actuallyadditions.chapter.banners.name=Additional Banners
booklet.actuallyadditions.chapter.banners.text.1=For <imp>special items<r> in <imp>Actually Additions<r>, there is also some additional <item>Banner<r> patterns you can do. <n>All of these just require the <imp>item next to the banner<r> in the crafting grid with, optionally, a <imp>color<r> as well. <n><n>The items that have a banner pattern are: <n>The <item>Actually Additions Manual<r> <n>The <item>Phantom Connector<r> <n>The <item>Leaf Blower<r> (not the advanced version) <n>The <item>Drill<r> (only the white one works due to the way banners work)

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B