├── src
└── main
│ ├── resources
│ ├── version.properties
│ ├── pack.mcmeta
│ ├── assets
│ │ └── bullseye
│ │ │ ├── textures
│ │ │ ├── gui
│ │ │ │ └── logo.png
│ │ │ ├── items
│ │ │ │ ├── be_icon.png
│ │ │ │ ├── egg_arrow.png
│ │ │ │ ├── ice_arrow.png
│ │ │ │ ├── bomb_arrow.png
│ │ │ │ ├── ender_arrow.png
│ │ │ │ ├── fire_arrow.png
│ │ │ │ ├── light_arrow.png
│ │ │ │ ├── diamond_arrow.png
│ │ │ │ ├── dye_arrow_blue.png
│ │ │ │ ├── dye_arrow_cyan.png
│ │ │ │ ├── dye_arrow_gray.png
│ │ │ │ ├── dye_arrow_lime.png
│ │ │ │ ├── dye_arrow_pink.png
│ │ │ │ ├── dye_arrow_red.png
│ │ │ │ ├── training_arrow.png
│ │ │ │ ├── dye_arrow_black.png
│ │ │ │ ├── dye_arrow_brown.png
│ │ │ │ ├── dye_arrow_green.png
│ │ │ │ ├── dye_arrow_magenta.png
│ │ │ │ ├── dye_arrow_orange.png
│ │ │ │ ├── dye_arrow_purple.png
│ │ │ │ ├── dye_arrow_silver.png
│ │ │ │ ├── dye_arrow_white.png
│ │ │ │ ├── dye_arrow_yellow.png
│ │ │ │ ├── lightning_arrow.png
│ │ │ │ ├── prismarine_arrow.png
│ │ │ │ ├── extinguishing_arrow.png
│ │ │ │ └── dye_arrow_light_blue.png
│ │ │ ├── particles
│ │ │ │ └── particles.png
│ │ │ └── entity
│ │ │ │ └── projectile
│ │ │ │ ├── bomb_arrow.png
│ │ │ │ ├── egg_arrow.png
│ │ │ │ ├── fire_arrow.png
│ │ │ │ ├── ice_arrow.png
│ │ │ │ ├── ender_arrow.png
│ │ │ │ ├── light_arrow.png
│ │ │ │ ├── diamond_arrow.png
│ │ │ │ ├── dye_arrow_black.png
│ │ │ │ ├── dye_arrow_blue.png
│ │ │ │ ├── dye_arrow_brown.png
│ │ │ │ ├── dye_arrow_cyan.png
│ │ │ │ ├── dye_arrow_gray.png
│ │ │ │ ├── dye_arrow_green.png
│ │ │ │ ├── dye_arrow_lime.png
│ │ │ │ ├── dye_arrow_pink.png
│ │ │ │ ├── dye_arrow_red.png
│ │ │ │ ├── dye_arrow_white.png
│ │ │ │ ├── lightning_arrow.png
│ │ │ │ ├── training_arrow.png
│ │ │ │ ├── dye_arrow_magenta.png
│ │ │ │ ├── dye_arrow_orange.png
│ │ │ │ ├── dye_arrow_purple.png
│ │ │ │ ├── dye_arrow_silver.png
│ │ │ │ ├── dye_arrow_yellow.png
│ │ │ │ ├── prismarine_arrow.png
│ │ │ │ ├── dye_arrow_light_blue.png
│ │ │ │ └── extinguishing_arrow.png
│ │ │ ├── models
│ │ │ └── item
│ │ │ │ ├── be_icon.json
│ │ │ │ ├── bomb_arrow.json
│ │ │ │ ├── egg_arrow.json
│ │ │ │ ├── fire_arrow.json
│ │ │ │ ├── ice_arrow.json
│ │ │ │ ├── diamond_arrow.json
│ │ │ │ ├── dye_arrow_red.json
│ │ │ │ ├── ender_arrow.json
│ │ │ │ ├── light_arrow.json
│ │ │ │ ├── dye_arrow_black.json
│ │ │ │ ├── dye_arrow_blue.json
│ │ │ │ ├── dye_arrow_brown.json
│ │ │ │ ├── dye_arrow_cyan.json
│ │ │ │ ├── dye_arrow_gray.json
│ │ │ │ ├── dye_arrow_green.json
│ │ │ │ ├── dye_arrow_lime.json
│ │ │ │ ├── dye_arrow_pink.json
│ │ │ │ ├── dye_arrow_white.json
│ │ │ │ ├── lightning_arrow.json
│ │ │ │ ├── training_arrow.json
│ │ │ │ ├── dye_arrow_magenta.json
│ │ │ │ ├── dye_arrow_orange.json
│ │ │ │ ├── dye_arrow_purple.json
│ │ │ │ ├── dye_arrow_silver.json
│ │ │ │ ├── dye_arrow_yellow.json
│ │ │ │ ├── prismarine_arrow.json
│ │ │ │ ├── dye_arrow_light_blue.json
│ │ │ │ └── extinguishing_arrow.json
│ │ │ ├── recipes
│ │ │ ├── egg_arrow.json
│ │ │ ├── ice_arrow.json
│ │ │ ├── bomb_arrow.json
│ │ │ ├── diamond_arrow.json
│ │ │ ├── ender_arrow.json
│ │ │ ├── fire_arrow.json
│ │ │ ├── light_arrow.json
│ │ │ ├── lightning_arrow.json
│ │ │ ├── training_arrow.json
│ │ │ ├── prismarine_arrow.json
│ │ │ ├── cyan_dye_arrow.json
│ │ │ ├── gray_dye_arrow.json
│ │ │ ├── lime_dye_arrow.json
│ │ │ ├── pink_dye_arrow.json
│ │ │ ├── red_dye_arrow.json
│ │ │ ├── black_dye_arrow.json
│ │ │ ├── blue_dye_arrow.json
│ │ │ ├── brown_dye_arrow.json
│ │ │ ├── green_dye_arrow.json
│ │ │ ├── orange_dye_arrow.json
│ │ │ ├── purple_dye_arrow.json
│ │ │ ├── white_dye_arrow.json
│ │ │ ├── yellow_dye_arrow.json
│ │ │ ├── magenta_dye_arrow.json
│ │ │ ├── light_blue_dye_arrow.json
│ │ │ ├── light_gray_dye_arrow.json
│ │ │ └── extinguishing_arrow.json
│ │ │ ├── advancements
│ │ │ └── recipes
│ │ │ │ └── combat
│ │ │ │ ├── bomb_arrow.json
│ │ │ │ ├── egg_arrow.json
│ │ │ │ ├── ice_arrow.json
│ │ │ │ ├── fire_arrow.json
│ │ │ │ ├── diamond_arrow.json
│ │ │ │ ├── ender_arrow.json
│ │ │ │ ├── light_arrow.json
│ │ │ │ ├── training_arrow.json
│ │ │ │ ├── lightning_arrow.json
│ │ │ │ ├── extinguishing_arrow.json
│ │ │ │ ├── prismarine_arrow.json
│ │ │ │ ├── red_dye_arrow.json
│ │ │ │ ├── blue_dye_arrow.json
│ │ │ │ ├── cyan_dye_arrow.json
│ │ │ │ ├── gray_dye_arrow.json
│ │ │ │ ├── lime_dye_arrow.json
│ │ │ │ ├── pink_dye_arrow.json
│ │ │ │ ├── black_dye_arrow.json
│ │ │ │ ├── brown_dye_arrow.json
│ │ │ │ ├── green_dye_arrow.json
│ │ │ │ ├── white_dye_arrow.json
│ │ │ │ ├── orange_dye_arrow.json
│ │ │ │ ├── purple_dye_arrow.json
│ │ │ │ ├── yellow_dye_arrow.json
│ │ │ │ ├── magenta_dye_arrow.json
│ │ │ │ ├── light_blue_dye_arrow.json
│ │ │ │ └── light_gray_dye_arrow.json
│ │ │ └── lang
│ │ │ ├── zh_CN.lang
│ │ │ ├── de_DE.lang
│ │ │ ├── en_US.lang
│ │ │ ├── ru_RU.lang
│ │ │ ├── fr_FR.lang
│ │ │ └── pt_BR.lang
│ └── mcmod.info
│ └── java
│ └── bullseye
│ ├── particle
│ ├── BEParticleTypes.java
│ └── EntitySnowflakeFX.java
│ ├── api
│ └── BEItems.java
│ ├── util
│ └── inventory
│ │ └── CreativeTabBE.java
│ ├── init
│ ├── ModConfiguration.java
│ ├── ModVanillaCompat.java
│ ├── ModEntities.java
│ └── ModItems.java
│ ├── core
│ ├── CommonProxy.java
│ ├── Bullseye.java
│ └── ClientProxy.java
│ ├── client
│ └── gui
│ │ └── GuiBEFactory.java
│ ├── config
│ └── ConfigurationHandler.java
│ ├── item
│ ├── ItemDyeArrow.java
│ └── ItemBEArrow.java
│ └── entities
│ └── projectile
│ ├── RenderBEArrow.java
│ ├── RenderDyeArrow.java
│ └── EntityDyeArrow.java
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── gradlew.bat
├── gradlew
└── LICENSE.txt
/src/main/resources/version.properties:
--------------------------------------------------------------------------------
1 | ${modid}.version=${mod_version}
2 | ${modid}.build_number=${build_number}
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | run/*
2 | bin/*
3 | .gradle/*
4 | .settings/*
5 |
6 | .project
7 | .classpath
8 | /bin/
9 | /build/
10 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/particle/BEParticleTypes.java:
--------------------------------------------------------------------------------
1 | package bullseye.particle;
2 |
3 | public enum BEParticleTypes
4 | {
5 | SNOWFLAKE;
6 | }
--------------------------------------------------------------------------------
/src/main/resources/pack.mcmeta:
--------------------------------------------------------------------------------
1 | {
2 | "pack": {
3 | "pack_format": 2,
4 | "description": "Resources used for Bullseye"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/gui/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/gui/logo.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/be_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/be_icon.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/egg_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/egg_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/ice_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/ice_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/be_icon.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/be_icon"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/bomb_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/bomb_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/ender_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/ender_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/fire_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/fire_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/light_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/light_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/bomb_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/bomb_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/egg_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/egg_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/fire_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/fire_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/ice_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/ice_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/diamond_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/diamond_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_blue.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_cyan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_cyan.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_gray.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_lime.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_lime.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_pink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_pink.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_red.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/training_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/training_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/particles/particles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/particles/particles.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/diamond_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/diamond_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_red.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_red"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/ender_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/ender_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/light_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/light_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_black.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_brown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_brown.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_green.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_magenta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_magenta.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_orange.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_purple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_purple.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_silver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_silver.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_white.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_yellow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/lightning_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/lightning_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/prismarine_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/prismarine_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_black.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_black"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_blue.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_blue"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_brown.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_brown"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_cyan.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_cyan"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_gray.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_gray"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_green.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_green"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_lime.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_lime"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_pink.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_pink"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_white.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_white"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/lightning_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/lightning_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/training_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/training_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/extinguishing_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/extinguishing_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_magenta.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_magenta"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_orange.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_orange"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_purple.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_purple"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_silver.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_silver"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_yellow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_yellow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/prismarine_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/prismarine_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/bomb_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/bomb_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/egg_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/egg_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/fire_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/fire_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/ice_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/ice_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/items/dye_arrow_light_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/items/dye_arrow_light_blue.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/dye_arrow_light_blue.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/dye_arrow_light_blue"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/models/item/extinguishing_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "item/generated",
3 | "textures": {
4 | "layer0": "bullseye:items/extinguishing_arrow"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/ender_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/ender_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/light_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/light_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/diamond_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/diamond_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_black.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_blue.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_brown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_brown.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_cyan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_cyan.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_gray.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_green.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_lime.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_lime.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_pink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_pink.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_red.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_white.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/lightning_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/lightning_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/training_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/training_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_magenta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_magenta.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_orange.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_purple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_purple.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_silver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_silver.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_yellow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/prismarine_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/prismarine_arrow.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_light_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/dye_arrow_light_blue.png
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/textures/entity/projectile/extinguishing_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Glitchfiend/Bullseye/HEAD/src/main/resources/assets/bullseye/textures/entity/projectile/extinguishing_arrow.png
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Dec 15 20:33:12 AEDT 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.9-bin.zip
7 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/api/BEItems.java:
--------------------------------------------------------------------------------
1 | package bullseye.api;
2 |
3 | import net.minecraft.item.Item;
4 | import net.minecraft.item.Item.ToolMaterial;
5 | import net.minecraft.item.ItemArmor.ArmorMaterial;
6 |
7 | public class BEItems
8 | {
9 | public static Item be_icon;
10 |
11 | public static Item dye_arrow;
12 | public static Item arrow;
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/resources/mcmod.info:
--------------------------------------------------------------------------------
1 | [{
2 | "modid": "bullseye",
3 | "name": "Bullseye",
4 | "description": "Adds new arrows, including fire arrows, dye arrows, bomb arrows, and more!",
5 | "version": "${mod_version}",
6 | "mcversion": "${minecraft_version}",
7 | "url": "https://minecraft.curseforge.com/projects/bullseye",
8 | "authorList": ["Forstride"],
9 | "logoFile": "assets/bullseye/textures/gui/logo.png"
10 | }]
11 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/egg_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:egg"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 1,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/ice_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:ice"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 6,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/bomb_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:tnt"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 4,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/diamond_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:diamond"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 3,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/ender_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:ender_pearl"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 9,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/fire_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:blaze_powder"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 5,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |

2 |
3 | **Bullseye** is a **Minecraft mod** that adds **new arrows,** including **fire arrows, dye arrows, bomb arrows, and more!**
4 |
5 | -----------------
6 |
7 | [
](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US)
8 |
9 | Bullseye is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US).
10 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/light_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:glowstone_dust"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 10,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/lightning_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:nether_star"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 7,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/training_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:rabbit_hide"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 0,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/prismarine_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "item": "minecraft:prismarine_shard"
11 | },
12 | "S": {
13 | "type": "forge:ore_dict",
14 | "ore": "stickWood"
15 | },
16 | "F": {
17 | "type": "forge:ore_dict",
18 | "ore": "feather"
19 | }
20 |
21 | },
22 | "result": {
23 | "item": "bullseye:arrow",
24 | "data": 8,
25 | "count": 4
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/cyan_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeCyan"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 9,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/gray_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeGray"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 7,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/lime_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeLime"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 5,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/pink_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyePink"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 6,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/red_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeRed"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 14,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/black_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeBlack"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 15,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/blue_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeBlue"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 11,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/brown_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeBrown"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 12,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/green_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeGreen"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 13,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/orange_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeOrange"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 1,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/purple_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyePurple"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 10,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/white_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeWhite"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 0,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/yellow_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeYellow"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 4,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/magenta_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeMagenta"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 2,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/light_blue_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeLightBlue"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 3,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/light_gray_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "group": "dye_arrow",
4 | "pattern": [
5 | "T",
6 | "S",
7 | "F"
8 | ],
9 | "key": {
10 | "T": {
11 | "type": "forge:ore_dict",
12 | "ore": "dyeLightGray"
13 | },
14 | "S": {
15 | "type": "forge:ore_dict",
16 | "ore": "stickWood"
17 | },
18 | "F": {
19 | "type": "forge:ore_dict",
20 | "ore": "feather"
21 | }
22 |
23 | },
24 | "result": {
25 | "item": "bullseye:dye_arrow",
26 | "data": 8,
27 | "count": 4
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/recipes/extinguishing_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "forge:ore_shaped",
3 | "pattern": [
4 | "T",
5 | "S",
6 | "F"
7 | ],
8 | "key": {
9 | "T": {
10 | "type": "minecraft:item_nbt",
11 | "item": "minecraft:potion",
12 | "nbt": {
13 | "Potion": "water"
14 | }
15 | },
16 | "S": {
17 | "type": "forge:ore_dict",
18 | "ore": "stickWood"
19 | },
20 | "F": {
21 | "type": "forge:ore_dict",
22 | "ore": "feather"
23 | }
24 |
25 | },
26 | "result": {
27 | "item": "bullseye:arrow",
28 | "data": 2,
29 | "count": 4
30 | }
31 | }
--------------------------------------------------------------------------------
/src/main/java/bullseye/util/inventory/CreativeTabBE.java:
--------------------------------------------------------------------------------
1 | package bullseye.util.inventory;
2 |
3 | import bullseye.api.BEItems;
4 | import net.minecraft.creativetab.CreativeTabs;
5 | import net.minecraft.item.ItemStack;
6 |
7 | public class CreativeTabBE extends CreativeTabs
8 | {
9 | public static final CreativeTabs instance = new CreativeTabBE(CreativeTabs.getNextID(), "tabBullseye");
10 |
11 | private CreativeTabBE(int index, String label)
12 | {
13 | super(index, label);
14 | }
15 |
16 | @Override
17 | public ItemStack getTabIconItem()
18 | {
19 | return new ItemStack(BEItems.be_icon);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/init/ModConfiguration.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2014-2016, the Biomes O' Plenty Team
3 | *
4 | * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
5 | *
6 | * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
7 | ******************************************************************************/
8 |
9 | package bullseye.init;
10 |
11 | import java.io.File;
12 |
13 | import bullseye.config.ConfigurationHandler;
14 | import net.minecraftforge.common.MinecraftForge;
15 |
16 | public class ModConfiguration
17 | {
18 | public static void init(File configDirectory)
19 | {
20 | ConfigurationHandler.init(new File(configDirectory, "config.cfg"));
21 | MinecraftForge.EVENT_BUS.register(new ConfigurationHandler());
22 | }
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/bomb_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:bomb_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:tnt"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:bomb_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/egg_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:egg_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:egg"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:egg_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/ice_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:ice_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:ice"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:ice_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/java/bullseye/core/CommonProxy.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2016, the Biomes O' Plenty Team
3 | *
4 | * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
5 | *
6 | * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
7 | ******************************************************************************/
8 | package bullseye.core;
9 |
10 | import net.minecraft.block.Block;
11 | import net.minecraft.item.Item;
12 | import bullseye.particle.BEParticleTypes;
13 |
14 | public class CommonProxy
15 | {
16 | public void registerRenderers() {}
17 | public void registerItemVariantModel(Item item, String name, int metadata) {}
18 | public void registerNonRenderingProperties(Block block) {}
19 | public void spawnParticle(BEParticleTypes type, double x, double y, double z, Object... info) {}
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/fire_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:fire_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:blaze_powder"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:fire_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/diamond_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:diamond_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:diamond"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:diamond_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/ender_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:ender_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:ender_pearl"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:ender_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/light_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:light_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:glowstone_dust"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:light_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/training_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:training_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:rabbit_hide"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:training_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/lightning_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:lightning_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:nether_star"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:lightning_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/extinguishing_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:extinguishing_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:potion"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:extinguishing_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/prismarine_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:prismarine_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "item": "minecraft:prismarine_shard"
24 | }
25 | ]
26 | }
27 | },
28 | "has_the_recipe": {
29 | "trigger": "minecraft:recipe_unlocked",
30 | "conditions": {
31 | "recipe": "bullseye:prismarine_arrow"
32 | }
33 | }
34 | },
35 | "requirements": [
36 | [
37 | "has_feather",
38 | "has_topper",
39 | "has_the_recipe"
40 | ]
41 | ]
42 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/red_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:red_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeRed"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:red_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/blue_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:blue_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeBlue"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:blue_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/cyan_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:cyan_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeCyan"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:cyan_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/gray_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:gray_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeGray"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:gray_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/lime_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:lime_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeLime"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:lime_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/pink_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:pink_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyePink"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:pink_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/black_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:black_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeBlack"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:black_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/brown_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:brown_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeBrown"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:brown_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/green_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:green_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeGreen"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:green_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/white_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:white_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeWhite"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:white_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/orange_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:orange_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeOrange"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:orange_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/purple_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:purple_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyePurple"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:purple_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/yellow_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:yellow_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeYellow"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:yellow_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/magenta_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:magenta_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeMagenta"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:magenta_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/light_blue_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:light_blue_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeLightBlue"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:light_blue_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/advancements/recipes/combat/light_gray_dye_arrow.json:
--------------------------------------------------------------------------------
1 | {
2 | "rewards": {
3 | "recipes": [
4 | "bullseye:light_gray_dye_arrow"
5 | ]
6 | },
7 | "criteria": {
8 | "has_feather": {
9 | "trigger": "minecraft:inventory_changed",
10 | "conditions": {
11 | "items": [
12 | {
13 | "item": "minecraft:feather"
14 | }
15 | ]
16 | }
17 | },
18 | "has_topper": {
19 | "trigger": "minecraft:inventory_changed",
20 | "conditions": {
21 | "items": [
22 | {
23 | "type": "forge:ore_dict",
24 | "ore": "dyeLightGray"
25 | }
26 | ]
27 | }
28 | },
29 | "has_the_recipe": {
30 | "trigger": "minecraft:recipe_unlocked",
31 | "conditions": {
32 | "recipe": "bullseye:light_gray_dye_arrow"
33 | }
34 | }
35 | },
36 | "requirements": [
37 | [
38 | "has_feather",
39 | "has_topper",
40 | "has_the_recipe"
41 | ]
42 | ]
43 | }
--------------------------------------------------------------------------------
/src/main/java/bullseye/client/gui/GuiBEFactory.java:
--------------------------------------------------------------------------------
1 | package bullseye.client.gui;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import bullseye.config.ConfigurationHandler;
7 | import bullseye.core.Bullseye;
8 | import net.minecraft.client.gui.GuiScreen;
9 | import net.minecraft.util.text.translation.I18n;
10 | import net.minecraftforge.common.config.ConfigElement;
11 | import net.minecraftforge.fml.client.DefaultGuiFactory;
12 | import net.minecraftforge.fml.client.config.DummyConfigElement.DummyCategoryElement;
13 | import net.minecraftforge.fml.client.config.GuiConfig;
14 | import net.minecraftforge.fml.client.config.IConfigElement;
15 |
16 | import static bullseye.config.ConfigurationHandler.ARROW_SETTINGS;
17 |
18 | public class GuiBEFactory extends DefaultGuiFactory
19 | {
20 | public GuiBEFactory()
21 | {
22 | super(Bullseye.MOD_ID, Bullseye.MOD_NAME);
23 | }
24 |
25 | @Override
26 | public GuiScreen createConfigGui(GuiScreen parentScreen)
27 | {
28 | return new GuiConfig(parentScreen, getConfigElements(), modid, false, false, title);
29 | }
30 |
31 | private static List getConfigElements()
32 | {
33 | List list = new ArrayList();
34 |
35 | List arrow_settings = new ConfigElement(ConfigurationHandler.config.getCategory(ARROW_SETTINGS.toLowerCase())).getChildElements();
36 |
37 | list.add(new DummyCategoryElement(I18n.translateToLocal("config.category.arrowSettings.title"), "config.category.arrowSettings", arrow_settings));
38 |
39 | return list;
40 | }
41 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/lang/zh_CN.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=箭矢设置
4 | config.category.arrowSettings.tooltip=设置不同种类箭矢的相关参数
5 |
6 | item.bomb_arrow.name=爆炸箭
7 | item.diamond_arrow.name=钻石箭
8 | item.egg_arrow.name=鸡蛋箭
9 | item.ender_arrow.name=末影箭
10 | item.extinguishing_arrow.name=扑火箭
11 | item.fire_arrow.name=火焰箭
12 | item.ice_arrow.name=寒冰箭
13 | item.light_arrow.name=荧光箭
14 | item.lightning_arrow.name=闪电箭
15 | item.prismarine_arrow.name=海晶箭
16 | item.training_arrow.name=训练箭
17 |
18 | item.dye_arrow_red.name=红色染色箭
19 | item.dye_arrow_orange.name=橙色染色箭
20 | item.dye_arrow_yellow.name=黄色染色箭
21 | item.dye_arrow_lime.name=黄绿色染色箭
22 | item.dye_arrow_green.name=绿色染色箭
23 | item.dye_arrow_cyan.name=青色染色箭
24 | item.dye_arrow_light_blue.name=淡蓝色染色箭
25 | item.dye_arrow_blue.name=蓝色染色箭
26 | item.dye_arrow_purple.name=紫色染色箭
27 | item.dye_arrow_magenta.name=品红色染色箭
28 | item.dye_arrow_pink.name=粉红色染色箭
29 | item.dye_arrow_brown.name=棕色染色箭
30 | item.dye_arrow_white.name=白色染色箭
31 | item.dye_arrow_silver.name=淡灰色染色箭
32 | item.dye_arrow_gray.name=灰色染色箭
33 | item.dye_arrow_black.name=黑色染色箭
34 |
35 | entity.arrow.name=箭
36 | entity.training_arrow.name=训练箭
37 | entity.egg_arrow.name=鸡蛋箭
38 | entity.extinguishing_arrow.name=扑火箭
39 | entity.diamond_arrow.name=钻石箭
40 | entity.bomb_arrow.name=爆炸箭
41 | entity.fire_arrow.name=火焰箭
42 | entity.ice_arrow.name=寒冰箭
43 | entity.lightning_arrow.name=闪电箭
44 | entity.prismarine_arrow.name=海晶箭
45 | entity.ender_arrow.name=末影箭
46 | entity.light_arrow.name=荧光箭
47 |
48 | entity.dye_arrow.name=染色箭
49 | entity.dye_arrow_red.name=红色染色箭
50 | entity.dye_arrow_orange.name=橙色染色箭
51 | entity.dye_arrow_yellow.name=黄色染色箭
52 | entity.dye_arrow_lime.name=黄绿色染色箭
53 | entity.dye_arrow_green.name=绿色染色箭
54 | entity.dye_arrow_cyan.name=青色染色箭
55 | entity.dye_arrow_light_blue.name=淡蓝色染色箭
56 | entity.dye_arrow_blue.name=蓝色染色箭
57 | entity.dye_arrow_purple.name=紫色染色箭
58 | entity.dye_arrow_magenta.name=品红色染色箭
59 | entity.dye_arrow_pink.name=粉红色染色箭
60 | entity.dye_arrow_brown.name=棕色染色箭
61 | entity.dye_arrow_white.name=白色染色箭
62 | entity.dye_arrow_silver.name=淡灰色染色箭
63 | entity.dye_arrow_gray.name=灰色染色箭
64 | entity.dye_arrow_black.name=黑色染色箭
65 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/core/Bullseye.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2016, the Biomes O' Plenty Team
3 | *
4 | * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
5 | *
6 | * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
7 | ******************************************************************************/
8 | package bullseye.core;
9 |
10 | import java.io.File;
11 |
12 | import org.apache.logging.log4j.LogManager;
13 | import org.apache.logging.log4j.Logger;
14 |
15 | import bullseye.init.ModConfiguration;
16 | import bullseye.init.ModEntities;
17 | import bullseye.init.ModItems;
18 | import bullseye.init.ModVanillaCompat;
19 | import net.minecraftforge.fml.common.Mod;
20 | import net.minecraftforge.fml.common.Mod.EventHandler;
21 | import net.minecraftforge.fml.common.Mod.Instance;
22 | import net.minecraftforge.fml.common.SidedProxy;
23 | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
24 |
25 | @Mod(modid = Bullseye.MOD_ID, version = Bullseye.MOD_VERSION, name = Bullseye.MOD_NAME, dependencies = "required-after:forge@[1.0.0.0,)", guiFactory = Bullseye.GUI_FACTORY)
26 | public class Bullseye
27 | {
28 | public static final String MOD_NAME = "Bullseye";
29 | public static final String MOD_ID = "bullseye";
30 | public static final String MOD_VERSION = "@MOD_VERSION@";
31 | public static final String GUI_FACTORY = "bullseye.client.gui.GuiBEFactory";
32 |
33 | @Instance(MOD_ID)
34 | public static Bullseye instance;
35 |
36 | @SidedProxy(clientSide = "bullseye.core.ClientProxy", serverSide = "bullseye.core.CommonProxy")
37 | public static CommonProxy proxy;
38 |
39 | public static Logger logger = LogManager.getLogger(MOD_ID);
40 | public static File configDirectory;
41 |
42 | @EventHandler
43 | public void preInit(FMLPreInitializationEvent event)
44 | {
45 | configDirectory = new File(event.getModConfigurationDirectory(), "bullseye");
46 | ModConfiguration.init(configDirectory);
47 |
48 | ModEntities.init();
49 | ModItems.init();
50 | ModVanillaCompat.init();
51 |
52 | proxy.registerRenderers();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/config/ConfigurationHandler.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2015-2016, the Biomes O' Plenty Team
3 | *
4 | * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
5 | *
6 | * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
7 | ******************************************************************************/
8 |
9 | package bullseye.config;
10 |
11 | import java.io.File;
12 |
13 | import bullseye.core.Bullseye;
14 | import net.minecraftforge.common.config.Configuration;
15 | import net.minecraftforge.fml.client.event.ConfigChangedEvent;
16 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
17 |
18 | public class ConfigurationHandler
19 | {
20 | public static Configuration config;
21 |
22 | public static final String ARROW_SETTINGS = "Arrow Settings";
23 |
24 | public static boolean explodeBombArrows;
25 | public static boolean burnFireArrows;
26 | public static boolean fireLightningArrows;
27 |
28 | public static void init(File configFile)
29 | {
30 | if (config == null)
31 | {
32 | config = new Configuration(configFile);
33 | loadConfiguration();
34 | }
35 | }
36 |
37 | private static void loadConfiguration()
38 | {
39 | try
40 | {
41 | explodeBombArrows = config.getBoolean("Bombs Arrows Destroy Blocks", ARROW_SETTINGS, true, "Allow Bomb Arrows to destroy blocks.");
42 | burnFireArrows = config.getBoolean("Fire Arrows Burn Blocks", ARROW_SETTINGS, true, "Allow Fire Arrows to catch fire to blocks.");
43 | fireLightningArrows = config.getBoolean("Lightning Arrows Burn Blocks", ARROW_SETTINGS, true, "Allow Lightning Arrows to catch fire to blocks.");
44 | }
45 | catch (Exception e)
46 | {
47 | Bullseye.logger.error("Bullseye has encountered a problem loading misc.cfg", e);
48 | }
49 | finally
50 | {
51 | if (config.hasChanged()) config.save();
52 | }
53 | }
54 |
55 | @SubscribeEvent
56 | public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
57 | {
58 | if (event.getModID().equalsIgnoreCase(Bullseye.MOD_ID))
59 | {
60 | loadConfiguration();
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/lang/de_DE.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=Arrow Settings
4 |
5 | item.bomb_arrow.name=Bombenpfeil
6 | item.diamond_arrow.name=Diamantpfeil
7 | item.egg_arrow.name=Eierpfeil
8 | item.extinguishing_arrow.name=Löschpfeil
9 | item.fire_arrow.name=Feuerpfeil
10 | item.ice_arrow.name=Eispfeil
11 | item.lightning_arrow.name=Blitzpfeil
12 | item.training_arrow.name=Übungspfeil
13 |
14 | item.dye_arrow_red.name=Roter Farbpfeil
15 | item.dye_arrow_orange.name=Oranger Farbpfeil
16 | item.dye_arrow_yellow.name=Gelber Farbpfeil
17 | item.dye_arrow_lime.name=Hellgrüner Farbpfeil
18 | item.dye_arrow_green.name=Grüner Farbpfeil
19 | item.dye_arrow_cyan.name=Türkiser Farbpfeil
20 | item.dye_arrow_light_blue.name=Hellblauer Farbpfeil
21 | item.dye_arrow_blue.name=Blauer Farbpfeil
22 | item.dye_arrow_purple.name=Violetter Farbpfeil
23 | item.dye_arrow_magenta.name=Magenta Farbpfeil
24 | item.dye_arrow_pink.name=Rosa Farbpfeil
25 | item.dye_arrow_brown.name=Brauner Farbpfeil
26 | item.dye_arrow_white.name=Weißer Farbpfeil
27 | item.dye_arrow_silver.name=Hellgrauer Farbpfeil
28 | item.dye_arrow_gray.name=Grauer Farbpfeil
29 | item.dye_arrow_black.name=Schwarzer Farbpfeil
30 |
31 | entity.Bullseye.arrow.name=Pfeil
32 | entity.Bullseye.training_arrow.name=Übungspfeil
33 | entity.Bullseye.egg_arrow.name=Eierpfeil
34 | entity.Bullseye.extinguishing_arrow.name=Löschpfeil
35 | entity.Bullseye.diamond_arrow.name=Diamantpfeil
36 | entity.Bullseye.bomb_arrow.name=Bombenpfeil
37 | entity.Bullseye.fire_arrow.name=Feuerpfeil
38 | entity.Bullseye.ice_arrow.name=Eispfeil
39 | entity.Bullseye.lightning_arrow.name=Blitzpfeil
40 |
41 | entity.Bullseye.dye_arrow_red.name=Roter Farbpfeil
42 | entity.Bullseye.dye_arrow_orange.name=Oranger Farbpfeil
43 | entity.Bullseye.dye_arrow_yellow.name=Gelber Farbpfeil
44 | entity.Bullseye.dye_arrow_lime.name=Hellgrüner Farbpfeil
45 | entity.Bullseye.dye_arrow_green.name=Grüner Farbpfeil
46 | entity.Bullseye.dye_arrow_cyan.name=Türkiser Farbpfeil
47 | entity.Bullseye.dye_arrow_light_blue.name=Hellblauer Farbpfeil
48 | entity.Bullseye.dye_arrow_blue.name=Blauer Farbpfeil
49 | entity.Bullseye.dye_arrow_purple.name=Violetter Farbpfeil
50 | entity.Bullseye.dye_arrow_magenta.name=Magenta Farbpfeil
51 | entity.Bullseye.dye_arrow_pink.name=Rosa Farbpfeil
52 | entity.Bullseye.dye_arrow_brown.name=Brauner Farbpfeil
53 | entity.Bullseye.dye_arrow_white.name=Weißer Farbpfeil
54 | entity.Bullseye.dye_arrow_silver.name=Hellgrauer Farbpfeil
55 | entity.Bullseye.dye_arrow_gray.name=Grauer Farbpfeil
56 | entity.Bullseye.dye_arrow_black.name=Schwarzer Farbpfeil
57 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/init/ModVanillaCompat.java:
--------------------------------------------------------------------------------
1 | package bullseye.init;
2 |
3 | import javax.annotation.Nullable;
4 |
5 | import bullseye.api.BEItems;
6 | import bullseye.entities.projectile.EntityBEArrow;
7 | import bullseye.entities.projectile.EntityDyeArrow;
8 | import bullseye.item.ItemBEArrow;
9 | import bullseye.item.ItemDyeArrow;
10 | import net.minecraft.block.BlockDispenser;
11 | import net.minecraft.dispenser.BehaviorProjectileDispense;
12 | import net.minecraft.dispenser.IPosition;
13 | import net.minecraft.entity.Entity;
14 | import net.minecraft.entity.IProjectile;
15 | import net.minecraft.entity.projectile.EntityArrow;
16 | import net.minecraft.item.ItemStack;
17 | import net.minecraft.util.DamageSource;
18 | import net.minecraft.util.EntityDamageSourceIndirect;
19 | import net.minecraft.util.datafix.DataFixer;
20 | import net.minecraft.world.World;
21 |
22 | public class ModVanillaCompat
23 | {
24 | public static void init()
25 | {
26 | registerDispenserBehaviors();
27 |
28 | DataFixer datafixer = new DataFixer(1139);
29 | datafixer = new net.minecraftforge.common.util.CompoundDataFixer(datafixer);
30 | EntityDyeArrow.registerFixesDyeArrow(datafixer);
31 | EntityBEArrow.registerFixesBEArrow(datafixer);
32 | }
33 |
34 | private static void registerDispenserBehaviors()
35 | {
36 | BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(BEItems.arrow, new BehaviorProjectileDispense()
37 | {
38 | protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
39 | {
40 | EntityBEArrow entitybearrow = new EntityBEArrow(worldIn, position.getX(), position.getY(), position.getZ());
41 | entitybearrow.setArrowType(ItemBEArrow.ArrowType.fromMeta(stackIn.getMetadata()));
42 | entitybearrow.pickupStatus = EntityBEArrow.PickupStatus.ALLOWED;
43 | return entitybearrow;
44 | }
45 | });
46 | BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(BEItems.dye_arrow, new BehaviorProjectileDispense()
47 | {
48 | protected IProjectile getProjectileEntity(World worldIn, IPosition position, ItemStack stackIn)
49 | {
50 | EntityDyeArrow entitydyearrow = new EntityDyeArrow(worldIn, position.getX(), position.getY(), position.getZ());
51 | entitydyearrow.setDyeType(ItemDyeArrow.DyeType.fromMeta(stackIn.getMetadata()));
52 | entitydyearrow.pickupStatus = EntityDyeArrow.PickupStatus.ALLOWED;
53 | return entitydyearrow;
54 | }
55 | });
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/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/resources/assets/bullseye/lang/en_US.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=Arrow Settings
4 | config.category.arrowSettings.tooltip=Toggle properties for different types of arrows
5 |
6 | item.bomb_arrow.name=Bomb Arrow
7 | item.diamond_arrow.name=Diamond Arrow
8 | item.egg_arrow.name=Egg Arrow
9 | item.ender_arrow.name=Ender Arrow
10 | item.extinguishing_arrow.name=Extinguishing Arrow
11 | item.fire_arrow.name=Fire Arrow
12 | item.ice_arrow.name=Ice Arrow
13 | item.light_arrow.name=Light Arrow
14 | item.lightning_arrow.name=Lightning Arrow
15 | item.prismarine_arrow.name=Prismarine Arrow
16 | item.training_arrow.name=Training Arrow
17 |
18 | item.dye_arrow_red.name=Red Dye Arrow
19 | item.dye_arrow_orange.name=Orange Dye Arrow
20 | item.dye_arrow_yellow.name=Yellow Dye Arrow
21 | item.dye_arrow_lime.name=Lime Dye Arrow
22 | item.dye_arrow_green.name=Green Dye Arrow
23 | item.dye_arrow_cyan.name=Cyan Dye Arrow
24 | item.dye_arrow_light_blue.name=Light Blue Dye Arrow
25 | item.dye_arrow_blue.name=Blue Dye Arrow
26 | item.dye_arrow_purple.name=Purple Dye Arrow
27 | item.dye_arrow_magenta.name=Magenta Dye Arrow
28 | item.dye_arrow_pink.name=Pink Dye Arrow
29 | item.dye_arrow_brown.name=Brown Dye Arrow
30 | item.dye_arrow_white.name=White Dye Arrow
31 | item.dye_arrow_silver.name=Light Gray Dye Arrow
32 | item.dye_arrow_gray.name=Gray Dye Arrow
33 | item.dye_arrow_black.name=Black Dye Arrow
34 |
35 | entity.arrow.name=Arrow
36 | entity.training_arrow.name=Training Arrow
37 | entity.egg_arrow.name=Egg Arrow
38 | entity.extinguishing_arrow.name=Extinguishing Arrow
39 | entity.diamond_arrow.name=Diamond Arrow
40 | entity.bomb_arrow.name=Bomb Arrow
41 | entity.fire_arrow.name=Fire Arrow
42 | entity.ice_arrow.name=Ice Arrow
43 | entity.lightning_arrow.name=Lightning Arrow
44 | entity.prismarine_arrow.name=Prismarine Arrow
45 | entity.ender_arrow.name=Ender Arrow
46 | entity.light_arrow.name=Light Arrow
47 |
48 | entity.dye_arrow.name=Dye Arrow
49 | entity.dye_arrow_red.name=Red Dye Arrow
50 | entity.dye_arrow_orange.name=Orange Dye Arrow
51 | entity.dye_arrow_yellow.name=Yellow Dye Arrow
52 | entity.dye_arrow_lime.name=Lime Dye Arrow
53 | entity.dye_arrow_green.name=Green Dye Arrow
54 | entity.dye_arrow_cyan.name=Cyan Dye Arrow
55 | entity.dye_arrow_light_blue.name=Light Blue Dye Arrow
56 | entity.dye_arrow_blue.name=Blue Dye Arrow
57 | entity.dye_arrow_purple.name=Purple Dye Arrow
58 | entity.dye_arrow_magenta.name=Magenta Dye Arrow
59 | entity.dye_arrow_pink.name=Pink Dye Arrow
60 | entity.dye_arrow_brown.name=Brown Dye Arrow
61 | entity.dye_arrow_white.name=White Dye Arrow
62 | entity.dye_arrow_silver.name=Light Gray Dye Arrow
63 | entity.dye_arrow_gray.name=Gray Dye Arrow
64 | entity.dye_arrow_black.name=Black Dye Arrow
--------------------------------------------------------------------------------
/src/main/java/bullseye/item/ItemDyeArrow.java:
--------------------------------------------------------------------------------
1 | package bullseye.item;
2 |
3 | import java.util.List;
4 |
5 | import bullseye.entities.projectile.EntityDyeArrow;
6 | import net.minecraft.creativetab.CreativeTabs;
7 | import net.minecraft.entity.EntityLivingBase;
8 | import net.minecraft.entity.projectile.EntityArrow;
9 | import net.minecraft.item.Item;
10 | import net.minecraft.item.ItemArrow;
11 | import net.minecraft.item.ItemStack;
12 | import net.minecraft.util.IStringSerializable;
13 | import net.minecraft.util.NonNullList;
14 | import net.minecraft.world.World;
15 | import net.minecraftforge.fml.relauncher.Side;
16 | import net.minecraftforge.fml.relauncher.SideOnly;
17 |
18 |
19 | public class ItemDyeArrow extends ItemArrow
20 | {
21 | public static enum DyeType implements IStringSerializable
22 | {
23 | WHITE, ORANGE, MAGENTA, LIGHT_BLUE, YELLOW, LIME, PINK, GRAY, SILVER, CYAN, PURPLE, BLUE, BROWN, GREEN, RED, BLACK;
24 | @Override
25 | public String getName()
26 | {
27 | return "dye_arrow_" + this.name().toLowerCase();
28 | }
29 | @Override
30 | public String toString()
31 | {
32 | return this.getName();
33 | }
34 |
35 | public static DyeType fromMeta(int meta)
36 | {
37 | return DyeType.values()[meta % DyeType.values().length];
38 | }
39 | };
40 |
41 | public ItemDyeArrow()
42 | {
43 | this.setHasSubtypes(true);
44 | this.setMaxDamage(0);
45 | }
46 |
47 | @Override
48 | public EntityArrow createArrow(World worldIn, ItemStack stack, EntityLivingBase shooter)
49 | {
50 | EntityDyeArrow entityDyeArrow = new EntityDyeArrow(worldIn, shooter);
51 | entityDyeArrow.setDyeType(ItemDyeArrow.DyeType.fromMeta(stack.getMetadata()));
52 | return entityDyeArrow;
53 | }
54 |
55 | // add all the gem types as separate items in the creative tab
56 | @Override
57 | @SideOnly(Side.CLIENT)
58 | public void getSubItems(CreativeTabs tab, NonNullList subItems)
59 | {
60 | if (this.isInCreativeTab(tab))
61 | {
62 | for (DyeType dyeType : DyeType.values())
63 | {
64 | subItems.add(new ItemStack(this, 1, dyeType.ordinal()));
65 | }
66 | }
67 | }
68 |
69 | // default behavior in Item is to return 0, but the meta value is important here because it determines which dart type to use
70 | @Override
71 | public int getMetadata(int metadata)
72 | {
73 | return metadata;
74 | }
75 |
76 | // get the correct name for this item by looking up the meta value in the DartType enum
77 | @Override
78 | public String getUnlocalizedName(ItemStack stack)
79 | {
80 | return "item." + DyeType.fromMeta(stack.getMetadata()).toString();
81 | }
82 |
83 |
84 | }
85 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/init/ModEntities.java:
--------------------------------------------------------------------------------
1 | package bullseye.init;
2 |
3 | import java.util.Map;
4 |
5 | import net.minecraft.entity.Entity;
6 | import net.minecraft.entity.EntityList.EntityEggInfo;
7 | import net.minecraft.util.ResourceLocation;
8 | import net.minecraft.world.World;
9 | import net.minecraftforge.fml.common.FMLCommonHandler;
10 | import net.minecraftforge.fml.common.ModContainer;
11 | import net.minecraftforge.fml.common.registry.EntityRegistry;
12 | import net.minecraftforge.fml.common.registry.EntityRegistry.EntityRegistration;
13 | import bullseye.core.Bullseye;
14 | import bullseye.entities.projectile.EntityBEArrow;
15 | import bullseye.entities.projectile.EntityDyeArrow;
16 |
17 | import com.google.common.collect.Maps;
18 |
19 | public class ModEntities
20 | {
21 | public static final Map entityEggs = Maps.newLinkedHashMap();
22 | public static final Map idToBEEntityName = Maps.newLinkedHashMap();
23 |
24 | private static int nextBEEntityId = 1;
25 |
26 | public static void init()
27 | {
28 | // projectiles
29 | registerBEEntity(EntityDyeArrow.class, "dye_arrow", 64, 20, false);
30 | registerBEEntity(EntityBEArrow.class, "arrow", 64, 20, false);
31 | }
32 |
33 | // register an entity
34 | public static int registerBEEntity(Class extends Entity> entityClass, String entityName, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
35 | {
36 | int beEntityId = nextBEEntityId;
37 | nextBEEntityId++;
38 | EntityRegistry.registerModEntity(new ResourceLocation(Bullseye.MOD_ID, entityName), entityClass, entityName, beEntityId, Bullseye.instance, trackingRange, updateFrequency, sendsVelocityUpdates);
39 | idToBEEntityName.put(beEntityId, entityName);
40 | return beEntityId;
41 | }
42 |
43 | public static Entity createEntityByID(int tanEntityId, World worldIn)
44 | {
45 | Entity entity = null;
46 | ModContainer mc = FMLCommonHandler.instance().findContainerFor(Bullseye.instance);
47 | EntityRegistration er = EntityRegistry.instance().lookupModSpawn(mc, tanEntityId);
48 | if (er != null)
49 | {
50 | Class extends Entity> clazz = er.getEntityClass();
51 | try
52 | {
53 | if (clazz != null)
54 | {
55 | entity = (Entity)clazz.getConstructor(new Class[] {World.class}).newInstance(new Object[] {worldIn});
56 | }
57 | }
58 | catch (Exception exception)
59 | {
60 | exception.printStackTrace();
61 | }
62 | }
63 | if (entity == null)
64 | {
65 | Bullseye.logger.warn("Skipping BE Entity with id " + tanEntityId);
66 | }
67 | return entity;
68 | }
69 |
70 |
71 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/lang/ru_RU.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=Настройки стрел
4 |
5 | item.bomb_arrow.name=Стрела с бомбой
6 | item.diamond_arrow.name=Алмазная стрела
7 | item.egg_arrow.name=Стрела с яйцом
8 | item.extinguishing_arrow.name=Стрела пожаротушения
9 | item.fire_arrow.name=Огненная стрела
10 | item.ice_arrow.name=Ледяная стрела
11 | item.lightning_arrow.name=Молниеносная стрела
12 | item.training_arrow.name=Тренировочная стрела
13 |
14 | item.dye_arrow_red.name=Стрела с красным красителем
15 | item.dye_arrow_orange.name=Стрела с оранжевым красителем
16 | item.dye_arrow_yellow.name=Стрела с жёлтым красителем
17 | item.dye_arrow_lime.name=Стрела с лаймовым красителем
18 | item.dye_arrow_green.name=Стрела с зелёным красителем
19 | item.dye_arrow_cyan.name=Стрела с бирюзовым красителем
20 | item.dye_arrow_light_blue.name=Стрела с голубым красителем
21 | item.dye_arrow_blue.name=Стрела с синим красителем
22 | item.dye_arrow_purple.name=Стрела с фиолетовым красителем
23 | item.dye_arrow_magenta.name=Стрела с пурпурным красителем
24 | item.dye_arrow_pink.name=Стрела с розовым красителем
25 | item.dye_arrow_brown.name=Стрела с коричневым красителем
26 | item.dye_arrow_white.name=Стрела с белым красителем
27 | item.dye_arrow_silver.name=Стрела со светло-серым красителем
28 | item.dye_arrow_gray.name=Стрела с серым красителем
29 | item.dye_arrow_black.name=Стрела с чёрным красителем
30 |
31 | entity.Bullseye.arrow.name=Стрела
32 | entity.Bullseye.training_arrow.name=Тренировочная стрела
33 | entity.Bullseye.egg_arrow.name=Стрела с яйцом
34 | entity.Bullseye.extinguishing_arrow.name=Стрела пожаротушения
35 | entity.Bullseye.diamond_arrow.name=Алмазная стрела
36 | entity.Bullseye.bomb_arrow.name=Стрела с бомбой
37 | entity.Bullseye.fire_arrow.name=Огненная стрела
38 | entity.Bullseye.ice_arrow.name=Ледяная стрела
39 | entity.Bullseye.lightning_arrow.name=Молниеносная стрела
40 |
41 | entity.Bullseye.dye_arrow_red.name=Стрела с красным красителем
42 | entity.Bullseye.dye_arrow_orange.name=Стрела с оранжевым красителем
43 | entity.Bullseye.dye_arrow_yellow.name=Стрела с жёлтым красителем
44 | entity.Bullseye.dye_arrow_lime.name=Стрела с лаймовым красителем
45 | entity.Bullseye.dye_arrow_green.name=Стрела с зелёным красителем
46 | entity.Bullseye.dye_arrow_cyan.name=Стрела с бирюзовым красителем
47 | entity.Bullseye.dye_arrow_light_blue.name=Стрела с голубым красителем
48 | entity.Bullseye.dye_arrow_blue.name=Стрела с синим красителем
49 | entity.Bullseye.dye_arrow_purple.name=Стрела с фиолетовым красителем
50 | entity.Bullseye.dye_arrow_magenta.name=Стрела с пурпурным красителем
51 | entity.Bullseye.dye_arrow_pink.name=Стрела с розовым красителем
52 | entity.Bullseye.dye_arrow_brown.name=Стрела с коричневым красителем
53 | entity.Bullseye.dye_arrow_white.name=Стрела с белым красителем
54 | entity.Bullseye.dye_arrow_silver.name=Стрела со светло-серым красителем
55 | entity.Bullseye.dye_arrow_gray.name=Стрела с серым красителем
56 | entity.Bullseye.dye_arrow_black.name=Стрела с чёрным красителем
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/lang/fr_FR.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=Paramètres des flèches
4 | config.category.arrowSettings.tooltip=Baculer les propriétés pour les différents types de flèches
5 |
6 | item.bomb_arrow.name=Flèche explosive
7 | item.diamond_arrow.name=Flèche en diamant
8 | item.egg_arrow.name=Flèche à oeuf
9 | item.ender_arrow.name=Flèche de l'Ender
10 | item.extinguishing_arrow.name=Flèche d'extinction
11 | item.fire_arrow.name=Flèche enflammée
12 | item.ice_arrow.name=Flèche glacée
13 | item.light_arrow.name=Flèche lumineuse
14 | item.lightning_arrow.name=Flèche foudroyante
15 | item.prismarine_arrow.name=Flèche en prismarine
16 | item.training_arrow.name=Flèche d'entraînement
17 |
18 | item.dye_arrow_red.name=Flèche à teinture rouge
19 | item.dye_arrow_orange.name=Flèche à teinture orange
20 | item.dye_arrow_yellow.name=Flèche à teinture jaune
21 | item.dye_arrow_lime.name=Flèche à teinture vert clair
22 | item.dye_arrow_green.name=Flèche à teinture verte
23 | item.dye_arrow_cyan.name=Flèche à teinture cyan
24 | item.dye_arrow_light_blue.name=Flèche à teinture bleu clair
25 | item.dye_arrow_blue.name=Flèche à teinture bleue
26 | item.dye_arrow_purple.name=Flèche à teinture violette
27 | item.dye_arrow_magenta.name=Flèche à teinture magenta
28 | item.dye_arrow_pink.name=Flèche à teinture rose
29 | item.dye_arrow_brown.name=Flèche à teinture marron
30 | item.dye_arrow_white.name=Flèche à teinture blanche
31 | item.dye_arrow_silver.name=Flèche à teinture gris clair
32 | item.dye_arrow_gray.name=Flèche à teinture grise
33 | item.dye_arrow_black.name=Flèche à teinture noire
34 |
35 | entity.arrow.name=Flèche
36 | entity.training_arrow.name=Flèche d'entraînement
37 | entity.egg_arrow.name=Flèche à oeuf
38 | entity.extinguishing_arrow.name=Flèche d'extinction
39 | entity.diamond_arrow.name=Flèche en diamant
40 | entity.bomb_arrow.name=Flèche explosive
41 | entity.fire_arrow.name=Flèche enflammée
42 | entity.ice_arrow.name=Flèche glacée
43 | entity.lightning_arrow.name=Flèche foudroyante
44 | entity.prismarine_arrow.name=Flèche en prismarine
45 | entity.ender_arrow.name=Flèche de l'Ender
46 | entity.light_arrow.name=Flèche lumineuse
47 |
48 | entity.dye_arrow.name=Flèche à teinture
49 | entity.dye_arrow_red.name=Flèche à teinture rouge
50 | entity.dye_arrow_orange.name=Flèche à teinture orange
51 | entity.dye_arrow_yellow.name=Flèche à teinture jaune
52 | entity.dye_arrow_lime.name=Flèche à teinture vert clair
53 | entity.dye_arrow_green.name=Flèche à teinture verte
54 | entity.dye_arrow_cyan.name=Flèche à teinture cyan
55 | entity.dye_arrow_light_blue.name=Flèche à teinture bleu clair
56 | entity.dye_arrow_blue.name=Flèche à teinture bleue
57 | entity.dye_arrow_purple.name=Flèche à teinture violette
58 | entity.dye_arrow_magenta.name=Flèche à teinture magenta
59 | entity.dye_arrow_pink.name=Flèche à teinture rose
60 | entity.dye_arrow_brown.name=Flèche à teinture marron
61 | entity.dye_arrow_white.name=Flèche à teinture blanche
62 | entity.dye_arrow_silver.name=Flèche à teinture gris clair
63 | entity.dye_arrow_gray.name=Flèche à teinture grise
64 | entity.dye_arrow_black.name=Flèche à teinture noire
65 |
--------------------------------------------------------------------------------
/src/main/resources/assets/bullseye/lang/pt_BR.lang:
--------------------------------------------------------------------------------
1 | itemGroup.tabBullseye=Bullseye
2 |
3 | config.category.arrowSettings.title=Configurações de flechas
4 | config.category.arrowSettings.tooltip=Altera as propriedades dos diferentes tipos de flechas
5 |
6 | item.bomb_arrow.name=Flecha explosiva
7 | item.diamond_arrow.name=Flecha de diamante
8 | item.egg_arrow.name=Flecha de ovo
9 | item.ender_arrow.name=Flecha de ender
10 | item.extinguishing_arrow.name=Flecha extintora
11 | item.fire_arrow.name=Flecha incendiária
12 | item.ice_arrow.name=Flecha de gelo
13 | item.light_arrow.name=Flecha luminosa
14 | item.lightning_arrow.name=Flecha de Thor
15 | item.prismarine_arrow.name=Flecha de prismarinho
16 | item.training_arrow.name=Flecha de treino
17 |
18 | item.dye_arrow_red.name=Flecha com corante vermelho
19 | item.dye_arrow_orange.name=Flecha com corante laranja
20 | item.dye_arrow_yellow.name=Flecha com corante amarelo
21 | item.dye_arrow_lime.name=Flecha com corante verde-limão
22 | item.dye_arrow_green.name=Flecha com corante verde
23 | item.dye_arrow_cyan.name=Flecha com corante ciano
24 | item.dye_arrow_light_blue.name=Flecha com corante azul-claro
25 | item.dye_arrow_blue.name=Flecha com corante azul
26 | item.dye_arrow_purple.name=Flecha com corante roxo
27 | item.dye_arrow_magenta.name=Flecha com corante magenta
28 | item.dye_arrow_pink.name=Flecha com corante rosa
29 | item.dye_arrow_brown.name=Flecha com corante marrom
30 | item.dye_arrow_white.name=Flecha com corante branco
31 | item.dye_arrow_silver.name=Flecha com corante cinza-claro
32 | item.dye_arrow_gray.name=Flecha com corante cinza
33 | item.dye_arrow_black.name=Flecha com corante preto
34 |
35 | entity.arrow.name=Flecha
36 | entity.training_arrow.name=Flecha de treino
37 | entity.egg_arrow.name=Flecha de ovo
38 | entity.extinguishing_arrow.name=Flecha extintora
39 | entity.diamond_arrow.name=Flecha de diamante
40 | entity.bomb_arrow.name=Flecha explosiva
41 | entity.fire_arrow.name=Flecha incendiária
42 | entity.ice_arrow.name=Flecha de gelo
43 | entity.lightning_arrow.name=Flecha de Thor
44 | entity.prismarine_arrow.name=Flecha de prismarinho
45 | entity.ender_arrow.name=Flecha de ender
46 | entity.light_arrow.name=Flecha luminosa
47 |
48 | entity.dye_arrow.name=Flecha com corante
49 | entity.dye_arrow_red.name=Flecha com corante vermelho
50 | entity.dye_arrow_orange.name=Flecha com corante laranja
51 | entity.dye_arrow_yellow.name=Flecha com corante amarelo
52 | entity.dye_arrow_lime.name=Flecha com corante verde-limão
53 | entity.dye_arrow_green.name=Flecha com corante verde
54 | entity.dye_arrow_cyan.name=Flecha com corante ciano
55 | entity.dye_arrow_light_blue.name=Flecha com corante azul-claro
56 | entity.dye_arrow_blue.name=Flecha com corante azul
57 | entity.dye_arrow_purple.name=Flecha com corante roxo
58 | entity.dye_arrow_magenta.name=Flecha com corante magenta
59 | entity.dye_arrow_pink.name=Flecha com corante rosa
60 | entity.dye_arrow_brown.name=Flecha com corante marrom
61 | entity.dye_arrow_white.name=Flecha com corante branco
62 | entity.dye_arrow_silver.name=Flecha com corante cinza-claro
63 | entity.dye_arrow_gray.name=Flecha com corante cinza
64 | entity.dye_arrow_black.name=Flecha com corante preto
65 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/init/ModItems.java:
--------------------------------------------------------------------------------
1 | package bullseye.init;
2 |
3 | import static bullseye.api.BEItems.arrow;
4 | import static bullseye.api.BEItems.be_icon;
5 | import static bullseye.api.BEItems.dye_arrow;
6 |
7 | import bullseye.core.Bullseye;
8 | import bullseye.item.ItemBEArrow;
9 | import bullseye.item.ItemDyeArrow;
10 | import bullseye.util.inventory.CreativeTabBE;
11 | import net.minecraft.client.renderer.block.model.ModelBakery;
12 | import net.minecraft.client.renderer.block.model.ModelResourceLocation;
13 | import net.minecraft.creativetab.CreativeTabs;
14 | import net.minecraft.item.Item;
15 | import net.minecraft.item.ItemStack;
16 | import net.minecraft.util.NonNullList;
17 | import net.minecraft.util.ResourceLocation;
18 | import net.minecraftforge.client.model.ModelLoader;
19 | import net.minecraftforge.fml.common.FMLCommonHandler;
20 | import net.minecraftforge.fml.common.registry.ForgeRegistries;
21 | import net.minecraftforge.fml.relauncher.Side;
22 |
23 | public class ModItems
24 | {
25 | public static void init()
26 | {
27 | registerItems();
28 | //setupModels();
29 | }
30 |
31 | public static void registerItems()
32 | {
33 | //BE Creative Tab Icon
34 | be_icon = registerItem(new Item(), "be_icon");
35 | be_icon.setCreativeTab(null);
36 |
37 |
38 | //Main Items
39 | arrow = registerItem(new ItemBEArrow(), "arrow");
40 | dye_arrow = registerItem(new ItemDyeArrow(), "dye_arrow");
41 | }
42 |
43 | public static Item registerItem(Item item, String name)
44 | {
45 | return registerItem(item, name, CreativeTabBE.instance);
46 | }
47 |
48 | public static Item registerItem(Item item, String name, CreativeTabs tab)
49 | {
50 | item.setUnlocalizedName(name);
51 | if (tab != null)
52 | {
53 | item.setCreativeTab(CreativeTabBE.instance);
54 | }
55 |
56 | item.setRegistryName(new ResourceLocation(Bullseye.MOD_ID, name));
57 | ForgeRegistries.ITEMS.register(item);
58 | //BECommand.itemCount++;
59 |
60 | // register sub types if there are any
61 | if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
62 | {
63 | if (item.getHasSubtypes())
64 | {
65 | NonNullList subItems = NonNullList.create();
66 | item.getSubItems(CreativeTabBE.instance, subItems);
67 | for (ItemStack subItem : subItems)
68 | {
69 | String subItemName = item.getUnlocalizedName(subItem);
70 | subItemName = subItemName.substring(subItemName.indexOf(".") + 1); // remove 'item.' from the front
71 |
72 | ModelBakery.registerItemVariants(item, new ResourceLocation(Bullseye.MOD_ID, subItemName));
73 | ModelLoader.setCustomModelResourceLocation(item, subItem.getMetadata(), new ModelResourceLocation(Bullseye.MOD_ID + ":" + subItemName, "inventory"));
74 | }
75 | }
76 | else
77 | {
78 | ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Bullseye.MOD_ID + ":" + name, "inventory"));
79 | }
80 | }
81 |
82 | return item;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/particle/EntitySnowflakeFX.java:
--------------------------------------------------------------------------------
1 | package bullseye.particle;
2 |
3 | import bullseye.core.ClientProxy;
4 | import net.minecraft.client.particle.Particle;
5 | import net.minecraft.client.renderer.BufferBuilder;
6 | import net.minecraft.client.renderer.GlStateManager;
7 | import net.minecraft.entity.Entity;
8 | import net.minecraft.util.math.MathHelper;
9 | import net.minecraft.world.World;
10 | import net.minecraftforge.fml.client.FMLClientHandler;
11 |
12 | public class EntitySnowflakeFX extends Particle
13 | {
14 |
15 | public EntitySnowflakeFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn)
16 | {
17 | this(world, xCoordIn, yCoordIn, zCoordIn, motionXIn, motionYIn, motionZIn, 1.0F);
18 | }
19 |
20 | public EntitySnowflakeFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn, float par14)
21 | {
22 | super(world, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
23 |
24 | this.particleTextureIndexX = 7;
25 | this.particleTextureIndexY = 0;
26 |
27 | this.motionX *= 0.10000000149011612D;
28 | this.motionY *= 0.10000000149011612D;
29 | this.motionZ *= 0.10000000149011612D;
30 | this.motionX += motionXIn;
31 | this.motionY += motionYIn;
32 | this.motionZ += motionZIn;
33 | this.particleScale *= 0.75F;
34 | this.particleScale *= par14;
35 | this.particleMaxAge = (int)((8.0D / (Math.random() * 0.8D + 0.2D)) * 8);
36 | this.particleMaxAge = (int)((float)this.particleMaxAge * par14);
37 | this.particleAge = world.rand.nextInt(2);
38 | this.particleAlpha = 1.0F;
39 | this.particleGravity = 0.02F;
40 | this.canCollide = false;
41 | }
42 |
43 | @Override
44 | public int getFXLayer()
45 | {
46 | return 2;
47 | }
48 |
49 | @Override
50 | public void renderParticle(BufferBuilder buffer, Entity entity, float partialTicks, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY)
51 | {
52 |
53 | // EffectRenderer will by default bind the vanilla particles texture, override with our own
54 | FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particleTexturesLocation);
55 |
56 | float scaleMultiplier = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
57 | scaleMultiplier = MathHelper.clamp(scaleMultiplier, 0.0F, 1.0F);
58 | this.particleScale = this.particleScale * scaleMultiplier;
59 |
60 | GlStateManager.depthMask(false);
61 | GlStateManager.enableBlend();
62 | GlStateManager.blendFunc(770, 1);
63 |
64 | super.renderParticle(buffer, entity, partialTicks, rotX, rotXZ, rotZ, rotYZ, rotXY);
65 |
66 | GlStateManager.disableBlend();
67 | GlStateManager.depthMask(true);
68 |
69 | }
70 |
71 | @Override
72 | public void onUpdate()
73 | {
74 | prevPosX = posX;
75 | prevPosY = posY;
76 | prevPosZ = posZ;
77 |
78 | if (particleAge++ >= particleMaxAge)
79 | {
80 | this.setExpired();
81 | }
82 |
83 | this.particleTextureIndexX = 7 - particleAge * 8 / particleMaxAge;
84 | this.move(motionX, motionY, motionZ);
85 |
86 | if (posY == prevPosY)
87 | {
88 | motionX *= 1.1D;
89 | motionZ *= 1.1D;
90 | }
91 |
92 | motionX *= 0.9599999785423279D;
93 | motionY *= 0.9599999785423279D;
94 | motionZ *= 0.9599999785423279D;
95 |
96 | if (onGround)
97 | {
98 | motionX *= 0.699999988079071D;
99 | motionZ *= 0.699999988079071D;
100 | }
101 | }
102 |
103 |
104 | }
--------------------------------------------------------------------------------
/src/main/java/bullseye/core/ClientProxy.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2016, the Biomes O' Plenty Team
3 | *
4 | * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
5 | *
6 | * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
7 | ******************************************************************************/
8 | package bullseye.core;
9 |
10 | import bullseye.entities.projectile.EntityBEArrow;
11 | import bullseye.entities.projectile.EntityDyeArrow;
12 | import bullseye.entities.projectile.RenderBEArrow;
13 | import bullseye.entities.projectile.RenderDyeArrow;
14 | import bullseye.particle.BEParticleTypes;
15 | import bullseye.particle.EntitySnowflakeFX;
16 | import net.minecraft.client.Minecraft;
17 | import net.minecraft.client.particle.Particle;
18 | import net.minecraft.client.renderer.block.model.ModelBakery;
19 | import net.minecraft.client.renderer.block.model.ModelResourceLocation;
20 | import net.minecraft.client.renderer.entity.Render;
21 | import net.minecraft.client.renderer.entity.RenderManager;
22 | import net.minecraft.entity.Entity;
23 | import net.minecraft.item.Item;
24 | import net.minecraft.util.ResourceLocation;
25 | import net.minecraft.util.math.MathHelper;
26 | import net.minecraftforge.client.model.ModelLoader;
27 | import net.minecraftforge.fml.client.registry.IRenderFactory;
28 | import net.minecraftforge.fml.client.registry.RenderingRegistry;
29 |
30 |
31 | public class ClientProxy extends CommonProxy
32 | {
33 | public static ResourceLocation particleTexturesLocation = new ResourceLocation("bullseye:textures/particles/particles.png");
34 |
35 | @Override
36 | public void registerRenderers()
37 | {
38 | registerEntityRenderer(EntityBEArrow.class, RenderBEArrow.class);
39 | registerEntityRenderer(EntityDyeArrow.class, RenderDyeArrow.class);
40 | }
41 |
42 | @Override
43 | public void registerItemVariantModel(Item item, String name, int metadata)
44 | {
45 | if (item != null)
46 | {
47 | ModelBakery.registerItemVariants(item, new ResourceLocation("bullseye:" + name));
48 | ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(Bullseye.MOD_ID + ":" + name, "inventory"));
49 | }
50 | }
51 |
52 | @Override
53 | public void spawnParticle(BEParticleTypes type, double x, double y, double z, Object... info)
54 | {
55 | Minecraft minecraft = Minecraft.getMinecraft();
56 | Particle entityFx = null;
57 | switch (type)
58 | {
59 | case SNOWFLAKE:
60 | entityFx = new EntitySnowflakeFX(minecraft.world, x, y, z, MathHelper.nextDouble(minecraft.world.rand, -0.03, 0.03), -0.02D, MathHelper.nextDouble(minecraft.world.rand, -0.03, 0.03));
61 | break;
62 | default:
63 | break;
64 | }
65 |
66 | if (entityFx != null) {minecraft.effectRenderer.addEffect(entityFx);}
67 | }
68 |
69 | private static void registerEntityRenderer(Class entityClass, Class extends Render> renderClass)
70 | {
71 | RenderingRegistry.registerEntityRenderingHandler(entityClass, new EntityRenderFactory(renderClass));
72 | }
73 |
74 | private static class EntityRenderFactory implements IRenderFactory
75 | {
76 | private Class extends Render> renderClass;
77 |
78 | private EntityRenderFactory(Class extends Render> renderClass)
79 | {
80 | this.renderClass = renderClass;
81 | }
82 |
83 | @Override
84 | public Render createRenderFor(RenderManager manager)
85 | {
86 | Render renderer = null;
87 |
88 | try
89 | {
90 | renderer = renderClass.getConstructor(RenderManager.class).newInstance(manager);
91 | }
92 | catch (Exception e)
93 | {
94 | e.printStackTrace();
95 | }
96 |
97 | return renderer;
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/item/ItemBEArrow.java:
--------------------------------------------------------------------------------
1 | package bullseye.item;
2 |
3 | import java.util.List;
4 |
5 | import bullseye.entities.projectile.EntityBEArrow;
6 | import net.minecraft.creativetab.CreativeTabs;
7 | import net.minecraft.entity.EntityLivingBase;
8 | import net.minecraft.entity.projectile.EntityArrow;
9 | import net.minecraft.item.Item;
10 | import net.minecraft.item.ItemArrow;
11 | import net.minecraft.item.ItemStack;
12 | import net.minecraft.util.IStringSerializable;
13 | import net.minecraft.util.NonNullList;
14 | import net.minecraft.world.World;
15 | import net.minecraftforge.fml.relauncher.Side;
16 | import net.minecraftforge.fml.relauncher.SideOnly;
17 |
18 |
19 | public class ItemBEArrow extends ItemArrow
20 | {
21 | public static enum ArrowType implements IStringSerializable
22 | {
23 | TRAINING, EGG, EXTINGUISHING, DIAMOND, BOMB, FIRE, ICE, LIGHTNING, PRISMARINE, ENDER, LIGHT;
24 | @Override
25 | public String getName()
26 | {
27 | return this.name().toLowerCase() + "_arrow";
28 | }
29 | @Override
30 | public String toString()
31 | {
32 | return this.getName();
33 | }
34 |
35 | public double getDamageInflicted()
36 | {
37 | switch(this)
38 | {
39 | case TRAINING:
40 | return 0.0D;
41 | case EGG:
42 | return 0.25D;
43 | case EXTINGUISHING:
44 | return 1.0D;
45 | case DIAMOND:
46 | return 4.0D;
47 | case FIRE:
48 | return 1.5D;
49 | case ICE:
50 | return 1.0D;
51 | case LIGHTNING:
52 | return 0.5D;
53 | case BOMB:
54 | return 1.25D;
55 | case PRISMARINE:
56 | return 1.75D;
57 | case ENDER:
58 | return 0.75D;
59 | case LIGHT:
60 | return 2.0D;
61 | default:
62 | return 2.0D;
63 | }
64 | }
65 | public static ArrowType fromMeta(int meta)
66 | {
67 | return ArrowType.values()[meta % ArrowType.values().length];
68 | }
69 | };
70 |
71 | public ItemBEArrow()
72 | {
73 | this.setHasSubtypes(true);
74 | this.setMaxDamage(0);
75 | }
76 |
77 | @Override
78 | public EntityArrow createArrow(World worldIn, ItemStack stack, EntityLivingBase shooter)
79 | {
80 | EntityBEArrow entityBEArrow = new EntityBEArrow(worldIn, shooter);
81 | entityBEArrow.setArrowType(ItemBEArrow.ArrowType.fromMeta(stack.getMetadata()));
82 | entityBEArrow.setDamage(ItemBEArrow.ArrowType.fromMeta(stack.getMetadata()).getDamageInflicted());
83 | return entityBEArrow;
84 | }
85 |
86 | // add all the gem types as separate items in the creative tab
87 | @Override
88 | @SideOnly(Side.CLIENT)
89 | public void getSubItems(CreativeTabs tab, NonNullList subItems)
90 | {
91 | if (this.isInCreativeTab(tab))
92 | {
93 | for (ArrowType arrowType : ArrowType.values())
94 | {
95 | subItems.add(new ItemStack(this, 1, arrowType.ordinal()));
96 | }
97 | }
98 | }
99 |
100 | @Override
101 | public boolean hasEffect(ItemStack stack)
102 | {
103 | ArrowType arrowtype = ItemBEArrow.ArrowType.fromMeta(stack.getMetadata());
104 | switch (arrowtype)
105 | {
106 | case FIRE: case ICE: case LIGHTNING:
107 | return true;
108 | default:
109 | return super.hasEffect(stack);
110 | }
111 | }
112 |
113 | // default behavior in Item is to return 0, but the meta value is important here because it determines which dart type to use
114 | @Override
115 | public int getMetadata(int metadata)
116 | {
117 | return metadata;
118 | }
119 |
120 | // get the correct name for this item by looking up the meta value in the DartType enum
121 | @Override
122 | public String getUnlocalizedName(ItemStack stack)
123 | {
124 | return "item." + ArrowType.fromMeta(stack.getMetadata()).toString();
125 | }
126 |
127 |
128 | }
129 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/entities/projectile/RenderBEArrow.java:
--------------------------------------------------------------------------------
1 | package bullseye.entities.projectile;
2 |
3 | import bullseye.item.ItemBEArrow;
4 | import net.minecraft.client.renderer.BufferBuilder;
5 | import net.minecraft.client.renderer.GlStateManager;
6 | import net.minecraft.client.renderer.Tessellator;
7 | import net.minecraft.client.renderer.entity.Render;
8 | import net.minecraft.client.renderer.entity.RenderManager;
9 | import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
10 | import net.minecraft.util.ResourceLocation;
11 | import net.minecraft.util.math.MathHelper;
12 | import net.minecraftforge.fml.relauncher.Side;
13 | import net.minecraftforge.fml.relauncher.SideOnly;
14 |
15 | @SideOnly(Side.CLIENT)
16 | public class RenderBEArrow extends Render
17 | {
18 | protected ResourceLocation[] textures;
19 |
20 | public RenderBEArrow(RenderManager renderManager)
21 | {
22 | super(renderManager);
23 | int n = ItemBEArrow.ArrowType.values().length;
24 | this.textures = new ResourceLocation[n];
25 | for (int i = 0; i < n; ++i)
26 | {
27 | this.textures[i] = new ResourceLocation("bullseye:textures/entity/projectile/" + ItemBEArrow.ArrowType.values()[i].getName() + ".png");
28 | }
29 | }
30 |
31 | public void doRender(EntityBEArrow arrow, double x, double y, double z, float entityYaw, float partialTicks)
32 | {
33 | this.bindEntityTexture(arrow);
34 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
35 | GlStateManager.pushMatrix();
36 | GlStateManager.disableLighting();
37 | GlStateManager.translate((float)x, (float)y, (float)z);
38 | GlStateManager.rotate(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
39 | GlStateManager.rotate(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
40 | Tessellator tessellator = Tessellator.getInstance();
41 | BufferBuilder bufferbuilder = tessellator.getBuffer();
42 | int i = 0;
43 | float f = 0.0F;
44 | float f1 = 0.5F;
45 | float f2 = (float)(0 + i * 10) / 32.0F;
46 | float f3 = (float)(5 + i * 10) / 32.0F;
47 | float f4 = 0.0F;
48 | float f5 = 0.15625F;
49 | float f6 = (float)(5 + i * 10) / 32.0F;
50 | float f7 = (float)(10 + i * 10) / 32.0F;
51 | float f8 = 0.05625F;
52 | GlStateManager.enableRescaleNormal();
53 | float f9 = (float)arrow.arrowShake - partialTicks;
54 |
55 | if (f9 > 0.0F)
56 | {
57 | float f10 = -MathHelper.sin(f9 * 3.0F) * f9;
58 | GlStateManager.rotate(f10, 0.0F, 0.0F, 1.0F);
59 | }
60 |
61 | GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
62 | GlStateManager.scale(f8, f8, f8);
63 | GlStateManager.translate(-4.0F, 0.0F, 0.0F);
64 |
65 | if (this.renderOutlines)
66 | {
67 | GlStateManager.enableColorMaterial();
68 | GlStateManager.enableOutlineMode(this.getTeamColor(arrow));
69 | }
70 |
71 | GlStateManager.glNormal3f(f8, 0.0F, 0.0F);
72 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
73 | bufferbuilder.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
74 | bufferbuilder.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
75 | bufferbuilder.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
76 | bufferbuilder.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
77 | tessellator.draw();
78 | GlStateManager.glNormal3f(-f8, 0.0F, 0.0F);
79 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
80 | bufferbuilder.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
81 | bufferbuilder.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
82 | bufferbuilder.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
83 | bufferbuilder.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
84 | tessellator.draw();
85 |
86 | for (int j = 0; j < 4; ++j)
87 | {
88 | GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
89 | GlStateManager.glNormal3f(0.0F, 0.0F, f8);
90 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
91 | bufferbuilder.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
92 | bufferbuilder.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
93 | bufferbuilder.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex();
94 | bufferbuilder.pos(-8.0D, 2.0D, 0.0D).tex((double)f, (double)f3).endVertex();
95 | tessellator.draw();
96 | }
97 |
98 | if (this.renderOutlines)
99 | {
100 | GlStateManager.disableOutlineMode();
101 | GlStateManager.disableColorMaterial();
102 | }
103 |
104 | GlStateManager.disableRescaleNormal();
105 | GlStateManager.enableLighting();
106 | GlStateManager.popMatrix();
107 | super.doRender(arrow, x, y, z, entityYaw, partialTicks);
108 | }
109 |
110 | @Override
111 | protected ResourceLocation getEntityTexture(EntityBEArrow arrow)
112 | {
113 | return this.textures[arrow.getArrowType().ordinal()];
114 | }
115 | }
--------------------------------------------------------------------------------
/src/main/java/bullseye/entities/projectile/RenderDyeArrow.java:
--------------------------------------------------------------------------------
1 | package bullseye.entities.projectile;
2 |
3 | import bullseye.item.ItemDyeArrow;
4 | import net.minecraft.client.renderer.BufferBuilder;
5 | import net.minecraft.client.renderer.GlStateManager;
6 | import net.minecraft.client.renderer.Tessellator;
7 | import net.minecraft.client.renderer.entity.Render;
8 | import net.minecraft.client.renderer.entity.RenderManager;
9 | import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
10 | import net.minecraft.util.ResourceLocation;
11 | import net.minecraft.util.math.MathHelper;
12 | import net.minecraftforge.fml.relauncher.Side;
13 | import net.minecraftforge.fml.relauncher.SideOnly;
14 |
15 | @SideOnly(Side.CLIENT)
16 | public class RenderDyeArrow extends Render
17 | {
18 | protected ResourceLocation[] textures;
19 |
20 | public RenderDyeArrow(RenderManager renderManager)
21 | {
22 | super(renderManager);
23 | int n = ItemDyeArrow.DyeType.values().length;
24 | this.textures = new ResourceLocation[n];
25 | for (int i = 0; i < n; ++i)
26 | {
27 | this.textures[i] = new ResourceLocation("bullseye:textures/entity/projectile/" + ItemDyeArrow.DyeType.values()[i].getName() + ".png");
28 | }
29 | }
30 |
31 | public void doRender(EntityDyeArrow arrow, double x, double y, double z, float entityYaw, float partialTicks)
32 | {
33 | this.bindEntityTexture(arrow);
34 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
35 | GlStateManager.pushMatrix();
36 | GlStateManager.disableLighting();
37 | GlStateManager.translate((float)x, (float)y, (float)z);
38 | GlStateManager.rotate(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * partialTicks - 90.0F, 0.0F, 1.0F, 0.0F);
39 | GlStateManager.rotate(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * partialTicks, 0.0F, 0.0F, 1.0F);
40 | Tessellator tessellator = Tessellator.getInstance();
41 | BufferBuilder bufferbuilder = tessellator.getBuffer();
42 | int i = 0;
43 | float f = 0.0F;
44 | float f1 = 0.5F;
45 | float f2 = (float)(0 + i * 10) / 32.0F;
46 | float f3 = (float)(5 + i * 10) / 32.0F;
47 | float f4 = 0.0F;
48 | float f5 = 0.15625F;
49 | float f6 = (float)(5 + i * 10) / 32.0F;
50 | float f7 = (float)(10 + i * 10) / 32.0F;
51 | float f8 = 0.05625F;
52 | GlStateManager.enableRescaleNormal();
53 | float f9 = (float)arrow.arrowShake - partialTicks;
54 |
55 | if (f9 > 0.0F)
56 | {
57 | float f10 = -MathHelper.sin(f9 * 3.0F) * f9;
58 | GlStateManager.rotate(f10, 0.0F, 0.0F, 1.0F);
59 | }
60 |
61 | GlStateManager.rotate(45.0F, 1.0F, 0.0F, 0.0F);
62 | GlStateManager.scale(f8, f8, f8);
63 | GlStateManager.translate(-4.0F, 0.0F, 0.0F);
64 |
65 | if (this.renderOutlines)
66 | {
67 | GlStateManager.enableColorMaterial();
68 | GlStateManager.enableOutlineMode(this.getTeamColor(arrow));
69 | }
70 |
71 | GlStateManager.glNormal3f(f8, 0.0F, 0.0F);
72 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
73 | bufferbuilder.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
74 | bufferbuilder.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
75 | bufferbuilder.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
76 | bufferbuilder.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
77 | tessellator.draw();
78 | GlStateManager.glNormal3f(-f8, 0.0F, 0.0F);
79 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
80 | bufferbuilder.pos(-7.0D, 2.0D, -2.0D).tex((double)f4, (double)f6).endVertex();
81 | bufferbuilder.pos(-7.0D, 2.0D, 2.0D).tex((double)f5, (double)f6).endVertex();
82 | bufferbuilder.pos(-7.0D, -2.0D, 2.0D).tex((double)f5, (double)f7).endVertex();
83 | bufferbuilder.pos(-7.0D, -2.0D, -2.0D).tex((double)f4, (double)f7).endVertex();
84 | tessellator.draw();
85 |
86 | for (int j = 0; j < 4; ++j)
87 | {
88 | GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
89 | GlStateManager.glNormal3f(0.0F, 0.0F, f8);
90 | bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
91 | bufferbuilder.pos(-8.0D, -2.0D, 0.0D).tex((double)f, (double)f2).endVertex();
92 | bufferbuilder.pos(8.0D, -2.0D, 0.0D).tex((double)f1, (double)f2).endVertex();
93 | bufferbuilder.pos(8.0D, 2.0D, 0.0D).tex((double)f1, (double)f3).endVertex();
94 | bufferbuilder.pos(-8.0D, 2.0D, 0.0D).tex((double)f, (double)f3).endVertex();
95 | tessellator.draw();
96 | }
97 |
98 | if (this.renderOutlines)
99 | {
100 | GlStateManager.disableOutlineMode();
101 | GlStateManager.disableColorMaterial();
102 | }
103 |
104 | GlStateManager.disableRescaleNormal();
105 | GlStateManager.enableLighting();
106 | GlStateManager.popMatrix();
107 | super.doRender(arrow, x, y, z, entityYaw, partialTicks);
108 | }
109 |
110 | @Override
111 | protected ResourceLocation getEntityTexture(EntityDyeArrow arrow)
112 | {
113 | return this.textures[arrow.getDyeType().ordinal()];
114 | }
115 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
2 | International Public License
3 |
4 | By exercising the Licensed Rights (defined below), You accept and agree
5 | to be bound by the terms and conditions of this Creative Commons
6 | Attribution-NonCommercial-NoDerivatives 4.0 International Public
7 | License ("Public License"). To the extent this Public License may be
8 | interpreted as a contract, You are granted the Licensed Rights in
9 | consideration of Your acceptance of these terms and conditions, and the
10 | Licensor grants You such rights in consideration of benefits the
11 | Licensor receives from making the Licensed Material available under
12 | these terms and conditions.
13 |
14 |
15 | Section 1 -- Definitions.
16 |
17 | a. Adapted Material means material subject to Copyright and Similar
18 | Rights that is derived from or based upon the Licensed Material
19 | and in which the Licensed Material is translated, altered,
20 | arranged, transformed, or otherwise modified in a manner requiring
21 | permission under the Copyright and Similar Rights held by the
22 | Licensor. For purposes of this Public License, where the Licensed
23 | Material is a musical work, performance, or sound recording,
24 | Adapted Material is always produced where the Licensed Material is
25 | synched in timed relation with a moving image.
26 |
27 | b. Copyright and Similar Rights means copyright and/or similar rights
28 | closely related to copyright including, without limitation,
29 | performance, broadcast, sound recording, and Sui Generis Database
30 | Rights, without regard to how the rights are labeled or
31 | categorized. For purposes of this Public License, the rights
32 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
33 | Rights.
34 |
35 | c. Effective Technological Measures means those measures that, in the
36 | absence of proper authority, may not be circumvented under laws
37 | fulfilling obligations under Article 11 of the WIPO Copyright
38 | Treaty adopted on December 20, 1996, and/or similar international
39 | agreements.
40 |
41 | d. Exceptions and Limitations means fair use, fair dealing, and/or
42 | any other exception or limitation to Copyright and Similar Rights
43 | that applies to Your use of the Licensed Material.
44 |
45 | e. Licensed Material means the artistic or literary work, database,
46 | or other material to which the Licensor applied this Public
47 | License.
48 |
49 | f. Licensed Rights means the rights granted to You subject to the
50 | terms and conditions of this Public License, which are limited to
51 | all Copyright and Similar Rights that apply to Your use of the
52 | Licensed Material and that the Licensor has authority to license.
53 |
54 | g. Licensor means the individual(s) or entity(ies) granting rights
55 | under this Public License.
56 |
57 | h. NonCommercial means not primarily intended for or directed towards
58 | commercial advantage or monetary compensation. For purposes of
59 | this Public License, the exchange of the Licensed Material for
60 | other material subject to Copyright and Similar Rights by digital
61 | file-sharing or similar means is NonCommercial provided there is
62 | no payment of monetary compensation in connection with the
63 | exchange.
64 |
65 | i. Share means to provide material to the public by any means or
66 | process that requires permission under the Licensed Rights, such
67 | as reproduction, public display, public performance, distribution,
68 | dissemination, communication, or importation, and to make material
69 | available to the public including in ways that members of the
70 | public may access the material from a place and at a time
71 | individually chosen by them.
72 |
73 | j. Sui Generis Database Rights means rights other than copyright
74 | resulting from Directive 96/9/EC of the European Parliament and of
75 | the Council of 11 March 1996 on the legal protection of databases,
76 | as amended and/or succeeded, as well as other essentially
77 | equivalent rights anywhere in the world.
78 |
79 | k. You means the individual or entity exercising the Licensed Rights
80 | under this Public License. Your has a corresponding meaning.
81 |
82 |
83 | Section 2 -- Scope.
84 |
85 | a. License grant.
86 |
87 | 1. Subject to the terms and conditions of this Public License,
88 | the Licensor hereby grants You a worldwide, royalty-free,
89 | non-sublicensable, non-exclusive, irrevocable license to
90 | exercise the Licensed Rights in the Licensed Material to:
91 |
92 | a. reproduce and Share the Licensed Material, in whole or
93 | in part, for NonCommercial purposes only; and
94 |
95 | b. produce and reproduce, but not Share, Adapted Material
96 | for NonCommercial purposes only.
97 |
98 | 2. Exceptions and Limitations. For the avoidance of doubt, where
99 | Exceptions and Limitations apply to Your use, this Public
100 | License does not apply, and You do not need to comply with
101 | its terms and conditions.
102 |
103 | 3. Term. The term of this Public License is specified in Section
104 | 6(a).
105 |
106 | 4. Media and formats; technical modifications allowed. The
107 | Licensor authorizes You to exercise the Licensed Rights in
108 | all media and formats whether now known or hereafter created,
109 | and to make technical modifications necessary to do so. The
110 | Licensor waives and/or agrees not to assert any right or
111 | authority to forbid You from making technical modifications
112 | necessary to exercise the Licensed Rights, including
113 | technical modifications necessary to circumvent Effective
114 | Technological Measures. For purposes of this Public License,
115 | simply making modifications authorized by this Section 2(a)
116 | (4) never produces Adapted Material.
117 |
118 | 5. Downstream recipients.
119 |
120 | a. Offer from the Licensor -- Licensed Material. Every
121 | recipient of the Licensed Material automatically
122 | receives an offer from the Licensor to exercise the
123 | Licensed Rights under the terms and conditions of this
124 | Public License.
125 |
126 | b. No downstream restrictions. You may not offer or impose
127 | any additional or different terms or conditions on, or
128 | apply any Effective Technological Measures to, the
129 | Licensed Material if doing so restricts exercise of the
130 | Licensed Rights by any recipient of the Licensed
131 | Material.
132 |
133 | 6. No endorsement. Nothing in this Public License constitutes or
134 | may be construed as permission to assert or imply that You
135 | are, or that Your use of the Licensed Material is, connected
136 | with, or sponsored, endorsed, or granted official status by,
137 | the Licensor or others designated to receive attribution as
138 | provided in Section 3(a)(1)(A)(i).
139 |
140 | b. Other rights.
141 |
142 | 1. Moral rights, such as the right of integrity, are not
143 | licensed under this Public License, nor are publicity,
144 | privacy, and/or other similar personality rights; however, to
145 | the extent possible, the Licensor waives and/or agrees not to
146 | assert any such rights held by the Licensor to the limited
147 | extent necessary to allow You to exercise the Licensed
148 | Rights, but not otherwise.
149 |
150 | 2. Patent and trademark rights are not licensed under this
151 | Public License.
152 |
153 | 3. To the extent possible, the Licensor waives any right to
154 | collect royalties from You for the exercise of the Licensed
155 | Rights, whether directly or through a collecting society
156 | under any voluntary or waivable statutory or compulsory
157 | licensing scheme. In all other cases the Licensor expressly
158 | reserves any right to collect such royalties, including when
159 | the Licensed Material is used other than for NonCommercial
160 | purposes.
161 |
162 |
163 | Section 3 -- License Conditions.
164 |
165 | Your exercise of the Licensed Rights is expressly made subject to the
166 | following conditions.
167 |
168 | a. Attribution.
169 |
170 | 1. If You Share the Licensed Material, You must:
171 |
172 | a. retain the following if it is supplied by the Licensor
173 | with the Licensed Material:
174 |
175 | i. identification of the creator(s) of the Licensed
176 | Material and any others designated to receive
177 | attribution, in any reasonable manner requested by
178 | the Licensor (including by pseudonym if
179 | designated);
180 |
181 | ii. a copyright notice;
182 |
183 | iii. a notice that refers to this Public License;
184 |
185 | iv. a notice that refers to the disclaimer of
186 | warranties;
187 |
188 | v. a URI or hyperlink to the Licensed Material to the
189 | extent reasonably practicable;
190 |
191 | b. indicate if You modified the Licensed Material and
192 | retain an indication of any previous modifications; and
193 |
194 | c. indicate the Licensed Material is licensed under this
195 | Public License, and include the text of, or the URI or
196 | hyperlink to, this Public License.
197 |
198 | For the avoidance of doubt, You do not have permission under
199 | this Public License to Share Adapted Material.
200 |
201 | 2. You may satisfy the conditions in Section 3(a)(1) in any
202 | reasonable manner based on the medium, means, and context in
203 | which You Share the Licensed Material. For example, it may be
204 | reasonable to satisfy the conditions by providing a URI or
205 | hyperlink to a resource that includes the required
206 | information.
207 |
208 | 3. If requested by the Licensor, You must remove any of the
209 | information required by Section 3(a)(1)(A) to the extent
210 | reasonably practicable.
211 |
212 |
213 | Section 4 -- Sui Generis Database Rights.
214 |
215 | Where the Licensed Rights include Sui Generis Database Rights that
216 | apply to Your use of the Licensed Material:
217 |
218 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
219 | to extract, reuse, reproduce, and Share all or a substantial
220 | portion of the contents of the database for NonCommercial purposes
221 | only and provided You do not Share Adapted Material;
222 |
223 | b. if You include all or a substantial portion of the database
224 | contents in a database in which You have Sui Generis Database
225 | Rights, then the database in which You have Sui Generis Database
226 | Rights (but not its individual contents) is Adapted Material; and
227 |
228 | c. You must comply with the conditions in Section 3(a) if You Share
229 | all or a substantial portion of the contents of the database.
230 |
231 | For the avoidance of doubt, this Section 4 supplements and does not
232 | replace Your obligations under this Public License where the Licensed
233 | Rights include other Copyright and Similar Rights.
234 |
235 |
236 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
237 |
238 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
239 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
240 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
241 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
242 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
243 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
244 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
245 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
246 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
247 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
248 |
249 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
250 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
251 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
252 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
253 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
254 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
255 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
256 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
257 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
258 |
259 | c. The disclaimer of warranties and limitation of liability provided
260 | above shall be interpreted in a manner that, to the extent
261 | possible, most closely approximates an absolute disclaimer and
262 | waiver of all liability.
263 |
264 |
265 | Section 6 -- Term and Termination.
266 |
267 | a. This Public License applies for the term of the Copyright and
268 | Similar Rights licensed here. However, if You fail to comply with
269 | this Public License, then Your rights under this Public License
270 | terminate automatically.
271 |
272 | b. Where Your right to use the Licensed Material has terminated under
273 | Section 6(a), it reinstates:
274 |
275 | 1. automatically as of the date the violation is cured, provided
276 | it is cured within 30 days of Your discovery of the
277 | violation; or
278 |
279 | 2. upon express reinstatement by the Licensor.
280 |
281 | For the avoidance of doubt, this Section 6(b) does not affect any
282 | right the Licensor may have to seek remedies for Your violations
283 | of this Public License.
284 |
285 | c. For the avoidance of doubt, the Licensor may also offer the
286 | Licensed Material under separate terms or conditions or stop
287 | distributing the Licensed Material at any time; however, doing so
288 | will not terminate this Public License.
289 |
290 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
291 | License.
292 |
293 |
294 | Section 7 -- Other Terms and Conditions.
295 |
296 | a. The Licensor shall not be bound by any additional or different
297 | terms or conditions communicated by You unless expressly agreed.
298 |
299 | b. Any arrangements, understandings, or agreements regarding the
300 | Licensed Material not stated herein are separate from and
301 | independent of the terms and conditions of this Public License.
302 |
303 |
304 | Section 8 -- Interpretation.
305 |
306 | a. For the avoidance of doubt, this Public License does not, and
307 | shall not be interpreted to, reduce, limit, restrict, or impose
308 | conditions on any use of the Licensed Material that could lawfully
309 | be made without permission under this Public License.
310 |
311 | b. To the extent possible, if any provision of this Public License is
312 | deemed unenforceable, it shall be automatically reformed to the
313 | minimum extent necessary to make it enforceable. If the provision
314 | cannot be reformed, it shall be severed from this Public License
315 | without affecting the enforceability of the remaining terms and
316 | conditions.
317 |
318 | c. No term or condition of this Public License will be waived and no
319 | failure to comply consented to unless expressly agreed to by the
320 | Licensor.
321 |
322 | d. Nothing in this Public License constitutes or may be interpreted
323 | as a limitation upon, or waiver of, any privileges and immunities
324 | that apply to the Licensor or You, including from the legal
325 | processes of any jurisdiction or authority.
326 |
--------------------------------------------------------------------------------
/src/main/java/bullseye/entities/projectile/EntityDyeArrow.java:
--------------------------------------------------------------------------------
1 | package bullseye.entities.projectile;
2 |
3 | import java.util.List;
4 |
5 | import javax.annotation.Nullable;
6 |
7 | import com.google.common.base.Predicate;
8 | import com.google.common.base.Predicates;
9 |
10 | import bullseye.api.BEItems;
11 | import bullseye.item.ItemDyeArrow;
12 | import net.minecraft.block.Block;
13 | import net.minecraft.block.BlockColored;
14 | import net.minecraft.block.BlockConcretePowder;
15 | import net.minecraft.block.BlockGlazedTerracotta;
16 | import net.minecraft.block.material.Material;
17 | import net.minecraft.block.state.IBlockState;
18 | import net.minecraft.enchantment.EnchantmentHelper;
19 | import net.minecraft.entity.Entity;
20 | import net.minecraft.entity.EntityLivingBase;
21 | import net.minecraft.entity.IProjectile;
22 | import net.minecraft.entity.monster.EntityEnderman;
23 | import net.minecraft.entity.passive.EntitySheep;
24 | import net.minecraft.entity.passive.EntityWolf;
25 | import net.minecraft.entity.player.EntityPlayer;
26 | import net.minecraft.entity.player.EntityPlayerMP;
27 | import net.minecraft.entity.projectile.EntityArrow;
28 | import net.minecraft.init.Blocks;
29 | import net.minecraft.init.Enchantments;
30 | import net.minecraft.init.Items;
31 | import net.minecraft.init.SoundEvents;
32 | import net.minecraft.item.EnumDyeColor;
33 | import net.minecraft.item.Item;
34 | import net.minecraft.item.ItemArmor;
35 | import net.minecraft.item.ItemStack;
36 | import net.minecraft.nbt.NBTTagCompound;
37 | import net.minecraft.network.datasync.DataParameter;
38 | import net.minecraft.network.datasync.DataSerializers;
39 | import net.minecraft.network.datasync.EntityDataManager;
40 | import net.minecraft.network.play.server.SPacketChangeGameState;
41 | import net.minecraft.util.DamageSource;
42 | import net.minecraft.util.EntitySelectors;
43 | import net.minecraft.util.EnumFacing;
44 | import net.minecraft.util.EnumParticleTypes;
45 | import net.minecraft.util.ResourceLocation;
46 | import net.minecraft.util.datafix.DataFixer;
47 | import net.minecraft.util.math.AxisAlignedBB;
48 | import net.minecraft.util.math.BlockPos;
49 | import net.minecraft.util.math.MathHelper;
50 | import net.minecraft.util.math.RayTraceResult;
51 | import net.minecraft.util.math.Vec3d;
52 | import net.minecraft.world.World;
53 | import net.minecraftforge.fml.common.registry.IThrowableEntity;
54 | import net.minecraftforge.fml.relauncher.Side;
55 | import net.minecraftforge.fml.relauncher.SideOnly;
56 |
57 | public class EntityDyeArrow extends EntityArrow implements IProjectile, IThrowableEntity
58 | {
59 | private static final Predicate ARROW_TARGETS = Predicates.and(new Predicate[] {EntitySelectors.NOT_SPECTATING, EntitySelectors.IS_ALIVE, new Predicate()
60 | {
61 | public boolean apply(@Nullable Entity p_apply_1_)
62 | {
63 | return p_apply_1_.canBeCollidedWith();
64 | }
65 | }
66 | });
67 | private static final DataParameter CRITICAL = EntityDataManager.createKey(EntityDyeArrow.class, DataSerializers.BYTE);
68 | private static final DataParameter DYE_TYPE = EntityDataManager.createKey(EntityDyeArrow.class, DataSerializers.BYTE);
69 | private int xTile;
70 | private int yTile;
71 | private int zTile;
72 | private Block inTile;
73 | private int inData;
74 | protected boolean inGround;
75 | protected int timeInGround;
76 | public EntityDyeArrow.PickupStatus pickupStatus;
77 | public int arrowShake;
78 | public Entity shootingEntity;
79 | private int ticksInGround;
80 | private int ticksInAir;
81 | private double damage;
82 | private int knockbackStrength;
83 |
84 | public EntityDyeArrow(World worldIn)
85 | {
86 | super(worldIn);
87 | this.xTile = -1;
88 | this.yTile = -1;
89 | this.zTile = -1;
90 | this.pickupStatus = EntityDyeArrow.PickupStatus.DISALLOWED;
91 | this.damage = 0.25D;
92 | this.setSize(0.5F, 0.5F);
93 | }
94 |
95 | public EntityDyeArrow(World worldIn, double x, double y, double z)
96 | {
97 | this(worldIn);
98 | this.setPosition(x, y, z);
99 | }
100 |
101 | public EntityDyeArrow(World worldIn, EntityLivingBase shooter)
102 | {
103 | this(worldIn, shooter.posX, shooter.posY + (double)shooter.getEyeHeight() - 0.10000000149011612D, shooter.posZ);
104 | this.shootingEntity = shooter;
105 |
106 | if (shooter instanceof EntityPlayer)
107 | {
108 | this.pickupStatus = EntityDyeArrow.PickupStatus.ALLOWED;
109 | }
110 | }
111 |
112 | @SideOnly(Side.CLIENT)
113 | @Override
114 | public boolean isInRangeToRenderDist(double distance)
115 | {
116 | double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 10.0D;
117 |
118 | if (Double.isNaN(d0))
119 | {
120 | d0 = 1.0D;
121 | }
122 |
123 | d0 = d0 * 64.0D * getRenderDistanceWeight();
124 | return distance < d0 * d0;
125 | }
126 |
127 | @Override
128 | protected void entityInit()
129 | {
130 | this.dataManager.register(CRITICAL, Byte.valueOf((byte)0));
131 | this.dataManager.register(DYE_TYPE, Byte.valueOf((byte)0));
132 | }
133 |
134 | public void setDyeType(ItemDyeArrow.DyeType dyeType)
135 | {
136 | dataManager.set(DYE_TYPE, (byte)dyeType.ordinal());
137 | }
138 |
139 | public ItemDyeArrow.DyeType getDyeType()
140 | {
141 | return ItemDyeArrow.DyeType.values()[dataManager.get(DYE_TYPE)];
142 | }
143 |
144 | @Override
145 | public void shoot(Entity shooter, float pitch, float yaw, float p_184547_4_, float velocity, float inaccuracy)
146 | {
147 | float f = -MathHelper.sin(yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F);
148 | float f1 = -MathHelper.sin(pitch * 0.017453292F);
149 | float f2 = MathHelper.cos(yaw * 0.017453292F) * MathHelper.cos(pitch * 0.017453292F);
150 | this.shoot((double)f, (double)f1, (double)f2, velocity, inaccuracy);
151 | this.motionX += shooter.motionX;
152 | this.motionZ += shooter.motionZ;
153 |
154 | if (!shooter.onGround)
155 | {
156 | this.motionY += shooter.motionY;
157 | }
158 | }
159 |
160 | @Override
161 | public void shoot(double x, double y, double z, float velocity, float inaccuracy)
162 | {
163 | float f = MathHelper.sqrt(x * x + y * y + z * z);
164 | x = x / (double)f;
165 | y = y / (double)f;
166 | z = z / (double)f;
167 | x = x + this.rand.nextGaussian() * 0.007499999832361937D * (double)inaccuracy;
168 | y = y + this.rand.nextGaussian() * 0.007499999832361937D * (double)inaccuracy;
169 | z = z + this.rand.nextGaussian() * 0.007499999832361937D * (double)inaccuracy;
170 | x = x * (double)velocity;
171 | y = y * (double)velocity;
172 | z = z * (double)velocity;
173 | this.motionX = x;
174 | this.motionY = y;
175 | this.motionZ = z;
176 | float f1 = MathHelper.sqrt(x * x + z * z);
177 | this.rotationYaw = (float)(MathHelper.atan2(x, z) * (180D / Math.PI));
178 | this.rotationPitch = (float)(MathHelper.atan2(y, (double)f1) * (180D / Math.PI));
179 | this.prevRotationYaw = this.rotationYaw;
180 | this.prevRotationPitch = this.rotationPitch;
181 | this.ticksInGround = 0;
182 | }
183 |
184 | @SideOnly(Side.CLIENT)
185 | @Override
186 | public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
187 | {
188 | this.setPosition(x, y, z);
189 | this.setRotation(yaw, pitch);
190 | }
191 |
192 | @SideOnly(Side.CLIENT)
193 | @Override
194 | public void setVelocity(double x, double y, double z)
195 | {
196 | this.motionX = x;
197 | this.motionY = y;
198 | this.motionZ = z;
199 |
200 | if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
201 | {
202 | float f = MathHelper.sqrt(x * x + z * z);
203 | this.rotationPitch = (float)(MathHelper.atan2(y, (double)f) * (180D / Math.PI));
204 | this.rotationYaw = (float)(MathHelper.atan2(x, z) * (180D / Math.PI));
205 | this.prevRotationPitch = this.rotationPitch;
206 | this.prevRotationYaw = this.rotationYaw;
207 | this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
208 | this.ticksInGround = 0;
209 | }
210 | }
211 |
212 | @Override
213 | public void onUpdate()
214 | {
215 | if (!this.world.isRemote)
216 | {
217 | this.setFlag(6, this.isGlowing());
218 | }
219 |
220 | this.onEntityUpdate();
221 |
222 | if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
223 | {
224 | float f = MathHelper.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
225 | this.rotationYaw = (float)(MathHelper.atan2(this.motionX, this.motionZ) * (180D / Math.PI));
226 | this.rotationPitch = (float)(MathHelper.atan2(this.motionY, (double)f) * (180D / Math.PI));
227 | this.prevRotationYaw = this.rotationYaw;
228 | this.prevRotationPitch = this.rotationPitch;
229 | }
230 |
231 | BlockPos blockpos = new BlockPos(this.xTile, this.yTile, this.zTile);
232 | IBlockState iblockstate = this.world.getBlockState(blockpos);
233 | Block block = iblockstate.getBlock();
234 |
235 | if (iblockstate.getMaterial() != Material.AIR)
236 | {
237 | AxisAlignedBB axisalignedbb = iblockstate.getCollisionBoundingBox(this.world, blockpos);
238 |
239 | if (axisalignedbb != Block.NULL_AABB && axisalignedbb.offset(blockpos).contains(new Vec3d(this.posX, this.posY, this.posZ)))
240 | {
241 | this.inGround = true;
242 | }
243 | }
244 |
245 | if (this.arrowShake > 0)
246 | {
247 | --this.arrowShake;
248 | }
249 |
250 | if (this.inGround)
251 | {
252 | int j = block.getMetaFromState(iblockstate);
253 |
254 | if ((block != this.inTile || j != this.inData) && !this.world.collidesWithAnyBlock(this.getEntityBoundingBox().grow(0.05D)))
255 | {
256 | this.inGround = false;
257 | this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
258 | this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
259 | this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
260 | this.ticksInGround = 0;
261 | this.ticksInAir = 0;
262 | }
263 | else
264 | {
265 | this.arrowLand(blockpos);
266 | }
267 |
268 | ++this.timeInGround;
269 | }
270 | else
271 | {
272 | ItemDyeArrow.DyeType dyeType = this.getDyeType();
273 |
274 | this.timeInGround = 0;
275 | ++this.ticksInAir;
276 | Vec3d vec3d1 = new Vec3d(this.posX, this.posY, this.posZ);
277 | Vec3d vec3d = new Vec3d(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
278 | RayTraceResult raytraceresult = this.world.rayTraceBlocks(vec3d1, vec3d, false, true, false);
279 | vec3d1 = new Vec3d(this.posX, this.posY, this.posZ);
280 | vec3d = new Vec3d(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
281 |
282 | if (raytraceresult != null)
283 | {
284 | vec3d = new Vec3d(raytraceresult.hitVec.x, raytraceresult.hitVec.y, raytraceresult.hitVec.z);
285 | }
286 |
287 | Entity entity = this.findEntityOnPath(vec3d1, vec3d);
288 |
289 | if (entity != null)
290 | {
291 | raytraceresult = new RayTraceResult(entity);
292 | }
293 |
294 | if (raytraceresult != null && raytraceresult.entityHit instanceof EntityPlayer)
295 | {
296 | EntityPlayer entityplayer = (EntityPlayer)raytraceresult.entityHit;
297 |
298 | if (this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
299 | {
300 | raytraceresult = null;
301 | }
302 | }
303 |
304 | if (raytraceresult != null)
305 | {
306 | this.onHit(raytraceresult);
307 | }
308 |
309 | if (this.getIsCritical())
310 | {
311 | for (int k = 0; k < 4; ++k)
312 | {
313 | this.world.spawnParticle(EnumParticleTypes.CRIT, this.posX + this.motionX * (double)k / 4.0D, this.posY + this.motionY * (double)k / 4.0D, this.posZ + this.motionZ * (double)k / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ, new int[0]);
314 | }
315 | }
316 |
317 | this.posX += this.motionX;
318 | this.posY += this.motionY;
319 | this.posZ += this.motionZ;
320 | float f4 = MathHelper.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
321 | this.rotationYaw = (float)(MathHelper.atan2(this.motionX, this.motionZ) * (180D / Math.PI));
322 |
323 | for (this.rotationPitch = (float)(MathHelper.atan2(this.motionY, (double)f4) * (180D / Math.PI)); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
324 | {
325 | ;
326 | }
327 |
328 | while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
329 | {
330 | this.prevRotationPitch += 360.0F;
331 | }
332 |
333 | while (this.rotationYaw - this.prevRotationYaw < -180.0F)
334 | {
335 | this.prevRotationYaw -= 360.0F;
336 | }
337 |
338 | while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
339 | {
340 | this.prevRotationYaw += 360.0F;
341 | }
342 |
343 | this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
344 | this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
345 | float f1 = 0.99F;
346 | float f2 = 0.05F;
347 |
348 | if (this.isInWater())
349 | {
350 | for (int i = 0; i < 4; ++i)
351 | {
352 | float f3 = 0.25F;
353 | this.world.spawnParticle(EnumParticleTypes.WATER_BUBBLE, this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D, this.motionX, this.motionY, this.motionZ);
354 | }
355 |
356 | f1 = 0.6F;
357 | }
358 |
359 | if (this.isWet())
360 | {
361 | this.extinguish();
362 | }
363 |
364 | this.motionX *= (double)f1;
365 | this.motionY *= (double)f1;
366 | this.motionZ *= (double)f1;
367 |
368 | if (!this.hasNoGravity())
369 | {
370 | this.motionY -= 0.05000000074505806D;
371 | }
372 |
373 | this.setPosition(this.posX, this.posY, this.posZ);
374 | this.doBlockCollisions();
375 | }
376 | }
377 |
378 | @Override
379 | protected void onHit(RayTraceResult raytraceResultIn)
380 | {
381 | Entity entity = raytraceResultIn.entityHit;
382 |
383 | if (entity != null)
384 | {
385 | float f = MathHelper.sqrt(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
386 | int i = MathHelper.ceil((double)f * this.damage);
387 |
388 | if (this.getIsCritical())
389 | {
390 | i += this.rand.nextInt(i / 2 + 2);
391 | }
392 |
393 | DamageSource damagesource;
394 |
395 | if (this.shootingEntity == null)
396 | {
397 | damagesource = DamageSource.causeArrowDamage(this, this);
398 | }
399 | else
400 | {
401 | damagesource = DamageSource.causeArrowDamage(this, this.shootingEntity);
402 | }
403 |
404 | if (this.isBurning() && !(entity instanceof EntityEnderman))
405 | {
406 | entity.setFire(5);
407 | }
408 |
409 | if (entity.attackEntityFrom(damagesource, (float)i))
410 | {
411 |
412 | if (entity instanceof EntityLivingBase)
413 | {
414 | EntityLivingBase entitylivingbase = (EntityLivingBase)entity;
415 |
416 | if (this.knockbackStrength > 0)
417 | {
418 | float f1 = MathHelper.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
419 |
420 | if (f1 > 0.0F)
421 | {
422 | entitylivingbase.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f1, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f1);
423 | }
424 | }
425 |
426 | if (this.shootingEntity instanceof EntityLivingBase)
427 | {
428 | EnchantmentHelper.applyThornEnchantments(entitylivingbase, this.shootingEntity);
429 | EnchantmentHelper.applyArthropodEnchantments((EntityLivingBase)this.shootingEntity, entitylivingbase);
430 | }
431 |
432 | this.arrowHit(entitylivingbase);
433 |
434 | if (this.shootingEntity != null && entitylivingbase != this.shootingEntity && entitylivingbase instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
435 | {
436 | ((EntityPlayerMP)this.shootingEntity).connection.sendPacket(new SPacketChangeGameState(6, 0.0F));
437 | }
438 | }
439 |
440 | this.playSound(SoundEvents.ENTITY_ARROW_HIT, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
441 |
442 | if (!(entity instanceof EntityEnderman))
443 | {
444 | this.setDead();
445 | }
446 | }
447 | else
448 | {
449 | this.motionX *= -0.10000000149011612D;
450 | this.motionY *= -0.10000000149011612D;
451 | this.motionZ *= -0.10000000149011612D;
452 | this.rotationYaw += 180.0F;
453 | this.prevRotationYaw += 180.0F;
454 | this.ticksInAir = 0;
455 |
456 | if (!this.world.isRemote && this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ < 0.0010000000474974513D)
457 | {
458 | if (this.pickupStatus == EntityDyeArrow.PickupStatus.ALLOWED)
459 | {
460 | this.entityDropItem(this.getArrowStack(), 0.1F);
461 | }
462 |
463 | this.setDead();
464 | }
465 | }
466 | }
467 | else
468 | {
469 | BlockPos blockpos = raytraceResultIn.getBlockPos();
470 | this.xTile = blockpos.getX();
471 | this.yTile = blockpos.getY();
472 | this.zTile = blockpos.getZ();
473 | IBlockState iblockstate = this.world.getBlockState(blockpos);
474 | this.inTile = iblockstate.getBlock();
475 | this.inData = this.inTile.getMetaFromState(iblockstate);
476 | this.motionX = (double)((float)(raytraceResultIn.hitVec.x - this.posX));
477 | this.motionY = (double)((float)(raytraceResultIn.hitVec.y - this.posY));
478 | this.motionZ = (double)((float)(raytraceResultIn.hitVec.z - this.posZ));
479 | float f2 = MathHelper.sqrt(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
480 | this.posX -= this.motionX / (double)f2 * 0.05000000074505806D;
481 | this.posY -= this.motionY / (double)f2 * 0.05000000074505806D;
482 | this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D;
483 | this.playSound(SoundEvents.ENTITY_ARROW_HIT, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
484 | this.inGround = true;
485 | this.arrowShake = 7;
486 | this.setIsCritical(false);
487 |
488 | if (iblockstate.getMaterial() != Material.AIR)
489 | {
490 | this.inTile.onEntityCollidedWithBlock(this.world, blockpos, iblockstate, this);
491 | }
492 | }
493 | }
494 |
495 | protected void arrowLand(BlockPos blockpos)
496 | {
497 | IBlockState iblockstate = this.world.getBlockState(blockpos);
498 | Block block = iblockstate.getBlock();
499 |
500 | ItemDyeArrow.DyeType dyeType = this.getDyeType();
501 |
502 | if (!this.world.isRemote)
503 | {
504 | if (block == Blocks.WOOL)
505 | {
506 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
507 | }
508 | if (block == Blocks.CARPET)
509 | {
510 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
511 | }
512 | if (block == Blocks.STAINED_HARDENED_CLAY)
513 | {
514 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
515 | }
516 | if (block == Blocks.STAINED_GLASS)
517 | {
518 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
519 | }
520 | if (block == Blocks.CONCRETE)
521 | {
522 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
523 | }
524 | if (block == Blocks.CONCRETE_POWDER)
525 | {
526 | world.setBlockState(blockpos, iblockstate.withProperty(BlockConcretePowder.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
527 | }
528 | if (block == Blocks.STAINED_GLASS_PANE)
529 | {
530 | world.setBlockState(blockpos, iblockstate.withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
531 | }
532 | if (block == Blocks.GLASS)
533 | {
534 | world.setBlockState(blockpos, Blocks.STAINED_GLASS.getDefaultState().withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
535 | }
536 | if (block == Blocks.HARDENED_CLAY)
537 | {
538 | world.setBlockState(blockpos, Blocks.STAINED_HARDENED_CLAY.getDefaultState().withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
539 | }
540 | if (block == Blocks.GLASS_PANE)
541 | {
542 | world.setBlockState(blockpos, Blocks.STAINED_GLASS_PANE.getDefaultState().withProperty(BlockColored.COLOR, EnumDyeColor.byMetadata(dyeType.ordinal())));
543 | }
544 | /*
545 | if (block == Blocks.BED)
546 | {
547 | EnumFacing enumfacing = (EnumFacing)iblockstate.getValue(BlockBed.FACING);
548 |
549 | if (iblockstate.getValue(BlockBed.PART) == BlockBed.EnumPartType.FOOT)
550 | {
551 | BlockPos blockpos2 = blockpos.offset(enumfacing);
552 |
553 | TileEntity bed1 = world.getTileEntity(blockpos);
554 | TileEntity bed2 = world.getTileEntity(blockpos2);
555 |
556 | if (bed1 != null && bed1 instanceof TileEntityBed)
557 | {
558 | ((TileEntityBed)bed1).setColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
559 | }
560 | if (bed2 != null && bed2 instanceof TileEntityBed)
561 | {
562 | ((TileEntityBed)bed2).setColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
563 | }
564 | }
565 |
566 | if (iblockstate.getValue(BlockBed.PART) == BlockBed.EnumPartType.HEAD)
567 | {
568 | BlockPos blockpos2 = blockpos.offset(enumfacing.getOpposite());
569 |
570 | TileEntity bed1 = world.getTileEntity(blockpos);
571 | TileEntity bed2 = world.getTileEntity(blockpos2);
572 |
573 | if (bed1 != null && bed1 instanceof TileEntityBed)
574 | {
575 | ((TileEntityBed)bed1).setColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
576 | }
577 | if (bed2 != null && bed2 instanceof TileEntityBed)
578 | {
579 | ((TileEntityBed)bed2).setColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
580 | }
581 | }
582 | }
583 | */
584 | if (block instanceof BlockGlazedTerracotta)
585 | {
586 | EnumFacing facing = iblockstate.getValue(BlockGlazedTerracotta.FACING);
587 |
588 | if (dyeType == ItemDyeArrow.DyeType.BLACK) { world.setBlockState(blockpos, Blocks.BLACK_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
589 | if (dyeType == ItemDyeArrow.DyeType.BLUE) { world.setBlockState(blockpos, Blocks.BLUE_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
590 | if (dyeType == ItemDyeArrow.DyeType.BROWN) { world.setBlockState(blockpos, Blocks.BROWN_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
591 | if (dyeType == ItemDyeArrow.DyeType.CYAN) { world.setBlockState(blockpos, Blocks.CYAN_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
592 | if (dyeType == ItemDyeArrow.DyeType.GRAY) { world.setBlockState(blockpos, Blocks.GRAY_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
593 | if (dyeType == ItemDyeArrow.DyeType.GREEN) { world.setBlockState(blockpos, Blocks.GREEN_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
594 | if (dyeType == ItemDyeArrow.DyeType.LIGHT_BLUE) { world.setBlockState(blockpos, Blocks.LIGHT_BLUE_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
595 | if (dyeType == ItemDyeArrow.DyeType.LIME) { world.setBlockState(blockpos, Blocks.LIME_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
596 | if (dyeType == ItemDyeArrow.DyeType.MAGENTA) { world.setBlockState(blockpos, Blocks.MAGENTA_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
597 | if (dyeType == ItemDyeArrow.DyeType.ORANGE) { world.setBlockState(blockpos, Blocks.ORANGE_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
598 | if (dyeType == ItemDyeArrow.DyeType.PINK) { world.setBlockState(blockpos, Blocks.PINK_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
599 | if (dyeType == ItemDyeArrow.DyeType.PURPLE) { world.setBlockState(blockpos, Blocks.PURPLE_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
600 | if (dyeType == ItemDyeArrow.DyeType.RED) { world.setBlockState(blockpos, Blocks.RED_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
601 | if (dyeType == ItemDyeArrow.DyeType.SILVER) { world.setBlockState(blockpos, Blocks.SILVER_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
602 | if (dyeType == ItemDyeArrow.DyeType.WHITE) { world.setBlockState(blockpos, Blocks.WHITE_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
603 | if (dyeType == ItemDyeArrow.DyeType.YELLOW) { world.setBlockState(blockpos, Blocks.YELLOW_GLAZED_TERRACOTTA.getDefaultState().withProperty(BlockGlazedTerracotta.FACING, facing)); }
604 | }
605 | }
606 |
607 | int itemId = Item.getIdFromItem(BEItems.dye_arrow);
608 | int itemMeta = this.getDyeType().ordinal();
609 | for (int ii = 0; ii < 16; ++ii)
610 | {
611 | this.world.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, new int[] {itemId, itemMeta});
612 | }
613 |
614 | this.setDead();
615 | }
616 |
617 | @Override
618 | protected void arrowHit(EntityLivingBase living)
619 | {
620 | ItemDyeArrow.DyeType dyeType = this.getDyeType();
621 |
622 | if (living instanceof EntitySheep)
623 | {
624 | EntitySheep entitysheep = (EntitySheep)living;
625 |
626 | entitysheep.setFleeceColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
627 | this.setDead();
628 | }
629 |
630 | if (living instanceof EntityWolf)
631 | {
632 | EntityWolf entitywolf = (EntityWolf)living;
633 |
634 | entitywolf.setCollarColor(EnumDyeColor.byMetadata(dyeType.ordinal()));
635 | this.setDead();
636 | }
637 |
638 | if (living instanceof EntityPlayer)
639 | {
640 | EntityPlayer entityplayer = (EntityPlayer)living;
641 |
642 | for (ItemStack itemstack : entityplayer.inventory.armorInventory)
643 | {
644 | if (itemstack != null && (itemstack.getItem() == Items.LEATHER_HELMET || itemstack.getItem() == Items.LEATHER_CHESTPLATE || itemstack.getItem() == Items.LEATHER_LEGGINGS || itemstack.getItem() == Items.LEATHER_BOOTS))
645 | {
646 | ItemArmor itemarmor = (ItemArmor)itemstack.getItem();
647 | itemarmor.setColor(itemstack, EnumDyeColor.byMetadata(dyeType.ordinal()).getColorValue());
648 | }
649 | }
650 | }
651 | }
652 |
653 | @Override
654 | @Nullable
655 | protected Entity findEntityOnPath(Vec3d start, Vec3d end)
656 | {
657 | Entity entity = null;
658 | List list = this.world.getEntitiesInAABBexcluding(this, this.getEntityBoundingBox().expand(this.motionX, this.motionY, this.motionZ).grow(1.0D), ARROW_TARGETS);
659 | double d0 = 0.0D;
660 |
661 | for (int i = 0; i < list.size(); ++i)
662 | {
663 | Entity entity1 = list.get(i);
664 |
665 | if (entity1 != this.shootingEntity || this.ticksInAir >= 5)
666 | {
667 | AxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().grow(0.30000001192092896D);
668 | RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(start, end);
669 |
670 | if (raytraceresult != null)
671 | {
672 | double d1 = start.squareDistanceTo(raytraceresult.hitVec);
673 |
674 | if (d1 < d0 || d0 == 0.0D)
675 | {
676 | entity = entity1;
677 | d0 = d1;
678 | }
679 | }
680 | }
681 | }
682 |
683 | return entity;
684 | }
685 |
686 | public static void registerFixesDyeArrow(DataFixer fixer)
687 | {
688 | EntityArrow.registerFixesArrow(fixer, "DyeArrow");
689 | }
690 |
691 | @Override
692 | public void writeEntityToNBT(NBTTagCompound compound)
693 | {
694 | compound.setInteger("xTile", this.xTile);
695 | compound.setInteger("yTile", this.yTile);
696 | compound.setInteger("zTile", this.zTile);
697 | compound.setShort("life", (short)this.ticksInGround);
698 | ResourceLocation resourcelocation = (ResourceLocation)Block.REGISTRY.getNameForObject(this.inTile);
699 | compound.setString("inTile", resourcelocation == null ? "" : resourcelocation.toString());
700 | compound.setByte("inData", (byte)this.inData);
701 | compound.setByte("shake", (byte)this.arrowShake);
702 | compound.setByte("inGround", (byte)(this.inGround ? 1 : 0));
703 | compound.setByte("pickup", (byte)this.pickupStatus.ordinal());
704 | compound.setDouble("damage", this.damage);
705 | compound.setInteger("dyeType", this.getDyeType().ordinal());
706 | }
707 |
708 | @Override
709 | public void readEntityFromNBT(NBTTagCompound compound)
710 | {
711 | this.xTile = compound.getInteger("xTile");
712 | this.yTile = compound.getInteger("yTile");
713 | this.zTile = compound.getInteger("zTile");
714 | this.ticksInGround = compound.getShort("life");
715 |
716 | if (compound.hasKey("inTile", 8))
717 | {
718 | this.inTile = Block.getBlockFromName(compound.getString("inTile"));
719 | }
720 | else
721 | {
722 | this.inTile = Block.getBlockById(compound.getByte("inTile") & 255);
723 | }
724 |
725 | this.inData = compound.getByte("inData") & 255;
726 | this.arrowShake = compound.getByte("shake") & 255;
727 | this.inGround = compound.getByte("inGround") == 1;
728 |
729 | if (compound.hasKey("damage", 99))
730 | {
731 | this.damage = compound.getDouble("damage");
732 | }
733 |
734 | if (compound.hasKey("pickup", 99))
735 | {
736 | this.pickupStatus = EntityDyeArrow.PickupStatus.getByOrdinal(compound.getByte("pickup"));
737 | }
738 | else if (compound.hasKey("player", 99))
739 | {
740 | this.pickupStatus = compound.getBoolean("player") ? EntityDyeArrow.PickupStatus.ALLOWED : EntityDyeArrow.PickupStatus.DISALLOWED;
741 | }
742 |
743 | if (compound.hasKey("dyeType", 99))
744 | {
745 | this.setDyeType(ItemDyeArrow.DyeType.fromMeta(compound.getInteger("dyeType")));
746 | }
747 | }
748 |
749 | @Override
750 | public void onCollideWithPlayer(EntityPlayer entityIn)
751 | {
752 | if (!this.world.isRemote && this.inGround && this.arrowShake <= 0)
753 | {
754 | boolean flag = this.pickupStatus == EntityDyeArrow.PickupStatus.ALLOWED || this.pickupStatus == EntityDyeArrow.PickupStatus.CREATIVE_ONLY && entityIn.capabilities.isCreativeMode;
755 |
756 | if (this.pickupStatus == EntityDyeArrow.PickupStatus.ALLOWED && !entityIn.inventory.addItemStackToInventory(this.getArrowStack()))
757 | {
758 | flag = false;
759 | }
760 |
761 | if (flag)
762 | {
763 | entityIn.onItemPickup(this, 1);
764 | this.setDead();
765 | }
766 | }
767 | }
768 |
769 | @Override
770 | protected ItemStack getArrowStack()
771 | {
772 | ItemStack itemstack = new ItemStack(BEItems.dye_arrow);
773 | itemstack.setItemDamage(this.getDyeType().ordinal());
774 | return itemstack;
775 | }
776 |
777 | @Override
778 | protected boolean canTriggerWalking()
779 | {
780 | return false;
781 | }
782 |
783 | @Override
784 | public void setDamage(double damageIn)
785 | {
786 | this.damage = damageIn;
787 | }
788 |
789 | @Override
790 | public double getDamage()
791 | {
792 | return this.damage;
793 | }
794 |
795 | @Override
796 | public void setKnockbackStrength(int knockbackStrengthIn)
797 | {
798 | this.knockbackStrength = knockbackStrengthIn;
799 | }
800 |
801 | @Override
802 | public boolean canBeAttackedWithItem()
803 | {
804 | return false;
805 | }
806 |
807 | @Override
808 | public float getEyeHeight()
809 | {
810 | return 0.0F;
811 | }
812 |
813 | @Override
814 | public void setIsCritical(boolean critical)
815 | {
816 | byte b0 = ((Byte)this.dataManager.get(CRITICAL)).byteValue();
817 |
818 | if (critical)
819 | {
820 | this.dataManager.set(CRITICAL, Byte.valueOf((byte)(b0 | 1)));
821 | }
822 | else
823 | {
824 | this.dataManager.set(CRITICAL, Byte.valueOf((byte)(b0 & -2)));
825 | }
826 | }
827 |
828 | @Override
829 | public boolean getIsCritical()
830 | {
831 | byte b0 = ((Byte)this.dataManager.get(CRITICAL)).byteValue();
832 | return (b0 & 1) != 0;
833 | }
834 |
835 | @Override
836 | public void setEnchantmentEffectsFromEntity(EntityLivingBase p_190547_1_, float p_190547_2_)
837 | {
838 | int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.POWER, p_190547_1_);
839 | int j = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.PUNCH, p_190547_1_);
840 | this.setDamage((double)(p_190547_2_ * 2.0F) + this.rand.nextGaussian() * 0.25D + (double)((float)this.world.getDifficulty().getDifficultyId() * 0.11F));
841 |
842 | if (i > 0)
843 | {
844 | this.setDamage(this.getDamage() + (double)i * 0.5D + 0.5D);
845 | }
846 |
847 | if (j > 0)
848 | {
849 | this.setKnockbackStrength(j);
850 | }
851 |
852 | if (EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FLAME, p_190547_1_) > 0)
853 | {
854 | this.setFire(100);
855 | }
856 | }
857 |
858 | public static enum PickupStatus
859 | {
860 | DISALLOWED,
861 | ALLOWED,
862 | CREATIVE_ONLY;
863 |
864 | public static EntityDyeArrow.PickupStatus getByOrdinal(int ordinal)
865 | {
866 | if (ordinal < 0 || ordinal > values().length)
867 | {
868 | ordinal = 0;
869 | }
870 |
871 | return values()[ordinal];
872 | }
873 | }
874 |
875 | @Override
876 | public Entity getThrower()
877 | {
878 | return shootingEntity;
879 | }
880 |
881 | @Override
882 | public void setThrower( Entity entity )
883 | {
884 | shootingEntity = entity;
885 | }
886 | }
--------------------------------------------------------------------------------