├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── CREDITS-fml.txt ├── LICENSE-fml.txt ├── LICENSE-new.txt ├── LICENSE.txt ├── MinecraftForge-Credits.txt ├── MinecraftForge-License.txt ├── Paulscode IBXM Library License.txt ├── Paulscode SoundSystem CodecIBXM License.txt ├── README-forge.txt ├── README.md ├── build.gradle ├── changelog.txt ├── forge-1.10.2-12.18.3.2185-changelog.txt ├── forge-1.8.9-11.15.1.1722-changelog.txt ├── forge-1.9-12.16.0.1805-1.9-changelog.txt ├── forge-1.9.4-12.17.0.1922-1.9.4-changelog.txt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src └── main ├── java └── com │ └── setycz │ └── chickens │ ├── ChickenTeachHandler.java │ ├── ChickensMod.java │ ├── ChickensRegistry.java │ ├── ChickensRegistryItem.java │ ├── ChickensTab.java │ ├── ClientProxy.java │ ├── CommonProxy.java │ ├── IColorSource.java │ ├── IInventoryGui.java │ ├── ItemColorHandler.java │ ├── LiquidEggRegistry.java │ ├── LiquidEggRegistryItem.java │ ├── SpawnType.java │ ├── TileEntityGuiHandler.java │ ├── analyzer │ ├── ItemAnalyzer.java │ └── package-info.java │ ├── chicken │ ├── ChickenNetherPopulateHandler.java │ ├── EntityChickensChicken.java │ ├── ModelChickensChicken.java │ ├── RenderChickensChicken.java │ └── package-info.java │ ├── coloredEgg │ ├── EntityColoredEgg.java │ ├── ItemColoredEgg.java │ └── package-info.java │ ├── henhouse │ ├── BlockHenhouse.java │ ├── ContainerHenhouse.java │ ├── GuiHenhouse.java │ ├── TileEntityHenhouse.java │ └── package-info.java │ ├── jei │ ├── ChickensJeiPlugin.java │ ├── breeding │ │ ├── BreedingRecipeCategory.java │ │ ├── BreedingRecipeHandler.java │ │ ├── BreedingRecipeWrapper.java │ │ └── package-info.java │ ├── drop │ │ ├── DropRecipeCategory.java │ │ ├── DropRecipeHandler.java │ │ ├── DropRecipeWrapper.java │ │ └── package-info.java │ ├── henhousing │ │ ├── HenhousingRecipeCategory.java │ │ ├── HenhousingRecipeHandler.java │ │ ├── HenhousingRecipeWrapper.java │ │ └── package-info.java │ ├── laying │ │ ├── LayingRecipeCategory.java │ │ ├── LayingRecipeHandler.java │ │ ├── LayingRecipeWrapper.java │ │ └── package-info.java │ ├── package-info.java │ └── throwing │ │ ├── ThrowingRecipeCategory.java │ │ ├── ThrowingRecipeHandler.java │ │ ├── ThrowingRecipeWrapper.java │ │ └── package-info.java │ ├── liquidEgg │ ├── ItemLiquidEgg.java │ ├── LiquidEggFluidWrapper.java │ └── package-info.java │ ├── package-info.java │ ├── spawnEgg │ ├── ItemSpawnEgg.java │ └── package-info.java │ └── waila │ └── ChickensEntityProvider.java └── resources ├── assets └── chickens │ ├── blockstates │ ├── henhouse.json │ ├── henhouse_acacia.json │ ├── henhouse_birch.json │ ├── henhouse_dark_oak.json │ ├── henhouse_jungle.json │ └── henhouse_spruce.json │ ├── lang │ ├── de_DE.lang │ ├── en_US.lang │ ├── tr_TR.lang │ └── zh_CN.lang │ ├── logo.png │ ├── models │ ├── block │ │ ├── henhouse.json │ │ ├── henhouse_acacia.json │ │ ├── henhouse_birch.json │ │ ├── henhouse_dark_oak.json │ │ ├── henhouse_jungle.json │ │ └── henhouse_spruce.json │ └── item │ │ ├── analyzer.json │ │ ├── colored_egg.json │ │ ├── henhouse.json │ │ ├── henhouse_acacia.json │ │ ├── henhouse_birch.json │ │ ├── henhouse_dark_oak.json │ │ ├── henhouse_jungle.json │ │ ├── henhouse_spruce.json │ │ ├── liquid_egg.json │ │ └── spawn_egg.json │ └── textures │ ├── blocks │ ├── henhouse_front.png │ ├── henhouse_front_acacia.png │ ├── henhouse_front_birch.png │ ├── henhouse_front_dark_oak.png │ ├── henhouse_front_jungle.png │ ├── henhouse_front_spruce.png │ ├── henhouse_side.png │ ├── henhouse_side_acacia.png │ ├── henhouse_side_birch.png │ ├── henhouse_side_dark_oak.png │ ├── henhouse_side_jungle.png │ ├── henhouse_side_spruce.png │ ├── henhouse_top.png │ ├── henhouse_top_acacia.png │ ├── henhouse_top_birch.png │ ├── henhouse_top_dark_oak.png │ ├── henhouse_top_jungle.png │ └── henhouse_top_spruce.png │ ├── entity │ ├── BlackChicken.png │ ├── BlazeChicken.png │ ├── BlueChicken.png │ ├── BrownChicken.png │ ├── ClayChicken.png │ ├── CoalChicken.png │ ├── CyanChicken.png │ ├── DiamondChicken.png │ ├── EmeraldChicken.png │ ├── EnderChicken.png │ ├── FlintChicken.png │ ├── GhastChicken.png │ ├── GlassChicken.png │ ├── GlowstoneChicken.png │ ├── GoldChicken.png │ ├── GrayChicken.png │ ├── GreenChicken.png │ ├── GunpowderChicken.png │ ├── IronChicken.png │ ├── LavaChicken.png │ ├── LeatherChicken.png │ ├── LightBlueChicken.png │ ├── LimeChicken.png │ ├── LogChicken.png │ ├── MagentaChicken.png │ ├── MagmaChicken.png │ ├── NetherwartChicken.png │ ├── OrangeChicken.png │ ├── PinkChicken.png │ ├── PurpleChicken.png │ ├── QuartzChicken.png │ ├── RedChicken.png │ ├── RedstoneChicken.png │ ├── SandChicken.png │ ├── SilverDyeChicken.png │ ├── SlimeChicken.png │ ├── SmartChicken.png │ ├── SnowballChicken.png │ ├── StringChicken.png │ ├── WaterChicken.png │ ├── WhiteChicken.png │ └── YellowChicken.png │ ├── gui │ ├── breeding.png │ ├── breeding_icon.png │ ├── drops.png │ ├── drops_icon.png │ ├── henhouse.png │ ├── henhousing_icon.png │ ├── laying.png │ ├── laying_icon.png │ ├── throws.png │ └── throws_icon.png │ └── items │ ├── analyzer.png │ ├── colored_egg.png │ ├── liquid_egg.png │ ├── spawn_egg.png │ └── spawn_egg_overlay.png └── mcmod.info /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Issue Description: 2 | Note: If this bug occurs in a modpack, please report this to the modpack author. Otherwise, delete this line and add your description here. If this is a feature request, this template does not apply to you. Just delete everything. 3 | 4 | 5 | #### Steps to reproduce (important): 6 | 7 | 1. 8 | 2. 9 | 3. 10 | ... 11 | 12 | 13 | #### What happens: 14 | 15 | 16 | 17 | #### What you expected to happen: 18 | 19 | 20 | ____ 21 | #### Affected Versions (Do *not* use "latest"): 22 | 23 | - Chickens: 24 | - Minecraft: 25 | - Forge: -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea 15 | 16 | # gradle 17 | build 18 | .gradle 19 | 20 | # other 21 | eclipse 22 | run 23 | -------------------------------------------------------------------------------- /CREDITS-fml.txt: -------------------------------------------------------------------------------- 1 | This is Forge Mod Loader. 2 | 3 | You can find the source code at all times at https://github.com/MinecraftForge/FML 4 | 5 | This minecraft mod is a clean open source implementation of a mod loader for minecraft servers 6 | and minecraft clients. 7 | 8 | The code is authored by cpw. 9 | 10 | It began by partially implementing an API defined by the client side ModLoader, authored by Risugami. 11 | http://www.minecraftforum.net/topic/75440- 12 | This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader. 13 | 14 | It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge. 15 | http://www.minecraftforge.net/ 16 | 17 | Additionally, it contains an implementation of topological sort based on that 18 | published at http://keithschwarz.com/interesting/code/?dir=topological-sort 19 | 20 | It also contains code from the Maven project for performing versioned dependency 21 | resolution. http://maven.apache.org/ 22 | 23 | It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/ 24 | with credit to it's authors. 25 | 26 | Forge Mod Loader downloads components from the Minecraft Coder Pack 27 | (http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team. 28 | 29 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 setycz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MinecraftForge-Credits.txt: -------------------------------------------------------------------------------- 1 | * Eloraam * 2 | 3 | * FlowerChild * 4 | 5 | * Hawkye * 6 | 7 | * MALfunction84 * 8 | 9 | Submitted the sleep handler code for his mod (Somnia) and others to use. 10 | 11 | * Scokeev9 * 12 | 13 | Gave permission for ScotTools API to be integrated into MCF, and also supported the Forge by converting his mods to use it. 14 | 15 | ScotTools Background: ScotTools was an API that enabled modders to add blocks to harvesting levels (and many other ease-of-use features to create new tools), and the first tool API that used block material for block breaking efficiency which allowed blocks from mods that didn't use ScotTools API to break with the correct speed. 16 | 17 | * SpaceToad * 18 | 19 | * LexManos * 20 | 21 | * cpw * 22 | 23 | * Minecraft Coder Pack (MCP) * 24 | Forge Mod Loader and Minecraft Forge have permission to distribute and automatically download components of MCP and distribute MCP data files. 25 | This permission is not transitive and others wishing to redistribute the Minecraft Forge source independently should seek permission of MCP or 26 | remove the MCP data files and request their users to download MCP separately. 27 | -------------------------------------------------------------------------------- /MinecraftForge-License.txt: -------------------------------------------------------------------------------- 1 | Minecraft Forge Public Licence 2 | ============================== 3 | 4 | Version 1.0 5 | 6 | 0. Definitions 7 | -------------- 8 | 9 | Minecraft: Denotes a copy of the Minecraft game licensed by Mojang AB 10 | 11 | User: Anybody that interract with the software in one of the following ways: 12 | - play 13 | - decompile 14 | - recompile or compile 15 | - modify 16 | 17 | Minecraft Forge: The Minecraft Forge code, in source form, class file form, as 18 | obtained in a standalone fashion or as part of a wider distribution. 19 | 20 | Dependency: Code required to have Minecraft Forge working properly. That can 21 | include dependencies required to compile the code as well as modifications in 22 | the Minecraft sources that are required to have Minecraft Forge working. 23 | 24 | 1. Scope 25 | -------- 26 | 27 | The present license is granted to any user of Minecraft Forge, for all files included 28 | unless stated otherwise in the file itself. As a prerequisite, a user of Minecraft 29 | Forge must own a legally aquired copy of Minecraft. 30 | 31 | 2. Play rights 32 | -------------- 33 | 34 | The user of Minecraft Forge is allowed to install the software on a client or 35 | a server and to play it without restriction. 36 | 37 | 3. Modification rights 38 | ---------------------- 39 | 40 | The user has the right to decompile the source code, look at either the 41 | decompiled version or the original source code, and to modify it. 42 | 43 | 4. Derivation rights 44 | -------------------- 45 | 46 | The user has the rights to derive code from Minecraft Forge, that is to say to 47 | write code that either extends Minecraft Forge class and interfaces, 48 | instantiate the objects declared or calls the functions. This code is known as 49 | "derived" code, and can be licensed with conditions different from Minecraft 50 | Forge. 51 | 52 | 53 | 5. Distribution rights 54 | ---------------------- 55 | 56 | The user of Minecraft Forge is allowed to redistribute Minecraft Forge in 57 | partially, in totallity, or included in a distribution. When distributing 58 | binaries or class files, the user must provide means to obtain the sources of 59 | the distributed version of Minecraft Forge at no costs. This includes the 60 | files as well as any dependency that the code may rely on, including patches to 61 | minecraft original sources. 62 | 63 | Modification of Minecraft Forge as well as dependencies, including patches to 64 | minecraft original sources, has to remain under the terms of the present 65 | license. 66 | 67 | The right to distribute Minecraft Forge does not extend to the right to distribute 68 | MCP data files included within Minecraft Forge. These are the property of the MCP 69 | project and should be removed from any customized distribution of Minecraft Forge 70 | or permission sought separately from the MCP team. 71 | -------------------------------------------------------------------------------- /Paulscode IBXM Library License.txt: -------------------------------------------------------------------------------- 1 | IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | 11 | -------------------------------------------------------------------------------- /Paulscode SoundSystem CodecIBXM License.txt: -------------------------------------------------------------------------------- 1 | SoundSystem CodecIBXM Class License: 2 | 3 | You are free to use this class for any purpose, commercial or otherwise. 4 | You may modify this class or source code, and distribute it any way you 5 | like, provided the following conditions are met: 6 | 7 | 1) You may not falsely claim to be the author of this class or any 8 | unmodified portion of it. 9 | 2) You may not copyright this class or a modified version of it and then 10 | sue me for copyright infringement. 11 | 3) If you modify the source code, you must clearly document the changes 12 | made before redistributing the modified source code, so other users know 13 | it is not the original code. 14 | 4) You are not required to give me credit for this class in any derived 15 | work, but if you do, you must also mention my website: 16 | http://www.paulscode.com 17 | 5) I the author will not be responsible for any damages (physical, 18 | financial, or otherwise) caused by the use if this class or any 19 | portion of it. 20 | 6) I the author do not guarantee, warrant, or make any representations, 21 | either expressed or implied, regarding the use of this class or any 22 | portion of it. 23 | 24 | Author: Paul Lamb 25 | http://www.paulscode.com 26 | 27 | 28 | This software is based on or using the IBXM library available from 29 | http://www.geocities.com/sunet2000/ 30 | 31 | 32 | IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. 33 | All rights reserved. 34 | 35 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 36 | 37 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 38 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 39 | Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | -------------------------------------------------------------------------------- /README-forge.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------- 2 | Source installation information for modders 3 | ------------------------------------------- 4 | This code follows the Minecraft Forge installation methodology. It will apply 5 | some small patches to the vanilla MCP source code, giving you and it access 6 | to some of the data and functions you need to build a successful mod. 7 | 8 | Note also that the patches are built against "unrenamed" MCP source code (aka 9 | srgnames) - this means that you will not be able to read them directly against 10 | normal code. 11 | 12 | Source pack installation information: 13 | 14 | Standalone source installation 15 | ============================== 16 | 17 | Step 1: Open your command-line and browse to the folder where you extracted the zip file. 18 | 19 | Step 2: Once you have a command window up in the folder that the downloaded material was placed, type: 20 | 21 | Windows: "gradlew setupDecompWorkspace" 22 | Linux/Mac OS: "./gradlew setupDecompWorkspace" 23 | 24 | Step 3: After all that finished, you're left with a choice. 25 | For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux) 26 | 27 | If you preffer to use IntelliJ, steps are a little different. 28 | 1. Open IDEA, and import project. 29 | 2. Select your build.gradle file and have it import. 30 | 3. Once it's finished you must close IntelliJ and run the following command: 31 | 32 | "gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux) 33 | 34 | Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project) 35 | 36 | If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not effect your code} and then start the processs again. 37 | 38 | Should it still not work, 39 | Refer to #ForgeGradle on EsperNet for more information about the gradle environment. 40 | 41 | Tip: 42 | If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following: 43 | "setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code. 44 | "setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work. 45 | 46 | Tip: 47 | When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE. 48 | 49 | Forge source installation 50 | ========================= 51 | MinecraftForge ships with this code and installs it as part of the forge 52 | installation process, no further action is required on your part. 53 | 54 | LexManos' Install Video 55 | ======================= 56 | https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be 57 | 58 | For more details update more often refer to the Forge Forums: 59 | http://www.minecraftforge.net/forum/index.php/topic,14048.0.html 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chickens 2 | 3 | Chickens lay eggs. Sometimes drop feather. You can throw eggs. 4 | That's it. SO BOOORING! 5 | Minecraft is a magical place so why not to add a little bit of magic? 6 | Chicken laying gunpowder... bonemeal... snowballs... YEAH! 7 | And what if you try to crossbreed them? Iron? Gold? DIAMODS? Just try it! 8 | 9 | Don't forget to visit [the project site](https://minecraft.curseforge.com/projects/chickens). 10 | 11 | ## Crossbreeding 12 | 13 | TBD 14 | 15 | ## Chicken stats 16 | 17 | Chickens have different stats which affects their abilities. 18 | Every stat is on scale from 1 (the lowest) to 10 (the highest). 19 | Naturally spawned chickens always start with 1 and you can increase stats by [breeding](#crossbreeding) them but only if it has parents of the same breed. 20 | Please make a note, that stats are not-increased when a new breed is created. 21 | 22 | ### Growth 23 | 24 | The speed of which the chicken grows, lays and is able to reproduce. 25 | Having 10 means that it's ten times faster. 26 | 27 | ### Gain 28 | 29 | Affects the amount of items (eggs) the chicken will lay: 30 | * __1 - 4__ : 1 item 31 | * __5 - 9__ : 2 items 32 | * __10__ : 3 items at once !!! 33 | 34 | ### Strength 35 | 36 | The ability for a chicken to carry its stats over to the children chickens, i.e. the chicken will most likely has stats based on the stronger parent. 37 | 38 | ## Tips 39 | 40 | You can spawn chicken with desired stats by command: 41 | ``` 42 | /give @p chickens:spawn_egg 1 201 {Analyzed:1,Strength:10,Gain:10,Growth:10} 43 | ``` 44 | where ```201``` is chicken ID. 45 | 46 | ## Addon developers 47 | 48 | Please assign yourself some high random offset for your chicken IDs in order to avoid conflict with other contributors. 49 | E.g. 1 000 000 (your addon base ID) + 5 (your amazing fire breathing chicken) = 1 000 005. -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | jcenter() 5 | maven { 6 | name = "forge" 7 | url = "http://files.minecraftforge.net/maven" 8 | } 9 | } 10 | dependencies { 11 | classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' 12 | } 13 | } 14 | 15 | plugins { 16 | id "com.matthewprenger.cursegradle" version "1.0.7" 17 | } 18 | 19 | apply plugin: 'net.minecraftforge.gradle.forge' 20 | //Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup. 21 | 22 | version = modversion 23 | group= "com.setycz.chickens" // http://maven.apache.org/guides/mini/guide-naming-conventions.html 24 | archivesBaseName = "chickens" 25 | 26 | sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly. 27 | compileJava { 28 | sourceCompatibility = targetCompatibility = "1.6" 29 | } 30 | 31 | minecraft { 32 | version = mcversion + "-" + forgeversion + forgeversion_suffix 33 | runDir = "run" 34 | 35 | // the mappings can be changed at any time, and must be in the following format. 36 | // snapshot_YYYYMMDD snapshot are built nightly. 37 | // stable_# stables are built at the discretion of the MCP team. 38 | // Use non-default mappings at your own risk. they may not allways work. 39 | // simply re-run your setup task after changing the mappings to update your workspace. 40 | mappings = "snapshot_20161111" 41 | // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. 42 | 43 | replace '@VERSION@', project.version 44 | replace '@FORGEVERSION@', forgeversion 45 | } 46 | 47 | repositories { 48 | mavenCentral() 49 | maven { url "http://mobiusstrip.eu/maven" } 50 | maven { url = "http://chickenbones.net/maven/" } 51 | maven { url "http://dvs1.progwml6.com/files/maven" } 52 | } 53 | 54 | dependencies { 55 | // you may put jars on which you depend on in ./libs 56 | // or you may define them like so.. 57 | //compile "some.group:artifact:version:classifier" 58 | //compile "some.group:artifact:version" 59 | 60 | // real examples 61 | //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env 62 | //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env 63 | 64 | // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. 65 | //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 66 | 67 | // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, 68 | // except that these dependencies get remapped to your current MCP mappings 69 | //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' 70 | //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 71 | 72 | // for more info... 73 | // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html 74 | // http://www.gradle.org/docs/current/userguide/dependency_management.html 75 | 76 | deobfCompile "mezz.jei:jei_1.10.2:3.13.6.387" 77 | compile "mcp.mobius.waila:Waila:1.7.0-B3_1.9.4" 78 | } 79 | 80 | processResources 81 | { 82 | // this will ensure that this task is redone when the versions change. 83 | inputs.property "version", project.version 84 | inputs.property "mcversion", project.minecraft.version 85 | 86 | // replace stuff in mcmod.info, nothing else 87 | from(sourceSets.main.resources.srcDirs) { 88 | include 'mcmod.info' 89 | 90 | // replace version and mcversion 91 | expand 'version':project.version, 'mcversion':project.minecraft.version 92 | } 93 | 94 | // copy everything else, thats not the mcmod.info 95 | from(sourceSets.main.resources.srcDirs) { 96 | exclude 'mcmod.info' 97 | } 98 | } 99 | 100 | curseforge { 101 | apiKey = curse_token 102 | project { 103 | id = curse_project_id 104 | changelog = file('changelog.txt') 105 | releaseType = project.releaseType 106 | addGameVersion '1.10.2' 107 | relations { 108 | optionalLibrary 'waila' 109 | optionalLibrary 'just-enough-items-jei' 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Main improvements: 2 | * stats are more challenging 3 | ** every new breed starts with 1,1,1 4 | ** stats are increased only if it has parents of the same breed 5 | 6 | Minor improvements: 7 | * spawn egg applies NBT to entities 8 | 9 | Bugfixes: 10 | * 11 | 12 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | 5 | mcversion=1.10.2 6 | forgeversion=12.18.3.2185 7 | forgeversion_suffix= 8 | 9 | curse_project_id=241941 10 | 11 | modversion=4.3.2 12 | releaseType=release 13 | 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 14 12:28:28 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ChickenTeachHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import com.setycz.chickens.chicken.EntityChickensChicken; 4 | import net.minecraft.entity.passive.EntityChicken; 5 | import net.minecraft.init.Items; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.world.World; 8 | import net.minecraftforge.event.entity.player.PlayerInteractEvent; 9 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 10 | 11 | /** 12 | * Created by setyc on 21.03.2016. 13 | */ 14 | @SuppressWarnings("WeakerAccess") 15 | public class ChickenTeachHandler { 16 | 17 | @SuppressWarnings("unused") 18 | @SubscribeEvent 19 | public void handleInteraction(PlayerInteractEvent.EntityInteract event) { 20 | ItemStack item = event.getEntityPlayer().getHeldItem(event.getHand()); 21 | if (item == null || item.getItem() != Items.BOOK) { 22 | return; 23 | } 24 | if (!(event.getTarget().getClass() == EntityChicken.class)) { 25 | return; 26 | } 27 | 28 | World worldObj = event.getEntityPlayer().worldObj; 29 | if (worldObj.isRemote) { 30 | return; 31 | } 32 | 33 | ChickensRegistryItem smartChickenDescription = ChickensRegistry.getSmartChicken(); 34 | if (smartChickenDescription == null || !smartChickenDescription.isEnabled()) { 35 | return; 36 | } 37 | 38 | EntityChicken chicken = (EntityChicken) event.getTarget(); 39 | EntityChickensChicken smartChicken = convertToSmart(chicken, worldObj, smartChickenDescription); 40 | 41 | worldObj.removeEntity(chicken); 42 | worldObj.spawnEntityInWorld(smartChicken); 43 | smartChicken.spawnExplosionParticle(); 44 | 45 | event.setCanceled(true); 46 | } 47 | 48 | private EntityChickensChicken convertToSmart(EntityChicken chicken, World worldObj, ChickensRegistryItem smartChickenDescription) { 49 | EntityChickensChicken smartChicken = new EntityChickensChicken(worldObj); 50 | smartChicken.setPositionAndRotation(chicken.posX, chicken.posY, chicken.posZ, chicken.rotationYaw, chicken.rotationPitch); 51 | smartChicken.onInitialSpawn(worldObj.getDifficultyForLocation(chicken.getPosition()), null); 52 | smartChicken.setChickenType(smartChickenDescription.getId()); 53 | if (chicken.hasCustomName()) { 54 | smartChicken.setCustomNameTag(chicken.getCustomNameTag()); 55 | } 56 | smartChicken.setGrowingAge(chicken.getGrowingAge()); 57 | return smartChicken; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ChickensRegistry.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.init.Biomes; 4 | import net.minecraft.world.biome.Biome; 5 | 6 | import javax.annotation.Nullable; 7 | import java.util.*; 8 | 9 | /** 10 | * Created by setyc on 12.02.2016. 11 | */ 12 | public final class ChickensRegistry { 13 | private static final Map items = new HashMap(); 14 | public static final int SMART_CHICKEN_ID = 50; 15 | private static final Random rand = new Random(); 16 | 17 | public static void register(ChickensRegistryItem entity) { 18 | validate(entity); 19 | items.put(entity.getId(), entity); 20 | } 21 | 22 | private static void validate(ChickensRegistryItem entity) { 23 | for (ChickensRegistryItem item : items.values()) { 24 | if (entity.getId() == item.getId()) { 25 | throw new RuntimeException("Duplicated ID [" + entity.getId() + "] of [" + entity.getEntityName() + "] with [" + item.getEntityName() + "]!"); 26 | } 27 | if (entity.getEntityName().compareToIgnoreCase(item.getEntityName()) == 0) { 28 | throw new RuntimeException("Duplicated name [" + entity.getEntityName() + "] of [" + entity.getId() + "] with [" + item.getId() + "]!"); 29 | } 30 | } 31 | } 32 | 33 | public static ChickensRegistryItem getByType(int type) { 34 | return items.get(type); 35 | } 36 | 37 | public static Collection getItems() { 38 | List result = new ArrayList(); 39 | for (ChickensRegistryItem chicken : items.values()) { 40 | if (chicken.isEnabled()) { 41 | result.add(chicken); 42 | } 43 | } 44 | return result; 45 | } 46 | 47 | @Deprecated 48 | @SuppressWarnings("unused") 49 | public static Collection getAllItems() { 50 | return items.values(); 51 | } 52 | 53 | private static List getChildren(ChickensRegistryItem parent1, ChickensRegistryItem parent2) { 54 | List result = new ArrayList(); 55 | if (parent1.isEnabled()) { 56 | result.add(parent1); 57 | } 58 | if (parent2.isEnabled()) { 59 | result.add(parent2); 60 | } 61 | for (ChickensRegistryItem item : items.values()) { 62 | if (item.isEnabled() && item.isChildOf(parent1, parent2)) { 63 | result.add(item); 64 | } 65 | } 66 | return result; 67 | } 68 | 69 | @Nullable 70 | public static ChickensRegistryItem findDyeChicken(int dyeMetadata) { 71 | for (ChickensRegistryItem chicken : items.values()) { 72 | if (chicken.isDye(dyeMetadata)) { 73 | return chicken; 74 | } 75 | } 76 | return null; 77 | } 78 | 79 | public static List getPossibleChickensToSpawn(SpawnType spawnType) { 80 | List result = new ArrayList(); 81 | for (ChickensRegistryItem chicken : items.values()) { 82 | if (chicken.canSpawn() && chicken.getSpawnType() == spawnType && chicken.isEnabled()) { 83 | result.add(chicken); 84 | } 85 | } 86 | return result; 87 | } 88 | 89 | public static SpawnType getSpawnType(Biome biome) { 90 | if (biome == Biomes.HELL) { 91 | return SpawnType.HELL; 92 | } 93 | 94 | if (biome == Biomes.EXTREME_HILLS || biome.isSnowyBiome()) { 95 | return SpawnType.SNOW; 96 | } 97 | 98 | return SpawnType.NORMAL; 99 | } 100 | 101 | public static float getChildChance(ChickensRegistryItem child) { 102 | if (child.getTier() <= 1) { 103 | return 0; 104 | } 105 | 106 | //noinspection ConstantConditions 107 | List possibleChildren = getChildren(child.getParent1(), child.getParent2()); 108 | 109 | int maxChance = getMaxChance(possibleChildren); 110 | int maxDiceValue = getMaxDiceValue(possibleChildren, maxChance); 111 | 112 | return ((maxChance - child.getTier()) * 100.0f) / maxDiceValue; 113 | } 114 | 115 | @Nullable 116 | public static ChickensRegistryItem getRandomChild(ChickensRegistryItem parent1, ChickensRegistryItem parent2) { 117 | List possibleChildren = getChildren(parent1, parent2); 118 | if (possibleChildren.size() == 0) { 119 | return null; 120 | } 121 | 122 | int maxChance = getMaxChance(possibleChildren); 123 | int maxDiceValue = getMaxDiceValue(possibleChildren, maxChance); 124 | 125 | int diceValue = rand.nextInt(maxDiceValue); 126 | return getChickenToBeBorn(possibleChildren, maxChance, diceValue); 127 | } 128 | 129 | @Nullable 130 | private static ChickensRegistryItem getChickenToBeBorn(List possibleChildren, int maxChance, int diceValue) { 131 | int currentVale = 0; 132 | for (ChickensRegistryItem child : possibleChildren) { 133 | currentVale += maxChance - child.getTier(); 134 | if (diceValue < currentVale) { 135 | return child; 136 | } 137 | } 138 | return null; 139 | } 140 | 141 | private static int getMaxDiceValue(List possibleChildren, int maxChance) { 142 | int maxDiceValue = 0; 143 | for (ChickensRegistryItem child : possibleChildren) { 144 | maxDiceValue += maxChance - child.getTier(); 145 | } 146 | return maxDiceValue; 147 | } 148 | 149 | private static int getMaxChance(List possibleChildren) { 150 | int maxChance = 0; 151 | for (ChickensRegistryItem child : possibleChildren) { 152 | maxChance = Math.max(maxChance, child.getTier()); 153 | } 154 | maxChance += 1; 155 | return maxChance; 156 | } 157 | 158 | public static boolean isAnyIn(SpawnType spawnType) { 159 | for (ChickensRegistryItem chicken : items.values()) { 160 | if (chicken.canSpawn() && chicken.isEnabled() && chicken.getSpawnType() == spawnType) { 161 | return true; 162 | } 163 | } 164 | return false; 165 | } 166 | 167 | @Nullable 168 | public static ChickensRegistryItem getSmartChicken() { 169 | return items.get(SMART_CHICKEN_ID); 170 | } 171 | 172 | public static Collection getDisabledItems() { 173 | List result = new ArrayList(); 174 | for (ChickensRegistryItem chicken : items.values()) { 175 | if (!chicken.isEnabled()) { 176 | result.add(chicken); 177 | } 178 | } 179 | return result; 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ChickensRegistryItem.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.init.Items; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.util.ResourceLocation; 6 | 7 | import javax.annotation.Nullable; 8 | 9 | /** 10 | * Created by setyc on 12.02.2016. 11 | */ 12 | public class ChickensRegistryItem { 13 | private final int id; 14 | private final String entityName; 15 | private ItemStack layItem; 16 | private ItemStack dropItem; 17 | private final int bgColor; 18 | private final int fgColor; 19 | private final ResourceLocation texture; 20 | private ChickensRegistryItem parent1; 21 | private ChickensRegistryItem parent2; 22 | private SpawnType spawnType; 23 | private boolean isEnabled = true; 24 | private float layCoefficient = 1.0f; 25 | 26 | public ChickensRegistryItem(int id, String entityName, ResourceLocation texture, ItemStack layItem, int bgColor, int fgColor) { 27 | this(id, entityName, texture, layItem, bgColor, fgColor, null, null); 28 | } 29 | 30 | public ChickensRegistryItem(int id, String entityName, ResourceLocation texture, ItemStack layItem, int bgColor, int fgColor, @Nullable ChickensRegistryItem parent1, @Nullable ChickensRegistryItem parent2) { 31 | this.id = id; 32 | this.entityName = entityName; 33 | this.layItem = layItem; 34 | this.bgColor = bgColor; 35 | this.fgColor = fgColor; 36 | this.texture = texture; 37 | this.spawnType = SpawnType.NORMAL; 38 | this.parent1 = parent1; 39 | this.parent2 = parent2; 40 | } 41 | 42 | public ChickensRegistryItem setDropItem(ItemStack stack) { 43 | dropItem = stack; 44 | return this; 45 | } 46 | 47 | public ChickensRegistryItem setSpawnType(SpawnType type) { 48 | spawnType = type; 49 | return this; 50 | } 51 | 52 | @SuppressWarnings("UnusedReturnValue") 53 | public ChickensRegistryItem setLayCoefficient(float coef) { 54 | layCoefficient = coef; 55 | return this; 56 | } 57 | 58 | public String getEntityName() { 59 | return entityName; 60 | } 61 | 62 | @Nullable 63 | public ChickensRegistryItem getParent1() { 64 | return parent1; 65 | } 66 | 67 | @Nullable 68 | public ChickensRegistryItem getParent2() { 69 | return parent2; 70 | } 71 | 72 | public int getBgColor() { 73 | return bgColor; 74 | } 75 | 76 | public int getFgColor() { 77 | return fgColor; 78 | } 79 | 80 | public ResourceLocation getTexture() { 81 | return texture; 82 | } 83 | 84 | public ItemStack createLayItem() { 85 | return layItem.copy(); 86 | } 87 | 88 | public ItemStack createDropItem() { 89 | if (dropItem != null) { 90 | return dropItem.copy(); 91 | } 92 | return createLayItem(); 93 | } 94 | 95 | public int getTier() { 96 | if (parent1 == null || parent2 == null) { 97 | return 1; 98 | } 99 | return Math.max(parent1.getTier(), parent2.getTier()) + 1; 100 | } 101 | 102 | public boolean isChildOf(ChickensRegistryItem parent1, ChickensRegistryItem parent2) { 103 | return this.parent1 == parent1 && this.parent2 == parent2 || this.parent1 == parent2 && this.parent2 == parent1; 104 | } 105 | 106 | public boolean isDye() { 107 | return layItem.getItem() == Items.DYE; 108 | } 109 | 110 | public boolean isDye(int dyeMetadata) { 111 | return layItem.getItem() == Items.DYE && layItem.getMetadata() == dyeMetadata; 112 | } 113 | 114 | public int getDyeMetadata() { 115 | return layItem.getMetadata(); 116 | } 117 | 118 | public boolean canSpawn() { 119 | return getTier() == 1 && spawnType != SpawnType.NONE; 120 | } 121 | 122 | public int getId() { 123 | return id; 124 | } 125 | 126 | public int getMinLayTime() { 127 | return (int) Math.max(6000 * getTier() * layCoefficient, 1.0f); 128 | } 129 | 130 | public int getMaxLayTime() { 131 | return 2 * getMinLayTime(); 132 | } 133 | 134 | public SpawnType getSpawnType() { 135 | return spawnType; 136 | } 137 | 138 | public boolean isImmuneToFire() { 139 | return spawnType == SpawnType.HELL; 140 | } 141 | 142 | public void setEnabled(boolean enabled) { 143 | isEnabled = enabled; 144 | } 145 | 146 | public boolean isEnabled() { 147 | return !(!isEnabled 148 | || parent1 != null && !parent1.isEnabled() 149 | || parent2 != null && !parent2.isEnabled()); 150 | } 151 | 152 | public void setLayItem(ItemStack itemStack) { 153 | layItem = itemStack; 154 | } 155 | 156 | public void setNoParents() { 157 | parent1 = null; 158 | parent2 = null; 159 | } 160 | 161 | public ChickensRegistryItem setParentsNew(ChickensRegistryItem parent1, ChickensRegistryItem parent2) { 162 | this.parent1 = parent1; 163 | this.parent2 = parent2; 164 | return this; 165 | } 166 | 167 | @Deprecated 168 | @SuppressWarnings("UnusedReturnValue") 169 | public void setParents(ChickensRegistryItem parent1, ChickensRegistryItem parent2) { 170 | this.parent1 = parent1; 171 | this.parent2 = parent2; 172 | } 173 | 174 | public boolean isBreedable() { 175 | return parent1 != null && parent2 != null; 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ChickensTab.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.creativetab.CreativeTabs; 4 | import net.minecraft.init.Items; 5 | import net.minecraft.item.Item; 6 | 7 | /** 8 | * Created by setyc on 12.02.2016. 9 | */ 10 | @SuppressWarnings("WeakerAccess") 11 | public class ChickensTab extends CreativeTabs { 12 | 13 | public ChickensTab() { 14 | super("chickens"); 15 | } 16 | 17 | @Override 18 | public Item getTabIconItem() { 19 | return Items.CHICKEN; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ClientProxy.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import com.setycz.chickens.chicken.EntityChickensChicken; 4 | import com.setycz.chickens.chicken.ModelChickensChicken; 5 | import com.setycz.chickens.chicken.RenderChickensChicken; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.client.renderer.block.model.ModelResourceLocation; 8 | import net.minecraft.client.renderer.entity.RenderManager; 9 | import net.minecraft.item.Item; 10 | 11 | /** 12 | * Created by setyc on 18.02.2016. 13 | */ 14 | @SuppressWarnings("unused") 15 | public class ClientProxy extends CommonProxy { 16 | 17 | @Override 18 | public void init() { 19 | super.init(); 20 | 21 | Minecraft.getMinecraft().getItemColors().registerItemColorHandler( 22 | new ItemColorHandler(), 23 | ChickensMod.spawnEgg, ChickensMod.coloredEgg, ChickensMod.liquidEgg); 24 | 25 | // chicken entity registration 26 | RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); 27 | renderManager.entityRenderMap.put(EntityChickensChicken.class, new RenderChickensChicken(renderManager, new ModelChickensChicken())); 28 | 29 | //noinspection ConstantConditions 30 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse), 0); 31 | //noinspection ConstantConditions 32 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse_acacia), 0); 33 | //noinspection ConstantConditions 34 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse_birch), 0); 35 | //noinspection ConstantConditions 36 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse_dark_oak), 0); 37 | //noinspection ConstantConditions 38 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse_jungle), 0); 39 | //noinspection ConstantConditions 40 | registerItemModel(Item.getItemFromBlock(ChickensMod.henhouse_spruce), 0); 41 | 42 | registerItemModel(ChickensMod.analyzer, 0); 43 | } 44 | 45 | private void registerItemModel(Item item, int meta) { 46 | ModelResourceLocation resourceLocation = new ModelResourceLocation(ChickensMod.MODID + ":" + ChickensMod.getItemName(item), "inventory"); 47 | Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, resourceLocation); 48 | } 49 | 50 | @Override 51 | public void registerLiquidEgg(LiquidEggRegistryItem liquidEgg) { 52 | super.registerLiquidEgg(liquidEgg); 53 | 54 | registerItemModel(ChickensMod.liquidEgg, liquidEgg.getId()); 55 | } 56 | 57 | @Override 58 | public void registerChicken(ChickensRegistryItem chicken) { 59 | super.registerChicken(chicken); 60 | 61 | registerItemModel(ChickensMod.spawnEgg, chicken.getId()); 62 | 63 | if (chicken.isDye()) { 64 | registerItemModel(ChickensMod.coloredEgg, chicken.getDyeMetadata()); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/CommonProxy.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import com.setycz.chickens.coloredEgg.EntityColoredEgg; 4 | import com.setycz.chickens.coloredEgg.ItemColoredEgg; 5 | import com.setycz.chickens.liquidEgg.ItemLiquidEgg; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.BlockDispenser; 8 | import net.minecraft.dispenser.BehaviorDefaultDispenseItem; 9 | import net.minecraft.dispenser.BehaviorProjectileDispense; 10 | import net.minecraft.dispenser.IBlockSource; 11 | import net.minecraft.dispenser.IPosition; 12 | import net.minecraft.entity.IProjectile; 13 | import net.minecraft.init.Items; 14 | import net.minecraft.item.ItemStack; 15 | import net.minecraft.util.math.BlockPos; 16 | import net.minecraft.world.World; 17 | import net.minecraftforge.fml.common.registry.GameRegistry; 18 | 19 | /** 20 | * Created by setyc on 18.02.2016. 21 | */ 22 | public class CommonProxy { 23 | public void init() { 24 | 25 | } 26 | 27 | public void registerChicken(ChickensRegistryItem chicken) { 28 | if (chicken.isDye() && chicken.isEnabled()) { 29 | GameRegistry.addShapelessRecipe( 30 | new ItemStack(ChickensMod.coloredEgg, 1, chicken.getDyeMetadata()), 31 | new ItemStack(Items.EGG), new ItemStack(Items.DYE, 1, chicken.getDyeMetadata()) 32 | ); 33 | } 34 | } 35 | 36 | public void registerLiquidEgg(LiquidEggRegistryItem liquidEgg) { 37 | BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(ChickensMod.liquidEgg, new DispenseLiquidEgg()); 38 | BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(ChickensMod.coloredEgg, new DispenseColorEgg()); 39 | } 40 | 41 | 42 | class DispenseColorEgg extends BehaviorProjectileDispense { 43 | @Override 44 | protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn) { 45 | EntityColoredEgg entityColoredEgg = new EntityColoredEgg(worldIn, position.getX(), position.getY(), position.getZ()); 46 | entityColoredEgg.setChickenType(((ItemColoredEgg) stackIn.getItem()).getChickenType(stackIn)); 47 | return entityColoredEgg; 48 | } 49 | } 50 | 51 | class DispenseLiquidEgg extends BehaviorDefaultDispenseItem { 52 | @Override 53 | protected ItemStack dispenseStack(IBlockSource source, ItemStack stack) { 54 | ItemLiquidEgg itemLiquidEgg = (ItemLiquidEgg) stack.getItem(); 55 | BlockPos blockpos = source.getBlockPos().offset(source.getBlockState().getValue(BlockDispenser.FACING)); 56 | Block liquid = LiquidEggRegistry.findById(stack.getMetadata()).getLiquid(); 57 | if (!itemLiquidEgg.tryPlaceContainedLiquid(null, source.getWorld(), blockpos, liquid)) { 58 | return super.dispenseStack(source, stack); 59 | } 60 | stack.stackSize--; 61 | return stack; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/IColorSource.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.item.ItemStack; 4 | 5 | /** 6 | * Created by setyc on 25.03.2016. 7 | */ 8 | public interface IColorSource { 9 | int getColorFromItemStack(ItemStack stack, int renderPass); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/IInventoryGui.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.client.gui.inventory.GuiContainer; 4 | import net.minecraft.entity.player.InventoryPlayer; 5 | import net.minecraft.inventory.Container; 6 | import net.minecraftforge.fml.relauncher.Side; 7 | import net.minecraftforge.fml.relauncher.SideOnly; 8 | 9 | /** 10 | * Created by setyc on 06.03.2016. 11 | */ 12 | public interface IInventoryGui { 13 | Container createContainer(InventoryPlayer inventoryplayer); 14 | 15 | @SideOnly(Side.CLIENT) 16 | GuiContainer createGui(InventoryPlayer inventoryplayer); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/ItemColorHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.client.renderer.color.IItemColor; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraftforge.fml.relauncher.Side; 6 | import net.minecraftforge.fml.relauncher.SideOnly; 7 | 8 | /** 9 | * Created by setyc on 25.03.2016. 10 | */ 11 | @SuppressWarnings("WeakerAccess") 12 | @SideOnly(Side.CLIENT) 13 | public class ItemColorHandler implements IItemColor { 14 | @Override 15 | public int getColorFromItemstack(ItemStack stack, int tintIndex) { 16 | return ((IColorSource) stack.getItem()).getColorFromItemStack(stack, tintIndex); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/LiquidEggRegistry.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import java.util.Collection; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | /** 8 | * Created by setyc on 14.02.2016. 9 | */ 10 | public final class LiquidEggRegistry { 11 | private static final Map items = new HashMap(); 12 | 13 | public static void register(LiquidEggRegistryItem liquidEgg) { 14 | items.put(liquidEgg.getId(), liquidEgg); 15 | } 16 | 17 | public static Collection getAll() { 18 | return items.values(); 19 | } 20 | 21 | public static LiquidEggRegistryItem findById(int id) { 22 | return items.get(id); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/LiquidEggRegistryItem.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraftforge.fluids.Fluid; 5 | 6 | /** 7 | * Created by setyc on 14.02.2016. 8 | */ 9 | public class LiquidEggRegistryItem { 10 | private final int id; 11 | private final Block liquid; 12 | private final int eggColor; 13 | private final Fluid fluid; 14 | 15 | public LiquidEggRegistryItem(int id, Block liquid, int eggColor, Fluid fluid) { 16 | this.id = id; 17 | this.liquid = liquid; 18 | this.eggColor = eggColor; 19 | this.fluid = fluid; 20 | } 21 | 22 | public int getId() { 23 | return id; 24 | } 25 | 26 | public Block getLiquid() { 27 | return liquid; 28 | } 29 | 30 | public int getEggColor() { 31 | return eggColor; 32 | } 33 | 34 | public Fluid getFluid() { 35 | return fluid; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/SpawnType.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | /** 4 | * Created by setyc on 28.02.2016. 5 | */ 6 | public enum SpawnType { 7 | NORMAL, SNOW, NONE, HELL; 8 | 9 | public static String[] names() { 10 | SpawnType[] states = values(); 11 | String[] names = new String[states.length]; 12 | 13 | for (int i = 0; i < states.length; i++) { 14 | names[i] = states[i].name(); 15 | } 16 | 17 | return names; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/TileEntityGuiHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens; 2 | 3 | import net.minecraft.entity.player.EntityPlayer; 4 | import net.minecraft.tileentity.TileEntity; 5 | import net.minecraft.util.math.BlockPos; 6 | import net.minecraft.world.World; 7 | import net.minecraftforge.fml.common.network.IGuiHandler; 8 | 9 | import javax.annotation.Nullable; 10 | 11 | /** 12 | * Created by setyc on 06.03.2016. 13 | */ 14 | public class TileEntityGuiHandler implements IGuiHandler { 15 | 16 | @Override 17 | @Nullable 18 | public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 19 | TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); 20 | if (te instanceof IInventoryGui) { 21 | return ((IInventoryGui) te).createContainer(player.inventory); 22 | } 23 | return null; 24 | } 25 | 26 | @Override 27 | @Nullable 28 | public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 29 | TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); 30 | if (te instanceof IInventoryGui) { 31 | return ((IInventoryGui) te).createGui(player.inventory); 32 | } 33 | return null; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/analyzer/ItemAnalyzer.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.analyzer; 2 | 3 | import com.setycz.chickens.chicken.EntityChickensChicken; 4 | import net.minecraft.entity.EntityLivingBase; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.item.Item; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.util.EnumHand; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraft.util.text.TextComponentTranslation; 11 | import net.minecraft.util.text.TextFormatting; 12 | import net.minecraft.util.text.translation.I18n; 13 | import net.minecraftforge.fml.relauncher.Side; 14 | import net.minecraftforge.fml.relauncher.SideOnly; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * Created by setyc on 21.12.2016. 20 | */ 21 | public class ItemAnalyzer extends Item { 22 | public ItemAnalyzer() { 23 | setMaxStackSize(1); 24 | setMaxDamage(238); 25 | } 26 | 27 | @SideOnly(Side.CLIENT) 28 | @Override 29 | public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { 30 | super.addInformation(stack, playerIn, tooltip, advanced); 31 | tooltip.add(I18n.translateToLocal("item.analyzer.tooltip1")); 32 | tooltip.add(I18n.translateToLocal("item.analyzer.tooltip2")); 33 | } 34 | 35 | @Override 36 | public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer playerIn, EntityLivingBase target, EnumHand hand) { 37 | if (target.worldObj.isRemote || !(target instanceof EntityChickensChicken)) { 38 | return false; 39 | } 40 | 41 | EntityChickensChicken chicken = (EntityChickensChicken) target; 42 | chicken.setStatsAnalyzed(true); 43 | 44 | TextComponentString chickenName = new TextComponentString(chicken.getName()); 45 | chickenName.getStyle().setBold(true).setColor(TextFormatting.GOLD); 46 | playerIn.addChatMessage(chickenName); 47 | 48 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.tier", chicken.getTier())); 49 | 50 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.growth", chicken.getGrowth())); 51 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.gain", chicken.getGain())); 52 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.strength", chicken.getStrength())); 53 | 54 | if (!chicken.isChild()) { 55 | int layProgress = chicken.getLayProgress(); 56 | if (layProgress <= 0) { 57 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.nextEggSoon")); 58 | } else { 59 | playerIn.addChatMessage(new TextComponentTranslation("entity.ChickensChicken.layProgress", layProgress)); 60 | } 61 | } 62 | 63 | stack.damageItem(1, target); 64 | return true; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/analyzer/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.analyzer; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/chicken/ChickenNetherPopulateHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.chicken; 2 | 3 | import net.minecraft.entity.EntitySpawnPlacementRegistry; 4 | import net.minecraft.entity.IEntityLivingData; 5 | import net.minecraft.init.Biomes; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraft.util.math.MathHelper; 8 | import net.minecraft.world.World; 9 | import net.minecraft.world.WorldEntitySpawner; 10 | import net.minecraft.world.biome.Biome; 11 | import net.minecraft.world.chunk.Chunk; 12 | import net.minecraftforge.event.terraingen.PopulateChunkEvent; 13 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 14 | 15 | import javax.annotation.Nullable; 16 | 17 | /** 18 | * Created by setyc on 05.03.2016. 19 | */ 20 | public class ChickenNetherPopulateHandler { 21 | private final float chanceMultiplier; 22 | 23 | public ChickenNetherPopulateHandler(float chanceMultiplier) { 24 | 25 | this.chanceMultiplier = chanceMultiplier; 26 | } 27 | 28 | @SuppressWarnings("unused") 29 | @SubscribeEvent 30 | public void populateChunk(PopulateChunkEvent.Populate event) { 31 | BlockPos chunkCentrePos = new BlockPos(event.getChunkX() * 16 + 8, 0, event.getChunkZ() * 16 + 8); 32 | Biome biome = event.getWorld().getBiomeForCoordsBody(chunkCentrePos); 33 | if (biome != Biomes.HELL) { 34 | return; 35 | } 36 | 37 | if (event.getWorld().rand.nextFloat() < biome.getSpawningChance() * chanceMultiplier) { 38 | 39 | BlockPos basePosition = getRandomChunkPosition(event.getWorld(), event.getChunkX(), event.getChunkZ()); 40 | BlockPos spawnPos = findFloor(event.getWorld(), basePosition); 41 | 42 | IEntityLivingData livingData = spawn(event.getWorld(), null, spawnPos); 43 | livingData = spawn(event.getWorld(), livingData, spawnPos.north()); 44 | livingData = spawn(event.getWorld(), livingData, spawnPos.south()); 45 | livingData = spawn(event.getWorld(), livingData, spawnPos.west()); 46 | spawn(event.getWorld(), livingData, spawnPos.east()); 47 | } 48 | } 49 | 50 | private BlockPos findFloor(World world, BlockPos basePosition) { 51 | BlockPos spawnPos = basePosition; 52 | while (spawnPos.getY() < 100 && !WorldEntitySpawner.canCreatureTypeSpawnAtLocation(EntitySpawnPlacementRegistry.getPlacementForEntity(EntityChickensChicken.class), world, spawnPos)) { 53 | spawnPos = spawnPos.up(); 54 | } 55 | return spawnPos; 56 | } 57 | 58 | @Nullable 59 | private IEntityLivingData spawn(World world, @Nullable IEntityLivingData livingData, BlockPos spawnPos) { 60 | if (WorldEntitySpawner.canCreatureTypeSpawnAtLocation(EntitySpawnPlacementRegistry.getPlacementForEntity(EntityChickensChicken.class), world, spawnPos)) { 61 | EntityChickensChicken entity = new EntityChickensChicken(world); 62 | entity.setLocationAndAngles(spawnPos.getX() + 0.5, spawnPos.getY(), spawnPos.getZ() + 0.5, world.rand.nextFloat() * 360.0F, 0.0F); 63 | livingData = entity.onInitialSpawn(world.getDifficultyForLocation(new BlockPos(entity)), livingData); 64 | if (entity.isNotColliding()) { 65 | world.spawnEntityInWorld(entity); 66 | } 67 | } 68 | return livingData; 69 | } 70 | 71 | private static BlockPos getRandomChunkPosition(World worldIn, int x, int z) { 72 | Chunk chunk = worldIn.getChunkFromChunkCoords(x, z); 73 | int i = x * 16 + worldIn.rand.nextInt(16); 74 | int j = z * 16 + worldIn.rand.nextInt(16); 75 | int k = MathHelper.roundUp(chunk.getHeight(new BlockPos(i, 0, j)) + 1, 16); 76 | int l = worldIn.rand.nextInt(k > 0 ? k : chunk.getTopFilledSegment() + 16 - 1); 77 | return new BlockPos(i, l, j); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/chicken/EntityChickensChicken.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.chicken; 2 | 3 | import com.setycz.chickens.ChickensRegistry; 4 | import com.setycz.chickens.ChickensRegistryItem; 5 | import com.setycz.chickens.SpawnType; 6 | import com.setycz.chickens.henhouse.TileEntityHenhouse; 7 | import net.minecraft.block.Block; 8 | import net.minecraft.entity.EntityAgeable; 9 | import net.minecraft.entity.IEntityLivingData; 10 | import net.minecraft.entity.passive.EntityChicken; 11 | import net.minecraft.init.Biomes; 12 | import net.minecraft.init.Items; 13 | import net.minecraft.init.SoundEvents; 14 | import net.minecraft.item.ItemStack; 15 | import net.minecraft.nbt.NBTTagCompound; 16 | import net.minecraft.network.datasync.DataParameter; 17 | import net.minecraft.network.datasync.DataSerializers; 18 | import net.minecraft.network.datasync.EntityDataManager; 19 | import net.minecraft.util.ResourceLocation; 20 | import net.minecraft.util.math.BlockPos; 21 | import net.minecraft.util.math.Vec3d; 22 | import net.minecraft.util.text.translation.I18n; 23 | import net.minecraft.world.DifficultyInstance; 24 | import net.minecraft.world.World; 25 | import net.minecraft.world.biome.Biome; 26 | 27 | import javax.annotation.Nullable; 28 | import java.util.List; 29 | import java.util.Random; 30 | 31 | /** 32 | * Created by setyc on 12.02.2016. 33 | */ 34 | public class EntityChickensChicken extends EntityChicken { 35 | private static final DataParameter CHICKEN_TYPE = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.VARINT); 36 | private static final DataParameter CHICKEN_STATS_ANALYZED = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.BOOLEAN); 37 | private static final DataParameter CHICKEN_GROWTH = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.VARINT); 38 | private static final DataParameter CHICKEN_GAIN = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.VARINT); 39 | private static final DataParameter CHICKEN_STRENGTH = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.VARINT); 40 | private static final DataParameter LAY_PROGRESS = EntityDataManager.createKey(EntityChickensChicken.class, DataSerializers.VARINT); 41 | 42 | private static final String TYPE_NBT = "Type"; 43 | private static final String CHICKEN_STATS_ANALYZED_NBT = "Analyzed"; 44 | private static final String CHICKEN_GROWTH_NBT = "Growth"; 45 | private static final String CHICKEN_GAIN_NBT = "Gain"; 46 | private static final String CHICKEN_STRENGTH_NBT = "Strength"; 47 | 48 | public EntityChickensChicken(World worldIn) { 49 | super(worldIn); 50 | } 51 | 52 | public boolean getStatsAnalyzed() { 53 | return dataManager.get(CHICKEN_STATS_ANALYZED); 54 | } 55 | 56 | public void setStatsAnalyzed(boolean statsAnalyzed) { 57 | dataManager.set(CHICKEN_STATS_ANALYZED, statsAnalyzed); 58 | } 59 | 60 | public int getGain() { 61 | return dataManager.get(CHICKEN_GAIN); 62 | } 63 | 64 | private void setGain(int gain) { 65 | dataManager.set(CHICKEN_GAIN, gain); 66 | } 67 | 68 | public int getGrowth() { 69 | return dataManager.get(CHICKEN_GROWTH); 70 | } 71 | 72 | private void setGrowth(int growth) { 73 | dataManager.set(CHICKEN_GROWTH, growth); 74 | } 75 | 76 | public int getStrength() { 77 | return dataManager.get(CHICKEN_STRENGTH); 78 | } 79 | 80 | private void setStrength(int strength) { 81 | dataManager.set(CHICKEN_STRENGTH, strength); 82 | } 83 | 84 | ResourceLocation getTexture() { 85 | ChickensRegistryItem chickenDescription = getChickenDescription(); 86 | return chickenDescription.getTexture(); 87 | } 88 | 89 | private ChickensRegistryItem getChickenDescription() { 90 | return ChickensRegistry.getByType(getChickenTypeInternal()); 91 | } 92 | 93 | public int getTier() { 94 | return getChickenDescription().getTier(); 95 | } 96 | 97 | @Override 98 | public String getName() { 99 | if (this.hasCustomName()) { 100 | return getCustomNameTag(); 101 | } 102 | 103 | ChickensRegistryItem chickenDescription = getChickenDescription(); 104 | return I18n.translateToLocal("entity." + chickenDescription.getEntityName() + ".name"); 105 | } 106 | 107 | @Override 108 | public EntityChicken createChild(EntityAgeable ageable) { 109 | EntityChickensChicken mateChicken = (EntityChickensChicken) ageable; 110 | 111 | ChickensRegistryItem chickenDescription = getChickenDescription(); 112 | ChickensRegistryItem mateChickenDescription = mateChicken.getChickenDescription(); 113 | 114 | ChickensRegistryItem childToBeBorn = ChickensRegistry.getRandomChild(chickenDescription, mateChickenDescription); 115 | if (childToBeBorn == null) { 116 | return null; 117 | } 118 | 119 | EntityChickensChicken newChicken = new EntityChickensChicken(this.worldObj); 120 | newChicken.setChickenType(childToBeBorn.getId()); 121 | 122 | boolean mutatingStats = chickenDescription.getId() == mateChickenDescription.getId() && childToBeBorn.getId() == chickenDescription.getId(); 123 | if (mutatingStats) { 124 | increaseStats(newChicken, this, mateChicken, rand); 125 | } else if (chickenDescription.getId() == childToBeBorn.getId()) { 126 | inheritStats(newChicken, this); 127 | } else if (mateChickenDescription.getId() == childToBeBorn.getId()) { 128 | inheritStats(newChicken, mateChicken); 129 | } 130 | 131 | return newChicken; 132 | } 133 | 134 | private static void inheritStats(EntityChickensChicken newChicken, EntityChickensChicken parent) { 135 | newChicken.setGrowth(parent.getGrowth()); 136 | newChicken.setGain(parent.getGain()); 137 | newChicken.setStrength(parent.getStrength()); 138 | } 139 | 140 | private static void increaseStats(EntityChickensChicken newChicken, EntityChickensChicken parent1, EntityChickensChicken parent2, Random rand) { 141 | int parent1Strength = parent1.getStrength(); 142 | int parent2Strength = parent2.getStrength(); 143 | newChicken.setGrowth(calculateNewStat(parent1Strength, parent2Strength, parent1.getGrowth(), parent2.getGrowth(), rand)); 144 | newChicken.setGain(calculateNewStat(parent1Strength, parent2Strength, parent2.getGain(), parent2.getGain(), rand)); 145 | newChicken.setStrength(calculateNewStat(parent1Strength, parent2Strength, parent1Strength, parent2Strength, rand)); 146 | } 147 | 148 | private static int calculateNewStat(int thisStrength, int mateStrength, int stat1, int stat2, Random rand) { 149 | int mutation = rand.nextInt(2) + 1; 150 | int newStatValue = (stat1 * thisStrength + stat2 * mateStrength) / (thisStrength + mateStrength) + mutation; 151 | if (newStatValue <= 1) return 1; 152 | if (newStatValue >= 10) return 10; 153 | return newStatValue; 154 | } 155 | 156 | @Override 157 | public void onLivingUpdate() { 158 | if (!this.worldObj.isRemote && !this.isChild() && !this.isChickenJockey()) { 159 | int newTimeUntilNextEgg = timeUntilNextEgg - 1; 160 | setTimeUntilNextEgg(newTimeUntilNextEgg); 161 | if (newTimeUntilNextEgg <= 1) { 162 | ChickensRegistryItem chickenDescription = getChickenDescription(); 163 | ItemStack itemToLay = chickenDescription.createLayItem(); 164 | 165 | itemToLay = TileEntityHenhouse.pushItemStack(itemToLay, worldObj, new Vec3d(posX, posY, posZ)); 166 | 167 | if (itemToLay != null) { 168 | entityDropItem(chickenDescription.createLayItem(), 0); 169 | int gain = getGain(); 170 | if (gain >= 5) { 171 | entityDropItem(chickenDescription.createLayItem(), 0); 172 | } 173 | if (gain >= 10) { 174 | entityDropItem(chickenDescription.createLayItem(), 0); 175 | } 176 | playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); 177 | } 178 | 179 | resetTimeUntilNextEgg(); 180 | } 181 | } 182 | super.onLivingUpdate(); 183 | } 184 | 185 | private void setTimeUntilNextEgg(int value) { 186 | timeUntilNextEgg = value; 187 | updateLayProgress(); 188 | } 189 | 190 | public int getLayProgress() { 191 | return dataManager.get(LAY_PROGRESS); 192 | } 193 | 194 | private void updateLayProgress() { 195 | dataManager.set(LAY_PROGRESS, timeUntilNextEgg / 60 / 20 / 2); 196 | } 197 | 198 | private void resetTimeUntilNextEgg() { 199 | ChickensRegistryItem chickenDescription = getChickenDescription(); 200 | int newBaseTimeUntilNextEgg = (chickenDescription.getMinLayTime() 201 | + rand.nextInt(chickenDescription.getMaxLayTime() - chickenDescription.getMinLayTime())); 202 | int newTimeUntilNextEgg = (int) Math.max(1.0f, (newBaseTimeUntilNextEgg * (10.f - getGrowth() + 1.f)) / 10.f); 203 | setTimeUntilNextEgg(newTimeUntilNextEgg * 2); 204 | } 205 | 206 | @Override 207 | public boolean getCanSpawnHere() { 208 | boolean anyInNether = ChickensRegistry.isAnyIn(SpawnType.HELL); 209 | boolean anyInOverworld = ChickensRegistry.isAnyIn(SpawnType.NORMAL) || ChickensRegistry.isAnyIn(SpawnType.SNOW); 210 | Biome biome = worldObj.getBiomeForCoordsBody(getPosition()); 211 | return anyInNether && biome == Biomes.HELL || anyInOverworld && super.getCanSpawnHere(); 212 | } 213 | 214 | @Override 215 | public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingData) { 216 | livingData = super.onInitialSpawn(difficulty, livingData); 217 | if (livingData instanceof GroupData) { 218 | GroupData groupData = (GroupData) livingData; 219 | setChickenType(groupData.getType()); 220 | } else { 221 | SpawnType spawnType = getSpawnType(); 222 | List possibleChickens = ChickensRegistry.getPossibleChickensToSpawn(spawnType); 223 | if (possibleChickens.size() > 0) { 224 | ChickensRegistryItem chickenToSpawn = possibleChickens.get(rand.nextInt(possibleChickens.size())); 225 | 226 | int type = chickenToSpawn.getId(); 227 | setChickenType(type); 228 | livingData = new GroupData(type); 229 | } 230 | } 231 | 232 | if (rand.nextInt(5) == 0) { 233 | setGrowingAge(-24000); 234 | } 235 | 236 | return livingData; 237 | } 238 | 239 | private SpawnType getSpawnType() { 240 | Biome biome = worldObj.getBiomeForCoordsBody(getPosition()); 241 | return ChickensRegistry.getSpawnType(biome); 242 | } 243 | 244 | private static class GroupData implements IEntityLivingData { 245 | private final int type; 246 | 247 | public GroupData(int type) { 248 | this.type = type; 249 | } 250 | 251 | public int getType() { 252 | return type; 253 | } 254 | } 255 | 256 | public void setChickenType(int type) { 257 | setChickenTypeInternal(type); 258 | isImmuneToFire = getChickenDescription().isImmuneToFire(); 259 | resetTimeUntilNextEgg(); 260 | } 261 | 262 | private void setChickenTypeInternal(int type) { 263 | this.dataManager.set(CHICKEN_TYPE, type); 264 | } 265 | 266 | private int getChickenTypeInternal() { 267 | return this.dataManager.get(CHICKEN_TYPE); 268 | } 269 | 270 | @Override 271 | protected void entityInit() { 272 | super.entityInit(); 273 | dataManager.register(CHICKEN_TYPE, 0); 274 | dataManager.register(CHICKEN_GROWTH, 1); 275 | dataManager.register(CHICKEN_GAIN, 1); 276 | dataManager.register(CHICKEN_STRENGTH, 1); 277 | dataManager.register(LAY_PROGRESS, 0); 278 | dataManager.register(CHICKEN_STATS_ANALYZED, false); 279 | } 280 | 281 | @Override 282 | public void writeEntityToNBT(NBTTagCompound tagCompound) { 283 | super.writeEntityToNBT(tagCompound); 284 | tagCompound.setInteger(TYPE_NBT, getChickenTypeInternal()); 285 | tagCompound.setBoolean(CHICKEN_STATS_ANALYZED_NBT, getStatsAnalyzed()); 286 | tagCompound.setInteger(CHICKEN_GROWTH_NBT, getGrowth()); 287 | tagCompound.setInteger(CHICKEN_GAIN_NBT, getGain()); 288 | tagCompound.setInteger(CHICKEN_STRENGTH_NBT, getStrength()); 289 | } 290 | 291 | @Override 292 | public void readEntityFromNBT(NBTTagCompound tagCompound) { 293 | super.readEntityFromNBT(tagCompound); 294 | setChickenTypeInternal(tagCompound.getInteger(TYPE_NBT)); 295 | setStatsAnalyzed(tagCompound.getBoolean(CHICKEN_STATS_ANALYZED_NBT)); 296 | setGrowth(getStatusValue(tagCompound, CHICKEN_GROWTH_NBT)); 297 | setGain(getStatusValue(tagCompound, CHICKEN_GAIN_NBT)); 298 | setStrength(getStatusValue(tagCompound, CHICKEN_STRENGTH_NBT)); 299 | updateLayProgress(); 300 | } 301 | 302 | private int getStatusValue(NBTTagCompound compound, String statusName) { 303 | return compound.hasKey(statusName) ? compound.getInteger(statusName) : 1; 304 | } 305 | 306 | @Override 307 | public int getTalkInterval() { 308 | return 20 * 60; 309 | } 310 | 311 | @Override 312 | protected void playStepSound(BlockPos pos, Block blockIn) { 313 | if (this.rand.nextFloat() > 0.1) { 314 | return; 315 | } 316 | super.playStepSound(pos, blockIn); 317 | } 318 | 319 | @Override 320 | protected ResourceLocation getLootTable() { 321 | return null; 322 | } 323 | 324 | @Override 325 | protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier) { 326 | ItemStack itemsToDrop = getChickenDescription().createDropItem(); 327 | int count = 1 + rand.nextInt(1 + lootingModifier); 328 | itemsToDrop.stackSize *= count; 329 | entityDropItem(itemsToDrop, 0); 330 | 331 | if (this.isBurning()) { 332 | this.dropItem(Items.COOKED_CHICKEN, 1); 333 | } else { 334 | this.dropItem(Items.CHICKEN, 1); 335 | } 336 | } 337 | 338 | @Override 339 | public void setGrowingAge(int age) { 340 | int childAge = -24000; 341 | boolean resetToChild = age == childAge; 342 | if (resetToChild) { 343 | age = Math.min(-1, (childAge * (10 - getGrowth() + 1)) / 10); 344 | } 345 | 346 | int loveAge = 6000; 347 | boolean resetLoveAfterBreeding = age == loveAge; 348 | if (resetLoveAfterBreeding) { 349 | age = Math.max(1, (loveAge * (10 - getGrowth() + 1)) / 10); 350 | } 351 | 352 | super.setGrowingAge(age); 353 | } 354 | } 355 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/chicken/ModelChickensChicken.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.chicken; 2 | 3 | import net.minecraft.client.model.ModelChicken; 4 | import net.minecraftforge.fml.relauncher.Side; 5 | import net.minecraftforge.fml.relauncher.SideOnly; 6 | 7 | /** 8 | * Created by setyc on 12.02.2016. 9 | */ 10 | @SideOnly(Side.CLIENT) 11 | public class ModelChickensChicken extends ModelChicken { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/chicken/RenderChickensChicken.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.chicken; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderLiving; 5 | import net.minecraft.client.renderer.entity.RenderManager; 6 | import net.minecraft.util.ResourceLocation; 7 | import net.minecraft.util.math.MathHelper; 8 | import net.minecraftforge.fml.relauncher.Side; 9 | import net.minecraftforge.fml.relauncher.SideOnly; 10 | 11 | /** 12 | * Created by setyc on 12.02.2016. 13 | */ 14 | @SideOnly(Side.CLIENT) 15 | public class RenderChickensChicken extends RenderLiving { 16 | 17 | public RenderChickensChicken(RenderManager renderManagerIn, ModelBase modelBaseIn) { 18 | super(renderManagerIn, modelBaseIn, 0.3F); 19 | } 20 | 21 | @Override 22 | protected ResourceLocation getEntityTexture(EntityChickensChicken entity) { 23 | return entity.getTexture(); 24 | } 25 | 26 | @Override 27 | protected float handleRotationFloat(EntityChickensChicken livingBase, float partialTicks) { 28 | float f = livingBase.oFlap + (livingBase.wingRotation - livingBase.oFlap) * partialTicks; 29 | float f1 = livingBase.oFlapSpeed + (livingBase.destPos - livingBase.oFlapSpeed) * partialTicks; 30 | return (MathHelper.sin(f) + 1.0F) * f1; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/chicken/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.chicken; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/coloredEgg/EntityColoredEgg.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.coloredEgg; 2 | 3 | import com.setycz.chickens.chicken.EntityChickensChicken; 4 | import net.minecraft.entity.EntityLivingBase; 5 | import net.minecraft.entity.projectile.EntityEgg; 6 | import net.minecraft.init.Items; 7 | import net.minecraft.item.Item; 8 | import net.minecraft.nbt.NBTTagCompound; 9 | import net.minecraft.network.datasync.DataParameter; 10 | import net.minecraft.network.datasync.DataSerializers; 11 | import net.minecraft.network.datasync.EntityDataManager; 12 | import net.minecraft.util.DamageSource; 13 | import net.minecraft.util.EnumParticleTypes; 14 | import net.minecraft.util.math.RayTraceResult; 15 | import net.minecraft.world.World; 16 | 17 | /** 18 | * Created by setyc on 13.02.2016. 19 | */ 20 | @SuppressWarnings("WeakerAccess") 21 | public class EntityColoredEgg extends EntityEgg { 22 | private static final DataParameter CHICKEN_TYPE = EntityDataManager.createKey(EntityColoredEgg.class, DataSerializers.VARINT); 23 | public static final String TYPE_NBT = "Type"; 24 | 25 | public EntityColoredEgg(World worldIn, EntityLivingBase throwerIn) { 26 | super(worldIn, throwerIn); 27 | } 28 | 29 | public EntityColoredEgg(World worldIn, double x, double y, double z) { 30 | super(worldIn, x, y, z); 31 | } 32 | 33 | public void setChickenType(int type) { 34 | this.dataManager.set(CHICKEN_TYPE, type); 35 | } 36 | 37 | private int getChickenType() { 38 | return this.dataManager.get(CHICKEN_TYPE); 39 | } 40 | 41 | @Override 42 | protected void entityInit() { 43 | super.entityInit(); 44 | this.dataManager.register(CHICKEN_TYPE, 0); 45 | } 46 | 47 | @Override 48 | public NBTTagCompound writeToNBT(NBTTagCompound tagCompound) { 49 | super.writeToNBT(tagCompound); 50 | tagCompound.setInteger(TYPE_NBT, getChickenType()); 51 | return tagCompound; 52 | } 53 | 54 | @Override 55 | public void readFromNBT(NBTTagCompound tagCompound) { 56 | super.readFromNBT(tagCompound); 57 | setChickenType(tagCompound.getInteger(TYPE_NBT)); 58 | } 59 | 60 | @Override 61 | protected void onImpact(RayTraceResult result) { 62 | if (result.entityHit != null) { 63 | result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0.0F); 64 | } 65 | 66 | if (!this.worldObj.isRemote && this.rand.nextInt(8) == 0) { 67 | int i = 1; 68 | 69 | if (this.rand.nextInt(32) == 0) { 70 | i = 4; 71 | } 72 | 73 | for (int j = 0; j < i; ++j) { 74 | EntityChickensChicken entityChicken = new EntityChickensChicken(this.worldObj); 75 | entityChicken.setChickenType(getChickenType()); 76 | entityChicken.setGrowingAge(-24000); 77 | entityChicken.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); 78 | this.worldObj.spawnEntityInWorld(entityChicken); 79 | } 80 | } 81 | 82 | for (int k = 0; k < 8; ++k) { 83 | this.worldObj.spawnParticle(EnumParticleTypes.ITEM_CRACK, this.posX, this.posY, this.posZ, ((double) this.rand.nextFloat() - 0.5D) * 0.08D, ((double) this.rand.nextFloat() - 0.5D) * 0.08D, ((double) this.rand.nextFloat() - 0.5D) * 0.08D, Item.getIdFromItem(Items.EGG)); 84 | } 85 | 86 | if (!this.worldObj.isRemote) { 87 | this.setDead(); 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/coloredEgg/ItemColoredEgg.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.coloredEgg; 2 | 3 | import com.setycz.chickens.ChickensRegistry; 4 | import com.setycz.chickens.ChickensRegistryItem; 5 | import com.setycz.chickens.IColorSource; 6 | import net.minecraft.creativetab.CreativeTabs; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.init.SoundEvents; 9 | import net.minecraft.item.EnumDyeColor; 10 | import net.minecraft.item.Item; 11 | import net.minecraft.item.ItemEgg; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.stats.StatList; 14 | import net.minecraft.util.ActionResult; 15 | import net.minecraft.util.EnumActionResult; 16 | import net.minecraft.util.EnumHand; 17 | import net.minecraft.util.SoundCategory; 18 | import net.minecraft.util.text.translation.I18n; 19 | import net.minecraft.world.World; 20 | import net.minecraftforge.fml.relauncher.Side; 21 | import net.minecraftforge.fml.relauncher.SideOnly; 22 | 23 | import java.util.List; 24 | 25 | /** 26 | * Created by setyc on 13.02.2016. 27 | */ 28 | public class ItemColoredEgg extends ItemEgg implements IColorSource { 29 | public ItemColoredEgg() { 30 | setHasSubtypes(true); 31 | } 32 | 33 | @SideOnly(Side.CLIENT) 34 | @Override 35 | public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { 36 | super.addInformation(stack, playerIn, tooltip, advanced); 37 | tooltip.add(I18n.translateToLocal("item.colored_egg.tooltip")); 38 | } 39 | 40 | @Override 41 | public String getItemStackDisplayName(ItemStack stack) { 42 | EnumDyeColor color = EnumDyeColor.byDyeDamage(stack.getMetadata()); 43 | String unlocalizedName = color.getUnlocalizedName(); 44 | // hotfix for compatibility with MoreChickens 45 | if (unlocalizedName.equals("silver")) { 46 | unlocalizedName += "Dye"; 47 | } 48 | return I18n.translateToLocal(getUnlocalizedName() + "." + unlocalizedName + ".name"); 49 | } 50 | 51 | @Override 52 | public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) { 53 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 54 | if (chicken.isDye()) { 55 | subItems.add(new ItemStack(itemIn, 1, chicken.getDyeMetadata())); 56 | } 57 | } 58 | } 59 | 60 | @Override 61 | public int getColorFromItemStack(ItemStack stack, int renderPass) { 62 | return EnumDyeColor.byDyeDamage(stack.getMetadata()).getMapColor().colorValue; 63 | } 64 | 65 | @Override 66 | public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { 67 | if (!playerIn.capabilities.isCreativeMode) { 68 | --itemStackIn.stackSize; 69 | } 70 | 71 | worldIn.playSound(null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_EGG_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); 72 | 73 | if (!worldIn.isRemote) { 74 | int chickenType = getChickenType(itemStackIn); 75 | if (chickenType != -1) { 76 | EntityColoredEgg entityIn = new EntityColoredEgg(worldIn, playerIn); 77 | entityIn.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); 78 | entityIn.setChickenType(chickenType); 79 | worldIn.spawnEntityInWorld(entityIn); 80 | } 81 | } 82 | 83 | //noinspection ConstantConditions 84 | playerIn.addStat(StatList.getObjectUseStats(this)); 85 | return new ActionResult(EnumActionResult.SUCCESS, itemStackIn); 86 | } 87 | 88 | public int getChickenType(ItemStack itemStack) { 89 | ChickensRegistryItem chicken = ChickensRegistry.findDyeChicken(itemStack.getMetadata()); 90 | if (chicken == null) { 91 | return -1; 92 | } 93 | return chicken.getId(); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/coloredEgg/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.coloredEgg; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/henhouse/BlockHenhouse.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.henhouse; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import net.minecraft.block.BlockContainer; 5 | import net.minecraft.block.material.Material; 6 | import net.minecraft.block.properties.PropertyDirection; 7 | import net.minecraft.block.state.BlockStateContainer; 8 | import net.minecraft.block.state.IBlockState; 9 | import net.minecraft.entity.EntityLivingBase; 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.inventory.InventoryHelper; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.tileentity.TileEntity; 14 | import net.minecraft.util.*; 15 | import net.minecraft.util.math.BlockPos; 16 | import net.minecraft.util.text.translation.I18n; 17 | import net.minecraft.world.World; 18 | import net.minecraftforge.fml.relauncher.Side; 19 | import net.minecraftforge.fml.relauncher.SideOnly; 20 | 21 | import javax.annotation.Nullable; 22 | import java.util.List; 23 | 24 | /** 25 | * Created by setyc on 01.03.2016. 26 | */ 27 | public class BlockHenhouse extends BlockContainer { 28 | @SuppressWarnings("WeakerAccess") 29 | public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); 30 | 31 | public BlockHenhouse() { 32 | super(Material.WOOD); 33 | this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH)); 34 | } 35 | 36 | @SideOnly(Side.CLIENT) 37 | @Override 38 | public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { 39 | super.addInformation(stack, playerIn, tooltip, advanced); 40 | tooltip.add(I18n.translateToLocal("tile.henhouse.tooltip")); 41 | } 42 | 43 | @Override 44 | public TileEntity createNewTileEntity(World worldIn, int meta) { 45 | return new TileEntityHenhouse(); 46 | } 47 | 48 | @Override 49 | public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { 50 | TileEntity tileEntity = worldIn.getTileEntity(pos); 51 | if (tileEntity instanceof TileEntityHenhouse) { 52 | InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityHenhouse) tileEntity); 53 | } 54 | 55 | super.breakBlock(worldIn, pos, state); 56 | } 57 | 58 | @Override 59 | @Deprecated 60 | public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { 61 | return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); 62 | } 63 | 64 | @Override 65 | public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { 66 | worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2); 67 | 68 | if (stack.hasDisplayName()) { 69 | TileEntity tileEntity = worldIn.getTileEntity(pos); 70 | if (tileEntity instanceof TileEntityHenhouse) { 71 | ((TileEntityHenhouse) tileEntity).setCustomName(stack.getDisplayName()); 72 | } 73 | } 74 | } 75 | 76 | @Override 77 | public EnumBlockRenderType getRenderType(IBlockState state) { 78 | return EnumBlockRenderType.MODEL; 79 | } 80 | 81 | @Override 82 | @Deprecated 83 | public IBlockState getStateFromMeta(int meta) { 84 | EnumFacing enumfacing = EnumFacing.getFront(meta); 85 | if (enumfacing.getAxis() == EnumFacing.Axis.Y) { 86 | enumfacing = EnumFacing.NORTH; 87 | } 88 | return getDefaultState().withProperty(FACING, enumfacing); 89 | } 90 | 91 | @Override 92 | public int getMetaFromState(IBlockState state) { 93 | return state.getValue(FACING).getIndex(); 94 | } 95 | 96 | @Override 97 | @Deprecated 98 | public IBlockState withRotation(IBlockState state, Rotation rot) { 99 | return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); 100 | } 101 | 102 | @Override 103 | @Deprecated 104 | public IBlockState withMirror(IBlockState state, Mirror mirrorIn) { 105 | return state.withRotation(mirrorIn.toRotation(state.getValue(FACING))); 106 | } 107 | 108 | @Override 109 | protected BlockStateContainer createBlockState() { 110 | return new BlockStateContainer(this, FACING); 111 | } 112 | 113 | @Override 114 | public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { 115 | if (!worldIn.isRemote) { 116 | TileEntity tileEntity = worldIn.getTileEntity(pos); 117 | if (tileEntity instanceof TileEntityHenhouse) { 118 | playerIn.openGui(ChickensMod.instance, 0, worldIn, pos.getX(), pos.getY(), pos.getZ()); 119 | } 120 | } 121 | return true; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/henhouse/ContainerHenhouse.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.henhouse; 2 | 3 | import net.minecraft.entity.player.EntityPlayer; 4 | import net.minecraft.entity.player.InventoryPlayer; 5 | import net.minecraft.inventory.Container; 6 | import net.minecraft.inventory.IContainerListener; 7 | import net.minecraft.inventory.Slot; 8 | import net.minecraft.item.ItemStack; 9 | 10 | /** 11 | * Created by setyc on 06.03.2016. 12 | */ 13 | @SuppressWarnings("WeakerAccess") 14 | public class ContainerHenhouse extends Container { 15 | 16 | private final TileEntityHenhouse tileEntityHenhouse; 17 | private int energy; 18 | 19 | public ContainerHenhouse(InventoryPlayer playerInventory, TileEntityHenhouse tileEntityHenhouse) { 20 | this.tileEntityHenhouse = tileEntityHenhouse; 21 | 22 | this.addSlotToContainer(new Slot(tileEntityHenhouse, TileEntityHenhouse.hayBaleSlotIndex, 25, 19)); 23 | this.addSlotToContainer(new Slot(tileEntityHenhouse, TileEntityHenhouse.dirtSlotIndex, 25, 55)); 24 | 25 | for (int row = 0; row < 3; row++) { 26 | for (int column = 0; column < 3; column++) { 27 | this.addSlotToContainer(new Slot( 28 | tileEntityHenhouse, 29 | TileEntityHenhouse.firstItemSlotIndex + (row * 3) + column, 30 | 98 + column * 18, 31 | 17 + row * 18)); 32 | } 33 | } 34 | 35 | for (int l = 0; l < 3; ++l) { 36 | for (int k = 0; k < 9; ++k) { 37 | this.addSlotToContainer(new Slot(playerInventory, k + l * 9 + 9, 8 + k * 18, l * 18 + 84)); 38 | } 39 | } 40 | 41 | for (int i1 = 0; i1 < 9; ++i1) { 42 | this.addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 142)); 43 | } 44 | } 45 | 46 | @Override 47 | public boolean canInteractWith(EntityPlayer playerIn) { 48 | return tileEntityHenhouse.isUseableByPlayer(playerIn); 49 | } 50 | 51 | @Override 52 | public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { 53 | 54 | ItemStack itemstack = null; 55 | Slot slot = this.inventorySlots.get(index); 56 | 57 | if (slot != null && slot.getHasStack()) { 58 | ItemStack itemStack1 = slot.getStack(); 59 | assert itemStack1 != null; 60 | itemstack = itemStack1.copy(); 61 | 62 | if (index < this.tileEntityHenhouse.getSizeInventory()) { 63 | if (!this.mergeItemStack(itemStack1, this.tileEntityHenhouse.getSizeInventory(), this.inventorySlots.size(), true)) { 64 | return null; 65 | } 66 | } else if (!this.mergeItemStack(itemStack1, 0, this.tileEntityHenhouse.getSizeInventory(), false)) { 67 | return null; 68 | } 69 | 70 | if (itemStack1.stackSize == 0) { 71 | slot.putStack(null); 72 | } else { 73 | slot.onSlotChanged(); 74 | } 75 | } 76 | 77 | return itemstack; 78 | } 79 | 80 | @Override 81 | public void onContainerClosed(EntityPlayer playerIn) { 82 | super.onContainerClosed(playerIn); 83 | tileEntityHenhouse.closeInventory(playerIn); 84 | } 85 | 86 | @Override 87 | public void detectAndSendChanges() { 88 | super.detectAndSendChanges(); 89 | 90 | for (IContainerListener listener : listeners) { 91 | if (energy != tileEntityHenhouse.getField(0)) { 92 | listener.sendProgressBarUpdate(this, 0, tileEntityHenhouse.getField(0)); 93 | } 94 | } 95 | 96 | energy = tileEntityHenhouse.getField(0); 97 | } 98 | 99 | @Override 100 | public void updateProgressBar(int id, int data) { 101 | tileEntityHenhouse.setField(id, data); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/henhouse/GuiHenhouse.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.henhouse; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import net.minecraft.client.gui.inventory.GuiContainer; 5 | import net.minecraft.client.renderer.GlStateManager; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | import net.minecraft.util.ResourceLocation; 8 | import net.minecraft.util.text.ITextComponent; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | /** 13 | * Created by setyc on 06.03.2016. 14 | */ 15 | @SuppressWarnings("WeakerAccess") 16 | @SideOnly(Side.CLIENT) 17 | public class GuiHenhouse extends GuiContainer { 18 | private static final ResourceLocation GUI_TEXTURE = new ResourceLocation(ChickensMod.MODID, "textures/gui/henhouse.png"); 19 | private final InventoryPlayer playerInv; 20 | private final TileEntityHenhouse tileEntityHenhouse; 21 | 22 | public GuiHenhouse(InventoryPlayer playerInv, TileEntityHenhouse tileEntityHenhouse) { 23 | super(new ContainerHenhouse(playerInv, tileEntityHenhouse)); 24 | this.playerInv = playerInv; 25 | this.tileEntityHenhouse = tileEntityHenhouse; 26 | this.ySize = 166; 27 | } 28 | 29 | @Override 30 | protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { 31 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); 32 | mc.getTextureManager().bindTexture(GUI_TEXTURE); 33 | int i = (width - xSize) / 2; 34 | int j = (height - ySize) / 2; 35 | drawTexturedModalRect(i, j, 0, 0, xSize, ySize); 36 | 37 | int energy = tileEntityHenhouse.getEnergy(); 38 | final int BAR_HEIGHT = 57; 39 | int offset = BAR_HEIGHT - (energy * BAR_HEIGHT / TileEntityHenhouse.hayBaleEnergy); 40 | drawTexturedModalRect(i + 75, j + 14 + offset, 195, offset, 12, BAR_HEIGHT - offset); 41 | } 42 | 43 | @Override 44 | protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { 45 | ITextComponent henhouseDisplayName = tileEntityHenhouse.getDisplayName(); 46 | assert henhouseDisplayName != null; 47 | String henhouseName = henhouseDisplayName.getUnformattedText(); 48 | this.fontRendererObj.drawString( 49 | henhouseName, 50 | xSize / 2 - fontRendererObj.getStringWidth(henhouseName) / 2, 6, 51 | 4210752); 52 | this.fontRendererObj.drawString( 53 | playerInv.getDisplayName().getUnformattedText(), 54 | 8, ySize - 96 + 2, 55 | 4210752); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/henhouse/TileEntityHenhouse.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.henhouse; 2 | 3 | import com.setycz.chickens.IInventoryGui; 4 | import net.minecraft.client.gui.inventory.GuiContainer; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | import net.minecraft.init.Blocks; 8 | import net.minecraft.inventory.Container; 9 | import net.minecraft.inventory.ISidedInventory; 10 | import net.minecraft.item.Item; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.nbt.NBTTagCompound; 13 | import net.minecraft.nbt.NBTTagList; 14 | import net.minecraft.tileentity.TileEntity; 15 | import net.minecraft.util.EnumFacing; 16 | import net.minecraft.util.math.MathHelper; 17 | import net.minecraft.util.math.Vec3d; 18 | import net.minecraft.util.text.ITextComponent; 19 | import net.minecraft.util.text.TextComponentString; 20 | import net.minecraft.util.text.TextComponentTranslation; 21 | import net.minecraft.world.World; 22 | import net.minecraft.world.chunk.Chunk; 23 | import net.minecraftforge.fml.relauncher.Side; 24 | import net.minecraftforge.fml.relauncher.SideOnly; 25 | 26 | import javax.annotation.Nullable; 27 | import java.util.ArrayList; 28 | import java.util.Arrays; 29 | import java.util.List; 30 | 31 | /** 32 | * Created by setyc on 01.03.2016. 33 | */ 34 | public class TileEntityHenhouse extends TileEntity implements ISidedInventory, IInventoryGui { 35 | public static final int hayBaleEnergy = 100; 36 | 37 | public static final int hayBaleSlotIndex = 0; 38 | public static final int dirtSlotIndex = 1; 39 | public static final int firstItemSlotIndex = 2; 40 | private static final int lastItemSlotIndex = 10; 41 | private static final double HENHOUSE_RADIUS = 0.5; 42 | private static final double FENCE_THRESHOLD = 0.5; 43 | 44 | private String customName; 45 | private final ItemStack[] slots = new ItemStack[11]; 46 | private int energy = 0; 47 | 48 | @Nullable 49 | public static ItemStack pushItemStack(ItemStack itemToLay, World worldObj, Vec3d pos) { 50 | List henhouses = findHenhouses(worldObj, pos, 4 + HENHOUSE_RADIUS + FENCE_THRESHOLD); 51 | for (TileEntityHenhouse henhouse : henhouses) { 52 | itemToLay = henhouse.pushItemStack(itemToLay); 53 | if (itemToLay == null) { 54 | break; 55 | } 56 | } 57 | return itemToLay; 58 | } 59 | 60 | private static List findHenhouses(World worldObj, Vec3d pos, double radius) { 61 | int firstChunkX = MathHelper.floor_double((pos.xCoord - radius - World.MAX_ENTITY_RADIUS) / 16.0D); 62 | int lastChunkX = MathHelper.floor_double((pos.xCoord + radius + World.MAX_ENTITY_RADIUS) / 16.0D); 63 | int firstChunkY = MathHelper.floor_double((pos.zCoord - radius - World.MAX_ENTITY_RADIUS) / 16.0D); 64 | int lastChunkY = MathHelper.floor_double((pos.zCoord + radius + World.MAX_ENTITY_RADIUS) / 16.0D); 65 | 66 | List distances = new ArrayList(); 67 | List result = new ArrayList(); 68 | for (int chunkX = firstChunkX; chunkX <= lastChunkX; ++chunkX) { 69 | for (int chunkY = firstChunkY; chunkY <= lastChunkY; ++chunkY) { 70 | Chunk chunk = worldObj.getChunkFromChunkCoords(chunkX, chunkY); 71 | for (TileEntity tileEntity : chunk.getTileEntityMap().values()) { 72 | if (tileEntity instanceof TileEntityHenhouse) { 73 | Vec3d tileEntityPos = new Vec3d(tileEntity.getPos()).addVector(HENHOUSE_RADIUS, HENHOUSE_RADIUS, HENHOUSE_RADIUS); 74 | boolean inRage = testRange(pos, tileEntityPos, radius); 75 | if (inRage) { 76 | double distance = pos.distanceTo(tileEntityPos); 77 | addHenhouseToResults((TileEntityHenhouse) tileEntity, distance, distances, result); 78 | } 79 | } 80 | } 81 | } 82 | } 83 | return result; 84 | } 85 | 86 | private static boolean testRange(Vec3d pos1, Vec3d pos2, double range) { 87 | return Math.abs(pos1.xCoord - pos2.xCoord) <= range && 88 | Math.abs(pos1.yCoord - pos2.yCoord) <= range && 89 | Math.abs(pos1.zCoord - pos2.zCoord) <= range; 90 | } 91 | 92 | private static void addHenhouseToResults(TileEntityHenhouse henhouse, double distance, List distances, List henhouses) { 93 | for (int resultIndex = 0; resultIndex < distances.size(); resultIndex++) { 94 | if (distance < distances.get(resultIndex)) { 95 | distances.add(resultIndex, distance); 96 | henhouses.add(resultIndex, henhouse); 97 | return; 98 | } 99 | } 100 | distances.add(distance); 101 | henhouses.add(henhouse); 102 | } 103 | 104 | @Nullable 105 | private ItemStack pushItemStack(ItemStack stack) { 106 | ItemStack rest = stack.copy(); 107 | 108 | int capacity = getEffectiveCapacity(); 109 | if (capacity <= 0) { 110 | return rest; 111 | } 112 | 113 | for (int slotIndex = firstItemSlotIndex; slotIndex <= lastItemSlotIndex; slotIndex++) { 114 | int canAdd = canAdd(slots[slotIndex], rest); 115 | int willAdd = Math.min(canAdd, capacity); 116 | if (willAdd > 0) { 117 | consumeEnergy(willAdd); 118 | capacity -= willAdd; 119 | 120 | if (slots[slotIndex] == null) { 121 | slots[slotIndex] = rest.splitStack(willAdd); 122 | } else { 123 | slots[slotIndex].stackSize += willAdd; 124 | rest.stackSize -= willAdd; 125 | } 126 | 127 | if (rest.stackSize <= 0) { 128 | return null; 129 | } 130 | } 131 | } 132 | 133 | markDirty(); 134 | return rest; 135 | } 136 | 137 | private void consumeEnergy(int amount) { 138 | while (amount > 0) { 139 | if (energy == 0) { 140 | assert slots[hayBaleSlotIndex] != null; 141 | slots[hayBaleSlotIndex].stackSize--; 142 | if (slots[hayBaleSlotIndex].stackSize <= 0) { 143 | slots[hayBaleSlotIndex] = null; 144 | } 145 | energy += hayBaleEnergy; 146 | } 147 | 148 | int consumed = Math.min(amount, energy); 149 | energy -= consumed; 150 | amount -= consumed; 151 | 152 | if (energy <= 0) { 153 | if (slots[dirtSlotIndex] == null) { 154 | slots[dirtSlotIndex] = new ItemStack(Blocks.DIRT, 1); 155 | } else { 156 | slots[dirtSlotIndex].stackSize++; 157 | } 158 | } 159 | } 160 | } 161 | 162 | private int canAdd(@Nullable ItemStack slotStack, ItemStack inputStack) { 163 | if (slotStack == null) { 164 | return Math.min(getInventoryStackLimit(), inputStack.stackSize); 165 | } 166 | if (!slotStack.isItemEqual(inputStack)) { 167 | return 0; 168 | } 169 | if (slotStack.stackSize >= getInventoryStackLimit()) { 170 | return 0; 171 | } 172 | return Math.min(inputStack.stackSize, getInventoryStackLimit() - slotStack.stackSize); 173 | } 174 | 175 | private int getEffectiveCapacity() { 176 | return Math.min(getInputCapacity(), getOutputCapacity()); 177 | } 178 | 179 | private int getInputCapacity() { 180 | int potential = energy; 181 | 182 | ItemStack hayBaleStack = slots[hayBaleSlotIndex]; 183 | if (hayBaleStack != null && hayBaleStack.getItem() == Item.getItemFromBlock(Blocks.HAY_BLOCK)) { 184 | potential += hayBaleStack.stackSize * hayBaleEnergy; 185 | } 186 | 187 | return potential; 188 | } 189 | 190 | private int getOutputCapacity() { 191 | ItemStack dirtStack = slots[dirtSlotIndex]; 192 | if (dirtStack == null) { 193 | return getInventoryStackLimit() * hayBaleEnergy; 194 | } 195 | if (dirtStack.getItem() != Item.getItemFromBlock(Blocks.DIRT)) { 196 | return 0; 197 | } 198 | return (getInventoryStackLimit() - dirtStack.stackSize) * hayBaleEnergy; 199 | } 200 | 201 | @Override 202 | public NBTTagCompound writeToNBT(NBTTagCompound compound) { 203 | super.writeToNBT(compound); 204 | 205 | if (hasCustomName()) { 206 | compound.setString("customName", customName); 207 | } 208 | 209 | compound.setInteger("energy", energy); 210 | 211 | NBTTagList items = new NBTTagList(); 212 | for (int slotIndex = 0; slotIndex < slots.length; slotIndex++) { 213 | ItemStack itemStack = slots[slotIndex]; 214 | if (itemStack != null) { 215 | NBTTagCompound item = new NBTTagCompound(); 216 | item.setInteger("slot", slotIndex); 217 | itemStack.writeToNBT(item); 218 | items.appendTag(item); 219 | } 220 | } 221 | compound.setTag("items", items); 222 | 223 | compound.setInteger("energy", energy); 224 | 225 | return compound; 226 | } 227 | 228 | @Override 229 | public void readFromNBT(NBTTagCompound compound) { 230 | super.readFromNBT(compound); 231 | 232 | customName = compound.getString("customName"); 233 | 234 | energy = compound.getInteger("energy"); 235 | 236 | Arrays.fill(slots, null); 237 | NBTTagList items = compound.getTagList("items", 10); 238 | for (int itemIndex = 0; itemIndex < items.tagCount(); itemIndex++) { 239 | NBTTagCompound item = items.getCompoundTagAt(itemIndex); 240 | int slotIndex = item.getInteger("slot"); 241 | ItemStack itemStack = ItemStack.loadItemStackFromNBT(item); 242 | slots[slotIndex] = itemStack; 243 | } 244 | 245 | energy = compound.getInteger("energy"); 246 | } 247 | 248 | @Override 249 | public int getSizeInventory() { 250 | return slots.length; 251 | } 252 | 253 | @Override 254 | public ItemStack getStackInSlot(int index) { 255 | return slots[index]; 256 | } 257 | 258 | @Override 259 | public ItemStack decrStackSize(int index, int count) { 260 | ItemStack stack = slots[index]; 261 | if (stack == null) { 262 | return null; 263 | } 264 | if (count >= stack.stackSize) { 265 | slots[index] = null; 266 | return stack; 267 | } 268 | return stack.splitStack(count); 269 | } 270 | 271 | @Override 272 | public ItemStack removeStackFromSlot(int index) { 273 | ItemStack stack = slots[index]; 274 | slots[index] = null; 275 | return stack; 276 | } 277 | 278 | @Override 279 | public void setInventorySlotContents(int index, @Nullable ItemStack stack) { 280 | slots[index] = stack; 281 | } 282 | 283 | @Override 284 | public int getInventoryStackLimit() { 285 | return 64; 286 | } 287 | 288 | @Override 289 | public boolean isUseableByPlayer(EntityPlayer player) { 290 | return true; 291 | } 292 | 293 | @Override 294 | public void openInventory(EntityPlayer player) { 295 | 296 | } 297 | 298 | @Override 299 | public void closeInventory(EntityPlayer player) { 300 | 301 | } 302 | 303 | @Override 304 | public boolean isItemValidForSlot(int index, ItemStack stack) { 305 | if (index == hayBaleSlotIndex) { 306 | return stack.getItem() == Item.getItemFromBlock(Blocks.HAY_BLOCK); 307 | } 308 | //noinspection RedundantIfStatement 309 | if (index == dirtSlotIndex) { 310 | return false; 311 | } 312 | return true; 313 | } 314 | 315 | @Override 316 | public int getField(int id) { 317 | switch (id) { 318 | case 0: 319 | return energy; 320 | default: 321 | return 0; 322 | } 323 | } 324 | 325 | @Override 326 | public void setField(int id, int value) { 327 | switch (id) { 328 | case 0: 329 | energy = value; 330 | break; 331 | } 332 | } 333 | 334 | @Override 335 | public int getFieldCount() { 336 | return 1; 337 | } 338 | 339 | @Override 340 | public void clear() { 341 | for (int slotIndex = 0; slotIndex < slots.length; slotIndex++) { 342 | slots[slotIndex] = null; 343 | } 344 | } 345 | 346 | @Override 347 | public String getName() { 348 | return hasCustomName() ? customName : "container.henhouse"; 349 | } 350 | 351 | @Override 352 | public boolean hasCustomName() { 353 | return customName != null && customName.length() > 0; 354 | } 355 | 356 | @Override 357 | public ITextComponent getDisplayName() { 358 | return hasCustomName() ? new TextComponentString(getName()) : new TextComponentTranslation(getName()); 359 | } 360 | 361 | public void setCustomName(String customName) { 362 | this.customName = customName; 363 | } 364 | 365 | @Override 366 | public Container createContainer(InventoryPlayer inventoryplayer) { 367 | return new ContainerHenhouse(inventoryplayer, this); 368 | } 369 | 370 | @Override 371 | @SideOnly(Side.CLIENT) 372 | public GuiContainer createGui(InventoryPlayer inventoryplayer) { 373 | return new GuiHenhouse(inventoryplayer, this); 374 | } 375 | 376 | public int getEnergy() { 377 | return energy; 378 | } 379 | 380 | @Override 381 | public int[] getSlotsForFace(EnumFacing side) { 382 | switch (side) { 383 | case DOWN: 384 | int itemSlotCount = lastItemSlotIndex - firstItemSlotIndex + 1; 385 | int[] itemSlots = new int[itemSlotCount + 1]; 386 | itemSlots[0] = dirtSlotIndex; 387 | for (int resultIndex = 0; resultIndex < itemSlotCount; resultIndex++) { 388 | itemSlots[resultIndex + 1] = firstItemSlotIndex + resultIndex; 389 | } 390 | return itemSlots; 391 | case UP: 392 | return new int[]{hayBaleSlotIndex}; 393 | default: 394 | return new int[0]; 395 | } 396 | } 397 | 398 | @Override 399 | public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) { 400 | return isItemValidForSlot(index, itemStackIn); 401 | } 402 | 403 | @Override 404 | public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { 405 | return true; 406 | } 407 | } 408 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/henhouse/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.henhouse; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/ChickensJeiPlugin.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import com.setycz.chickens.ChickensRegistry; 5 | import com.setycz.chickens.ChickensRegistryItem; 6 | import com.setycz.chickens.jei.breeding.BreedingRecipeCategory; 7 | import com.setycz.chickens.jei.breeding.BreedingRecipeHandler; 8 | import com.setycz.chickens.jei.breeding.BreedingRecipeWrapper; 9 | import com.setycz.chickens.jei.drop.DropRecipeCategory; 10 | import com.setycz.chickens.jei.drop.DropRecipeHandler; 11 | import com.setycz.chickens.jei.drop.DropRecipeWrapper; 12 | import com.setycz.chickens.jei.henhousing.HenhousingRecipeCategory; 13 | import com.setycz.chickens.jei.henhousing.HenhousingRecipeHandler; 14 | import com.setycz.chickens.jei.henhousing.HenhousingRecipeWrapper; 15 | import com.setycz.chickens.jei.laying.LayingRecipeCategory; 16 | import com.setycz.chickens.jei.laying.LayingRecipeHandler; 17 | import com.setycz.chickens.jei.laying.LayingRecipeWrapper; 18 | import com.setycz.chickens.jei.throwing.ThrowingRecipeCategory; 19 | import com.setycz.chickens.jei.throwing.ThrowingRecipeHandler; 20 | import com.setycz.chickens.jei.throwing.ThrowingRecipeWrapper; 21 | import mezz.jei.api.*; 22 | import mezz.jei.api.ingredients.IModIngredientRegistration; 23 | import net.minecraft.init.Blocks; 24 | import net.minecraft.item.ItemStack; 25 | 26 | import java.util.ArrayList; 27 | import java.util.List; 28 | 29 | /** 30 | * Created by setyc on 21.02.2016. 31 | */ 32 | @JEIPlugin 33 | public class ChickensJeiPlugin implements IModPlugin { 34 | 35 | @Override 36 | public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) { 37 | 38 | } 39 | 40 | @Override 41 | public void registerIngredients(IModIngredientRegistration registry) { 42 | 43 | } 44 | 45 | @Override 46 | public void register(IModRegistry registry) { 47 | IJeiHelpers jeiHelpers = registry.getJeiHelpers(); 48 | registry.addRecipeCategories( 49 | new LayingRecipeCategory(jeiHelpers.getGuiHelper()), 50 | new BreedingRecipeCategory(jeiHelpers.getGuiHelper()), 51 | new DropRecipeCategory(jeiHelpers.getGuiHelper()), 52 | new ThrowingRecipeCategory(jeiHelpers.getGuiHelper()), 53 | new HenhousingRecipeCategory(jeiHelpers.getGuiHelper()) 54 | ); 55 | registry.addRecipeHandlers( 56 | new LayingRecipeHandler(), 57 | new BreedingRecipeHandler(), 58 | new DropRecipeHandler(), 59 | new ThrowingRecipeHandler(), 60 | new HenhousingRecipeHandler() 61 | ); 62 | registry.addRecipes(getLayingRecipes()); 63 | registry.addRecipes(getBreedingRecipes()); 64 | registry.addRecipes(getDropRecipes()); 65 | registry.addRecipes(getThrowRecipes()); 66 | registry.addRecipes(getHenhouseRecipes()); 67 | } 68 | 69 | @Override 70 | public void onRuntimeAvailable(IJeiRuntime jeiRuntime) { 71 | 72 | } 73 | 74 | private List getLayingRecipes() { 75 | List result = new ArrayList(); 76 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 77 | result.add(new LayingRecipeWrapper( 78 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getId()), 79 | chicken.createLayItem(), 80 | chicken.getMinLayTime(), chicken.getMaxLayTime() 81 | )); 82 | } 83 | return result; 84 | } 85 | 86 | private List getDropRecipes() { 87 | List result = new ArrayList(); 88 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 89 | result.add(new DropRecipeWrapper( 90 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getId()), 91 | chicken.createDropItem() 92 | )); 93 | } 94 | return result; 95 | } 96 | 97 | private List getBreedingRecipes() { 98 | List result = new ArrayList(); 99 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 100 | if (chicken.isBreedable()) { 101 | //noinspection ConstantConditions 102 | result.add(new BreedingRecipeWrapper( 103 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getParent1().getId()), 104 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getParent2().getId()), 105 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getId()), 106 | ChickensRegistry.getChildChance(chicken) 107 | )); 108 | } 109 | } 110 | return result; 111 | } 112 | 113 | private List getThrowRecipes() { 114 | List result = new ArrayList(); 115 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 116 | if (chicken.isDye()) { 117 | result.add(new ThrowingRecipeWrapper( 118 | new ItemStack(ChickensMod.coloredEgg, 1, chicken.getDyeMetadata()), 119 | new ItemStack(ChickensMod.spawnEgg, 1, chicken.getId()))); 120 | } 121 | } 122 | return result; 123 | } 124 | 125 | private List getHenhouseRecipes() { 126 | List henhouseRecipes = new ArrayList(); 127 | henhouseRecipes.add(new HenhousingRecipeWrapper(new ItemStack(Blocks.HAY_BLOCK), new ItemStack(Blocks.DIRT))); 128 | return henhouseRecipes; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/breeding/BreedingRecipeCategory.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.breeding; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import mezz.jei.api.IGuiHelper; 5 | import mezz.jei.api.gui.*; 6 | import mezz.jei.api.ingredients.IIngredients; 7 | import mezz.jei.api.recipe.IRecipeCategory; 8 | import mezz.jei.api.recipe.IRecipeWrapper; 9 | import mezz.jei.util.Translator; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.ResourceLocation; 12 | 13 | import javax.annotation.Nullable; 14 | 15 | /** 16 | * Created by setyc on 21.02.2016. 17 | */ 18 | public class BreedingRecipeCategory implements IRecipeCategory { 19 | public static final String UID = "chickens.Breeding"; 20 | private final String title; 21 | private final IDrawableStatic background; 22 | private final IDrawableAnimated arrow; 23 | private final IDrawableStatic icon; 24 | 25 | public BreedingRecipeCategory(IGuiHelper guiHelper) { 26 | title = Translator.translateToLocal("gui.breeding"); 27 | 28 | ResourceLocation location = new ResourceLocation(ChickensMod.MODID, "textures/gui/breeding.png"); 29 | background = guiHelper.createDrawable(location, 0, 0, 82, 54); 30 | 31 | IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, 82, 0, 7, 7); 32 | arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.BOTTOM, false); 33 | 34 | ResourceLocation iconLocation = new ResourceLocation(ChickensMod.MODID, "textures/gui/breeding_icon.png"); 35 | icon = guiHelper.createDrawable(iconLocation, 0, 0, 16, 16); 36 | } 37 | 38 | @Override 39 | public String getUid() { 40 | return UID; 41 | } 42 | 43 | @Override 44 | public String getTitle() { 45 | return title; 46 | } 47 | 48 | @Override 49 | public IDrawable getBackground() { 50 | return background; 51 | } 52 | 53 | @Nullable 54 | @Override 55 | public IDrawable getIcon() { 56 | return icon; 57 | } 58 | 59 | @Override 60 | public void drawExtras(Minecraft minecraft) { 61 | arrow.draw(minecraft, 37, 5); 62 | } 63 | 64 | @Override 65 | @Deprecated 66 | public void drawAnimations(Minecraft minecraft) { 67 | 68 | } 69 | 70 | @Override 71 | @Deprecated 72 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper) { 73 | 74 | } 75 | 76 | @Override 77 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { 78 | IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); 79 | 80 | int parent1Slot = 0; 81 | guiItemStacks.init(parent1Slot, true, 10, 15); 82 | guiItemStacks.set(ingredients); 83 | 84 | int parent2Slot = 1; 85 | guiItemStacks.init(parent2Slot, true, 53, 15); 86 | guiItemStacks.set(ingredients); 87 | 88 | int childrenSlot = 2; 89 | guiItemStacks.init(childrenSlot, false, 33, 30); 90 | guiItemStacks.set(ingredients); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/breeding/BreedingRecipeHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.breeding; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.IRecipeHandler; 5 | import mezz.jei.api.recipe.IRecipeWrapper; 6 | import mezz.jei.util.Ingredients; 7 | import net.minecraft.item.ItemStack; 8 | 9 | /** 10 | * Created by setyc on 21.02.2016. 11 | */ 12 | public class BreedingRecipeHandler implements IRecipeHandler { 13 | @Override 14 | public Class getRecipeClass() { 15 | return BreedingRecipeWrapper.class; 16 | } 17 | 18 | @Override 19 | @Deprecated 20 | public String getRecipeCategoryUid() { 21 | return BreedingRecipeCategory.UID; 22 | } 23 | 24 | @Override 25 | public String getRecipeCategoryUid(BreedingRecipeWrapper recipe) { 26 | return BreedingRecipeCategory.UID; 27 | } 28 | 29 | @Override 30 | public IRecipeWrapper getRecipeWrapper(BreedingRecipeWrapper recipe) { 31 | return recipe; 32 | } 33 | 34 | @Override 35 | public boolean isRecipeValid(BreedingRecipeWrapper recipe) { 36 | IIngredients ingredients = new Ingredients(); 37 | recipe.getIngredients(ingredients); 38 | return ingredients.getInputs(ItemStack.class).size() > 1 && ingredients.getOutputs(ItemStack.class).size() > 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/breeding/BreedingRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.breeding; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.BlankRecipeWrapper; 5 | import mezz.jei.util.Translator; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.item.ItemStack; 8 | 9 | import java.awt.*; 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by setyc on 21.02.2016. 15 | */ 16 | public class BreedingRecipeWrapper extends BlankRecipeWrapper { 17 | private final List parents; 18 | private final ItemStack child; 19 | private final int chance; 20 | 21 | public BreedingRecipeWrapper(ItemStack parent1, ItemStack parent2, ItemStack child, float chance) { 22 | parents = new ArrayList(); 23 | parents.add(parent1); 24 | parents.add(parent2); 25 | this.child = child; 26 | this.chance = Math.round(chance); 27 | } 28 | 29 | @Override 30 | public void getIngredients(IIngredients ingredients) { 31 | ingredients.setInputs(ItemStack.class, parents); 32 | ingredients.setOutput(ItemStack.class, child); 33 | } 34 | 35 | @Override 36 | public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) { 37 | String message = Translator.translateToLocalFormatted("gui.breeding.time", chance); 38 | minecraft.fontRendererObj.drawString(message, 32, 25, Color.gray.getRGB()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/breeding/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei.breeding; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/drop/DropRecipeCategory.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.drop; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import mezz.jei.api.IGuiHelper; 5 | import mezz.jei.api.gui.*; 6 | import mezz.jei.api.ingredients.IIngredients; 7 | import mezz.jei.api.recipe.IRecipeCategory; 8 | import mezz.jei.api.recipe.IRecipeWrapper; 9 | import mezz.jei.util.Translator; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.ResourceLocation; 12 | 13 | import javax.annotation.Nonnull; 14 | import javax.annotation.Nullable; 15 | 16 | /** 17 | * Created by setyc on 21.02.2016. 18 | */ 19 | public class DropRecipeCategory implements IRecipeCategory { 20 | 21 | public static final String UID = "chickens.Drops"; 22 | private final IDrawableStatic background; 23 | private final IDrawableAnimated arrow; 24 | private final String title; 25 | private final IDrawableStatic icon; 26 | 27 | public DropRecipeCategory(IGuiHelper guiHelper) { 28 | title = Translator.translateToLocal("gui.drops"); 29 | 30 | ResourceLocation location = new ResourceLocation(ChickensMod.MODID, "textures/gui/drops.png"); 31 | background = guiHelper.createDrawable(location, 0, 0, 82, 54); 32 | 33 | IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, 82, 0, 13, 10); 34 | arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.LEFT, false); 35 | 36 | ResourceLocation iconLocation = new ResourceLocation(ChickensMod.MODID, "textures/gui/drops_icon.png"); 37 | icon = guiHelper.createDrawable(iconLocation, 0, 0, 16, 16); 38 | } 39 | 40 | @Override 41 | public String getUid() { 42 | return UID; 43 | } 44 | 45 | @Override 46 | public String getTitle() { 47 | return title; 48 | } 49 | 50 | @Override 51 | public IDrawable getBackground() { 52 | return background; 53 | } 54 | 55 | @Nullable 56 | @Override 57 | public IDrawable getIcon() { 58 | return icon; 59 | } 60 | 61 | @Override 62 | public void drawExtras(Minecraft minecraft) { 63 | arrow.draw(minecraft, 40, 21); 64 | } 65 | 66 | @Override 67 | @Deprecated 68 | public void drawAnimations(Minecraft minecraft) { 69 | } 70 | 71 | @Override 72 | @Deprecated 73 | public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) { 74 | } 75 | 76 | @Override 77 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { 78 | IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); 79 | 80 | int inputSlot = 0; 81 | guiItemStacks.init(inputSlot, true, 13, 15); 82 | guiItemStacks.set(ingredients); 83 | 84 | int outputSlot = 1; 85 | guiItemStacks.init(outputSlot, false, 57, 15); 86 | guiItemStacks.set(ingredients); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/drop/DropRecipeHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.drop; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.IRecipeHandler; 5 | import mezz.jei.api.recipe.IRecipeWrapper; 6 | import mezz.jei.util.Ingredients; 7 | import net.minecraft.item.ItemStack; 8 | 9 | /** 10 | * Created by setyc on 21.02.2016. 11 | */ 12 | public class DropRecipeHandler implements IRecipeHandler { 13 | @Override 14 | public Class getRecipeClass() { 15 | return DropRecipeWrapper.class; 16 | } 17 | 18 | @Override 19 | @Deprecated 20 | public String getRecipeCategoryUid() { 21 | return DropRecipeCategory.UID; 22 | } 23 | 24 | @Override 25 | public String getRecipeCategoryUid(DropRecipeWrapper recipe) { 26 | return DropRecipeCategory.UID; 27 | } 28 | 29 | @Override 30 | public IRecipeWrapper getRecipeWrapper(DropRecipeWrapper recipe) { 31 | return recipe; 32 | } 33 | 34 | @Override 35 | public boolean isRecipeValid(DropRecipeWrapper recipe) { 36 | IIngredients ingredients = new Ingredients(); 37 | recipe.getIngredients(ingredients); 38 | return ingredients.getInputs(ItemStack.class).size() > 0 && ingredients.getOutputs(ItemStack.class).size() > 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/drop/DropRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.drop; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.BlankRecipeWrapper; 5 | import net.minecraft.item.ItemStack; 6 | 7 | /** 8 | * Created by setyc on 21.02.2016. 9 | */ 10 | public class DropRecipeWrapper extends BlankRecipeWrapper { 11 | private final ItemStack chicken; 12 | private final ItemStack egg; 13 | 14 | public DropRecipeWrapper(ItemStack chicken, ItemStack drop) { 15 | this.chicken = chicken; 16 | this.egg = drop; 17 | } 18 | 19 | @Override 20 | public void getIngredients(IIngredients ingredients) { 21 | ingredients.setInput(ItemStack.class, chicken); 22 | ingredients.setOutput(ItemStack.class, egg); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/drop/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei.drop; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/henhousing/HenhousingRecipeCategory.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.henhousing; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import mezz.jei.api.IGuiHelper; 5 | import mezz.jei.api.gui.*; 6 | import mezz.jei.api.ingredients.IIngredients; 7 | import mezz.jei.api.recipe.IRecipeCategory; 8 | import mezz.jei.api.recipe.IRecipeWrapper; 9 | import mezz.jei.util.Translator; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.ResourceLocation; 12 | 13 | import javax.annotation.Nullable; 14 | 15 | /** 16 | * Created by setyc on 07.01.2017. 17 | */ 18 | public class HenhousingRecipeCategory implements IRecipeCategory { 19 | public static final String UID = "chickens.Henhousing"; 20 | private final String title; 21 | private final IDrawableStatic background; 22 | private final IDrawableAnimated arrow; 23 | private final IDrawableStatic icon; 24 | 25 | public HenhousingRecipeCategory(IGuiHelper guiHelper) { 26 | title = Translator.translateToLocal("gui.henhousing"); 27 | 28 | ResourceLocation location = new ResourceLocation(ChickensMod.MODID, "textures/gui/henhouse.png"); 29 | background = guiHelper.createDrawable(location, 18, 12, 72, 62); 30 | 31 | IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, 195, 0, 12, 57); 32 | arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.TOP, true); 33 | 34 | ResourceLocation iconLocation = new ResourceLocation(ChickensMod.MODID, "textures/gui/henhousing_icon.png"); 35 | icon = guiHelper.createDrawable(iconLocation, 0, 0, 16, 16); 36 | } 37 | 38 | @Override 39 | public String getUid() { 40 | return UID; 41 | } 42 | 43 | @Override 44 | public String getTitle() { 45 | return title; 46 | } 47 | 48 | @Override 49 | public IDrawable getBackground() { 50 | return background; 51 | } 52 | 53 | @Nullable 54 | @Override 55 | public IDrawable getIcon() { 56 | return icon; 57 | } 58 | 59 | @Override 60 | public void drawExtras(Minecraft minecraft) { 61 | arrow.draw(minecraft, 75 - 18, 14 - 12); 62 | } 63 | 64 | @Override 65 | @Deprecated 66 | public void drawAnimations(Minecraft minecraft) { 67 | 68 | } 69 | 70 | @Override 71 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper) { 72 | 73 | } 74 | 75 | @Override 76 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { 77 | IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); 78 | 79 | int inputSlot = 0; 80 | guiItemStacks.init(inputSlot, true, 24 - 18, 17 - 12); 81 | guiItemStacks.set(ingredients); 82 | 83 | int outputSlot = 1; 84 | guiItemStacks.init(outputSlot, false, 24 - 18, 54 - 12); 85 | guiItemStacks.set(ingredients); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/henhousing/HenhousingRecipeHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.henhousing; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.IRecipeHandler; 5 | import mezz.jei.api.recipe.IRecipeWrapper; 6 | import mezz.jei.util.Ingredients; 7 | import net.minecraft.item.ItemStack; 8 | 9 | /** 10 | * Created by setyc on 07.01.2017. 11 | */ 12 | public class HenhousingRecipeHandler implements IRecipeHandler { 13 | @Override 14 | public Class getRecipeClass() { 15 | return HenhousingRecipeWrapper.class; 16 | } 17 | 18 | @Override 19 | @Deprecated 20 | public String getRecipeCategoryUid() { 21 | return HenhousingRecipeCategory.UID; 22 | } 23 | 24 | @Override 25 | public String getRecipeCategoryUid(HenhousingRecipeWrapper recipe) { 26 | return HenhousingRecipeCategory.UID; 27 | } 28 | 29 | @Override 30 | public IRecipeWrapper getRecipeWrapper(HenhousingRecipeWrapper recipe) { 31 | return recipe; 32 | } 33 | 34 | @Override 35 | public boolean isRecipeValid(HenhousingRecipeWrapper recipe) { 36 | IIngredients ingredients = new Ingredients(); 37 | recipe.getIngredients(ingredients); 38 | return ingredients.getInputs(ItemStack.class).size() > 0 && ingredients.getOutputs(ItemStack.class).size() == 1; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/henhousing/HenhousingRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.henhousing; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.BlankRecipeWrapper; 5 | import net.minecraft.item.ItemStack; 6 | 7 | /** 8 | * Created by setyc on 07.01.2017. 9 | */ 10 | public class HenhousingRecipeWrapper extends BlankRecipeWrapper { 11 | 12 | private final ItemStack hayBale; 13 | private final ItemStack dirtBlock; 14 | 15 | public HenhousingRecipeWrapper(ItemStack hayBale, ItemStack dirtBlock) { 16 | this.hayBale = hayBale; 17 | this.dirtBlock = dirtBlock; 18 | } 19 | 20 | @Override 21 | public void getIngredients(IIngredients ingredients) { 22 | ingredients.setInput(ItemStack.class, hayBale); 23 | ingredients.setOutput(ItemStack.class, dirtBlock); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/henhousing/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei.henhousing; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/laying/LayingRecipeCategory.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.laying; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import mezz.jei.api.IGuiHelper; 5 | import mezz.jei.api.gui.*; 6 | import mezz.jei.api.ingredients.IIngredients; 7 | import mezz.jei.api.recipe.IRecipeCategory; 8 | import mezz.jei.api.recipe.IRecipeWrapper; 9 | import mezz.jei.util.Translator; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.ResourceLocation; 12 | 13 | import javax.annotation.Nullable; 14 | 15 | /** 16 | * Created by setyc on 21.02.2016. 17 | */ 18 | public class LayingRecipeCategory implements IRecipeCategory { 19 | 20 | public static final String UID = "chickens.Laying"; 21 | private final IDrawableStatic background; 22 | private final IDrawableAnimated arrow; 23 | private final String title; 24 | private final IDrawableStatic icon; 25 | 26 | public LayingRecipeCategory(IGuiHelper guiHelper) { 27 | title = Translator.translateToLocal("gui.laying"); 28 | 29 | ResourceLocation location = new ResourceLocation(ChickensMod.MODID, "textures/gui/laying.png"); 30 | background = guiHelper.createDrawable(location, 0, 0, 82, 54); 31 | 32 | IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, 82, 0, 13, 10); 33 | arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.LEFT, false); 34 | 35 | ResourceLocation iconLocation = new ResourceLocation(ChickensMod.MODID, "textures/gui/laying_icon.png"); 36 | icon = guiHelper.createDrawable(iconLocation, 0, 0, 16, 16); 37 | } 38 | 39 | @Override 40 | public String getUid() { 41 | return UID; 42 | } 43 | 44 | @Override 45 | public String getTitle() { 46 | return title; 47 | } 48 | 49 | @Override 50 | public IDrawable getBackground() { 51 | return background; 52 | } 53 | 54 | @Nullable 55 | @Override 56 | public IDrawable getIcon() { 57 | return icon; 58 | } 59 | 60 | @Override 61 | public void drawExtras(Minecraft minecraft) { 62 | arrow.draw(minecraft, 40, 21); 63 | } 64 | 65 | @Override 66 | @Deprecated 67 | public void drawAnimations(Minecraft minecraft) { 68 | } 69 | 70 | @Override 71 | @Deprecated 72 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper) { 73 | } 74 | 75 | @Override 76 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { 77 | IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); 78 | 79 | int inputSlot = 0; 80 | guiItemStacks.init(inputSlot, true, 13, 15); 81 | guiItemStacks.set(ingredients); 82 | 83 | int outputSlot = 1; 84 | guiItemStacks.init(outputSlot, false, 57, 15); 85 | guiItemStacks.set(ingredients); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/laying/LayingRecipeHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.laying; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.IRecipeHandler; 5 | import mezz.jei.api.recipe.IRecipeWrapper; 6 | import mezz.jei.util.Ingredients; 7 | import net.minecraft.item.ItemStack; 8 | 9 | /** 10 | * Created by setyc on 21.02.2016. 11 | */ 12 | public class LayingRecipeHandler implements IRecipeHandler { 13 | @Override 14 | public Class getRecipeClass() { 15 | return LayingRecipeWrapper.class; 16 | } 17 | 18 | @Override 19 | @Deprecated 20 | public String getRecipeCategoryUid() { 21 | return LayingRecipeCategory.UID; 22 | } 23 | 24 | @Override 25 | public String getRecipeCategoryUid(LayingRecipeWrapper recipe) { 26 | return LayingRecipeCategory.UID; 27 | } 28 | 29 | @Override 30 | public IRecipeWrapper getRecipeWrapper(LayingRecipeWrapper recipe) { 31 | return recipe; 32 | } 33 | 34 | @Override 35 | public boolean isRecipeValid(LayingRecipeWrapper recipe) { 36 | IIngredients ingredients = new Ingredients(); 37 | recipe.getIngredients(ingredients); 38 | return ingredients.getInputs(ItemStack.class).size() > 0 && ingredients.getOutputs(ItemStack.class).size() > 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/laying/LayingRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.laying; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.BlankRecipeWrapper; 5 | import mezz.jei.util.Translator; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.item.ItemStack; 8 | 9 | import javax.annotation.Nonnull; 10 | import java.awt.*; 11 | 12 | /** 13 | * Created by setyc on 21.02.2016. 14 | */ 15 | public class LayingRecipeWrapper extends BlankRecipeWrapper { 16 | private final ItemStack chicken; 17 | private final ItemStack egg; 18 | private final int minTime; 19 | private final int maxTime; 20 | 21 | public LayingRecipeWrapper(ItemStack chicken, ItemStack egg, int minTime, int maxTime) { 22 | this.minTime = minTime / 20 / 60; 23 | this.maxTime = maxTime / 20 / 60; 24 | this.chicken = chicken; 25 | this.egg = egg; 26 | } 27 | 28 | @Override 29 | public void getIngredients(IIngredients ingredients) { 30 | ingredients.setInput(ItemStack.class, chicken); 31 | ingredients.setOutput(ItemStack.class, egg); 32 | } 33 | 34 | @Override 35 | public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) { 36 | String message = Translator.translateToLocalFormatted("gui.laying.time", minTime, maxTime); 37 | minecraft.fontRendererObj.drawString(message, 24, 7, Color.gray.getRGB()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/laying/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei.laying; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/throwing/ThrowingRecipeCategory.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.throwing; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import mezz.jei.api.IGuiHelper; 5 | import mezz.jei.api.gui.*; 6 | import mezz.jei.api.ingredients.IIngredients; 7 | import mezz.jei.api.recipe.IRecipeCategory; 8 | import mezz.jei.api.recipe.IRecipeWrapper; 9 | import mezz.jei.util.Translator; 10 | import net.minecraft.client.Minecraft; 11 | import net.minecraft.util.ResourceLocation; 12 | 13 | import javax.annotation.Nullable; 14 | 15 | /** 16 | * Created by setyc on 07.01.2017. 17 | */ 18 | public class ThrowingRecipeCategory implements IRecipeCategory { 19 | public static final String UID = "chickens.Throws"; 20 | private final String title; 21 | private final IDrawableStatic background; 22 | private final IDrawableStatic icon; 23 | private final IDrawableAnimated arrow; 24 | 25 | public ThrowingRecipeCategory(IGuiHelper guiHelper) { 26 | title = Translator.translateToLocal("gui.throws"); 27 | 28 | ResourceLocation location = new ResourceLocation(ChickensMod.MODID, "textures/gui/throws.png"); 29 | background = guiHelper.createDrawable(location, 0, 0, 82, 54); 30 | 31 | IDrawableStatic arrowDrawable = guiHelper.createDrawable(location, 82, 0, 13, 10); 32 | arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.LEFT, false); 33 | 34 | ResourceLocation iconLocation = new ResourceLocation(ChickensMod.MODID, "textures/gui/throws_icon.png"); 35 | icon = guiHelper.createDrawable(iconLocation, 0, 0, 16, 16); 36 | } 37 | 38 | @Override 39 | public String getUid() { 40 | return UID; 41 | } 42 | 43 | @Override 44 | public String getTitle() { 45 | return title; 46 | } 47 | 48 | @Override 49 | public IDrawable getBackground() { 50 | return background; 51 | } 52 | 53 | @Nullable 54 | @Override 55 | public IDrawable getIcon() { 56 | return icon; 57 | } 58 | 59 | @Override 60 | public void drawExtras(Minecraft minecraft) { 61 | arrow.draw(minecraft, 32, 21); 62 | } 63 | 64 | @Override 65 | @Deprecated 66 | public void drawAnimations(Minecraft minecraft) { 67 | 68 | } 69 | 70 | @Override 71 | @Deprecated 72 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper) { 73 | 74 | } 75 | 76 | @Override 77 | public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) { 78 | IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); 79 | 80 | int inputSlot = 0; 81 | guiItemStacks.init(inputSlot, true, 10, 15); 82 | guiItemStacks.set(ingredients); 83 | 84 | int outputSlot = 1; 85 | guiItemStacks.init(outputSlot, false, 55, 15); 86 | guiItemStacks.set(ingredients); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/throwing/ThrowingRecipeHandler.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.throwing; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.IRecipeHandler; 5 | import mezz.jei.api.recipe.IRecipeWrapper; 6 | import mezz.jei.util.Ingredients; 7 | import net.minecraft.item.ItemStack; 8 | 9 | /** 10 | * Created by setyc on 07.01.2017. 11 | */ 12 | public class ThrowingRecipeHandler implements IRecipeHandler { 13 | 14 | @Override 15 | public Class getRecipeClass() { 16 | return ThrowingRecipeWrapper.class; 17 | } 18 | 19 | @Override 20 | @Deprecated 21 | public String getRecipeCategoryUid() { 22 | return ThrowingRecipeCategory.UID; 23 | } 24 | 25 | @Override 26 | public String getRecipeCategoryUid(ThrowingRecipeWrapper recipe) { 27 | return ThrowingRecipeCategory.UID; 28 | } 29 | 30 | @Override 31 | public IRecipeWrapper getRecipeWrapper(ThrowingRecipeWrapper recipe) { 32 | return recipe; 33 | } 34 | 35 | @Override 36 | public boolean isRecipeValid(ThrowingRecipeWrapper recipe) { 37 | IIngredients ingredients = new Ingredients(); 38 | recipe.getIngredients(ingredients); 39 | return ingredients.getInputs(ItemStack.class).size() == 1 && ingredients.getOutputs(ItemStack.class).size() == 1; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/throwing/ThrowingRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.jei.throwing; 2 | 3 | import mezz.jei.api.ingredients.IIngredients; 4 | import mezz.jei.api.recipe.BlankRecipeWrapper; 5 | import net.minecraft.item.ItemStack; 6 | 7 | /** 8 | * Created by setyc on 07.01.2017. 9 | */ 10 | public class ThrowingRecipeWrapper extends BlankRecipeWrapper { 11 | 12 | private final ItemStack colorEgg; 13 | private final ItemStack chicken; 14 | 15 | public ThrowingRecipeWrapper(ItemStack colorEgg, ItemStack chicken) { 16 | this.colorEgg = colorEgg; 17 | this.chicken = chicken; 18 | } 19 | 20 | @Override 21 | public void getIngredients(IIngredients ingredients) { 22 | ingredients.setInput(ItemStack.class, colorEgg); 23 | ingredients.setOutput(ItemStack.class, chicken); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/jei/throwing/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.jei.throwing; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/liquidEgg/ItemLiquidEgg.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.liquidEgg; 2 | 3 | import com.setycz.chickens.IColorSource; 4 | import com.setycz.chickens.LiquidEggRegistry; 5 | import com.setycz.chickens.LiquidEggRegistryItem; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.material.Material; 8 | import net.minecraft.creativetab.CreativeTabs; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraft.init.Blocks; 11 | import net.minecraft.init.SoundEvents; 12 | import net.minecraft.item.Item; 13 | import net.minecraft.item.ItemEgg; 14 | import net.minecraft.item.ItemStack; 15 | import net.minecraft.nbt.NBTTagCompound; 16 | import net.minecraft.stats.StatList; 17 | import net.minecraft.util.*; 18 | import net.minecraft.util.math.BlockPos; 19 | import net.minecraft.util.math.RayTraceResult; 20 | import net.minecraft.util.text.translation.I18n; 21 | import net.minecraft.world.World; 22 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 23 | import net.minecraftforge.fml.relauncher.Side; 24 | import net.minecraftforge.fml.relauncher.SideOnly; 25 | 26 | import javax.annotation.Nullable; 27 | import java.util.List; 28 | 29 | /** 30 | * Created by setyc on 14.02.2016. 31 | */ 32 | public class ItemLiquidEgg extends ItemEgg implements IColorSource { 33 | public ItemLiquidEgg() { 34 | setHasSubtypes(true); 35 | } 36 | 37 | @SideOnly(Side.CLIENT) 38 | @Override 39 | public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) { 40 | super.addInformation(stack, playerIn, tooltip, advanced); 41 | tooltip.add(I18n.translateToLocal("item.liquid_egg.tooltip")); 42 | } 43 | 44 | @Override 45 | public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) { 46 | for (LiquidEggRegistryItem liquid : LiquidEggRegistry.getAll()) { 47 | subItems.add(new ItemStack(itemIn, 1, liquid.getId())); 48 | } 49 | } 50 | 51 | @Override 52 | public int getColorFromItemStack(ItemStack stack, int renderPass) { 53 | return LiquidEggRegistry.findById(stack.getMetadata()).getEggColor(); 54 | } 55 | 56 | @Override 57 | public String getItemStackDisplayName(ItemStack stack) { 58 | Block liquid = LiquidEggRegistry.findById(stack.getMetadata()).getLiquid(); 59 | return I18n.translateToLocal(getUnlocalizedName() + "." + liquid.getUnlocalizedName().substring(5) + ".name"); 60 | } 61 | 62 | @Override 63 | public ActionResult onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { 64 | RayTraceResult raytraceresult = this.rayTrace(worldIn, playerIn, false); 65 | 66 | //noinspection ConstantConditions 67 | if (raytraceresult == null) { 68 | return new ActionResult(EnumActionResult.PASS, itemStackIn); 69 | } else if (raytraceresult.typeOfHit != RayTraceResult.Type.BLOCK) { 70 | return new ActionResult(EnumActionResult.PASS, itemStackIn); 71 | } else { 72 | BlockPos blockpos = raytraceresult.getBlockPos(); 73 | if (!worldIn.isBlockModifiable(playerIn, blockpos)) { 74 | return new ActionResult(EnumActionResult.FAIL, itemStackIn); 75 | } else { 76 | boolean flag1 = worldIn.getBlockState(blockpos).getBlock().isReplaceable(worldIn, blockpos); 77 | BlockPos blockPos1 = flag1 && raytraceresult.sideHit == EnumFacing.UP ? blockpos : blockpos.offset(raytraceresult.sideHit); 78 | 79 | Block liquid = LiquidEggRegistry.findById(itemStackIn.getMetadata()).getLiquid(); 80 | if (!playerIn.canPlayerEdit(blockPos1, raytraceresult.sideHit, itemStackIn)) { 81 | return new ActionResult(EnumActionResult.FAIL, itemStackIn); 82 | } else if (this.tryPlaceContainedLiquid(playerIn, worldIn, blockPos1, liquid)) { 83 | //noinspection ConstantConditions 84 | playerIn.addStat(StatList.getObjectUseStats(this)); 85 | return !playerIn.capabilities.isCreativeMode ? new ActionResult(EnumActionResult.SUCCESS, new ItemStack(itemStackIn.getItem(), itemStackIn.stackSize - 1, itemStackIn.getMetadata())) : new ActionResult(EnumActionResult.SUCCESS, itemStackIn); 86 | } else { 87 | return new ActionResult(EnumActionResult.FAIL, itemStackIn); 88 | } 89 | } 90 | } 91 | } 92 | 93 | public boolean tryPlaceContainedLiquid(@Nullable EntityPlayer playerIn, World worldIn, BlockPos pos, Block liquid) { 94 | Material material = worldIn.getBlockState(pos).getMaterial(); 95 | boolean flag = !material.isSolid(); 96 | 97 | if (!worldIn.isAirBlock(pos) && !flag) { 98 | return false; 99 | } else { 100 | if (worldIn.provider.doesWaterVaporize() && liquid == Blocks.FLOWING_WATER) { 101 | int i = pos.getX(); 102 | int j = pos.getY(); 103 | int k = pos.getZ(); 104 | worldIn.playSound(playerIn, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F); 105 | 106 | for (int l = 0; l < 8; ++l) { 107 | worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D); 108 | } 109 | } else { 110 | if (!worldIn.isRemote && flag && !material.isLiquid()) { 111 | worldIn.destroyBlock(pos, true); 112 | } 113 | 114 | worldIn.setBlockState(pos, liquid.getDefaultState(), 3); 115 | } 116 | 117 | return true; 118 | } 119 | } 120 | 121 | @Override 122 | public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) { 123 | return new LiquidEggFluidWrapper(stack); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/liquidEgg/LiquidEggFluidWrapper.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.liquidEgg; 2 | 3 | import com.setycz.chickens.LiquidEggRegistry; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.util.EnumFacing; 6 | import net.minecraftforge.common.capabilities.Capability; 7 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 8 | import net.minecraftforge.fluids.Fluid; 9 | import net.minecraftforge.fluids.FluidStack; 10 | import net.minecraftforge.fluids.capability.CapabilityFluidHandler; 11 | import net.minecraftforge.fluids.capability.FluidTankProperties; 12 | import net.minecraftforge.fluids.capability.IFluidHandler; 13 | import net.minecraftforge.fluids.capability.IFluidTankProperties; 14 | 15 | import javax.annotation.Nullable; 16 | 17 | /** 18 | * Created by setyc on 13.12.2016. 19 | */ 20 | @SuppressWarnings("WeakerAccess") 21 | public class LiquidEggFluidWrapper implements IFluidHandler, ICapabilityProvider { 22 | 23 | private final ItemStack container; 24 | 25 | public LiquidEggFluidWrapper(ItemStack container) { 26 | this.container = container; 27 | } 28 | 29 | @Override 30 | public boolean hasCapability(Capability capability, @Nullable EnumFacing facing) { 31 | return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY; 32 | } 33 | 34 | @Override 35 | @Nullable 36 | public T getCapability(Capability capability, @Nullable EnumFacing facing) { 37 | if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { 38 | return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(this); 39 | } 40 | return null; 41 | } 42 | 43 | @Override 44 | public IFluidTankProperties[] getTankProperties() { 45 | return new FluidTankProperties[]{new FluidTankProperties(getFluid(), Fluid.BUCKET_VOLUME)}; 46 | } 47 | 48 | @Override 49 | public int fill(FluidStack resource, boolean doFill) { 50 | return 0; 51 | } 52 | 53 | @Nullable 54 | @Override 55 | public FluidStack drain(FluidStack resource, boolean doDrain) { 56 | FluidStack fluidStack = getFluid(); 57 | if (!resource.isFluidEqual(fluidStack)) { 58 | return null; 59 | } 60 | 61 | return drain(resource.amount, doDrain); 62 | } 63 | 64 | private FluidStack getFluid() { 65 | Fluid fluid = LiquidEggRegistry.findById(container.getMetadata()).getFluid(); 66 | return new FluidStack(fluid, Fluid.BUCKET_VOLUME); 67 | } 68 | 69 | @Nullable 70 | @Override 71 | public FluidStack drain(int maxDrain, boolean doDrain) { 72 | if (container.stackSize < 1 || maxDrain < Fluid.BUCKET_VOLUME) { 73 | return null; 74 | } 75 | 76 | FluidStack fluidStack = getFluid(); 77 | if (doDrain) { 78 | container.stackSize--; 79 | } 80 | return fluidStack; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/liquidEgg/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.liquidEgg; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/spawnEgg/ItemSpawnEgg.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.spawnEgg; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import com.setycz.chickens.ChickensRegistry; 5 | import com.setycz.chickens.ChickensRegistryItem; 6 | import com.setycz.chickens.IColorSource; 7 | import com.setycz.chickens.chicken.EntityChickensChicken; 8 | import net.minecraft.creativetab.CreativeTabs; 9 | import net.minecraft.entity.EntityList; 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.item.Item; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.nbt.NBTTagCompound; 14 | import net.minecraft.util.EnumActionResult; 15 | import net.minecraft.util.EnumFacing; 16 | import net.minecraft.util.EnumHand; 17 | import net.minecraft.util.math.BlockPos; 18 | import net.minecraft.util.text.translation.I18n; 19 | import net.minecraft.world.World; 20 | 21 | import java.util.List; 22 | 23 | /** 24 | * Created by setyc on 12.02.2016. 25 | */ 26 | public class ItemSpawnEgg extends Item implements IColorSource { 27 | public ItemSpawnEgg() { 28 | setHasSubtypes(true); 29 | } 30 | 31 | @Override 32 | public void getSubItems(Item itemIn, CreativeTabs tab, List subItems) { 33 | for (ChickensRegistryItem chicken : ChickensRegistry.getItems()) { 34 | subItems.add(new ItemStack(itemIn, 1, chicken.getId())); 35 | } 36 | } 37 | 38 | @Override 39 | public String getItemStackDisplayName(ItemStack stack) { 40 | ChickensRegistryItem chickenDescription = ChickensRegistry.getByType(stack.getMetadata()); 41 | return I18n.translateToLocal("entity." + chickenDescription.getEntityName() + ".name"); 42 | } 43 | 44 | 45 | @Override 46 | public int getColorFromItemStack(ItemStack stack, int renderPass) { 47 | ChickensRegistryItem chickenDescription = ChickensRegistry.getByType(stack.getMetadata()); 48 | return renderPass == 0 ? chickenDescription.getBgColor() : chickenDescription.getFgColor(); 49 | } 50 | 51 | @Override 52 | public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { 53 | if (!worldIn.isRemote) { 54 | BlockPos correlatedPos = correctPosition(pos, facing); 55 | activate(stack, worldIn, correlatedPos, stack.getMetadata()); 56 | if (!playerIn.capabilities.isCreativeMode) { 57 | stack.stackSize--; 58 | } 59 | } 60 | return EnumActionResult.SUCCESS; 61 | } 62 | 63 | private BlockPos correctPosition(BlockPos pos, EnumFacing side) { 64 | final int[] offsetsXForSide = new int[]{0, 0, 0, 0, -1, 1}; 65 | final int[] offsetsYForSide = new int[]{-1, 1, 0, 0, 0, 0}; 66 | final int[] offsetsZForSide = new int[]{0, 0, -1, 1, 0, 0}; 67 | 68 | int posX = pos.getX() + offsetsXForSide[side.ordinal()]; 69 | int posY = pos.getY() + offsetsYForSide[side.ordinal()]; 70 | int posZ = pos.getZ() + offsetsZForSide[side.ordinal()]; 71 | 72 | return new BlockPos(posX, posY, posZ); 73 | } 74 | 75 | private void activate(ItemStack stack, World worldIn, BlockPos pos, int metadata) { 76 | String entityName = ChickensMod.MODID + "." + ChickensMod.CHICKEN; 77 | EntityChickensChicken entity = (EntityChickensChicken) EntityList.createEntityByName(entityName, worldIn); 78 | if (entity == null) { 79 | return; 80 | } 81 | entity.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); 82 | entity.onInitialSpawn(worldIn.getDifficultyForLocation(pos), null); 83 | entity.setChickenType(metadata); 84 | 85 | NBTTagCompound stackNBT = stack.getTagCompound(); 86 | if (stackNBT != null) { 87 | NBTTagCompound entityNBT = entity.writeToNBT(new NBTTagCompound()); 88 | entityNBT.merge(stackNBT); 89 | entity.readEntityFromNBT(entityNBT); 90 | } 91 | 92 | worldIn.spawnEntityInWorld(entity); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/spawnEgg/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by setyc on 10.12.2016. 3 | */ 4 | @ParametersAreNonnullByDefault 5 | @MethodsReturnNonnullByDefault 6 | package com.setycz.chickens.spawnEgg; 7 | 8 | import mcp.MethodsReturnNonnullByDefault; 9 | 10 | import javax.annotation.ParametersAreNonnullByDefault; -------------------------------------------------------------------------------- /src/main/java/com/setycz/chickens/waila/ChickensEntityProvider.java: -------------------------------------------------------------------------------- 1 | package com.setycz.chickens.waila; 2 | 3 | import com.setycz.chickens.ChickensMod; 4 | import com.setycz.chickens.chicken.EntityChickensChicken; 5 | import mcp.mobius.waila.api.IWailaConfigHandler; 6 | import mcp.mobius.waila.api.IWailaEntityAccessor; 7 | import mcp.mobius.waila.api.IWailaEntityProvider; 8 | import mcp.mobius.waila.api.IWailaRegistrar; 9 | import net.minecraft.entity.Entity; 10 | import net.minecraft.entity.player.EntityPlayerMP; 11 | import net.minecraft.nbt.NBTTagCompound; 12 | import net.minecraft.util.text.translation.I18n; 13 | import net.minecraft.world.World; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * Created by setyc on 20.02.2016. 19 | */ 20 | @SuppressWarnings("unused") 21 | public class ChickensEntityProvider implements IWailaEntityProvider { 22 | 23 | private static final ChickensEntityProvider INSTANCE = new ChickensEntityProvider(); 24 | 25 | public static void load(IWailaRegistrar registrar) { 26 | registrar.registerBodyProvider(INSTANCE, EntityChickensChicken.class); 27 | } 28 | 29 | @Override 30 | public Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config) { 31 | return null; 32 | } 33 | 34 | @Override 35 | public List getWailaHead(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { 36 | return null; 37 | } 38 | 39 | @Override 40 | public List getWailaBody(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { 41 | EntityChickensChicken chicken = (EntityChickensChicken) entity; 42 | 43 | currenttip.add(I18n.translateToLocalFormatted("entity.ChickensChicken.tier", chicken.getTier())); 44 | 45 | if (chicken.getStatsAnalyzed() || ChickensMod.instance.getAlwaysShowStats()) { 46 | currenttip.add(I18n.translateToLocalFormatted("entity.ChickensChicken.growth", chicken.getGrowth())); 47 | currenttip.add(I18n.translateToLocalFormatted("entity.ChickensChicken.gain", chicken.getGain())); 48 | currenttip.add(I18n.translateToLocalFormatted("entity.ChickensChicken.strength", chicken.getStrength())); 49 | } 50 | 51 | if (!chicken.isChild()) { 52 | int layProgress = chicken.getLayProgress(); 53 | if (layProgress <= 0) { 54 | currenttip.add(I18n.translateToLocal("entity.ChickensChicken.nextEggSoon")); 55 | } else { 56 | currenttip.add(I18n.translateToLocalFormatted("entity.ChickensChicken.layProgress", layProgress)); 57 | } 58 | } 59 | 60 | return currenttip; 61 | } 62 | 63 | @Override 64 | public List getWailaTail(Entity entity, List currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) { 65 | return null; 66 | } 67 | 68 | @Override 69 | public NBTTagCompound getNBTData(EntityPlayerMP player, Entity ent, NBTTagCompound tag, World world) { 70 | return null; 71 | } 72 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse" }, 4 | "facing=south": { "model": "chickens:henhouse", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse_acacia.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse_acacia" }, 4 | "facing=south": { "model": "chickens:henhouse_acacia", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse_acacia", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse_acacia", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse_birch.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse_birch" }, 4 | "facing=south": { "model": "chickens:henhouse_birch", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse_birch", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse_birch", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse_dark_oak.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse_dark_oak" }, 4 | "facing=south": { "model": "chickens:henhouse_dark_oak", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse_dark_oak", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse_dark_oak", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse_jungle.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse_jungle" }, 4 | "facing=south": { "model": "chickens:henhouse_jungle", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse_jungle", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse_jungle", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/blockstates/henhouse_spruce.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chickens:henhouse_spruce" }, 4 | "facing=south": { "model": "chickens:henhouse_spruce", "y": 180 }, 5 | "facing=west": { "model": "chickens:henhouse_spruce", "y": 270 }, 6 | "facing=east": { "model": "chickens:henhouse_spruce", "y": 90 } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/lang/de_DE.lang: -------------------------------------------------------------------------------- 1 | itemGroup.chickens=Chickens 2 | 3 | item.liquid_egg.tooltip=Verhält sich wie ein Einwegeimer. 4 | item.liquid_egg.water.name=Wasser-Ei 5 | item.liquid_egg.lava.name=Lava-Ei 6 | item.analyzer.name=Hühner-Analysierer 7 | item.analyzer.tooltip1=Verwende es bei Hühnern, um ihre Statistiken zu ermitteln. 8 | item.analyzer.tooltip2= - "Welchen Wochentag hassen Hühner am meisten? Fry-Tag!" 9 | 10 | item.colored_egg.tooltip=Wirf es, um eine Chance zu haben, ein Huhn zu erzeugen. 11 | 12 | entity.SmartChicken.name=Schlaues Huhn 13 | entity.WhiteChicken.name=Knochenweißes Huhn 14 | item.colored_egg.white.name=Knochenweißes Hühnerei 15 | entity.OrangeChicken.name=Oranges Huhn 16 | item.colored_egg.orange.name=Oranges Hühnerei 17 | entity.MagentaChicken.name=Magenta Huhn 18 | item.colored_egg.magenta.name=Magenta Hühnerei 19 | entity.LightBlueChicken.name=Hellblaues Huhn 20 | item.colored_egg.lightBlue.name=Hellblaues Hühnerei 21 | entity.YellowChicken.name=Gelbes Huhn 22 | item.colored_egg.yellow.name=Gelbes Hühnerei 23 | entity.LimeChicken.name=Hellgrünes Huhn 24 | item.colored_egg.lime.name=Hellgrünes Hühnerei 25 | entity.PinkChicken.name=Rosa Huhn 26 | item.colored_egg.pink.name=Rosa Hühnerei 27 | entity.GrayChicken.name=Graues Huhn 28 | item.colored_egg.gray.name=Graues Hühnerei 29 | entity.SilverDyeChicken.name=Hellgraues Huhn 30 | item.colored_egg.silverDye.name=Hellgraues Hühnerei 31 | entity.CyanChicken.name=Türkises Huhn 32 | item.colored_egg.cyan.name=Türkises Hühnerei 33 | entity.PurpleChicken.name=Violettes Huhn 34 | item.colored_egg.purple.name=Violettes Hühnerei 35 | entity.BlueChicken.name=Lapisblaues Huhn 36 | item.colored_egg.blue.name=Lapisblaues Hühnerei 37 | entity.BrownChicken.name=Kakaobraunes Huhn 38 | item.colored_egg.brown.name=Kakaobraunes Huhn 39 | entity.GreenChicken.name=Grünes Huhn 40 | item.colored_egg.green.name=Grünes Hühnerei 41 | entity.RedChicken.name=Rotes Huhn 42 | item.colored_egg.red.name=Rotes Hühnerei 43 | entity.BlackChicken.name=Tintenschwarzes Huhn 44 | item.colored_egg.black.name=Tintenschwarzes Hühnerei 45 | entity.GunpowderChicken.name=Schwarzpulverhuhn 46 | entity.FlintChicken.name=Feuersteinhuhn 47 | entity.SnowballChicken.name=Schneeballhuhn 48 | entity.LavaChicken.name=Lavahuhn 49 | entity.QuartzChicken.name=Netherquarzhuhn 50 | entity.RedstoneChicken.name=Redstonehuhn 51 | entity.GlowstoneChicken.name=Glowstonehuhn 52 | entity.IronChicken.name=Eisenhuhn 53 | entity.CoalChicken.name=Kohlehuhn 54 | entity.ClayChicken.name=Lehmhuhn 55 | entity.SlimeChicken.name=Schleimhuhn 56 | entity.WaterChicken.name=Wasserhuhn 57 | entity.NetherwartChicken.name=Netherwarzenhuhn 58 | entity.GoldChicken.name=Goldhuhn 59 | entity.DiamondChicken.name=Diamanthuhn 60 | entity.BlazeChicken.name=Lohenrutenhuhn 61 | entity.EmeraldChicken.name=Smaragdhuhn 62 | entity.EnderChicken.name=Enderperlenhuhn 63 | entity.GhastChicken.name=Ghasttränenhuhn 64 | entity.MagmaChicken.name=Magmacremehuhn 65 | entity.StringChicken.name=Fadenhuhn 66 | entity.LogChicken.name=Holzstammhuhn 67 | entity.SandChicken.name=Sandhuhn 68 | entity.GlassChicken.name=Glashuhn 69 | entity.LeatherChicken.name=Lederhuhn 70 | 71 | entity.ChickensChicken.tier=Stufe: %1$s 72 | entity.ChickensChicken.layProgress=Nächstes Ei in ~%1$smin. 73 | entity.ChickensChicken.nextEggSoon=Nächstes Ei in <1min. 74 | entity.ChickensChicken.growth=Wachstum: %1$s 75 | entity.ChickensChicken.gain=Ertrag: %1$s 76 | entity.ChickensChicken.strength=Stärke: %1$s 77 | gui.laying=Legt Ei 78 | gui.laying.time=%1$s-%2$smin. 79 | gui.breeding=Hühnerzucht 80 | gui.breeding.time=%1$s%% 81 | gui.drops=Hühnerdrops 82 | gui.throws=Eierwerfen 83 | gui.henhousing=Hühnerhaus-Nebenprodukt 84 | 85 | container.henhouse=Hühnerhaus 86 | tile.henhouse.name=Hühnerhaus 87 | tile.henhouse.tooltip=Sammelt Items von Hühnern automatisch in einem 9x9x9-Radius, falls mit einem Heuballen ausgestattet. 88 | tile.henhouse_acacia.name=Akazienhühnerhaus 89 | tile.henhouse_birch.name=Birkenhühnerhaus 90 | tile.henhouse_dark_oak.name=Schwarzeichenhühnerhaus 91 | tile.henhouse_jungle.name=Tropenhühnerhaus 92 | tile.henhouse_spruce.name=Fichtenhühnerhaus 93 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/lang/en_US.lang: -------------------------------------------------------------------------------- 1 | itemGroup.chickens=Chickens 2 | 3 | item.liquid_egg.tooltip=It's like one-off bucket. 4 | item.liquid_egg.water.name=Water Egg 5 | item.liquid_egg.lava.name=Lava Egg 6 | item.analyzer.name=Chicken Analyzer 7 | item.analyzer.tooltip1=Use it on chickens to determine their stats. 8 | item.analyzer.tooltip2= - "Which day of the week do chickens hate most? Fry-day!" 9 | 10 | item.colored_egg.tooltip=Throw it to have a chance to spawn the chicken. 11 | 12 | entity.SmartChicken.name=Smart Chicken 13 | entity.WhiteChicken.name=Bone White Chicken 14 | item.colored_egg.white.name=Bone White Chicken Egg 15 | entity.OrangeChicken.name=Orange Chicken 16 | item.colored_egg.orange.name=Orange Chicken Egg 17 | entity.MagentaChicken.name=Magenta Chicken 18 | item.colored_egg.magenta.name=Magenta Chicken Egg 19 | entity.LightBlueChicken.name=Light Blue Chicken 20 | item.colored_egg.lightBlue.name=Light Blue Chicken Egg 21 | entity.YellowChicken.name=Yellow Chicken 22 | item.colored_egg.yellow.name=Yellow Chicken Egg 23 | entity.LimeChicken.name=Lime Chicken 24 | item.colored_egg.lime.name=Lime Chicken Egg 25 | entity.PinkChicken.name=Pink Chicken 26 | item.colored_egg.pink.name=Pink Chicken Egg 27 | entity.GrayChicken.name=Gray Chicken 28 | item.colored_egg.gray.name=Gray Chicken Egg 29 | entity.SilverDyeChicken.name=Light Gray Chicken 30 | item.colored_egg.silverDye.name=Light Gray Chicken Egg 31 | entity.CyanChicken.name=Cyan Chicken 32 | item.colored_egg.cyan.name=Cyan Chicken Egg 33 | entity.PurpleChicken.name=Purple Chicken 34 | item.colored_egg.purple.name=Purple Chicken Egg 35 | entity.BlueChicken.name=Lapis Blue Chicken 36 | item.colored_egg.blue.name=Lapis Blue Chicken Egg 37 | entity.BrownChicken.name=Cocoa Brown Chicken 38 | item.colored_egg.brown.name=Cocoa Brown Chicken Egg 39 | entity.GreenChicken.name=Cactus Green Chicken 40 | item.colored_egg.green.name=Cactus Green Chicken Egg 41 | entity.RedChicken.name=Red Chicken 42 | item.colored_egg.red.name=Red Chicken Egg 43 | entity.BlackChicken.name=Ink Black Chicken 44 | item.colored_egg.black.name=Ink Black Chicken Egg 45 | entity.GunpowderChicken.name=Gunpowder Chicken 46 | entity.FlintChicken.name=Flint Chicken 47 | entity.SnowballChicken.name=Snowball Chicken 48 | entity.LavaChicken.name=Lava Chicken 49 | entity.QuartzChicken.name=Nether Quartz Chicken 50 | entity.RedstoneChicken.name=Redstone Chicken 51 | entity.GlowstoneChicken.name=Glowstone Chicken 52 | entity.IronChicken.name=Iron Chicken 53 | entity.CoalChicken.name=Coal Chicken 54 | entity.ClayChicken.name=Clay Chicken 55 | entity.SlimeChicken.name=Slime Chicken 56 | entity.WaterChicken.name=Water Chicken 57 | entity.NetherwartChicken.name=Nether Wart Chicken 58 | entity.GoldChicken.name=Gold Chicken 59 | entity.DiamondChicken.name=Diamond Chicken 60 | entity.BlazeChicken.name=Blaze Rod Chicken 61 | entity.EmeraldChicken.name=Emerald Chicken 62 | entity.EnderChicken.name=Ender Pearl Chicken 63 | entity.GhastChicken.name=Ghast Tear Chicken 64 | entity.MagmaChicken.name=Magma Cream Chicken 65 | entity.StringChicken.name=String Chicken 66 | entity.LogChicken.name=Log Chicken 67 | entity.SandChicken.name=Sand Chicken 68 | entity.GlassChicken.name=Glass Chicken 69 | entity.LeatherChicken.name=Leather Chicken 70 | 71 | entity.ChickensChicken.tier=Tier: %1$s 72 | entity.ChickensChicken.layProgress=Next egg in ~%1$smin. 73 | entity.ChickensChicken.nextEggSoon=Next egg in <1min. 74 | entity.ChickensChicken.growth=Growth: %1$s 75 | entity.ChickensChicken.gain=Gain: %1$s 76 | entity.ChickensChicken.strength=Strength: %1$s 77 | gui.laying=Laying Egg 78 | gui.laying.time=%1$s-%2$smin. 79 | gui.breeding=Chicken Breeding 80 | gui.breeding.time=%1$s%% 81 | gui.drops=Chicken Drops 82 | gui.throws=Color Egg Throwing 83 | gui.henhousing=Henhouse Byproduct 84 | 85 | container.henhouse=Henhouse 86 | tile.henhouse.tooltip=It will automatically collect items from chickens in 9x9x9 radius when provided with hay bale. 87 | tile.henhouse.name=Henhouse 88 | tile.henhouse_acacia.name=Acacia Henhouse 89 | tile.henhouse_birch.name=Birch Henhouse 90 | tile.henhouse_dark_oak.name=Dark Oak Henhouse 91 | tile.henhouse_jungle.name=Jungle Henhouse 92 | tile.henhouse_spruce.name=Spruce Henhouse 93 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/lang/tr_TR.lang: -------------------------------------------------------------------------------- 1 | itemGroup.chickens=Chickens 2 | 3 | item.liquid_egg.tooltip=Tek kullanımlık bir kovaya benziyor. 4 | item.liquid_egg.water.name=Su Yumurtası 5 | item.liquid_egg.lava.name=Lav Yumurtası 6 | item.analyzer.name=Tavuk Analiz Cihazı 7 | item.analyzer.tooltip1=İstatistiklerini belirlemek için tavuklarda kullanın. 8 | item.analyzer.tooltip2=-Haftanın hangi günü tavukların en çok nefret ettiği gündür? Fryday! (Kızartma Günü) 9 | 10 | item.colored_egg.tooltip=Tavuk yumurtlama şansına sahip. 11 | 12 | entity.SmartChicken.name=Akıllı Tavuk 13 | entity.WhiteChicken.name=İskelet Tavuk 14 | item.colored_egg.white.name=İskelet Tavuk Yumurtası 15 | entity.OrangeChicken.name=Turuncu Tavuk 16 | item.colored_egg.orange.name=Turuncu Tavuk Yumurtası 17 | entity.MagentaChicken.name=Eflatun Tavuk 18 | item.colored_egg.magenta.name=Eflatun Tavuk Yumurtası 19 | entity.LightBlueChicken.name=Açık Mavi Tavuk 20 | item.colored_egg.lightBlue.name=Açık Mavi Tavuk Yumurtası 21 | entity.YellowChicken.name=Sarı Tavuk 22 | item.colored_egg.yellow.name=Sarı Tavuk Yumurtası 23 | entity.LimeChicken.name=Açık Yeşil Tavuk 24 | item.colored_egg.lime.name=Açık Yeşil Tavuk Yumurtası 25 | entity.PinkChicken.name=Pembe Tavuk 26 | item.colored_egg.pink.name=Pembe Tavuk Yumurtası 27 | entity.GrayChicken.name=Gri Tavuk 28 | item.colored_egg.gray.name=Gri Tavuk Yumurtası 29 | entity.SilverDyeChicken.name=Açık Gri Tavuk 30 | item.colored_egg.silverDye.name=Açık Gri Tavuk Yumurtası 31 | entity.CyanChicken.name=Camgöbeği Tavuk 32 | item.colored_egg.cyan.name=Camgöbeği Tavuk Yumurtası 33 | entity.PurpleChicken.name=Mor Tavuk 34 | item.colored_egg.purple.name=Mor Tavuk Yumurtası 35 | entity.BlueChicken.name=Mavi Tavuk 36 | item.colored_egg.blue.name=Mavi Tavuk Yumurtası 37 | entity.BrownChicken.name=Kahverengi Tavuk 38 | item.colored_egg.brown.name=Kahverengi Tavuk Yumurtası 39 | entity.GreenChicken.name=Yeşil Tavuk 40 | item.colored_egg.green.name=Yeşil Tavuk Yumurtası 41 | entity.RedChicken.name=Kırmızı Tavuk 42 | item.colored_egg.red.name=Kırmızı Tavuk Yumurtası 43 | entity.BlackChicken.name=Siyah Tavuk 44 | item.colored_egg.black.name=Siyah Tavuk Yumurtası 45 | entity.GunpowderChicken.name=Barut Tavuğu 46 | entity.FlintChicken.name=Çakmak Tavuğu 47 | entity.SnowballChicken.name=Kartopu Tavuğu 48 | entity.LavaChicken.name=Lav Tavuğu 49 | entity.QuartzChicken.name=Nether Kuvars Tavuğu 50 | entity.RedstoneChicken.name=Kızıltaş Tavuğu 51 | entity.GlowstoneChicken.name=Işıktaşı Tavuğu 52 | entity.IronChicken.name=Demir Tavuk 53 | entity.CoalChicken.name=Kömür Tavuk 54 | entity.ClayChicken.name=Kil Tavuk 55 | entity.SlimeChicken.name=Balçık Tavuk 56 | entity.WaterChicken.name=Su Tavuk 57 | entity.NetherwartChicken.name=Nether Yumrusu Tavuğu 58 | entity.GoldChicken.name=Altın Tavuk 59 | entity.DiamondChicken.name=Elmas Tavuk 60 | entity.BlazeChicken.name=Alaz Çubuğu Tavuk 61 | entity.EmeraldChicken.name=Zümrüt Tavuk 62 | entity.EnderChicken.name=Ender İncisi Tavuğu 63 | entity.GhastChicken.name=Ghast Gözyaşı Tavuğu 64 | entity.MagmaChicken.name=Magma Kremi Tavuğu 65 | entity.StringChicken.name=İp Tavuğu 66 | entity.LogChicken.name=Tahta Tavuk 67 | entity.SandChicken.name=Kum Tavuk 68 | entity.GlassChicken.name=Cam Tavuk 69 | entity.LeatherChicken.name=Deri Tavuk 70 | entity.pShardChicken.name=Prizmarin Parça Tavuk 71 | entity.xpChicken.name=Xp Tavuğu 72 | entity.pCrystalChicken.name=Prizmarin Kristal Tavuk 73 | entity.obsidianChicken.name=Obsidyen Tavuk 74 | entity.soulSandChicken.name=Ruh Kumu Tavuk 75 | 76 | entity.ChickensChicken.tier=Aşama: %1$s 77 | entity.ChickensChicken.layProgress=Sonraki yumurta ~%1$sdk. 78 | entity.ChickensChicken.nextEggSoon=Sonraki yumurta <1dk. 79 | entity.ChickensChicken.growth=Büyüme: %1$s 80 | entity.ChickensChicken.gain=Kazanç: %1$s 81 | entity.ChickensChicken.strength=Güç: %1$s 82 | 83 | entity.ChickensChicken.top.tier=Aşama: 84 | entity.ChickensChicken.top.layProgress=Sonraki yumurta 85 | entity.ChickensChicken.top.layProgressEnd=dk. 86 | entity.ChickensChicken.top.nextEggSoon=Sonraki yumurta <1min. 87 | entity.ChickensChicken.top.growth=Büyüme: 88 | entity.ChickensChicken.top.gain=Kazanç: 89 | entity.ChickensChicken.top.strength=Güç: 90 | 91 | gui.laying=Yumurta Yumurtlama 92 | gui.laying.time=%1$s-%2$sdk. 93 | gui.breeding=Tavuk Ürüyor 94 | gui.breeding.time=%1$s%% 95 | gui.drops=Chicken Drops 96 | gui.throws=Renkli Yumurta Fırlatıyor 97 | gui.henhousing=Kümes Yanürünü 98 | 99 | container.henhouse=Kümes 100 | tile.henhouse.tooltip=Saman balyası sağlandığında 9x9x9 yarıçapındaki tavuklardan otomatik olarak eşyaları toplar. 101 | tile.henhouse.name=Kümes 102 | tile.henhouse_acacia.name=Akasya Kümes 103 | tile.henhouse_birch.name=Huş Kümes 104 | tile.henhouse_dark_oak.name=Koyu Meşe Kümes 105 | tile.henhouse_jungle.name=Orman Ağacı Kümes 106 | tile.henhouse_spruce.name=Ladin Kümes 107 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/lang/zh_CN.lang: -------------------------------------------------------------------------------- 1 | itemGroup.chickens=鸡 2 | 3 | item.liquid_egg.tooltip=有点像一次性使用的桶。 4 | item.liquid_egg.water.name=水鸡蛋 5 | item.liquid_egg.lava.name=熔岩鸡蛋 6 | item.analyzer.name=鸡分析器 7 | item.analyzer.tooltip1=对鸡使用来检测它们的属性。 8 | item.analyzer.tooltip2= ——“鸡最讨厌一星期中的哪一天?星期五!(因为Friday和Fry-Day谐音)!” 9 | 10 | item.colored_egg.tooltip=扔掉它有几率砸出小鸡。 11 | 12 | entity.SmartChicken.name=智慧鸡 13 | entity.WhiteChicken.name=骨白鸡 14 | item.colored_egg.white.name=骨白鸡蛋 15 | entity.OrangeChicken.name=橙鸡 16 | item.colored_egg.orange.name=橙鸡蛋 17 | entity.MagentaChicken.name=品红鸡 18 | item.colored_egg.magenta.name=品红鸡蛋 19 | entity.LightBlueChicken.name=淡蓝鸡 20 | item.colored_egg.lightBlue.name=淡蓝鸡蛋 21 | entity.YellowChicken.name=黄鸡 22 | item.colored_egg.yellow.name=黄鸡蛋 23 | entity.LimeChicken.name=黄绿鸡 24 | item.colored_egg.lime.name=黄绿鸡蛋 25 | entity.PinkChicken.name=粉鸡 26 | item.colored_egg.pink.name=粉鸡蛋 27 | entity.GrayChicken.name=灰鸡 28 | item.colored_egg.gray.name=灰鸡蛋 29 | entity.SilverDyeChicken.name=浅灰鸡 30 | item.colored_egg.silverDye.name=浅灰鸡蛋 31 | entity.CyanChicken.name=青鸡 32 | item.colored_egg.cyan.name=青鸡蛋 33 | entity.PurpleChicken.name=紫鸡 34 | item.colored_egg.purple.name=紫鸡蛋 35 | entity.BlueChicken.name=青金石蓝鸡 36 | item.colored_egg.blue.name=青金石蓝鸡蛋 37 | entity.BrownChicken.name=可可棕鸡 38 | item.colored_egg.brown.name=可可棕鸡蛋 39 | entity.GreenChicken.name=仙人掌绿鸡 40 | item.colored_egg.green.name=仙人掌绿鸡蛋 41 | entity.RedChicken.name=红鸡 42 | item.colored_egg.red.name=红鸡蛋 43 | entity.BlackChicken.name=墨囊黑鸡 44 | item.colored_egg.black.name=墨囊黑鸡蛋 45 | entity.GunpowderChicken.name=火药鸡 46 | entity.FlintChicken.name=燧石鸡 47 | entity.SnowballChicken.name=雪球鸡 48 | entity.LavaChicken.name=熔岩鸡 49 | entity.QuartzChicken.name=下界石英鸡 50 | entity.RedstoneChicken.name=红石鸡 51 | entity.GlowstoneChicken.name=萤石鸡 52 | entity.IronChicken.name=铁鸡 53 | entity.CoalChicken.name=煤鸡 54 | entity.ClayChicken.name=粘土鸡 55 | entity.SlimeChicken.name=史莱姆鸡 56 | entity.WaterChicken.name=水鸡 57 | entity.NetherwartChicken.name=地狱疣鸡 58 | entity.GoldChicken.name=金鸡 59 | entity.DiamondChicken.name=钻石鸡 60 | entity.BlazeChicken.name=烈焰棒鸡 61 | entity.EmeraldChicken.name=绿宝石鸡 62 | entity.EnderChicken.name=末影珍珠鸡 63 | entity.GhastChicken.name=恶魂之泪鸡 64 | entity.MagmaChicken.name=岩浆膏鸡 65 | entity.StringChicken.name=线鸡 66 | entity.LogChicken.name=原木鸡 67 | entity.SandChicken.name=沙子鸡 68 | entity.GlassChicken.name=玻璃鸡 69 | entity.LeatherChicken.name=皮革鸡 70 | 71 | entity.ChickensChicken.tier=等级:%1$s 72 | entity.ChickensChicken.layProgress=距离产出下个鸡蛋%1$smin。 73 | entity.ChickensChicken.nextEggSoon=距离产出下个鸡蛋小于1min。 74 | entity.ChickensChicken.growth=生长:%1$s 75 | entity.ChickensChicken.gain=增益:%1$s 76 | entity.ChickensChicken.strength=力量:%1$s 77 | gui.laying=鸡产物 78 | gui.laying.time=%1$s~%2$smin 79 | gui.breeding=鸡杂交 80 | gui.breeding.time=%1$s%% 81 | gui.drops=鸡死亡掉落 82 | gui.throws=彩色鸡蛋扔出产物 83 | gui.henhousing=鸡舍副产物 84 | 85 | container.henhouse=鸡舍 86 | tile.henhouse.tooltip=提供干草块时,它能自动收集9x9x9范围内的鸡的产物。 87 | tile.henhouse.name=鸡舍 88 | tile.henhouse_acacia.name=金合欢鸡舍 89 | tile.henhouse_birch.name=白桦木鸡舍 90 | tile.henhouse_dark_oak.name=深色橡木鸡舍 91 | tile.henhouse_jungle.name=丛林木鸡舍 92 | tile.henhouse_spruce.name=云杉木鸡舍 93 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/logo.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top", 5 | "front": "chickens:blocks/henhouse_front", 6 | "side": "chickens:blocks/henhouse_side" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse_acacia.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top_acacia", 5 | "front": "chickens:blocks/henhouse_front_acacia", 6 | "side": "chickens:blocks/henhouse_side_acacia" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse_birch.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top_birch", 5 | "front": "chickens:blocks/henhouse_front_birch", 6 | "side": "chickens:blocks/henhouse_side_birch" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse_dark_oak.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top_dark_oak", 5 | "front": "chickens:blocks/henhouse_front_dark_oak", 6 | "side": "chickens:blocks/henhouse_side_dark_oak" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse_jungle.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top_jungle", 5 | "front": "chickens:blocks/henhouse_front_jungle", 6 | "side": "chickens:blocks/henhouse_side_jungle" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/block/henhouse_spruce.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chickens:blocks/henhouse_top_spruce", 5 | "front": "chickens:blocks/henhouse_front_spruce", 6 | "side": "chickens:blocks/henhouse_side_spruce" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/analyzer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chickens:items/analyzer" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/colored_egg.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chickens:items/colored_egg" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse_acacia.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse_acacia" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse_birch.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse_birch" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse_dark_oak.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse_dark_oak" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse_jungle.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse_jungle" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/henhouse_spruce.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chickens:block/henhouse_spruce" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/liquid_egg.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chickens:items/liquid_egg" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/models/item/spawn_egg.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chickens:items/spawn_egg", 5 | "layer1": "chickens:items/spawn_egg_overlay" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front_acacia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front_acacia.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front_birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front_birch.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front_dark_oak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front_dark_oak.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front_jungle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front_jungle.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_front_spruce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_front_spruce.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side_acacia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side_acacia.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side_birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side_birch.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side_dark_oak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side_dark_oak.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side_jungle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side_jungle.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_side_spruce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_side_spruce.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top_acacia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top_acacia.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top_birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top_birch.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top_dark_oak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top_dark_oak.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top_jungle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top_jungle.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/blocks/henhouse_top_spruce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/blocks/henhouse_top_spruce.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/BlackChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/BlackChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/BlazeChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/BlazeChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/BlueChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/BlueChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/BrownChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/BrownChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/ClayChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/ClayChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/CoalChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/CoalChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/CyanChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/CyanChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/DiamondChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/DiamondChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/EmeraldChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/EmeraldChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/EnderChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/EnderChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/FlintChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/FlintChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GhastChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GhastChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GlassChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GlassChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GlowstoneChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GlowstoneChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GoldChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GoldChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GrayChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GrayChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GreenChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GreenChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/GunpowderChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/GunpowderChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/IronChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/IronChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/LavaChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/LavaChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/LeatherChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/LeatherChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/LightBlueChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/LightBlueChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/LimeChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/LimeChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/LogChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/LogChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/MagentaChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/MagentaChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/MagmaChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/MagmaChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/NetherwartChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/NetherwartChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/OrangeChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/OrangeChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/PinkChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/PinkChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/PurpleChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/PurpleChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/QuartzChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/QuartzChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/RedChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/RedChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/RedstoneChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/RedstoneChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/SandChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/SandChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/SilverDyeChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/SilverDyeChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/SlimeChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/SlimeChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/SmartChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/SmartChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/SnowballChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/SnowballChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/StringChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/StringChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/WaterChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/WaterChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/WhiteChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/WhiteChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/entity/YellowChicken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/entity/YellowChicken.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/breeding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/breeding.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/breeding_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/breeding_icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/drops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/drops.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/drops_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/drops_icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/henhouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/henhouse.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/henhousing_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/henhousing_icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/laying.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/laying.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/laying_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/laying_icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/throws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/throws.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/gui/throws_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/gui/throws_icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/items/analyzer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/items/analyzer.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/items/colored_egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/items/colored_egg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/items/liquid_egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/items/liquid_egg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/items/spawn_egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/items/spawn_egg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chickens/textures/items/spawn_egg_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setycz/ChickensMod/03497fec4a08f156f8b448db76316985f5fe0ebd/src/main/resources/assets/chickens/textures/items/spawn_egg_overlay.png -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "chickens", 4 | "name": "Chickens", 5 | "description": "Chickens... lots of chickens.", 6 | "version": "${version}", 7 | "mcversion": "${mcversion}", 8 | "url": "http://minecraft.curseforge.com/projects/chickens", 9 | "updateUrl": "", 10 | "authorList": ["SetyCz", "Wyvi"], 11 | "credits": "The Forge and FML guys, for making this example", 12 | "logoFile": "assets/chickens/logo.png", 13 | "screenshots": [], 14 | "dependencies": [] 15 | } 16 | ] 17 | --------------------------------------------------------------------------------