mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-31 17:36:43 +01:00
Magic Potatoes
- Fixed localization of potato cannon ammo tooltip - Added several enchantment compatibilities to the Potato Cannon - Added the Potato Recovery Enchantment
This commit is contained in:
parent
48ea7d64b4
commit
efa2bc745f
23 changed files with 300 additions and 62 deletions
|
@ -425,21 +425,21 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
|
||||||
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
|
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
|
||||||
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
|
||||||
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
|
||||||
f0d3897a272bda674b3da81ff96c9ff9d50a22d7 assets/create/lang/en_ud.json
|
1fa99fbea1418694aea41dea81f9cbf5e30066d4 assets/create/lang/en_ud.json
|
||||||
fe0d721b6a6cb497ebcd3d52cbdd85dcd0aaa88d assets/create/lang/en_us.json
|
f38e0d6773f0618212e6d036290be02692302b1b assets/create/lang/en_us.json
|
||||||
823a08304aa1d825810f3e289524204b0d459afc assets/create/lang/unfinished/de_de.json
|
8456877fca4c1c97a74c25c97e0dbd274e728d25 assets/create/lang/unfinished/de_de.json
|
||||||
c1584c0fd16dcdfbe6b954cf66853ae54e943e14 assets/create/lang/unfinished/es_es.json
|
4de8456cde05eecedec61c79522cbd6549de01a9 assets/create/lang/unfinished/es_es.json
|
||||||
5ce012b625bd43f4722ffd33dba5a1d69e826c63 assets/create/lang/unfinished/es_mx.json
|
2c72b40a22f6da68c179e875fecc471dfb63882c assets/create/lang/unfinished/es_mx.json
|
||||||
14982459cc823666a9c31c14f128c74fe23d7da7 assets/create/lang/unfinished/fr_fr.json
|
801a7fc4c0b83f94ee5fc6ff2dcfbc2c794e7fd5 assets/create/lang/unfinished/fr_fr.json
|
||||||
4e800e837b6604a963c1d8efd9502165306285ec assets/create/lang/unfinished/it_it.json
|
7c23104e6f627e2812391696550f7ac560a8543d assets/create/lang/unfinished/it_it.json
|
||||||
d6bff62e5c6ff8b9015f69239bd00dfc84752c1e assets/create/lang/unfinished/ja_jp.json
|
6a488e40ec2bd295e51447889e1643b12d744a1b assets/create/lang/unfinished/ja_jp.json
|
||||||
eaee8e2d47ca84cd95b7e5ee5681817a53e198df assets/create/lang/unfinished/ko_kr.json
|
aea13865e1613a09110c6d3b52c3da68015d6a72 assets/create/lang/unfinished/ko_kr.json
|
||||||
3b685a11350ab25b26b285d31e96af534ed8b583 assets/create/lang/unfinished/nl_nl.json
|
7be41ad5b274297072b1cc17663686287bc3f618 assets/create/lang/unfinished/nl_nl.json
|
||||||
dcffd28c035a77d20676b5df28b8bd053b821bda assets/create/lang/unfinished/pl_pl.json
|
3e1957e45a5cc7586236517a5ee0f57788be9e8e assets/create/lang/unfinished/pl_pl.json
|
||||||
da179be447f93814b5c2892a145ed8696f4cc1d6 assets/create/lang/unfinished/pt_br.json
|
e57e2fbe82324c567d130f008865f34c45e2f9be assets/create/lang/unfinished/pt_br.json
|
||||||
980321ff0d197abdbc9e9421dc570cc1faeae530 assets/create/lang/unfinished/ru_ru.json
|
e85f3a6441b932d3ebb4023a34d300ad196c7f41 assets/create/lang/unfinished/ru_ru.json
|
||||||
9a442edbadcb825bf0f22ba51d0761e18ae6942d assets/create/lang/unfinished/zh_cn.json
|
4186b08ae85862b6b73895507f6849d2f249d006 assets/create/lang/unfinished/zh_cn.json
|
||||||
5f16a1de3c3686367d449d9ae6898fe365592e3f assets/create/lang/unfinished/zh_tw.json
|
90e0931966c8e272a2bd03378b25769c5daf64bb assets/create/lang/unfinished/zh_tw.json
|
||||||
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
|
||||||
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
|
||||||
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
|
||||||
|
|
|
@ -426,6 +426,7 @@
|
||||||
"block.create.yellow_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u028Do\u05DF\u05DF\u01DD\u028E",
|
"block.create.yellow_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u028Do\u05DF\u05DF\u01DD\u028E",
|
||||||
"block.create.zinc_block": "\u0254u\u0131Z \u025Fo \u029E\u0254o\u05DF\u15FA",
|
"block.create.zinc_block": "\u0254u\u0131Z \u025Fo \u029E\u0254o\u05DF\u15FA",
|
||||||
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
|
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
|
||||||
|
"enchantment.create.potato_recovery": "\u028E\u0279\u01DD\u028Co\u0254\u01DD\u1D1A o\u0287\u0250\u0287o\u0500",
|
||||||
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
|
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
|
||||||
"entity.create.crafting_blueprint": "\u0287u\u0131\u0279d\u01DDn\u05DF\u15FA bu\u0131\u0287\u025F\u0250\u0279\u0186",
|
"entity.create.crafting_blueprint": "\u0287u\u0131\u0279d\u01DDn\u05DF\u15FA bu\u0131\u0287\u025F\u0250\u0279\u0186",
|
||||||
"entity.create.gantry_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0287u\u0250\u2141",
|
"entity.create.gantry_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0287u\u0250\u2141",
|
||||||
|
|
|
@ -430,6 +430,8 @@
|
||||||
"block.create.zinc_block": "Block of Zinc",
|
"block.create.zinc_block": "Block of Zinc",
|
||||||
"block.create.zinc_ore": "Zinc Ore",
|
"block.create.zinc_ore": "Zinc Ore",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Contraption",
|
"entity.create.contraption": "Contraption",
|
||||||
"entity.create.crafting_blueprint": "Crafting Blueprint",
|
"entity.create.crafting_blueprint": "Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "Gantry Contraption",
|
"entity.create.gantry_contraption": "Gantry Contraption",
|
||||||
|
@ -1171,6 +1173,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "Optional",
|
"create.crafting_blueprint.optional": "Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "%1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "%1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "%1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Bottomless Supply",
|
"create.hint.hose_pulley.title": "Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "No Targets",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1114",
|
"_": "Missing Localizations: 1118",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Zinkblock",
|
"block.create.zinc_block": "Zinkblock",
|
||||||
"block.create.zinc_ore": "Zinkerz",
|
"block.create.zinc_ore": "Zinkerz",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Vorrichtung",
|
"entity.create.contraption": "Vorrichtung",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "Portalkran Vorrichtung",
|
"entity.create.gantry_contraption": "Portalkran Vorrichtung",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Endlose Versorgung",
|
"create.hint.hose_pulley.title": "Endlose Versorgung",
|
||||||
"create.hint.hose_pulley": "Das angewählte Gewässer wird als unendlich betrachtet.",
|
"create.hint.hose_pulley": "Das angewählte Gewässer wird als unendlich betrachtet.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "Keine Ziele",
|
"create.hint.mechanical_arm_no_targets.title": "Keine Ziele",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 877",
|
"_": "Missing Localizations: 881",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Bloque de zinc",
|
"block.create.zinc_block": "Bloque de zinc",
|
||||||
"block.create.zinc_ore": "Mineral de zinc",
|
"block.create.zinc_ore": "Mineral de zinc",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Artilugio",
|
"entity.create.contraption": "Artilugio",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "Artilugio de grúa",
|
"entity.create.gantry_contraption": "Artilugio de grúa",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Suministro sin fondo",
|
"create.hint.hose_pulley.title": "Suministro sin fondo",
|
||||||
"create.hint.hose_pulley": "La masa de fluido objetivo se considera infinita",
|
"create.hint.hose_pulley": "La masa de fluido objetivo se considera infinita",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "No hay objetivos",
|
"create.hint.mechanical_arm_no_targets.title": "No hay objetivos",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1481",
|
"_": "Missing Localizations: 1485",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Bloque de Zinc",
|
"block.create.zinc_block": "Bloque de Zinc",
|
||||||
"block.create.zinc_ore": "Mineral de Zinc",
|
"block.create.zinc_ore": "Mineral de Zinc",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Artefacto",
|
"entity.create.contraption": "Artefacto",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1366",
|
"_": "Missing Localizations: 1370",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Bloc de zinc",
|
"block.create.zinc_block": "Bloc de zinc",
|
||||||
"block.create.zinc_ore": "Minerai de zinc",
|
"block.create.zinc_ore": "Minerai de zinc",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Engin",
|
"entity.create.contraption": "Engin",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 894",
|
"_": "Missing Localizations: 898",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Blocco di zinco",
|
"block.create.zinc_block": "Blocco di zinco",
|
||||||
"block.create.zinc_ore": "Zinco grezzo",
|
"block.create.zinc_ore": "Zinco grezzo",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Contrazione",
|
"entity.create.contraption": "Contrazione",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Buco senza fondo",
|
"create.hint.hose_pulley.title": "Buco senza fondo",
|
||||||
"create.hint.hose_pulley": "Il corpo fluido selezionato è considerato infinito.",
|
"create.hint.hose_pulley": "Il corpo fluido selezionato è considerato infinito.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "Nessun bersaglio",
|
"create.hint.mechanical_arm_no_targets.title": "Nessun bersaglio",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 26",
|
"_": "Missing Localizations: 30",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "亜鉛ブロック",
|
"block.create.zinc_block": "亜鉛ブロック",
|
||||||
"block.create.zinc_ore": "亜鉛鉱石",
|
"block.create.zinc_ore": "亜鉛鉱石",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "からくり",
|
"entity.create.contraption": "からくり",
|
||||||
"entity.create.crafting_blueprint": "クラフトブループリント",
|
"entity.create.crafting_blueprint": "クラフトブループリント",
|
||||||
"entity.create.gantry_contraption": "ガントリーからくり",
|
"entity.create.gantry_contraption": "ガントリーからくり",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "第2表示スロット",
|
"create.crafting_blueprint.secondary_display_slot": "第2表示スロット",
|
||||||
"create.crafting_blueprint.optional": "オプション",
|
"create.crafting_blueprint.optional": "オプション",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "底なし搬出",
|
"create.hint.hose_pulley.title": "底なし搬出",
|
||||||
"create.hint.hose_pulley": "対象となる液体は無限とみなされています。",
|
"create.hint.hose_pulley": "対象となる液体は無限とみなされています。",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "ターゲットが見つかりません",
|
"create.hint.mechanical_arm_no_targets.title": "ターゲットが見つかりません",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 272",
|
"_": "Missing Localizations: 276",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "아연 블록",
|
"block.create.zinc_block": "아연 블록",
|
||||||
"block.create.zinc_ore": "아연 광석",
|
"block.create.zinc_ore": "아연 광석",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "장치",
|
"entity.create.contraption": "장치",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "다리 장치",
|
"entity.create.gantry_contraption": "다리 장치",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "무한한 공급량",
|
"create.hint.hose_pulley.title": "무한한 공급량",
|
||||||
"create.hint.hose_pulley": "액체를 무한하다고 간주합니다.",
|
"create.hint.hose_pulley": "액체를 무한하다고 간주합니다.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "목표가 없음",
|
"create.hint.mechanical_arm_no_targets.title": "목표가 없음",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1747",
|
"_": "Missing Localizations: 1751",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
|
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
|
||||||
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 236",
|
"_": "Missing Localizations: 240",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Blok cynku",
|
"block.create.zinc_block": "Blok cynku",
|
||||||
"block.create.zinc_ore": "Ruda cynku",
|
"block.create.zinc_ore": "Ruda cynku",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Maszyna",
|
"entity.create.contraption": "Maszyna",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "Maszyna suwnicowa",
|
"entity.create.gantry_contraption": "Maszyna suwnicowa",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Niewyczerpany zapas",
|
"create.hint.hose_pulley.title": "Niewyczerpany zapas",
|
||||||
"create.hint.hose_pulley": "Wybrane zbiornik cieczy jest uznany za nieskończony",
|
"create.hint.hose_pulley": "Wybrane zbiornik cieczy jest uznany za nieskończony",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "Brak celi",
|
"create.hint.mechanical_arm_no_targets.title": "Brak celi",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 1788",
|
"_": "Missing Localizations: 1792",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
|
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
|
||||||
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
"entity.create.contraption": "UNLOCALIZED: Contraption",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
"entity.create.gantry_contraption": "UNLOCALIZED: Gantry Contraption",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
"create.hint.hose_pulley.title": "UNLOCALIZED: Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "UNLOCALIZED: The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "UNLOCALIZED: No Targets",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 267",
|
"_": "Missing Localizations: 271",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "Цинковый блок",
|
"block.create.zinc_block": "Цинковый блок",
|
||||||
"block.create.zinc_ore": "Цинковая руда",
|
"block.create.zinc_ore": "Цинковая руда",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "Штуковина",
|
"entity.create.contraption": "Штуковина",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "Крановая штуковина",
|
"entity.create.gantry_contraption": "Крановая штуковина",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Безграничное снабжение",
|
"create.hint.hose_pulley.title": "Безграничное снабжение",
|
||||||
"create.hint.hose_pulley": "Целевой водный резервуар считается бесконечным.",
|
"create.hint.hose_pulley": "Целевой водный резервуар считается бесконечным.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "Нет целей",
|
"create.hint.mechanical_arm_no_targets.title": "Нет целей",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 277",
|
"_": "Missing Localizations: 281",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "锌块",
|
"block.create.zinc_block": "锌块",
|
||||||
"block.create.zinc_ore": "锌矿石",
|
"block.create.zinc_ore": "锌矿石",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "装置",
|
"entity.create.contraption": "装置",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "起重机装置",
|
"entity.create.gantry_contraption": "起重机装置",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "无限供应",
|
"create.hint.hose_pulley.title": "无限供应",
|
||||||
"create.hint.hose_pulley": "目标液体对象被视为无限量的。",
|
"create.hint.hose_pulley": "目标液体对象被视为无限量的。",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "没有目标",
|
"create.hint.mechanical_arm_no_targets.title": "没有目标",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"_": "Missing Localizations: 272",
|
"_": "Missing Localizations: 276",
|
||||||
|
|
||||||
"_": "->------------------------] Game Elements [------------------------<-",
|
"_": "->------------------------] Game Elements [------------------------<-",
|
||||||
|
|
||||||
|
@ -431,6 +431,8 @@
|
||||||
"block.create.zinc_block": "鋅磚",
|
"block.create.zinc_block": "鋅磚",
|
||||||
"block.create.zinc_ore": "鋅礦石",
|
"block.create.zinc_ore": "鋅礦石",
|
||||||
|
|
||||||
|
"enchantment.create.potato_recovery": "UNLOCALIZED: Potato Recovery",
|
||||||
|
|
||||||
"entity.create.contraption": "結構",
|
"entity.create.contraption": "結構",
|
||||||
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
"entity.create.crafting_blueprint": "UNLOCALIZED: Crafting Blueprint",
|
||||||
"entity.create.gantry_contraption": "門式結構",
|
"entity.create.gantry_contraption": "門式結構",
|
||||||
|
@ -1172,6 +1174,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "UNLOCALIZED: Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
"create.crafting_blueprint.optional": "UNLOCALIZED: Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "UNLOCALIZED: %1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "UNLOCALIZED: %1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "UNLOCALIZED: %1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "無限供應",
|
"create.hint.hose_pulley.title": "無限供應",
|
||||||
"create.hint.hose_pulley": "目標液體為無限供應",
|
"create.hint.hose_pulley": "目標液體為無限供應",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "沒有目標",
|
"create.hint.mechanical_arm_no_targets.title": "沒有目標",
|
||||||
|
|
24
src/main/java/com/simibubi/create/AllEnchantments.java
Normal file
24
src/main/java/com/simibubi/create/AllEnchantments.java
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
package com.simibubi.create;
|
||||||
|
|
||||||
|
import com.simibubi.create.content.curiosities.weapons.PotatoRecoveryEnchantment;
|
||||||
|
import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||||
|
import com.tterrag.registrate.util.entry.RegistryEntry;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantment.Rarity;
|
||||||
|
import net.minecraft.enchantment.EnchantmentType;
|
||||||
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
|
|
||||||
|
public class AllEnchantments {
|
||||||
|
|
||||||
|
private static final CreateRegistrate REGISTRATE = Create.registrate();
|
||||||
|
|
||||||
|
public static final RegistryEntry<PotatoRecoveryEnchantment> POTATO_RECOVERY = REGISTRATE.object("potato_recovery")
|
||||||
|
.enchantment(EnchantmentType.BOW, PotatoRecoveryEnchantment::new)
|
||||||
|
.addSlots(EquipmentSlotType.MAINHAND, EquipmentSlotType.OFFHAND)
|
||||||
|
.lang("Potato Recovery")
|
||||||
|
.rarity(Rarity.UNCOMMON)
|
||||||
|
.register();
|
||||||
|
|
||||||
|
public static void register() {}
|
||||||
|
|
||||||
|
}
|
|
@ -89,6 +89,7 @@ public class Create {
|
||||||
AllMovementBehaviours.register();
|
AllMovementBehaviours.register();
|
||||||
AllWorldFeatures.register();
|
AllWorldFeatures.register();
|
||||||
AllConfigs.register();
|
AllConfigs.register();
|
||||||
|
AllEnchantments.register();
|
||||||
|
|
||||||
IEventBus modEventBus = FMLJavaModLoadingContext.get()
|
IEventBus modEventBus = FMLJavaModLoadingContext.get()
|
||||||
.getModEventBus();
|
.getModEventBus();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllEnchantments;
|
||||||
import com.simibubi.create.AllEntityTypes;
|
import com.simibubi.create.AllEntityTypes;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.CreateClient;
|
import com.simibubi.create.CreateClient;
|
||||||
|
@ -11,12 +12,16 @@ import com.simibubi.create.content.curiosities.armor.BackTankUtil;
|
||||||
import com.simibubi.create.content.curiosities.zapper.ShootableGadgetItemMethods;
|
import com.simibubi.create.content.curiosities.zapper.ShootableGadgetItemMethods;
|
||||||
import com.simibubi.create.foundation.config.AllConfigs;
|
import com.simibubi.create.foundation.config.AllConfigs;
|
||||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
|
import net.minecraft.enchantment.Enchantment;
|
||||||
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -28,7 +33,9 @@ import net.minecraft.util.ActionResultType;
|
||||||
import net.minecraft.util.Direction.Axis;
|
import net.minecraft.util.Direction.Axis;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.vector.Vector3d;
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
|
import net.minecraft.util.text.IFormattableTextComponent;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.StringTextComponent;
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
@ -52,6 +59,21 @@ public class PotatoCannonItem extends ShootableItem {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
|
||||||
|
if (enchantment == Enchantments.POWER)
|
||||||
|
return true;
|
||||||
|
if (enchantment == Enchantments.PUNCH)
|
||||||
|
return true;
|
||||||
|
if (enchantment == Enchantments.FLAME)
|
||||||
|
return true;
|
||||||
|
if (enchantment == Enchantments.LOOTING)
|
||||||
|
return true;
|
||||||
|
if (enchantment == AllEnchantments.POTATO_RECOVERY.get())
|
||||||
|
return true;
|
||||||
|
return super.canApplyAtEnchantingTable(stack, enchantment);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResultType onItemUse(ItemUseContext context) {
|
public ActionResultType onItemUse(ItemUseContext context) {
|
||||||
return onItemRightClick(context.getWorld(), context.getPlayer(), context.getHand()).getType();
|
return onItemRightClick(context.getWorld(), context.getPlayer(), context.getHand()).getType();
|
||||||
|
@ -118,18 +140,20 @@ public class PotatoCannonItem extends ShootableItem {
|
||||||
PotatoCannonProjectileTypes projectileType = PotatoCannonProjectileTypes.getProjectileTypeOf(itemStack)
|
PotatoCannonProjectileTypes projectileType = PotatoCannonProjectileTypes.getProjectileTypeOf(itemStack)
|
||||||
.orElse(PotatoCannonProjectileTypes.FALLBACK);
|
.orElse(PotatoCannonProjectileTypes.FALLBACK);
|
||||||
Vector3d lookVec = player.getLookVec();
|
Vector3d lookVec = player.getLookVec();
|
||||||
Vector3d motion = lookVec.add(correction).normalize().scale(projectileType.getVelocityMultiplier());
|
Vector3d motion = lookVec.add(correction)
|
||||||
|
.normalize()
|
||||||
|
.scale(projectileType.getVelocityMultiplier());
|
||||||
|
|
||||||
float soundPitch = projectileType.getSoundPitch() + (Create.RANDOM.nextFloat() - .5f) / 4f;
|
float soundPitch = projectileType.getSoundPitch() + (Create.RANDOM.nextFloat() - .5f) / 4f;
|
||||||
|
|
||||||
boolean spray = projectileType.getSplit() > 1;
|
boolean spray = projectileType.getSplit() > 1;
|
||||||
Vector3d sprayBase = VecHelper.rotate(new Vector3d(0,0.1,0),
|
Vector3d sprayBase = VecHelper.rotate(new Vector3d(0, 0.1, 0), 360 * Create.RANDOM.nextFloat(), Axis.Z);
|
||||||
360*Create.RANDOM.nextFloat(), Axis.Z);
|
|
||||||
float sprayChange = 360f / projectileType.getSplit();
|
float sprayChange = 360f / projectileType.getSplit();
|
||||||
|
|
||||||
for (int i = 0; i < projectileType.getSplit(); i++) {
|
for (int i = 0; i < projectileType.getSplit(); i++) {
|
||||||
PotatoProjectileEntity projectile = AllEntityTypes.POTATO_PROJECTILE.create(world);
|
PotatoProjectileEntity projectile = AllEntityTypes.POTATO_PROJECTILE.create(world);
|
||||||
projectile.setItem(itemStack);
|
projectile.setItem(itemStack);
|
||||||
|
projectile.setEnchantmentEffectsFromCannon(stack);
|
||||||
|
|
||||||
Vector3d splitMotion = motion;
|
Vector3d splitMotion = motion;
|
||||||
if (spray) {
|
if (spray) {
|
||||||
|
@ -138,6 +162,9 @@ public class PotatoCannonItem extends ShootableItem {
|
||||||
splitMotion = splitMotion.add(VecHelper.lookAt(sprayOffset, motion));
|
splitMotion = splitMotion.add(VecHelper.lookAt(sprayOffset, motion));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i != 0)
|
||||||
|
projectile.recoveryChance = 0;
|
||||||
|
|
||||||
projectile.setPosition(barrelPos.x, barrelPos.y, barrelPos.z);
|
projectile.setPosition(barrelPos.x, barrelPos.y, barrelPos.z);
|
||||||
projectile.setMotion(splitMotion);
|
projectile.setMotion(splitMotion);
|
||||||
projectile.setShooter(player);
|
projectile.setShooter(player);
|
||||||
|
@ -197,20 +224,45 @@ public class PotatoCannonItem extends ShootableItem {
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag) {
|
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag) {
|
||||||
|
int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, stack);
|
||||||
|
int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, stack);
|
||||||
|
final float additionalDamage = power * 2;
|
||||||
|
final float additionalKnockback = punch * .5f;
|
||||||
|
|
||||||
getAmmoforPreview(stack).ifPresent(ammo -> {
|
getAmmoforPreview(stack).ifPresent(ammo -> {
|
||||||
|
String _attack = "potato_cannon.ammo.attack_damage";
|
||||||
|
String _reload = "potato_cannon.ammo.reload_ticks";
|
||||||
|
String _knockback = "potato_cannon.ammo.knockback";
|
||||||
|
|
||||||
tooltip.add(new StringTextComponent(""));
|
tooltip.add(new StringTextComponent(""));
|
||||||
tooltip.add(new TranslationTextComponent(ammo.getTranslationKey()).append(new StringTextComponent(":"))
|
tooltip.add(new TranslationTextComponent(ammo.getTranslationKey()).append(new StringTextComponent(":"))
|
||||||
.formatted(TextFormatting.GRAY));
|
.formatted(TextFormatting.GRAY));
|
||||||
PotatoCannonProjectileTypes type = PotatoCannonProjectileTypes.getProjectileTypeOf(ammo)
|
PotatoCannonProjectileTypes type = PotatoCannonProjectileTypes.getProjectileTypeOf(ammo)
|
||||||
.get();
|
.get();
|
||||||
StringTextComponent spacing = new StringTextComponent(" ");
|
StringTextComponent spacing = new StringTextComponent(" ");
|
||||||
|
TextFormatting green = TextFormatting.GREEN;
|
||||||
TextFormatting darkGreen = TextFormatting.DARK_GREEN;
|
TextFormatting darkGreen = TextFormatting.DARK_GREEN;
|
||||||
|
|
||||||
|
float damageF = type.getDamage() + additionalDamage;
|
||||||
|
IFormattableTextComponent damage = new StringTextComponent(
|
||||||
|
damageF == MathHelper.floor(damageF) ? "" + MathHelper.floor(damageF) : "" + damageF);
|
||||||
|
IFormattableTextComponent reloadTicks = new StringTextComponent("" + type.getReloadTicks());
|
||||||
|
IFormattableTextComponent knockback =
|
||||||
|
new StringTextComponent("" + (type.getKnockback() + additionalKnockback));
|
||||||
|
|
||||||
|
damage = damage.formatted(additionalDamage > 0 ? green : darkGreen);
|
||||||
|
knockback = knockback.formatted(additionalKnockback > 0 ? green : darkGreen);
|
||||||
|
reloadTicks = reloadTicks.formatted(darkGreen);
|
||||||
|
|
||||||
tooltip.add(spacing.copy()
|
tooltip.add(spacing.copy()
|
||||||
.append(new StringTextComponent(type.getDamage() + " Attack Damage").formatted(darkGreen)));
|
.append(Lang.translate(_attack, damage)
|
||||||
|
.formatted(darkGreen)));
|
||||||
tooltip.add(spacing.copy()
|
tooltip.add(spacing.copy()
|
||||||
.append(new StringTextComponent(type.getReloadTicks() + " Reload Ticks").formatted(darkGreen)));
|
.append(Lang.translate(_reload, reloadTicks)
|
||||||
|
.formatted(darkGreen)));
|
||||||
tooltip.add(spacing.copy()
|
tooltip.add(spacing.copy()
|
||||||
.append(new StringTextComponent(type.getKnockback() + " Knockback").formatted(darkGreen)));
|
.append(Lang.translate(_knockback, knockback)
|
||||||
|
.formatted(darkGreen)));
|
||||||
});
|
});
|
||||||
super.addInformation(stack, world, tooltip, flag);
|
super.addInformation(stack, world, tooltip, flag);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,9 @@ package com.simibubi.create.content.curiosities.weapons;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiPredicate;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
import com.simibubi.create.AllItems;
|
import com.simibubi.create.AllItems;
|
||||||
|
@ -255,10 +256,8 @@ public class PotatoCannonProjectileTypes {
|
||||||
private float fwoompPitch = 1;
|
private float fwoompPitch = 1;
|
||||||
private boolean sticky = false;
|
private boolean sticky = false;
|
||||||
private PotatoProjectileRenderMode renderMode = new PotatoProjectileRenderMode.Billboard();
|
private PotatoProjectileRenderMode renderMode = new PotatoProjectileRenderMode.Billboard();
|
||||||
private Consumer<EntityRayTraceResult> onEntityHit = e -> {
|
private Predicate<EntityRayTraceResult> onEntityHit = e -> false;
|
||||||
};
|
private BiPredicate<IWorld, BlockRayTraceResult> onBlockHit = (w, ray) -> false;
|
||||||
private BiConsumer<IWorld, BlockRayTraceResult> onBlockHit = (w, ray) -> {
|
|
||||||
};
|
|
||||||
|
|
||||||
public float getGravityMultiplier() {
|
public float getGravityMultiplier() {
|
||||||
return gravityMultiplier;
|
return gravityMultiplier;
|
||||||
|
@ -298,12 +297,12 @@ public class PotatoCannonProjectileTypes {
|
||||||
|
|
||||||
public boolean isSticky() { return sticky; }
|
public boolean isSticky() { return sticky; }
|
||||||
|
|
||||||
public void onEntityHit(EntityRayTraceResult ray) {
|
public boolean onEntityHit(EntityRayTraceResult ray) {
|
||||||
onEntityHit.accept(ray);
|
return onEntityHit.test(ray);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBlockHit(IWorld world, BlockRayTraceResult ray) {
|
public boolean onBlockHit(IWorld world, BlockRayTraceResult ray) {
|
||||||
onBlockHit.accept(world, ray);
|
return onBlockHit.test(world, ray);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Consumer<EntityRayTraceResult> potion(Effect effect, int level, int ticks) {
|
private static Consumer<EntityRayTraceResult> potion(Effect effect, int level, int ticks) {
|
||||||
|
@ -326,37 +325,38 @@ public class PotatoCannonProjectileTypes {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BiConsumer<IWorld, BlockRayTraceResult> plantCrop(IRegistryDelegate<? extends Block> cropBlock) {
|
private static BiPredicate<IWorld, BlockRayTraceResult> plantCrop(IRegistryDelegate<? extends Block> cropBlock) {
|
||||||
return (world, ray) -> {
|
return (world, ray) -> {
|
||||||
BlockPos hitPos = ray.getPos();
|
BlockPos hitPos = ray.getPos();
|
||||||
if (!world.isAreaLoaded(hitPos, 1))
|
if (!world.isAreaLoaded(hitPos, 1))
|
||||||
return;
|
return true;
|
||||||
Direction face = ray.getFace();
|
Direction face = ray.getFace();
|
||||||
BlockPos placePos = hitPos.offset(face);
|
BlockPos placePos = hitPos.offset(face);
|
||||||
if (!world.getBlockState(placePos)
|
if (!world.getBlockState(placePos)
|
||||||
.getMaterial()
|
.getMaterial()
|
||||||
.isReplaceable())
|
.isReplaceable())
|
||||||
return;
|
return false;
|
||||||
if (!(cropBlock.get() instanceof IPlantable))
|
if (!(cropBlock.get() instanceof IPlantable))
|
||||||
return;
|
return false;
|
||||||
BlockState blockState = world.getBlockState(hitPos);
|
BlockState blockState = world.getBlockState(hitPos);
|
||||||
if (!blockState.canSustainPlant(world, hitPos, face, (IPlantable) cropBlock.get()))
|
if (!blockState.canSustainPlant(world, hitPos, face, (IPlantable) cropBlock.get()))
|
||||||
return;
|
return false;
|
||||||
world.setBlockState(placePos, cropBlock.get().getDefaultState(), 3);
|
world.setBlockState(placePos, cropBlock.get().getDefaultState(), 3);
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BiConsumer<IWorld, BlockRayTraceResult> placeBlockOnGround(IRegistryDelegate<? extends Block> block) {
|
private static BiPredicate<IWorld, BlockRayTraceResult> placeBlockOnGround(IRegistryDelegate<? extends Block> block) {
|
||||||
return (world, ray) -> {
|
return (world, ray) -> {
|
||||||
BlockPos hitPos = ray.getPos();
|
BlockPos hitPos = ray.getPos();
|
||||||
if (!world.isAreaLoaded(hitPos, 1))
|
if (!world.isAreaLoaded(hitPos, 1))
|
||||||
return;
|
return true;
|
||||||
Direction face = ray.getFace();
|
Direction face = ray.getFace();
|
||||||
BlockPos placePos = hitPos.offset(face);
|
BlockPos placePos = hitPos.offset(face);
|
||||||
if (!world.getBlockState(placePos)
|
if (!world.getBlockState(placePos)
|
||||||
.getMaterial()
|
.getMaterial()
|
||||||
.isReplaceable())
|
.isReplaceable())
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
if (face == Direction.UP) {
|
if (face == Direction.UP) {
|
||||||
world.setBlockState(placePos, block.get().getDefaultState(), 3);
|
world.setBlockState(placePos, block.get().getDefaultState(), 3);
|
||||||
|
@ -372,6 +372,8 @@ public class PotatoCannonProjectileTypes {
|
||||||
falling.fallTime = 1;
|
falling.fallTime = 1;
|
||||||
world.addEntity(falling);
|
world.addEntity(falling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,12 +483,20 @@ public class PotatoCannonProjectileTypes {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder onEntityHit(Consumer<EntityRayTraceResult> callback) {
|
public Builder onEntityHitRecoveryCancelable(Predicate<EntityRayTraceResult> callback) {
|
||||||
result.onEntityHit = callback;
|
result.onEntityHit = callback;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder onBlockHit(BiConsumer<IWorld, BlockRayTraceResult> callback) {
|
public Builder onEntityHit(Consumer<EntityRayTraceResult> callback) {
|
||||||
|
result.onEntityHit = ray -> {
|
||||||
|
callback.accept(ray);
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder onBlockHit(BiPredicate<IWorld, BlockRayTraceResult> callback) {
|
||||||
result.onBlockHit = callback;
|
result.onBlockHit = callback;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,14 @@ package com.simibubi.create.content.curiosities.weapons;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.simibubi.create.AllEnchantments;
|
||||||
import com.simibubi.create.AllSoundEvents;
|
import com.simibubi.create.AllSoundEvents;
|
||||||
import com.simibubi.create.content.contraptions.particle.AirParticleData;
|
import com.simibubi.create.content.contraptions.particle.AirParticleData;
|
||||||
import com.simibubi.create.foundation.advancement.AllTriggers;
|
import com.simibubi.create.foundation.advancement.AllTriggers;
|
||||||
import com.simibubi.create.foundation.utility.VecHelper;
|
import com.simibubi.create.foundation.utility.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityClassification;
|
import net.minecraft.entity.EntityClassification;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
|
@ -32,9 +34,11 @@ import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
|
import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
|
||||||
import net.minecraftforge.fml.network.NetworkHooks;
|
import net.minecraftforge.fml.network.NetworkHooks;
|
||||||
|
import net.minecraftforge.items.ItemHandlerHelper;
|
||||||
|
|
||||||
public class PotatoProjectileEntity extends DamagingProjectileEntity implements IEntityAdditionalSpawnData {
|
public class PotatoProjectileEntity extends DamagingProjectileEntity implements IEntityAdditionalSpawnData {
|
||||||
|
|
||||||
|
PotatoCannonProjectileTypes type;
|
||||||
ItemStack stack = ItemStack.EMPTY;
|
ItemStack stack = ItemStack.EMPTY;
|
||||||
|
|
||||||
Entity stuckEntity;
|
Entity stuckEntity;
|
||||||
|
@ -42,7 +46,9 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
PotatoProjectileRenderMode stuckRenderer;
|
PotatoProjectileRenderMode stuckRenderer;
|
||||||
double stuckFallSpeed;
|
double stuckFallSpeed;
|
||||||
|
|
||||||
PotatoCannonProjectileTypes type;
|
float additionalDamage = 0;
|
||||||
|
float additionalKnockback = 0;
|
||||||
|
float recoveryChance = .125f;
|
||||||
|
|
||||||
public PotatoProjectileEntity(EntityType<? extends DamagingProjectileEntity> type, World world) {
|
public PotatoProjectileEntity(EntityType<? extends DamagingProjectileEntity> type, World world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
|
@ -63,15 +69,37 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEnchantmentEffectsFromCannon(ItemStack cannon) {
|
||||||
|
int power = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, cannon);
|
||||||
|
int punch = EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, cannon);
|
||||||
|
int flame = EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, cannon);
|
||||||
|
int recovery = EnchantmentHelper.getEnchantmentLevel(AllEnchantments.POTATO_RECOVERY.get(), cannon);
|
||||||
|
|
||||||
|
if (power > 0)
|
||||||
|
additionalDamage = power * 2;
|
||||||
|
if (punch > 0)
|
||||||
|
additionalKnockback = punch * .5f;
|
||||||
|
if (flame > 0)
|
||||||
|
setFire(100);
|
||||||
|
if (recovery > 0)
|
||||||
|
recoveryChance = .125f + recovery * .125f;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readAdditional(CompoundNBT nbt) {
|
public void readAdditional(CompoundNBT nbt) {
|
||||||
stack = ItemStack.read(nbt.getCompound("Item"));
|
stack = ItemStack.read(nbt.getCompound("Item"));
|
||||||
|
additionalDamage = nbt.getFloat("AdditionalDamage");
|
||||||
|
additionalKnockback = nbt.getFloat("AdditionalKnockback");
|
||||||
|
recoveryChance = nbt.getFloat("Recovery");
|
||||||
super.readAdditional(nbt);
|
super.readAdditional(nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeAdditional(CompoundNBT nbt) {
|
public void writeAdditional(CompoundNBT nbt) {
|
||||||
nbt.put("Item", stack.serializeNBT());
|
nbt.put("Item", stack.serializeNBT());
|
||||||
|
nbt.putFloat("AdditionalDamage", additionalDamage);
|
||||||
|
nbt.putFloat("AdditionalKnockback", additionalKnockback);
|
||||||
|
nbt.putFloat("Recovery", recoveryChance);
|
||||||
super.writeAdditional(nbt);
|
super.writeAdditional(nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +137,8 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
} else {
|
} else {
|
||||||
stuckFallSpeed += 0.007 * projectileType.getGravityMultiplier();
|
stuckFallSpeed += 0.007 * projectileType.getGravityMultiplier();
|
||||||
stuckOffset = stuckOffset.add(0, -stuckFallSpeed, 0);
|
stuckOffset = stuckOffset.add(0, -stuckFallSpeed, 0);
|
||||||
Vector3d pos = stuckEntity.getPositionVec().add(stuckOffset);
|
Vector3d pos = stuckEntity.getPositionVec()
|
||||||
|
.add(stuckOffset);
|
||||||
setPosition(pos.x, pos.y, pos.z);
|
setPosition(pos.x, pos.y, pos.z);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -145,8 +174,8 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
Vector3d hit = ray.getHitVec();
|
Vector3d hit = ray.getHitVec();
|
||||||
Entity target = ray.getEntity();
|
Entity target = ray.getEntity();
|
||||||
PotatoCannonProjectileTypes projectileType = getProjectileType();
|
PotatoCannonProjectileTypes projectileType = getProjectileType();
|
||||||
int damage = projectileType.getDamage();
|
float damage = projectileType.getDamage() + additionalDamage;
|
||||||
float knockback = projectileType.getKnockback();
|
float knockback = projectileType.getKnockback() + additionalKnockback;
|
||||||
Entity owner = this.getOwner();
|
Entity owner = this.getOwner();
|
||||||
|
|
||||||
if (!target.isAlive())
|
if (!target.isAlive())
|
||||||
|
@ -173,7 +202,9 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
if (targetIsEnderman)
|
if (targetIsEnderman)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
projectileType.onEntityHit(ray);
|
if (!projectileType.onEntityHit(ray))
|
||||||
|
if (rand.nextDouble() <= recoveryChance)
|
||||||
|
recoverItem();
|
||||||
|
|
||||||
if (!(target instanceof LivingEntity)) {
|
if (!(target instanceof LivingEntity)) {
|
||||||
playHitSound(world, getPositionVec());
|
playHitSound(world, getPositionVec());
|
||||||
|
@ -200,8 +231,8 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
EnchantmentHelper.applyArthropodEnchantments((LivingEntity) owner, livingentity);
|
EnchantmentHelper.applyArthropodEnchantments((LivingEntity) owner, livingentity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (livingentity != owner && livingentity instanceof PlayerEntity
|
if (livingentity != owner && livingentity instanceof PlayerEntity && owner instanceof ServerPlayerEntity
|
||||||
&& owner instanceof ServerPlayerEntity && !this.isSilent()) {
|
&& !this.isSilent()) {
|
||||||
((ServerPlayerEntity) owner).connection
|
((ServerPlayerEntity) owner).connection
|
||||||
.sendPacket(new SChangeGameStatePacket(SChangeGameStatePacket.PROJECTILE_HIT_PLAYER, 0.0F));
|
.sendPacket(new SChangeGameStatePacket(SChangeGameStatePacket.PROJECTILE_HIT_PLAYER, 0.0F));
|
||||||
}
|
}
|
||||||
|
@ -222,6 +253,11 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void recoverItem() {
|
||||||
|
if (!stack.isEmpty())
|
||||||
|
entityDropItem(ItemHandlerHelper.copyStackWithSize(stack, 1));
|
||||||
|
}
|
||||||
|
|
||||||
public static void playHitSound(World world, Vector3d location) {
|
public static void playHitSound(World world, Vector3d location) {
|
||||||
AllSoundEvents.POTATO_HIT.playOnServer(world, new BlockPos(location));
|
AllSoundEvents.POTATO_HIT.playOnServer(world, new BlockPos(location));
|
||||||
}
|
}
|
||||||
|
@ -234,7 +270,9 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
|
||||||
protected void onBlockHit(BlockRayTraceResult ray) {
|
protected void onBlockHit(BlockRayTraceResult ray) {
|
||||||
Vector3d hit = ray.getHitVec();
|
Vector3d hit = ray.getHitVec();
|
||||||
pop(hit);
|
pop(hit);
|
||||||
getProjectileType().onBlockHit(world, ray);
|
if (!getProjectileType().onBlockHit(world, ray))
|
||||||
|
if (rand.nextDouble() <= recoveryChance)
|
||||||
|
recoverItem();
|
||||||
super.onBlockHit(ray);
|
super.onBlockHit(ray);
|
||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.simibubi.create.content.curiosities.weapons;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantment;
|
||||||
|
import net.minecraft.enchantment.EnchantmentType;
|
||||||
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class PotatoRecoveryEnchantment extends Enchantment {
|
||||||
|
|
||||||
|
public PotatoRecoveryEnchantment(Rarity p_i46731_1_, EnchantmentType p_i46731_2_, EquipmentSlotType[] p_i46731_3_) {
|
||||||
|
super(p_i46731_1_, p_i46731_2_, p_i46731_3_);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxLevel() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||||
|
return stack.getItem() instanceof PotatoCannonItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -505,6 +505,10 @@
|
||||||
"create.crafting_blueprint.secondary_display_slot": "Secondary Display Slot",
|
"create.crafting_blueprint.secondary_display_slot": "Secondary Display Slot",
|
||||||
"create.crafting_blueprint.optional": "Optional",
|
"create.crafting_blueprint.optional": "Optional",
|
||||||
|
|
||||||
|
"create.potato_cannon.ammo.attack_damage": "%1$s Attack Damage",
|
||||||
|
"create.potato_cannon.ammo.reload_ticks": "%1$s Reload Ticks",
|
||||||
|
"create.potato_cannon.ammo.knockback": "%1$s Knockback",
|
||||||
|
|
||||||
"create.hint.hose_pulley.title": "Bottomless Supply",
|
"create.hint.hose_pulley.title": "Bottomless Supply",
|
||||||
"create.hint.hose_pulley": "The targeted body of fluid is considered infinite.",
|
"create.hint.hose_pulley": "The targeted body of fluid is considered infinite.",
|
||||||
"create.hint.mechanical_arm_no_targets.title": "No Targets",
|
"create.hint.mechanical_arm_no_targets.title": "No Targets",
|
||||||
|
|
Loading…
Reference in a new issue