diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index 27babfa47..1cfe56b2e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -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(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 4eb932996..1a874c7bd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -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("", OreGen.QUARTZ_MIN).addTextReplacement("", 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(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java new file mode 100644 index 000000000..43867bb96 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java @@ -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); + } + +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java index fc92f3d5f..1f4d68da4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ModUtil.java @@ -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); } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 318569e38..48d25fbc0 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -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 Spawner Change booklet.actuallyadditions.chapter.itemStorage.name=Laser Relay Item Storage booklet.actuallyadditions.chapter.itemStorage.text.1=Additionally to the Laser Relays that transfer RF, there are also Item Laser Relays that are able to transfer items. This works in a verry different way though. To connect Item Laser Relays together works the same as connecting normal ones, however, you need an Item Interface to be able to interact with them. You can place any inventories (such as chests and furnaces) next to the Item Laser Relays, but to be pulled out from or inputted into, there needs to be an Item Interface connected -booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the Item Laser Relays. To input or output items in the system, just pipe them into the interface. If you want a way to make a storage system with this, there are also Advanced Item Laser Relays, in which, by sneak-right-clicking them, you can specify which items are allowed and disallowed to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an Item Interface, this effect also applies. \ No newline at end of file +booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the Item Laser Relays. To input or output items in the system, just pipe them into the interface. If you want a way to make a storage system with this, there are also Advanced Item Laser Relays, in which, by sneak-right-clicking them, you can specify which items are allowed and disallowed to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an Item Interface, this effect also applies. + +booklet.actuallyadditions.chapter.banners.name=Additional Banners +booklet.actuallyadditions.chapter.banners.text.1=For special items in Actually Additions, there is also some additional Banner patterns you can do. All of these just require the item next to the banner in the crafting grid with, optionally, a color as well. The items that have a banner pattern are: The Actually Additions Manual The Phantom Connector The Leaf Blower (not the advanced version) The Drill (only the white one works due to the way banners work) \ No newline at end of file diff --git a/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsBook.png b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsBook.png new file mode 100644 index 000000000..08b38684e Binary files /dev/null and b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsBook.png differ diff --git a/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsDrill.png b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsDrill.png new file mode 100644 index 000000000..858ba1746 Binary files /dev/null and b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsDrill.png differ diff --git a/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsLeafBlo.png b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsLeafBlo.png new file mode 100644 index 000000000..8d38b0f0e Binary files /dev/null and b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsLeafBlo.png differ diff --git a/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsPhanCon.png b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsPhanCon.png new file mode 100644 index 000000000..91e2936e8 Binary files /dev/null and b/src/main/resources/assets/minecraft/textures/entity/banner/actuallyadditionsPhanCon.png differ