Merge remote-tracking branch 'origin/mc1.16/dev' into mc1.16/chromatic-projector

# Conflicts:
#	src/main/java/com/simibubi/create/AllBlocks.java
This commit is contained in:
JozsefA 2021-04-20 14:07:54 -07:00
commit 7b7c6ef3c5
143 changed files with 2418 additions and 692 deletions

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# mod version info
mod_version=0.3.1a
mod_version=0.3.1c
minecraft_version=1.16.5
forge_version=36.0.42

View file

@ -406,20 +406,20 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
768a724d6c921cb92790364cf7a692fe8742a885 assets/create/lang/en_ud.json
3060ba1eee371d642e0590c3d6e99c2be397c7f5 assets/create/lang/en_us.json
e30cf096df194568cec732e36dea067efa28468a assets/create/lang/unfinished/de_de.json
3b3e7b694b75ab50acfe911935f80da0b3234010 assets/create/lang/unfinished/es_es.json
20d7a808b485b9140bce1c4c483c7fc2218a0611 assets/create/lang/unfinished/es_mx.json
1e9f530d590556eac0c4d08750d3ebbd83b504f2 assets/create/lang/unfinished/fr_fr.json
a604e3bf8d1b28d4f77cd4fb5b63f5d58988a507 assets/create/lang/unfinished/it_it.json
371ef25dcdbd268d1f96d19ccd56413c93425ced assets/create/lang/unfinished/ja_jp.json
7206826ff926de6a04145a17928c00ea28762404 assets/create/lang/unfinished/ko_kr.json
411d5197f3b5eb75ef7033685fb24df1c02a959f assets/create/lang/unfinished/nl_nl.json
59756083e6d04f649e860fed9b13657fa12f919b assets/create/lang/unfinished/pt_br.json
efae854418421a1ce80494d1da800e778f17afe8 assets/create/lang/unfinished/ru_ru.json
58fb522692bf7b15d8fb851f0a807fab04620d45 assets/create/lang/unfinished/zh_cn.json
1e2f8564c19f2fe35ce91e65831b72ab44bedea1 assets/create/lang/unfinished/zh_tw.json
97e9ee471ea650f6b7f3d3f39f00201cd5ad752d assets/create/lang/en_ud.json
514ab1f6fa3d24dc575a5dcaaaa96a8009da7414 assets/create/lang/en_us.json
7e45e9a69fb4d21d199174673f2ea6fe35ee6859 assets/create/lang/unfinished/de_de.json
2af0dd8cd0776b8ed5110990405f3cd515abe8e8 assets/create/lang/unfinished/es_es.json
90fc3a9475b957eebf10380a960416b072987541 assets/create/lang/unfinished/es_mx.json
997cc00c6a9afbb142e25c5a1840908363afad41 assets/create/lang/unfinished/fr_fr.json
6a9c89ff7a7c2df5f78a6a739a204744a4a5607a assets/create/lang/unfinished/it_it.json
e21697e70444e3c8fb367b7a4fe867726157390d assets/create/lang/unfinished/ja_jp.json
9f2d7b6fc84f6257837b4c517489f6ef31a4e1a5 assets/create/lang/unfinished/ko_kr.json
5bcfe026f3bb3f0aa0ea415e54dedad4195bb70a assets/create/lang/unfinished/nl_nl.json
bc60cb08266e8d13523d086cdb85aa12da78a47b assets/create/lang/unfinished/pt_br.json
288e3e76a1aa090a676415aeb9f5383b3386e40d assets/create/lang/unfinished/ru_ru.json
0b6852ca1cea71d24cfdee7004ab37fa7810a0fe assets/create/lang/unfinished/zh_cn.json
619d82eba592f4ae88ddbc2c9dfae02627876300 assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@ -1648,8 +1648,8 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
71739e613693c476e481dfcf38628a4f52f0f570 assets/create/sounds.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json

View file

@ -32,7 +32,7 @@
"block.create.blue_seat": "\u0287\u0250\u01DDS \u01DDn\u05DF\u15FA",
"block.create.blue_valve_handle": "\u01DD\u05DFpu\u0250H \u01DD\u028C\u05DF\u0250\u039B \u01DDn\u05DF\u15FA",
"block.create.brass_belt_funnel": "\u05DF\u01DDuun\u2132 \u0287\u05DF\u01DD\u15FA ss\u0250\u0279\u15FA",
"block.create.brass_block": "\u029E\u0254o\u05DF\u15FA ss\u0250\u0279\u15FA",
"block.create.brass_block": "ss\u0250\u0279\u15FA \u025Fo \u029E\u0254o\u05DF\u15FA",
"block.create.brass_casing": "bu\u0131s\u0250\u0186 ss\u0250\u0279\u15FA",
"block.create.brass_encased_shaft": "\u0287\u025F\u0250\u0265S p\u01DDs\u0250\u0254u\u018E ss\u0250\u0279\u15FA",
"block.create.brass_funnel": "\u05DF\u01DDuun\u2132 ss\u0250\u0279\u15FA",
@ -54,7 +54,7 @@
"block.create.cogwheel": "\u05DF\u01DD\u01DD\u0265\u028Dbo\u0186",
"block.create.content_observer": "\u0279\u01DD\u028C\u0279\u01DDsqO \u0287u\u01DD\u0287uo\u0186",
"block.create.controller_rail": "\u05DF\u0131\u0250\u1D1A \u0279\u01DD\u05DF\u05DFo\u0279\u0287uo\u0186",
"block.create.copper_block": "\u029E\u0254o\u05DF\u15FA \u0279\u01DDddo\u0186",
"block.create.copper_block": "\u0279\u01DDddo\u0186 \u025Fo \u029E\u0254o\u05DF\u15FA",
"block.create.copper_casing": "bu\u0131s\u0250\u0186 \u0279\u01DDddo\u0186",
"block.create.copper_ore": "\u01DD\u0279O \u0279\u01DDddo\u0186",
"block.create.copper_shingles": "s\u01DD\u05DFbu\u0131\u0265S \u0279\u01DDddo\u0186",
@ -405,7 +405,7 @@
"block.create.yellow_sail": "\u05DF\u0131\u0250S \u028Do\u05DF\u05DF\u01DD\u028E",
"block.create.yellow_seat": "\u0287\u0250\u01DDS \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": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z",
"block.create.zinc_block": "\u0254u\u0131Z \u025Fo \u029E\u0254o\u05DF\u15FA",
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
"entity.create.gantry_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0287u\u0250\u2141",

View file

@ -35,7 +35,7 @@
"block.create.blue_seat": "Blue Seat",
"block.create.blue_valve_handle": "Blue Valve Handle",
"block.create.brass_belt_funnel": "Brass Belt Funnel",
"block.create.brass_block": "Brass Block",
"block.create.brass_block": "Block of Brass",
"block.create.brass_casing": "Brass Casing",
"block.create.brass_encased_shaft": "Brass Encased Shaft",
"block.create.brass_funnel": "Brass Funnel",
@ -57,7 +57,7 @@
"block.create.cogwheel": "Cogwheel",
"block.create.content_observer": "Content Observer",
"block.create.controller_rail": "Controller Rail",
"block.create.copper_block": "Copper Block",
"block.create.copper_block": "Block of Copper",
"block.create.copper_casing": "Copper Casing",
"block.create.copper_ore": "Copper Ore",
"block.create.copper_shingles": "Copper Shingles",
@ -408,7 +408,7 @@
"block.create.yellow_sail": "Yellow Sail",
"block.create.yellow_seat": "Yellow Seat",
"block.create.yellow_valve_handle": "Yellow Valve Handle",
"block.create.zinc_block": "Zinc Block",
"block.create.zinc_block": "Block of Zinc",
"block.create.zinc_ore": "Zinc Ore",
"entity.create.contraption": "Contraption",
@ -1147,16 +1147,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Schematicannon shoots",
"create.subtitle.schematicannon_finish": "Schematicannon finishes",
"create.contraption.minecart_contraption_too_big": "This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "Cogwheels rumble",
"create.subtitle.slime_added": "Slime squishes",
"create.subtitle.mechanical_press_activation": "Mechanical Press activates",
"create.subtitle.mechanical_press_item_break": "Metal clanks",
"create.subtitle.blockzapper_place": "Blocks zap into place",
"create.subtitle.blockzapper_confirm": "Affirmative Ding",
"create.subtitle.blockzapper_deny": "Declining Boop",
"create.subtitle.block_funnel_eat": "Funnel CHOMPS",
"create.subtitle.blaze_munch": "Blaze munches happily",
"create.subtitle.mixing": "Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Affirmative ding",
"create.subtitle.depot_slide": "Item slides",
"create.subtitle.blockzapper_place": "Blockzapper zaps",
"create.subtitle.blaze_munch": "Blaze Burner munches",
"create.subtitle.schematicannon_launch_block": "Schematicannon fires",
"create.subtitle.funnel_flap": "Funnel Flaps",
"create.subtitle.schematicannon_finish": "Schematicannon dings",
"create.subtitle.scroll_value": "Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "Mechanical Press clangs",
"create.subtitle.blockzapper_deny": "Declining boop",
"create.subtitle.cranking": "Hand Crank turns",
"create.subtitle.depot_plop": "Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 912",
"_": "Missing Localizations: 921",
"_": "->------------------------] Game Elements [------------------------<-",
@ -57,7 +57,7 @@
"block.create.clutch": "Kupplung",
"block.create.cogwheel": "Zahnrad",
"block.create.content_observer": "Inhaltsbeobachter",
"block.create.controller_rail": "Steureungsschiene",
"block.create.controller_rail": "Steuerungsschiene",
"block.create.copper_block": "Kupfer Block",
"block.create.copper_casing": "Kupferrahmen",
"block.create.copper_ore": "Kupfererz",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: Benutze /killtps start <tickTime> um den Server Tick künstlich zu verlangsamen",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Bauplankanone schießt",
"create.subtitle.schematicannon_finish": "Bauplankanone endet",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "Schleim matscht",
"create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert",
"create.subtitle.mechanical_press_item_break": "Metall klonkt",
"create.subtitle.blockzapper_place": "Blöcke zappen an Ort und Stelle",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Bestätigendes Ding",
"create.subtitle.blockzapper_deny": "Ablehnendes Boop",
"create.subtitle.block_funnel_eat": "Trichter MAMPFT",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "Blöcke zappen an Ort und Stelle",
"create.subtitle.blaze_munch": "Lohe kaut glücklich",
"create.subtitle.schematicannon_launch_block": "Bauplankanone schießt",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "Bauplankanone endet",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "Mechanische Presse wird aktiviert",
"create.subtitle.blockzapper_deny": "Ablehnendes Boop",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 605",
"_": "Missing Localizations: 614",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: usar /killtps start <tickTime> para ralentizar artificialmente el tick del servidor",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon",
"create.subtitle.schematicannon_finish": "Acabados de Schematicannon",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "Slime aplastado",
"create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa",
"create.subtitle.mechanical_press_item_break": "Clanks de metal",
"create.subtitle.blockzapper_place": "Los bloques se colocan en su sitio",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Ding afirmativo",
"create.subtitle.blockzapper_deny": "Boop declinante",
"create.subtitle.block_funnel_eat": "CHOMPS del embudo",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "Los bloques se colocan en su sitio",
"create.subtitle.blaze_munch": "Blaze mastica felizmente",
"create.subtitle.schematicannon_launch_block": "Disparos de Schematicannon",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "Acabados de Schematicannon",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "La Prensa Mecánica se activa",
"create.subtitle.blockzapper_deny": "Boop declinante",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1265",
"_": "Missing Localizations: 1272",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1162",
"_": "Missing Localizations: 1171",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Tir de schémacanon",
"create.subtitle.schematicannon_finish": "Fin de schémacanon",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "Bruit de slime",
"create.subtitle.mechanical_press_activation": "Activation de la presse mechanique",
"create.subtitle.mechanical_press_item_break": "Cliquetis de métal",
"create.subtitle.blockzapper_place": "Blocs se zappant en place",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Ding d'affirmation",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "Blocs se zappant en place",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.schematicannon_launch_block": "Tir de schémacanon",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "Fin de schémacanon",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "Activation de la presse mechanique",
"create.subtitle.blockzapper_deny": "Boop de déclin",
"create.subtitle.block_funnel_eat": "Croc d'entonoir",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 622",
"_": "Missing Localizations: 631",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: usa /killtps avvia <tickTime> per rallentare artificialmente il tick del server",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico",
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "Slime schiacciato",
"create.subtitle.mechanical_press_activation": "Pressa meccanica attiva",
"create.subtitle.mechanical_press_item_break": "Rumori metallici",
"create.subtitle.blockzapper_place": "Posiziona blocchi nello spazio",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Ding affermativo",
"create.subtitle.blockzapper_deny": "Boop in calo",
"create.subtitle.block_funnel_eat": "CHOMPS a imbuto",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "Posiziona blocchi nello spazio",
"create.subtitle.blaze_munch": "Il blaze lo gusta felicemente",
"create.subtitle.schematicannon_launch_block": "Tiri del cannoneschematico",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "Finiture cannoneschematico",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "Pressa meccanica attiva",
"create.subtitle.blockzapper_deny": "Boop in calo",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 604",
"_": "Missing Localizations: 613",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: /killtps start <tickTime>を使用して、サーバーのティックを意図的に遅くします",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "スライムがぐしゃっとつぶれる",
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
"create.subtitle.mechanical_press_item_break": "金属がガチャンと鳴る",
"create.subtitle.blockzapper_place": "ブロックを発射して設置する",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "成功音",
"create.subtitle.blockzapper_deny": "失敗音",
"create.subtitle.block_funnel_eat": "ファンネルが大口で食べる",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "ブロックを発射して設置する",
"create.subtitle.blaze_munch": "ブレイズの咀嚼音",
"create.subtitle.schematicannon_launch_block": "概略図砲が発射する",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "概略図砲が作業を終える",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "メカニカルプレスが作動する",
"create.subtitle.blockzapper_deny": "失敗音",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 675",
"_": "Missing Localizations: 684",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함",
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "슬라임이 철퍽거림",
"create.subtitle.mechanical_press_activation": "압착기가 가동됨",
"create.subtitle.mechanical_press_item_break": "금속이 부딫힘",
"create.subtitle.blockzapper_place": "블록이 순간이동됨",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "확인 효과음",
"create.subtitle.blockzapper_deny": "취소 효과음",
"create.subtitle.block_funnel_eat": "깔때기가 흡입함",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "블록이 순간이동됨",
"create.subtitle.blaze_munch": "블레이즈가 행복하게 섭취함",
"create.subtitle.schematicannon_launch_block": "청사진 대포가 발포함",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "청사진 대포가 끝남",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "압착기가 가동됨",
"create.subtitle.blockzapper_deny": "취소 효과음",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1554",
"_": "Missing Localizations: 1561",
"_": "->------------------------] Game Elements [------------------------<-",
@ -36,7 +36,7 @@
"block.create.blue_seat": "UNLOCALIZED: Blue Seat",
"block.create.blue_valve_handle": "UNLOCALIZED: Blue Valve Handle",
"block.create.brass_belt_funnel": "UNLOCALIZED: Brass Belt Funnel",
"block.create.brass_block": "UNLOCALIZED: Brass Block",
"block.create.brass_block": "UNLOCALIZED: Block of Brass",
"block.create.brass_casing": "UNLOCALIZED: Brass Casing",
"block.create.brass_encased_shaft": "UNLOCALIZED: Brass Encased Shaft",
"block.create.brass_funnel": "UNLOCALIZED: Brass Funnel",
@ -58,7 +58,7 @@
"block.create.cogwheel": "Tandwiel",
"block.create.content_observer": "UNLOCALIZED: Content Observer",
"block.create.controller_rail": "UNLOCALIZED: Controller Rail",
"block.create.copper_block": "UNLOCALIZED: Copper Block",
"block.create.copper_block": "UNLOCALIZED: Block of Copper",
"block.create.copper_casing": "UNLOCALIZED: Copper Casing",
"block.create.copper_ore": "UNLOCALIZED: Copper Ore",
"block.create.copper_shingles": "UNLOCALIZED: Copper Shingles",
@ -409,7 +409,7 @@
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
"block.create.zinc_block": "UNLOCALIZED: Zinc Block",
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
"entity.create.contraption": "UNLOCALIZED: Contraption",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1608",
"_": "Missing Localizations: 1615",
"_": "->------------------------] Game Elements [------------------------<-",
@ -36,7 +36,7 @@
"block.create.blue_seat": "UNLOCALIZED: Blue Seat",
"block.create.blue_valve_handle": "UNLOCALIZED: Blue Valve Handle",
"block.create.brass_belt_funnel": "UNLOCALIZED: Brass Belt Funnel",
"block.create.brass_block": "UNLOCALIZED: Brass Block",
"block.create.brass_block": "UNLOCALIZED: Block of Brass",
"block.create.brass_casing": "UNLOCALIZED: Brass Casing",
"block.create.brass_encased_shaft": "UNLOCALIZED: Brass Encased Shaft",
"block.create.brass_funnel": "UNLOCALIZED: Brass Funnel",
@ -58,7 +58,7 @@
"block.create.cogwheel": "Roda Dentada",
"block.create.content_observer": "UNLOCALIZED: Content Observer",
"block.create.controller_rail": "UNLOCALIZED: Controller Rail",
"block.create.copper_block": "UNLOCALIZED: Copper Block",
"block.create.copper_block": "UNLOCALIZED: Block of Copper",
"block.create.copper_casing": "UNLOCALIZED: Copper Casing",
"block.create.copper_ore": "UNLOCALIZED: Copper Ore",
"block.create.copper_shingles": "UNLOCALIZED: Copper Shingles",
@ -409,7 +409,7 @@
"block.create.yellow_sail": "UNLOCALIZED: Yellow Sail",
"block.create.yellow_seat": "UNLOCALIZED: Yellow Seat",
"block.create.yellow_valve_handle": "UNLOCALIZED: Yellow Valve Handle",
"block.create.zinc_block": "UNLOCALIZED: Zinc Block",
"block.create.zinc_block": "UNLOCALIZED: Block of Zinc",
"block.create.zinc_ore": "UNLOCALIZED: Zinc Ore",
"entity.create.contraption": "UNLOCALIZED: Contraption",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "UNLOCALIZED: [Create]: use /killtps start <tickTime> to artificially slow down the server tick",
"create.command.killTPSCommand.argument.tickTime": "UNLOCALIZED: tickTime",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon shoots",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon finishes",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "UNLOCALIZED: Slime squishes",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press activates",
"create.subtitle.mechanical_press_item_break": "UNLOCALIZED: Metal clanks",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blocks zap into place",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative Ding",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining Boop",
"create.subtitle.block_funnel_eat": "UNLOCALIZED: Funnel CHOMPS",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze munches happily",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "UNLOCALIZED: Affirmative ding",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "UNLOCALIZED: Blockzapper zaps",
"create.subtitle.blaze_munch": "UNLOCALIZED: Blaze Burner munches",
"create.subtitle.schematicannon_launch_block": "UNLOCALIZED: Schematicannon fires",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "UNLOCALIZED: Schematicannon dings",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "UNLOCALIZED: Mechanical Press clangs",
"create.subtitle.blockzapper_deny": "UNLOCALIZED: Declining boop",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 519",
"_": "Missing Localizations: 528",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: используйте /killtps start <Время тика>, чтобы искусственно замедлить тик сервера",
"create.command.killTPSCommand.argument.tickTime": "Время тика",
"create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки",
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "Намазывание слизи",
"create.subtitle.mechanical_press_activation": "Механический пресс активирован",
"create.subtitle.mechanical_press_item_break": "Лязг металла",
"create.subtitle.blockzapper_place": "Блок запрыгивает на место",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "Утвердительный динь",
"create.subtitle.blockzapper_deny": "Тихий буп",
"create.subtitle.block_funnel_eat": "Воронкообразный чмопс",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "Блок запрыгивает на место",
"create.subtitle.blaze_munch": "Всполох радостно жуёт",
"create.subtitle.schematicannon_launch_block": "Выстрелы схематичной пушки",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "Схематичная пушка закончила работу",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "Механический пресс активирован",
"create.subtitle.blockzapper_deny": "Тихий буп",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 619",
"_": "Missing Localizations: 628",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 来手动降低服务器TPS速度",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射",
"create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "粘液:挤碎声",
"create.subtitle.mechanical_press_activation": "辊压机:工作中",
"create.subtitle.mechanical_press_item_break": "金属碰撞",
"create.subtitle.blockzapper_place": "放置方块",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "选择方块",
"create.subtitle.blockzapper_deny": "放置失败",
"create.subtitle.block_funnel_eat": "漏斗:吞食",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "放置方块",
"create.subtitle.blaze_munch": "烈焰人:开心地咀嚼着",
"create.subtitle.schematicannon_launch_block": "蓝图加农炮:发射",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "蓝图加农炮:完成任务",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "辊压机:工作中",
"create.subtitle.blockzapper_deny": "放置失败",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 624",
"_": "Missing Localizations: 633",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1148,16 +1148,27 @@
"create.command.killTPSCommand.status.usage.1": "[Create]: 用 /killtps start <tickTime> 來手動降低伺服器TPS",
"create.command.killTPSCommand.argument.tickTime": "tickTime",
"create.subtitle.schematicannon_launch_block": "藍圖大炮發射",
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
"create.contraption.minecart_contraption_too_big": "UNLOCALIZED: This Cart Contraption seems too big to pick up",
"_": "->------------------------] Subtitles [------------------------<-",
"create.subtitle.cogs": "UNLOCALIZED: Cogwheels rumble",
"create.subtitle.slime_added": "黏液擠壓",
"create.subtitle.mechanical_press_activation": "液壓機工作",
"create.subtitle.mechanical_press_item_break": "金屬碰撞",
"create.subtitle.blockzapper_place": "放置方塊",
"create.subtitle.mixing": "UNLOCALIZED: Mixing Noises",
"create.subtitle.mechanical_press_activation_belt": "UNLOCALIZED: Mechanical Press bonks",
"create.subtitle.blockzapper_confirm": "選擇方塊",
"create.subtitle.blockzapper_deny": "放置失敗",
"create.subtitle.block_funnel_eat": "漏斗吸收",
"create.subtitle.depot_slide": "UNLOCALIZED: Item slides",
"create.subtitle.blockzapper_place": "放置方塊",
"create.subtitle.blaze_munch": "烈焰使者開心地吃著",
"create.subtitle.schematicannon_launch_block": "藍圖大炮發射",
"create.subtitle.funnel_flap": "UNLOCALIZED: Funnel Flaps",
"create.subtitle.schematicannon_finish": "藍圖大炮完成任務",
"create.subtitle.scroll_value": "UNLOCALIZED: Scroll-input clicks",
"create.subtitle.mechanical_press_activation": "液壓機工作",
"create.subtitle.blockzapper_deny": "放置失敗",
"create.subtitle.cranking": "UNLOCALIZED: Hand Crank turns",
"create.subtitle.depot_plop": "UNLOCALIZED: Item lands",
"_": "->------------------------] Item Descriptions [------------------------<-",

View file

@ -1,69 +1,12 @@
{
"pigclock": {
"sounds": [
"create:pigclock"
],
"subtitle": "create.subtitle.pigclock"
},
"creeperclock": {
"sounds": [
"create:creeperclock"
],
"subtitle": "create.subtitle.creeperclock"
},
"schematicannon_launch_block": {
"blaze_munch": {
"sounds": [
{
"name": "minecraft:entity.generic.explode",
"name": "minecraft:entity.generic.eat",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_launch_block"
},
"schematicannon_finish": {
"sounds": [
{
"name": "minecraft:block.note_block.bell",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_finish"
},
"slime_added": {
"sounds": [
{
"name": "minecraft:block.slime_block.place",
"type": "event"
}
],
"subtitle": "create.subtitle.slime_added"
},
"mechanical_press_activation": {
"sounds": [
{
"name": "minecraft:block.anvil.land",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_activation"
},
"mechanical_press_item_break": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_item_break"
},
"blockzapper_place": {
"sounds": [
{
"name": "minecraft:block.note_block.basedrum",
"type": "event"
}
],
"subtitle": "create.subtitle.blockzapper_place"
"subtitle": "create.subtitle.blaze_munch"
},
"blockzapper_confirm": {
"sounds": [
@ -83,22 +26,158 @@
],
"subtitle": "create.subtitle.blockzapper_deny"
},
"block_funnel_eat": {
"blockzapper_place": {
"sounds": [
{
"name": "minecraft:entity.generic.eat",
"name": "minecraft:block.note_block.basedrum",
"type": "event"
}
],
"subtitle": "create.subtitle.block_funnel_eat"
"subtitle": "create.subtitle.blockzapper_place"
},
"blaze_munch": {
"cogs": {
"sounds": [
"create:cogs"
],
"subtitle": "create.subtitle.cogs"
},
"cranking": {
"sounds": [
{
"name": "minecraft:entity.generic.eat",
"name": "minecraft:block.wood.place",
"type": "event"
}
],
"subtitle": "create.subtitle.blaze_munch"
"subtitle": "create.subtitle.cranking"
},
"cranking_compounded_1": {
"sounds": [
{
"name": "minecraft:block.wooden_button.click_off",
"type": "event"
}
]
},
"depot_plop": {
"sounds": [
{
"name": "minecraft:entity.item_frame.add_item",
"type": "event"
}
],
"subtitle": "create.subtitle.depot_plop"
},
"depot_slide": {
"sounds": [
{
"name": "minecraft:block.sand.break",
"type": "event"
}
],
"subtitle": "create.subtitle.depot_slide"
},
"funnel_flap": {
"sounds": [
{
"name": "minecraft:entity.item_frame.rotate_item",
"type": "event"
}
],
"subtitle": "create.subtitle.funnel_flap"
},
"funnel_flap_compounded_1": {
"sounds": [
{
"name": "minecraft:block.wool.break",
"type": "event"
}
]
},
"mechanical_press_activation": {
"sounds": [
{
"name": "minecraft:block.anvil.land",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_activation"
},
"mechanical_press_activation_compounded_1": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
]
},
"mechanical_press_activation_belt": {
"sounds": [
{
"name": "minecraft:block.wool.hit",
"type": "event"
}
],
"subtitle": "create.subtitle.mechanical_press_activation_belt"
},
"mechanical_press_activation_belt_compounded_1": {
"sounds": [
{
"name": "minecraft:entity.item.break",
"type": "event"
}
]
},
"mixing": {
"sounds": [
{
"name": "minecraft:block.gilded_blackstone.break",
"type": "event"
}
],
"subtitle": "create.subtitle.mixing"
},
"mixing_compounded_1": {
"sounds": [
{
"name": "minecraft:block.netherrack.break",
"type": "event"
}
]
},
"schematicannon_finish": {
"sounds": [
{
"name": "minecraft:block.note_block.bell",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_finish"
},
"schematicannon_launch_block": {
"sounds": [
{
"name": "minecraft:entity.generic.explode",
"type": "event"
}
],
"subtitle": "create.subtitle.schematicannon_launch_block"
},
"scroll_value": {
"sounds": [
{
"name": "minecraft:block.note_block.hat",
"type": "event"
}
],
"subtitle": "create.subtitle.scroll_value"
},
"slime_added": {
"sounds": [
{
"name": "minecraft:block.slime_block.place",
"type": "event"
}
],
"subtitle": "create.subtitle.slime_added"
}
}

View file

@ -28,8 +28,8 @@
"trigger": "create:bracket_apply",
"conditions": {
"accepted_entries": [
"create:cogwheel",
"create:large_cogwheel"
"create:large_cogwheel",
"create:cogwheel"
]
}
},

View file

@ -9,6 +9,8 @@ import static com.simibubi.create.foundation.data.CreateRegistrate.connectedText
import static com.simibubi.create.foundation.data.ModelGen.customItemModel;
import static com.simibubi.create.foundation.data.ModelGen.oxidizedItemModel;
import java.util.Vector;
import com.simibubi.create.AllTags.AllBlockTags;
import com.simibubi.create.AllTags.AllItemTags;
import com.simibubi.create.content.AllSections;
@ -446,6 +448,7 @@ public class AllBlocks {
public static final BlockEntry<BasinBlock> BASIN = REGISTRATE.block("basin", BasinBlock::new)
.initialProperties(SharedProperties::stone)
.properties(p -> p.sound(SoundType.NETHERITE))
.blockstate(new BasinGenerator()::generate)
.onRegister(addMovementBehaviour(new BasinMovementBehaviour()))
.item()
@ -495,6 +498,7 @@ public class AllBlocks {
public static final BlockEntry<ChuteBlock> CHUTE = REGISTRATE.block("chute", ChuteBlock::new)
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.sound(SoundType.NETHERITE))
.addLayer(() -> RenderType::getCutoutMipped)
.blockstate(new ChuteGenerator()::generate)
.item(ChuteItem::new)
@ -503,6 +507,7 @@ public class AllBlocks {
public static final BlockEntry<SmartChuteBlock> SMART_CHUTE = REGISTRATE.block("smart_chute", SmartChuteBlock::new)
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.sound(SoundType.NETHERITE))
.blockstate((c, p) -> BlockStateGen.simpleBlock(c, p, AssetLookup.forPowered(c, p)))
.item()
.transform(customItemModel("_", "block"))
@ -601,22 +606,22 @@ public class AllBlocks {
.transform(BuilderTransformers.valveHandle(null))
.register();
public static final BlockEntry<ValveHandleBlock>[] DYED_VALVE_HANDLES = new BlockEntry[DyeColor.values().length];
public static final Vector<BlockEntry<ValveHandleBlock>> DYED_VALVE_HANDLES =
new Vector<>(DyeColor.values().length);
static {
for (DyeColor colour : DyeColor.values()) {
String colourName = colour.getString();
DYED_VALVE_HANDLES[colour.ordinal()] =
REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
.transform(BuilderTransformers.valveHandle(colour))
.recipe((c, p) -> ShapedRecipeBuilder.shapedRecipe(c.get())
.patternLine("#")
.patternLine("-")
.key('#', DyeHelper.getTagOfDye(colour))
.key('-', AllItemTags.VALVE_HANDLES.tag)
.addCriterion("has_valve", RegistrateRecipeProvider.hasItem(AllItemTags.VALVE_HANDLES.tag))
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_valve_handle")))
.register();
DYED_VALVE_HANDLES.add(REGISTRATE.block(colourName + "_valve_handle", ValveHandleBlock::dyed)
.transform(BuilderTransformers.valveHandle(colour))
.recipe((c, p) -> ShapedRecipeBuilder.shapedRecipe(c.get())
.patternLine("#")
.patternLine("-")
.key('#', DyeHelper.getTagOfDye(colour))
.key('-', AllItemTags.VALVE_HANDLES.tag)
.addCriterion("has_valve", RegistrateRecipeProvider.hasItem(AllItemTags.VALVE_HANDLES.tag))
.build(p, Create.asResource("crafting/kinetics/" + c.getName() + "_from_other_valve_handle")))
.register());
}
}
@ -1301,6 +1306,7 @@ public class AllBlocks {
.tag(Tags.Items.STORAGE_BLOCKS)
.transform(oxidizedItemModel())
.transform(oxidizedBlockstate())
.lang("Block of Copper")
.register();
public static final BlockEntry<OxidizingBlock> COPPER_SHINGLES =
@ -1326,6 +1332,7 @@ public class AllBlocks {
.transform(tagBlockAndItem("storage_blocks/zinc"))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.lang("Block of Zinc")
.register();
public static final BlockEntry<Block> BRASS_BLOCK = REGISTRATE.block("brass_block", p -> new Block(p))
@ -1333,11 +1340,12 @@ public class AllBlocks {
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
.cubeAll(c.getName(), p.modLoc("block/brass_storage_block"))))
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(tagBlockAndItem("storage_blocks/brass"))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register();
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(tagBlockAndItem("storage_blocks/brass"))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.lang("Block of Brass")
.register();
static {
REGISTRATE.startSection(AllSections.CURIOSITIES);
@ -1352,7 +1360,6 @@ public class AllBlocks {
// Load this class
public static void register() {
}
public static void register() {}
}

View file

@ -2,127 +2,416 @@ package com.simibubi.create;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.DirectoryCache;
import net.minecraft.data.IDataProvider;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.registries.IForgeRegistry;
public enum AllSoundEvents implements IDataProvider {
//@EventBusSubscriber(bus = Bus.FORGE)
public class AllSoundEvents {
CUCKOO_PIG("pigclock"),
CUCKOO_CREEPER("creeperclock"),
public static Map<ResourceLocation, SoundEntry> entries = Maps.newHashMap();
public static final SoundEntry
SCHEMATICANNON_LAUNCH_BLOCK(SoundEvents.ENTITY_GENERIC_EXPLODE),
SCHEMATICANNON_FINISH(SoundEvents.BLOCK_NOTE_BLOCK_BELL),
SLIME_ADDED(SoundEvents.BLOCK_SLIME_BLOCK_PLACE),
MECHANICAL_PRESS_ACTIVATION(SoundEvents.BLOCK_ANVIL_LAND),
MECHANICAL_PRESS_ITEM_BREAK(SoundEvents.ENTITY_ITEM_BREAK),
BLOCKZAPPER_PLACE(SoundEvents.BLOCK_NOTE_BLOCK_BASEDRUM),
BLOCKZAPPER_CONFIRM(SoundEvents.BLOCK_NOTE_BLOCK_BELL),
BLOCKZAPPER_DENY(SoundEvents.BLOCK_NOTE_BLOCK_BASS),
BLOCK_FUNNEL_EAT(SoundEvents.ENTITY_GENERIC_EAT),
BLAZE_MUNCH(SoundEvents.ENTITY_GENERIC_EAT)
SCHEMATICANNON_LAUNCH_BLOCK = create("schematicannon_launch_block").subtitle("Schematicannon fires")
.playExisting(SoundEvents.ENTITY_GENERIC_EXPLODE, .1f, 1.1f)
.category(SoundCategory.BLOCKS)
.build(),
;
SCHEMATICANNON_FINISH = create("schematicannon_finish").subtitle("Schematicannon dings")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BELL, 1, .7f)
.category(SoundCategory.BLOCKS)
.build(),
String id;
SoundEvent event, child;
private DataGenerator generator;
DEPOT_SLIDE = create("depot_slide").subtitle("Item slides")
.playExisting(SoundEvents.BLOCK_SAND_BREAK, .125f, 1.5f)
.category(SoundCategory.BLOCKS)
.build(),
// For adding our own sounds at assets/create/sounds/name.ogg
AllSoundEvents() {
id = Lang.asId(name());
}
DEPOT_PLOP = create("depot_plop").subtitle("Item lands")
.playExisting(SoundEvents.ENTITY_ITEM_FRAME_ADD_ITEM, .25f, 1.25f)
.category(SoundCategory.BLOCKS)
.build(),
AllSoundEvents(String name) {
id = name;
}
FUNNEL_FLAP = create("funnel_flap").subtitle("Funnel Flaps")
.playExisting(SoundEvents.ENTITY_ITEM_FRAME_ROTATE_ITEM, .125f, 1.5f)
.playExisting(SoundEvents.BLOCK_WOOL_BREAK, .0425f, .75f)
.category(SoundCategory.BLOCKS)
.build(),
// For wrapping a existing sound with new subtitle
AllSoundEvents(SoundEvent child) {
this();
this.child = child;
}
SLIME_ADDED = create("slime_added").subtitle("Slime squishes")
.playExisting(SoundEvents.BLOCK_SLIME_BLOCK_PLACE)
.category(SoundCategory.BLOCKS)
.build(),
// subtitles are taken from the lang file (create.subtitle.sound_event_name)
MECHANICAL_PRESS_ACTIVATION = create("mechanical_press_activation").subtitle("Mechanical Press clangs")
.playExisting(SoundEvents.BLOCK_ANVIL_LAND, .125f, 1f)
.playExisting(SoundEvents.ENTITY_ITEM_BREAK, .5f, 1f)
.category(SoundCategory.BLOCKS)
.build(),
public SoundEvent get() {
return event;
}
MECHANICAL_PRESS_ACTIVATION_ON_BELT =
create("mechanical_press_activation_belt").subtitle("Mechanical Press bonks")
.playExisting(SoundEvents.BLOCK_WOOL_HIT, .75f, 1f)
.playExisting(SoundEvents.ENTITY_ITEM_BREAK, .15f, .75f)
.category(SoundCategory.BLOCKS)
.build(),
private String getEventName() {
return id;
}
MIXING = create("mixing").subtitle("Mixing Noises")
.playExisting(SoundEvents.BLOCK_GILDED_BLACKSTONE_BREAK, .125f, .5f)
.playExisting(SoundEvents.BLOCK_NETHERRACK_BREAK, .125f, .5f)
.category(SoundCategory.BLOCKS)
.build(),
public AllSoundEvents generator(DataGenerator generator) {
this.generator = generator;
return this;
CRANKING = create("cranking").subtitle("Hand Crank turns")
.playExisting(SoundEvents.BLOCK_WOOD_PLACE, .075f, .5f)
.playExisting(SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_OFF, .025f, .5f)
.category(SoundCategory.BLOCKS)
.build(),
BLOCKZAPPER_PLACE = create("blockzapper_place").subtitle("Blockzapper zaps")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BASEDRUM)
.category(SoundCategory.PLAYERS)
.build(),
SCROLL_VALUE = create("scroll_value").subtitle("Scroll-input clicks")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_HAT, .124f, 1f)
.category(SoundCategory.PLAYERS)
.build(),
BLOCKZAPPER_CONFIRM = create("blockzapper_confirm").subtitle("Affirmative ding")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BELL, 0.5f, 0.8f)
.category(SoundCategory.PLAYERS)
.build(),
BLOCKZAPPER_DENY = create("blockzapper_deny").subtitle("Declining boop")
.playExisting(SoundEvents.BLOCK_NOTE_BLOCK_BASS, 1f, 0.5f)
.category(SoundCategory.PLAYERS)
.build(),
COGS = create("cogs").subtitle("Cogwheels rumble")
.category(SoundCategory.BLOCKS)
.build(),
BLAZE_MUNCH = create("blaze_munch").subtitle("Blaze Burner munches")
.playExisting(SoundEvents.ENTITY_GENERIC_EAT, .5f, 1f)
.category(SoundCategory.BLOCKS)
.build();
public static SoundEntryBuilder create(String id) {
return new SoundEntryBuilder(id);
}
public static void register(RegistryEvent.Register<SoundEvent> event) {
IForgeRegistry<SoundEvent> registry = event.getRegistry();
for (AllSoundEvents entry : values()) {
ResourceLocation rec = new ResourceLocation(Create.ID, entry.getEventName());
SoundEvent sound = new SoundEvent(rec).setRegistryName(rec);
registry.register(sound);
entry.event = sound;
}
for (SoundEntry entry : entries.values())
entry.register(registry);
}
public void generate(Path path, DirectoryCache cache) {
Gson GSON = (new GsonBuilder()).setPrettyPrinting()
.disableHtmlEscaping()
.create();
path = path.resolve("assets/create");
public static JsonElement provideLangEntries() {
JsonObject object = new JsonObject();
for (SoundEntry entry : entries.values())
object.addProperty(entry.getSubtitleKey(), entry.getSubtitle());
return object;
}
try {
JsonObject json = new JsonObject();
for (AllSoundEvents soundEvent : values()) {
JsonObject entry = new JsonObject();
JsonArray arr = new JsonArray();
if (soundEvent.child != null) {
// wrapper
JsonObject s = new JsonObject();
s.addProperty("name", soundEvent.child.getName()
.toString());
s.addProperty("type", "event");
arr.add(s);
} else {
// own sound
arr.add(Create.ID + ":" + soundEvent.getEventName());
}
entry.add("sounds", arr);
entry.addProperty("subtitle", Create.ID + ".subtitle." + soundEvent.getEventName());
json.add(soundEvent.getEventName(), entry);
public static SoundEntryProvider provider(DataGenerator generator) {
return new SoundEntryProvider(generator);
}
// @SubscribeEvent
// public static void cancelSubtitlesOfCompoundedSounds(PlaySoundEvent event) {
// ResourceLocation soundLocation = event.getSound().getSoundLocation();
// if (!soundLocation.getNamespace().equals(Create.ID))
// return;
// if (soundLocation.getPath().contains("_compounded_")
// event.setResultSound();
//
// }
private static class SoundEntryProvider implements IDataProvider {
private DataGenerator generator;
public SoundEntryProvider(DataGenerator generator) {
this.generator = generator;
}
@Override
public void act(DirectoryCache cache) throws IOException {
generate(generator.getOutputFolder(), cache);
}
@Override
public String getName() {
return "Create's Custom Sounds";
}
public void generate(Path path, DirectoryCache cache) {
Gson GSON = (new GsonBuilder()).setPrettyPrinting()
.disableHtmlEscaping()
.create();
path = path.resolve("assets/create");
try {
JsonObject json = new JsonObject();
entries.entrySet()
.stream()
.sorted(Map.Entry.comparingByKey())
.forEach(entry -> {
entry.getValue()
.write(json);
});
IDataProvider.save(GSON, cache, json, path.resolve("sounds.json"));
} catch (IOException e) {
e.printStackTrace();
}
IDataProvider.save(GSON, cache, json, path.resolve("sounds.json"));
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void act(DirectoryCache cache) throws IOException {
generate(generator.getOutputFolder(), cache);
static class SoundEntryBuilder {
protected String id;
protected String subtitle = "unregistered";
protected SoundCategory category = SoundCategory.BLOCKS;
List<Pair<SoundEvent, Couple<Float>>> wrappedEvents;
public SoundEntryBuilder(String id) {
wrappedEvents = Lists.newArrayList();
this.id = id;
}
public SoundEntryBuilder subtitle(String subtitle) {
this.subtitle = subtitle;
return this;
}
public SoundEntryBuilder category(SoundCategory category) {
this.category = category;
return this;
}
public SoundEntryBuilder playExisting(SoundEvent event, float volume, float pitch) {
wrappedEvents.add(Pair.of(event, Couple.create(volume, pitch)));
return this;
}
public SoundEntryBuilder playExisting(SoundEvent event) {
return playExisting(event, 1, 1);
}
public SoundEntry build() {
SoundEntry entry = wrappedEvents.isEmpty() ? new CustomSoundEntry(id, subtitle, category)
: new WrappedSoundEntry(id, subtitle, wrappedEvents, category);
entries.put(entry.getLocation(), entry);
return entry;
}
}
@Override
public String getName() {
return "Create's Custom Sound: " + name();
public static abstract class SoundEntry {
protected String id;
protected String subtitle;
protected SoundCategory category;
public SoundEntry(String id, String subtitle, SoundCategory category) {
this.id = id;
this.subtitle = subtitle;
this.category = category;
}
public abstract void register(IForgeRegistry<SoundEvent> registry);
public abstract void write(JsonObject json);
public abstract SoundEvent getMainEvent();
public String getSubtitleKey() {
return Create.ID + ".subtitle." + id;
}
public String getId() {
return id;
}
public ResourceLocation getLocation() {
return Create.asResource(id);
}
public String getSubtitle() {
return subtitle;
}
public void playOnServer(World world, BlockPos pos) {
playOnServer(world, pos, 1, 1);
}
public void playOnServer(World world, BlockPos pos, float volume, float pitch) {
play(world, null, pos, volume, pitch);
}
public void play(World world, PlayerEntity entity, BlockPos pos) {
play(world, entity, pos, 1, 1);
}
public void playFrom(Entity entity) {
playFrom(entity, 1, 1);
}
public void playFrom(Entity entity, float volume, float pitch) {
if (!entity.isSilent())
play(entity.world, null, entity.getBlockPos(), volume, pitch);
}
public void play(World world, PlayerEntity entity, BlockPos pos, float volume, float pitch) {
play(world, entity, pos.getX(), pos.getY(), pos.getZ(), volume, pitch);
}
abstract void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch);
public void playAt(World world, BlockPos pos, float volume, float pitch, boolean fade) {
playAt(world, pos.getX() + .5f, pos.getY() + .5f, pos.getZ() + .5f, volume, pitch, fade);
}
public abstract void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade);
}
static class WrappedSoundEntry extends SoundEntry {
private List<Pair<SoundEvent, Couple<Float>>> wrappedEvents;
private List<Pair<SoundEvent, Couple<Float>>> compiledEvents;
public WrappedSoundEntry(String id, String subtitle, List<Pair<SoundEvent, Couple<Float>>> wrappedEvents,
SoundCategory category) {
super(id, subtitle, category);
this.wrappedEvents = wrappedEvents;
compiledEvents = Lists.newArrayList();
}
@Override
public void register(IForgeRegistry<SoundEvent> registry) {
for (int i = 0; i < wrappedEvents.size(); i++) {
ResourceLocation location = Create.asResource(getIdOf(i));
SoundEvent sound = new SoundEvent(location).setRegistryName(location);
registry.register(sound);
compiledEvents.add(Pair.of(sound, wrappedEvents.get(i)
.getSecond()));
}
}
@Override
public SoundEvent getMainEvent() {
return compiledEvents.get(0)
.getFirst();
}
protected String getIdOf(int i) {
return i == 0 ? id : id + "_compounded_" + i;
}
@Override
public void write(JsonObject json) {
for (int i = 0; i < wrappedEvents.size(); i++) {
Pair<SoundEvent, Couple<Float>> pair = wrappedEvents.get(i);
JsonObject entry = new JsonObject();
JsonArray list = new JsonArray();
JsonObject s = new JsonObject();
s.addProperty("name", pair.getFirst()
.getName()
.toString());
s.addProperty("type", "event");
list.add(s);
entry.add("sounds", list);
if (i == 0)
entry.addProperty("subtitle", getSubtitleKey());
json.add(getIdOf(i), entry);
}
}
@Override
void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch) {
for (Pair<SoundEvent, Couple<Float>> pair : compiledEvents) {
Couple<Float> volPitch = pair.getSecond();
world.playSound(entity, x, y, z, pair.getFirst(), category, volPitch.getFirst() * volume,
volPitch.getSecond() * pitch);
}
}
@Override
public void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade) {
for (Pair<SoundEvent, Couple<Float>> pair : compiledEvents) {
Couple<Float> volPitch = pair.getSecond();
world.playSound(x, y, z, pair.getFirst(), category, volPitch.getFirst() * volume,
volPitch.getSecond() * pitch, fade);
}
}
}
static class CustomSoundEntry extends SoundEntry {
protected SoundEvent event;
public CustomSoundEntry(String id, String subtitle, SoundCategory category) {
super(id, subtitle, category);
}
@Override
public void register(IForgeRegistry<SoundEvent> registry) {
ResourceLocation location = getLocation();
registry.register(event = new SoundEvent(location).setRegistryName(location));
}
@Override
public SoundEvent getMainEvent() {
return event;
}
@Override
public void write(JsonObject json) {
JsonObject entry = new JsonObject();
JsonArray list = new JsonArray();
list.add(getLocation().toString());
entry.add("sounds", list);
entry.addProperty("subtitle", getSubtitleKey());
json.add(id, entry);
}
@Override
void play(World world, PlayerEntity entity, double x, double y, double z, float volume, float pitch) {
world.playSound(entity, x, y, z, event, category, volume, pitch);
}
@Override
public void playAt(World world, double x, double y, double z, float volume, float pitch, boolean fade) {
world.playSound(x, y, z, event, category, volume, pitch, fade);
}
}
}

View file

@ -155,6 +155,7 @@ import com.simibubi.create.content.schematics.block.SchematicannonInstance;
import com.simibubi.create.content.schematics.block.SchematicannonRenderer;
import com.simibubi.create.content.schematics.block.SchematicannonTileEntity;
import com.simibubi.create.foundation.tileEntity.renderer.SmartTileEntityRenderer;
import com.tterrag.registrate.util.entry.BlockEntry;
import com.tterrag.registrate.util.entry.TileEntityEntry;
public class AllTileEntities {
@ -246,7 +247,7 @@ public class AllTileEntities {
.tileEntity("hand_crank", HandCrankTileEntity::new)
.instance(() -> HandCrankInstance::new)
.validBlocks(AllBlocks.HAND_CRANK, AllBlocks.COPPER_VALVE_HANDLE)
.validBlocks(AllBlocks.DYED_VALVE_HANDLES)
.validBlocks(AllBlocks.DYED_VALVE_HANDLES.toArray(new BlockEntry<?>[AllBlocks.DYED_VALVE_HANDLES.size()]))
.renderer(() -> HandCrankRenderer::new)
.register();

View file

@ -55,7 +55,7 @@ public class Create {
public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.3.1a";
public static final String VERSION = "0.3.1c";
public static Logger logger = LogManager.getLogger();
public static ItemGroup baseCreativeTab = new CreateItemGroup();
@ -143,7 +143,7 @@ public class Create {
DataGenerator gen = event.getGenerator();
gen.addProvider(new AllAdvancements(gen));
gen.addProvider(new LangMerger(gen));
gen.addProvider(AllSoundEvents.BLAZE_MUNCH.generator(gen));
gen.addProvider(AllSoundEvents.provider(gen));
gen.addProvider(new StandardRecipeGen(gen));
gen.addProvider(new MechanicalCraftingRecipeGen(gen));
ProcessingRecipeGen.registerAll(gen);

View file

@ -54,7 +54,7 @@ public abstract class KineticBlock extends Block implements IRotate {
TileEntity tileEntity = worldIn.getTileEntity(pos);
if (tileEntity instanceof KineticTileEntity) {
KineticTileEntity kineticTileEntity = (KineticTileEntity) tileEntity;
kineticTileEntity.preventSpeedUpdate = false;
kineticTileEntity.preventSpeedUpdate = 0;
if (oldState.getBlock() != state.getBlock())
return;
@ -63,7 +63,7 @@ public abstract class KineticBlock extends Block implements IRotate {
if (!areStatesKineticallyEquivalent(oldState, state))
return;
kineticTileEntity.preventSpeedUpdate = true;
kineticTileEntity.preventSpeedUpdate = 2;
}
}
@ -94,8 +94,8 @@ public abstract class KineticBlock extends Block implements IRotate {
return;
KineticTileEntity kte = (KineticTileEntity) tileEntity;
if (kte.preventSpeedUpdate) {
kte.preventSpeedUpdate = false;
if (kte.preventSpeedUpdate > 0) {
kte.preventSpeedUpdate--;
return;
}

View file

@ -15,10 +15,12 @@ import com.simibubi.create.content.contraptions.base.IRotate.StressImpact;
import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation;
import com.simibubi.create.content.contraptions.goggles.IHaveHoveringInformation;
import com.simibubi.create.content.contraptions.relays.elementary.ICogWheel;
import com.simibubi.create.content.contraptions.relays.gearbox.GearboxBlock;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.render.backend.FastRenderDispatcher;
import com.simibubi.create.foundation.render.backend.instancing.IInstanceRendered;
import com.simibubi.create.foundation.sound.SoundScapes;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Lang;
@ -36,12 +38,14 @@ import net.minecraft.util.Direction.Axis;
import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
public abstract class KineticTileEntity extends SmartTileEntity
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation, IInstanceRendered {
@ -50,7 +54,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
public @Nullable BlockPos source;
public boolean networkDirty;
public boolean updateSpeed;
public boolean preventSpeedUpdate;
public int preventSpeedUpdate;
protected KineticEffectHandler effects;
protected float speed;
@ -93,6 +97,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
if (world.isRemote) {
cachedBoundingBox = null; // cache the bounding box for every frame between ticks
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> this.tickAudio());
return;
}
@ -391,21 +396,28 @@ public abstract class KineticTileEntity extends SmartTileEntity
boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0;
if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) {
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.stressometer.overstressed").formatted(GOLD)));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.stressometer.overstressed")
.formatted(GOLD)));
ITextComponent hint = Lang.translate("gui.contraptions.network_overstressed");
List<ITextComponent> cutString = TooltipHelper.cutTextComponent(hint, GRAY, TextFormatting.WHITE);
for (int i = 0; i < cutString.size(); i++)
tooltip.add(componentSpacing.copy().append(cutString.get(i)));
tooltip.add(componentSpacing.copy()
.append(cutString.get(i)));
return true;
}
if (notFastEnough) {
tooltip.add(componentSpacing.copy().append(Lang.translate("tooltip.speedRequirement").formatted(GOLD)));
ITextComponent hint = Lang.translate("gui.contraptions.not_fast_enough", I18n.format(getBlockState().getBlock()
.getTranslationKey()));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("tooltip.speedRequirement")
.formatted(GOLD)));
ITextComponent hint =
Lang.translate("gui.contraptions.not_fast_enough", I18n.format(getBlockState().getBlock()
.getTranslationKey()));
List<ITextComponent> cutString = TooltipHelper.cutTextComponent(hint, GRAY, TextFormatting.WHITE);
for (int i = 0; i < cutString.size(); i++)
tooltip.add(componentSpacing.copy().append(cutString.get(i)));
tooltip.add(componentSpacing.copy()
.append(cutString.get(i)));
return true;
}
@ -418,13 +430,21 @@ public abstract class KineticTileEntity extends SmartTileEntity
float stressAtBase = calculateStressApplied();
if (calculateStressApplied() != 0 && StressImpact.isEnabled()) {
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.goggles.kinetic_stats")));
tooltip.add(componentSpacing.copy().append(Lang.translate("tooltip.stressImpact").formatted(TextFormatting.GRAY)));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.goggles.kinetic_stats")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("tooltip.stressImpact")
.formatted(TextFormatting.GRAY)));
float stressTotal = stressAtBase * Math.abs(getTheoreticalSpeed());
tooltip.add(componentSpacing.copy().append(new StringTextComponent(" " + IHaveGoggleInformation.format(stressTotal))
.append(Lang.translate("generic.unit.stress")).append(" ").formatted(TextFormatting.AQUA)).append(Lang.translate("gui.goggles.at_current_speed").formatted(TextFormatting.DARK_GRAY)));
tooltip.add(componentSpacing.copy()
.append(new StringTextComponent(" " + IHaveGoggleInformation.format(stressTotal))
.append(Lang.translate("generic.unit.stress"))
.append(" ")
.formatted(TextFormatting.AQUA))
.append(Lang.translate("gui.goggles.at_current_speed")
.formatted(TextFormatting.DARK_GRAY)));
added = true;
}
@ -537,6 +557,7 @@ public abstract class KineticTileEntity extends SmartTileEntity
}
protected AxisAlignedBB cachedBoundingBox;
@OnlyIn(Dist.CLIENT)
public AxisAlignedBB getRenderBoundingBox() {
if (cachedBoundingBox == null) {
@ -548,4 +569,24 @@ public abstract class KineticTileEntity extends SmartTileEntity
protected AxisAlignedBB makeRenderBoundingBox() {
return super.getRenderBoundingBox();
}
@OnlyIn(Dist.CLIENT)
public void tickAudio() {
float componentSpeed = Math.abs(getSpeed());
if (componentSpeed == 0)
return;
float pitch = MathHelper.clamp((componentSpeed / 256f) + .45f, .5f, 1.25f);
if (isNoisy())
SoundScapes.playGeneralKineticAmbience(pos, pitch);
Block block = getBlockState().getBlock();
if (ICogWheel.isSmallCog(block) || ICogWheel.isSmallCog(block) || block instanceof GearboxBlock)
SoundScapes.playCogwheelAmbience(pos, pitch);
}
protected boolean isNoisy() {
return true;
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalBlock;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -69,4 +70,9 @@ public abstract class AttachedActorBlock extends HorizontalBlock implements IWre
return getDefaultState().with(HORIZONTAL_FACING, facing);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
@ -88,6 +89,11 @@ public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTile
public Class<DrillTileEntity> getTileEntityClass() {
return DrillTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
public static double getDamage(float speed) {
float speedAbs = Math.abs(speed);

View file

@ -21,4 +21,5 @@ public class HarvesterBlock extends AttachedActorBlock {
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new HarvesterTileEntity(AllTileEntities.HARVESTER.get());
}
}

View file

@ -21,6 +21,7 @@ import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
@ -143,4 +144,9 @@ public class SeatBlock extends Block {
entity.startRiding(seat, true);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -9,6 +9,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -75,5 +76,10 @@ public class CuckooClockBlock extends HorizontalKineticBlock {
public Axis getRotationAxis(BlockState state) {
return state.get(HORIZONTAL_FACING).getAxis();
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -116,5 +117,10 @@ public class HandCrankBlock extends DirectionalKineticBlock implements ITE<HandC
public Class<HandCrankTileEntity> getTileEntityClass() {
return HandCrankTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -1,7 +1,9 @@
package com.simibubi.create.content.contraptions.components.crank;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -68,7 +70,7 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
updateGeneratedRotation();
}
}
@Override
protected Block getStressConfigKey() {
return AllBlocks.HAND_CRANK.get();
@ -78,4 +80,15 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
public boolean shouldRenderAsTE() {
return true;
}
@Override
public void tickAudio() {
super.tickAudio();
if (inUse > 0 && AnimationTickHolder.getTicks() % 2 == 0) {
if (!AllBlocks.HAND_CRANK.has(getBlockState()))
return;
AllSoundEvents.CRANKING.playAt(world, pos, (inUse) / 5f, .65f + (10 - inUse) / 10f, true);
}
}
}

View file

@ -48,7 +48,8 @@ public class ValveHandleBlock extends HandCrankBlock {
if (worldIn.isRemote)
return ActionResultType.SUCCESS;
BlockState newState = AllBlocks.DYED_VALVE_HANDLES[color.ordinal()].getDefaultState()
BlockState newState = AllBlocks.DYED_VALVE_HANDLES.get(color.ordinal())
.getDefaultState()
.with(FACING, state.get(FACING));
if (newState != state)
worldIn.setBlockState(pos, newState);

View file

@ -20,6 +20,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -201,5 +202,10 @@ public class CrushingWheelControllerBlock extends DirectionalBlock
public Class<CrushingWheelControllerTileEntity> getTileEntityClass() {
return CrushingWheelControllerTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
@ -120,5 +121,10 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<De
BlockPos p_220069_5_, boolean p_220069_6_) {
withTileEntityDo(world, pos, DeployerTileEntity::redstoneUpdate);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -101,6 +101,8 @@ public class DeployerMovementBehaviour extends MovementBehaviour {
if (!tag.getBoolean("Deployed"))
return;
SchematicWorld schematicWorld = SchematicInstances.get(world, filter);
if (schematicWorld == null)
return;
if (!schematicWorld.getBounds()
.isVecInside(pos.subtract(schematicWorld.anchor)))
return;

View file

@ -19,6 +19,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ItemEntity;
@ -39,6 +40,9 @@ import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3i;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
public class AirCurrent {
@ -58,6 +62,8 @@ public class AirCurrent {
new ArrayList<>();
protected List<Entity> caughtEntities = new ArrayList<>();
static boolean isClientPlayerInAirCurrent;
public AirCurrent(IAirCurrentSource source) {
this.source = source;
}
@ -70,7 +76,8 @@ public class AirCurrent {
if (world != null && world.isRemote) {
float offset = pushing ? 0.5f : maxDistance + .5f;
Vector3d pos = VecHelper.getCenterOf(source.getAirCurrentPos())
.add(Vector3d.of(facing.getDirectionVec()).scale(offset));
.add(Vector3d.of(facing.getDirectionVec())
.scale(offset));
if (world.rand.nextFloat() < AllConfigs.CLIENT.fanParticleDensity.get())
world.addParticle(new AirFlowParticleData(source.getAirCurrentPos()), pos.x, pos.y, pos.z, 0, 0, 0);
}
@ -108,6 +115,8 @@ public class AirCurrent {
entity.setMotion(previousMotion.add(new Vector3d(xIn, yIn, zIn).scale(1 / 8f)));
entity.fallDistance = 0;
DistExecutor.unsafeRunWhenOn(Dist.CLIENT,
() -> () -> enableClientPlayerSound(entity, MathHelper.clamp(speed / 128f * .4f, 0.01f, .4f)));
if (entity instanceof ServerPlayerEntity)
((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
@ -115,7 +124,8 @@ public class AirCurrent {
entityDistance -= .5f;
InWorldProcessing.Type processingType = getSegmentAt((float) entityDistance);
if (entity instanceof ServerPlayerEntity)
AllTriggers.triggerFor(AllTriggers.FAN_PROCESSING.constructTriggerFor(processingType), (PlayerEntity) entity);
AllTriggers.triggerFor(AllTriggers.FAN_PROCESSING.constructTriggerFor(processingType),
(PlayerEntity) entity);
if (processingType == null || processingType == Type.NONE) {
continue;
@ -343,7 +353,40 @@ public class AirCurrent {
InWorldProcessing.Type type;
int startOffset;
int endOffset;
}
@OnlyIn(Dist.CLIENT)
static AirCurrentSound flyingSound;
@OnlyIn(Dist.CLIENT)
private static void enableClientPlayerSound(Entity e, float maxVolume) {
if (e != Minecraft.getInstance()
.getRenderViewEntity())
return;
isClientPlayerInAirCurrent = true;
float pitch = (float) MathHelper.clamp(e.getMotion()
.length() * .5f, .5f, 2f);
if (flyingSound == null || flyingSound.isDonePlaying()) {
flyingSound = new AirCurrentSound(SoundEvents.ITEM_ELYTRA_FLYING, pitch);
Minecraft.getInstance()
.getSoundHandler()
.play(flyingSound);
}
flyingSound.setPitch(pitch);
flyingSound.fadeIn(maxVolume);
}
@OnlyIn(Dist.CLIENT)
public static void tickClientPlayerSounds() {
if (!AirCurrent.isClientPlayerInAirCurrent && flyingSound != null)
if (flyingSound.isFaded())
flyingSound.stop();
else
flyingSound.fadeOut();
isClientPlayerInAirCurrent = false;
}
}

View file

@ -0,0 +1,48 @@
package com.simibubi.create.content.contraptions.components.fan;
import net.minecraft.client.audio.TickableSound;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
public class AirCurrentSound extends TickableSound {
private float pitch;
protected AirCurrentSound(SoundEvent p_i46532_1_, float pitch) {
super(p_i46532_1_, SoundCategory.BLOCKS);
this.pitch = pitch;
volume = 0.01f;
repeat = true;
repeatDelay = 0;
global = true;
}
@Override
public void tick() {}
public void setPitch(float pitch) {
this.pitch = pitch;
}
public void fadeIn(float maxVolume) {
volume = Math.min(maxVolume, volume + .05f);
}
public void fadeOut() {
volume = Math.max(0, volume - .05f);
}
public boolean isFaded() {
return volume == 0;
}
@Override
public float getPitch() {
return pitch;
}
public void stop() {
setDone();
}
}

View file

@ -54,7 +54,7 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity implements
@Override
public float calculateAddedStressCapacity() {
return isGenerator ? super.calculateAddedStressCapacity() : 0;
return lastCapacityProvided = (isGenerator ? super.calculateAddedStressCapacity() : 0);
}
@Override

View file

@ -11,6 +11,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -74,5 +75,10 @@ public class NozzleBlock extends ProperDirectionalBlock {
return te instanceof IAirCurrentSource
&& ((IAirCurrentSource) te).getAirflowOriginSide() == towardsFan.getOpposite();
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -45,7 +45,7 @@ public class FlywheelTileEntity extends GeneratingKineticTileEntity {
@Override
public float calculateAddedStressCapacity() {
return generatedCapacity;
return lastCapacityProvided = generatedCapacity;
}
@Override

View file

@ -13,6 +13,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -141,5 +142,10 @@ public class MillstoneBlock extends KineticBlock implements ITE<MillstoneTileEnt
public Class<MillstoneTileEntity> getTileEntityClass() {
return MillstoneTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -1,9 +1,12 @@
package com.simibubi.create.content.contraptions.components.millstone;
import java.util.List;
import java.util.Optional;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState;
@ -38,6 +41,12 @@ public class MillstoneTileEntity extends KineticTileEntity {
outputInv = new ItemStackHandler(9);
capability = LazyOptional.of(MillstoneInventoryHandler::new);
}
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
behaviours.add(new DirectBeltInputBehaviour(this));
super.addBehaviours(behaviours);
}
@Override
public void tick() {

View file

@ -9,6 +9,7 @@ import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -71,5 +72,10 @@ public class MechanicalMixerBlock extends KineticBlock implements ITE<Mechanical
public Class<MechanicalMixerTileEntity> getTileEntityClass() {
return MechanicalMixerTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Optional;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.content.contraptions.fluids.FluidFX;
import com.simibubi.create.content.contraptions.fluids.recipe.PotionMixingRecipeManager;
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
@ -14,6 +15,8 @@ import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.fluid.SmartFluidTankBehaviour.TankSegment;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState;
@ -27,9 +30,13 @@ import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction.Axis;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
@ -120,6 +127,19 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
if ((!world.isRemote || isVirtual()) && runningTicks == 20) {
if (processingTicks < 0) {
processingTicks = MathHelper.clamp((MathHelper.log2((int) (512 / speed))) * 15 + 1, 1, 512);
Optional<BasinTileEntity> basin = getBasin();
if (basin.isPresent()) {
Couple<SmartFluidTankBehaviour> tanks = basin.get()
.getTanks();
if (!tanks.getFirst()
.isEmpty()
|| !tanks.getSecond()
.isEmpty())
world.playSound(null, pos, SoundEvents.BLOCK_BUBBLE_COLUMN_WHIRLPOOL_AMBIENT,
SoundCategory.BLOCKS, .75f, speed < 65 ? .75f : 1.5f);
}
} else {
processingTicks--;
if (processingTicks == 0) {
@ -249,4 +269,18 @@ public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {
protected Optional<ITriggerable> getProcessedRecipeTrigger() {
return Optional.of(AllTriggers.MIXER_MIX);
}
@Override
@OnlyIn(Dist.CLIENT)
public void tickAudio() {
super.tickAudio();
// SoundEvents.BLOCK_STONE_BREAK
boolean slow = Math.abs(getSpeed()) < 65;
if (slow && AnimationTickHolder.getTicks() % 2 == 0)
return;
if (runningTicks == 20)
AllSoundEvents.MIXING.playAt(world, pos, .75f, 1, true);
}
}

View file

@ -6,6 +6,7 @@ import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -57,4 +58,10 @@ public class CreativeMotorBlock extends DirectionalKineticBlock {
public boolean hideStressImpact() {
return true;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -7,18 +7,25 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity.Mode;
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper;
import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack;
import com.simibubi.create.content.logistics.InWorldProcessing;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.BeltProcessingBehaviour.ProcessingResult;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.TransportedItemStackHandlerBehaviour.TransportedResult;
import net.minecraftforge.items.ItemHandlerHelper;
public class BeltPressingCallbacks {
static ProcessingResult onItemReceived(TransportedItemStack transported,
TransportedItemStackHandlerBehaviour handler, MechanicalPressTileEntity press) {
if (press.getSpeed() == 0 || press.running)
if (press.getSpeed() == 0)
return PASS;
if (press.running)
return HOLD;
if (!press.getRecipe(transported.stack)
.isPresent())
return PASS;
@ -44,25 +51,38 @@ public class BeltPressingCallbacks {
if (!recipe.isPresent())
return PASS;
List<TransportedItemStack> collect = InWorldProcessing.applyRecipeOn(transported.stack, recipe.get())
.stream()
.map(stack -> {
TransportedItemStack copy = transported.copy();
copy.stack = stack;
return copy;
}).collect(Collectors.toList());
boolean bulk = MechanicalPressTileEntity.canProcessInBulk() || transported.stack.getCount() == 1;
List<TransportedItemStack> collect = InWorldProcessing
.applyRecipeOn(bulk ? transported.stack : ItemHandlerHelper.copyStackWithSize(transported.stack, 1),
recipe.get())
.stream()
.map(stack -> {
TransportedItemStack copy = transported.copy();
boolean centered = BeltHelper.isItemUpright(stack);
copy.stack = stack;
copy.locked = true;
copy.angle = centered ? 180 : Create.random.nextInt(360);
return copy;
})
.collect(Collectors.toList());
if (bulk) {
if (collect.isEmpty())
handler.handleProcessingOnItem(transported, TransportedResult.removeItem());
else
handler.handleProcessingOnItem(transported, TransportedResult.convertTo(collect));
} else {
TransportedItemStack left = transported.copy();
left.stack.shrink(1);
if (collect.isEmpty())
handler.handleProcessingOnItem(transported, TransportedResult.convertTo(left));
else
handler.handleProcessingOnItem(transported, TransportedResult.convertToAndLeaveHeld(collect, left));
}
if (collect.isEmpty())
handler.handleProcessingOnItem(transported, TransportedItemStackHandlerBehaviour.TransportedResult.removeItem());
else
handler.handleProcessingOnItem(transported, TransportedItemStackHandlerBehaviour.TransportedResult.convertTo(collect));
/*ItemStack out = recipe.get()
.getRecipeOutput()
.copy();
List<ItemStack> multipliedOutput = ItemHelper.multipliedOutput(transported.stack, out);
if (multipliedOutput.isEmpty())
transported.stack = ItemStack.EMPTY;
transported.stack = multipliedOutput.get(0);*/
pressTe.sendData();
return HOLD;
}

View file

@ -9,6 +9,7 @@ import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -65,5 +66,10 @@ public class MechanicalPressBlock extends HorizontalKineticBlock implements ITE<
public Class<MechanicalPressTileEntity> getTileEntityClass() {
return MechanicalPressTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -7,6 +7,7 @@ import java.util.Optional;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.processing.BasinOperatingTileEntity;
import com.simibubi.create.content.contraptions.processing.BasinTileEntity;
import com.simibubi.create.content.logistics.InWorldProcessing;
@ -22,6 +23,7 @@ import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.inventory.IInventory;
@ -34,11 +36,11 @@ import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.NonNullList;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.common.util.Constants.NBT;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.RecipeWrapper;
@ -180,12 +182,14 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
applyPressingInWorld();
if (onBasin())
applyCompactingOnBasin();
if (!world.isRemote) {
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ITEM_BREAK.get(), SoundCategory.BLOCKS,
.5f, 1f);
world.playSound(null, getPos(), AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.get(), SoundCategory.BLOCKS,
.125f, 1f);
}
if (world.getBlockState(pos.down(2)).getSoundType() == SoundType.CLOTH)
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION_ON_BELT.playOnServer(world, pos);
else
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(world, pos, .5f, .75f + (Math.abs(getSpeed()) / 1024f));
if (!world.isRemote)
sendData();
}
if (!world.isRemote && runningTicks > CYCLE) {
@ -231,6 +235,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
protected void applyPressingInWorld() {
AxisAlignedBB bb = new AxisAlignedBB(pos.down(1));
boolean bulk = canProcessInBulk();
pressedItems.clear();
if (world.isRemote)
return;
@ -240,16 +245,39 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
if (!entity.isAlive() || !entity.isOnGround())
continue;
ItemEntity itemEntity = (ItemEntity) entity;
pressedItems.add(itemEntity.getItem());
ItemStack item = itemEntity.getItem();
pressedItems.add(item);
sendData();
Optional<PressingRecipe> recipe = getRecipe(itemEntity.getItem());
Optional<PressingRecipe> recipe = getRecipe(item);
if (!recipe.isPresent())
continue;
InWorldProcessing.applyRecipeOn(itemEntity, recipe.get());
if (bulk || item.getCount() == 1) {
InWorldProcessing.applyRecipeOn(itemEntity, recipe.get());
} else {
for (ItemStack result : InWorldProcessing.applyRecipeOn(ItemHandlerHelper.copyStackWithSize(item, 1),
recipe.get())) {
ItemEntity created =
new ItemEntity(world, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), result);
created.setDefaultPickupDelay();
created.setMotion(VecHelper.offsetRandomly(Vector3d.ZERO, Create.random, .05f));
world.addEntity(created);
}
item.shrink(1);
}
AllTriggers.triggerForNearbyPlayers(AllTriggers.BONK, world, pos, 4);
entityScanCooldown = 0;
if (!bulk)
break;
}
}
public static boolean canProcessInBulk() {
return AllConfigs.SERVER.recipes.bulkPressing.get();
}
public int getRunningTickSpeed() {
if (getSpeed() == 0)
return 0;

View file

@ -17,6 +17,7 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction;
@ -120,5 +121,10 @@ public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTile
public Class<SawTileEntity> getTileEntityClass() {
return SawTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -1,5 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement;
import java.io.IOException;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.List;
@ -10,8 +11,11 @@ import java.util.UUID;
import org.apache.commons.lang3.mutable.MutableInt;
import org.apache.commons.lang3.tuple.MutablePair;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllMovementBehaviours;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.actors.SeatEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MountedContraption;
@ -30,6 +34,7 @@ import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.network.IPacket;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.datasync.DataParameter;
@ -75,7 +80,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
return;
contraption.onEntityCreated(this);
}
public boolean supportsTerrainCollision() {
return contraption instanceof TranslatingContraption;
}
@ -139,9 +144,8 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
BlockPos seat = contraption.getSeatOf(id);
if (seat == null)
return null;
Vector3d transformedVector =
toGlobalVector(Vector3d.of(seat).add(.5, passenger.getYOffset() + ySize - .15f, .5), partialTicks)
.add(VecHelper.getCenterOf(BlockPos.ZERO))
Vector3d transformedVector = toGlobalVector(Vector3d.of(seat)
.add(.5, passenger.getYOffset() + ySize - .15f, .5), partialTicks).add(VecHelper.getCenterOf(BlockPos.ZERO))
.subtract(0.5, ySize, 0.5);
return transformedVector;
}
@ -380,14 +384,33 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
public void writeSpawnData(PacketBuffer buffer) {
CompoundNBT compound = new CompoundNBT();
writeAdditional(compound, true);
try {
ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();
CompressedStreamTools.write(compound, dataOutput);
byte[] byteArray = dataOutput.toByteArray();
int estimatedPacketSize = byteArray.length;
if (estimatedPacketSize > 2_000_000) {
Create.logger.warn("Could not send Contraption Spawn Data (Packet too big): "
+ getContraption().getType().id + " @" + getPositionVec() + " (" + getUniqueID().toString() + ")");
buffer.writeCompoundTag(new CompoundNBT());
return;
}
} catch (IOException e) {
e.printStackTrace();
buffer.writeCompoundTag(new CompoundNBT());
return;
}
buffer.writeCompoundTag(compound);
}
@Override
protected final void writeAdditional(CompoundNBT compound) {
writeAdditional(compound, false);
}
protected void writeAdditional(CompoundNBT compound, boolean spawnPacket) {
if (contraption != null)
compound.put("Contraption", contraption.writeNBT(spawnPacket));
@ -399,13 +422,16 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
public void readSpawnData(PacketBuffer additionalData) {
readAdditional(additionalData.readCompoundTag(), true);
}
@Override
protected final void readAdditional(CompoundNBT compound) {
readAdditional(compound, false);
}
protected void readAdditional(CompoundNBT compound, boolean spawnData) {
if (compound.isEmpty())
return;
initialized = compound.getBoolean("Initialized");
contraption = Contraption.fromNBT(world, compound.getCompound("Contraption"), spawnData);
contraption.entity = this;
@ -510,7 +536,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
@OnlyIn(Dist.CLIENT)
static void handleDisassemblyPacket(ContraptionDisassemblyPacket packet) {
Entity entity = Minecraft.getInstance().world.getEntityByID(packet.entityID);
Entity entity = Minecraft.getInstance().world.getEntityByID(packet.entityID);
if (!(entity instanceof AbstractContraptionEntity))
return;
AbstractContraptionEntity ce = (AbstractContraptionEntity) entity;
@ -650,25 +676,24 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
}
//@Override //TODO find 1.16 replacement
//public void updateAquatics() {
/*
Override this with an empty method to reduce enormous calculation time when contraptions are in water
WARNING: THIS HAS A BUNCH OF SIDE EFFECTS!
- Fluids will not try to change contraption movement direction
- this.inWater and this.isInWater() will return unreliable data
- entities riding a contraption will not cause water splashes (seats are their own entity so this should be fine)
- fall distance is not reset when the contraption is in water
- this.eyesInWater and this.canSwim() will always be false
- swimming state will never be updated
*/
// extinguish();
//}
// @Override //TODO find 1.16 replacement
// public void updateAquatics() {
/*
* Override this with an empty method to reduce enormous calculation time when contraptions are in water
* WARNING: THIS HAS A BUNCH OF SIDE EFFECTS!
* - Fluids will not try to change contraption movement direction
* - this.inWater and this.isInWater() will return unreliable data
* - entities riding a contraption will not cause water splashes (seats are their own entity so this should be fine)
* - fall distance is not reset when the contraption is in water
* - this.eyesInWater and this.canSwim() will always be false
* - swimming state will never be updated
*/
// extinguish();
// }
@Override
public void setFire(int p_70015_1_) {
// Contraptions no longer catch fire
// Contraptions no longer catch fire
}
}

View file

@ -13,6 +13,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.bea
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingBlock;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.SailBlock;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingBlock;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.WindmillBearingTileEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.AbstractChassisBlock;
import com.simibubi.create.content.contraptions.components.structureMovement.chassis.StickerBlock;
import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerBlock;
@ -26,6 +28,7 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
import net.minecraft.block.AbstractPressurePlateBlock;
import net.minecraft.block.AbstractRailBlock;
import net.minecraft.block.AbstractSignBlock;
import net.minecraft.block.BellBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -40,7 +43,9 @@ import net.minecraft.block.LadderBlock;
import net.minecraft.block.RedstoneDiodeBlock;
import net.minecraft.block.RedstoneWallTorchBlock;
import net.minecraft.block.RedstoneWireBlock;
import net.minecraft.block.StandingSignBlock;
import net.minecraft.block.TorchBlock;
import net.minecraft.block.WallSignBlock;
import net.minecraft.block.WallTorchBlock;
import net.minecraft.block.material.PushReaction;
import net.minecraft.state.properties.AttachFace;
@ -85,6 +90,11 @@ public class BlockMovementTraits {
if (te instanceof MechanicalBearingTileEntity)
return !((MechanicalBearingTileEntity) te).isRunning();
}
if (block instanceof WindmillBearingBlock) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof WindmillBearingTileEntity)
return !((WindmillBearingTileEntity) te).isRunning();
}
if (block instanceof ClockworkBearingBlock) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof ClockworkBearingTileEntity)
@ -116,6 +126,8 @@ public class BlockMovementTraits {
return true;
if (block instanceof TorchBlock)
return true;
if (block instanceof AbstractSignBlock)
return true;
if (block instanceof AbstractPressurePlateBlock)
return true;
if (block instanceof HorizontalFaceBlock && !(block instanceof GrindstoneBlock))
@ -143,6 +155,10 @@ public class BlockMovementTraits {
return state.get(LadderBlock.FACING) == direction.getOpposite();
if (block instanceof WallTorchBlock)
return state.get(WallTorchBlock.HORIZONTAL_FACING) == direction.getOpposite();
if (block instanceof WallSignBlock)
return state.get(WallSignBlock.FACING) == direction.getOpposite();
if (block instanceof StandingSignBlock)
return direction == Direction.DOWN;
if (block instanceof AbstractPressurePlateBlock)
return direction == Direction.DOWN;
if (block instanceof DoorBlock)

View file

@ -63,6 +63,8 @@ public class ContraptionHandlerClient {
ClientPlayerEntity player = mc.player;
if (player == null)
return;
if (player.isPassenger())
return;
if (mc.world == null)
return;
if (!event.isUseItem())

View file

@ -75,6 +75,11 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
@Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
if (wasMoved) {
super.fromTag(state, compound, clientPacket);
return;
}
float angleBefore = angle;
running = compound.getBoolean("Running");
angle = compound.getFloat("Angle");

View file

@ -28,6 +28,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ShearsItem;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
@ -195,6 +196,11 @@ public class SailBlock extends ProperDirectionalBlock {
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@MethodsReturnNonnullByDefault
private static class PlacementHelper implements IPlacementHelper {

View file

@ -27,7 +27,7 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity {
super.updateGeneratedRotation();
lastGeneratedSpeed = getGeneratedSpeed();
}
@Override
public void onSpeedChanged(float prevSpeed) {
boolean cancelAssembly = assembleNextTick;
@ -63,7 +63,8 @@ public class WindmillBearingTileEntity extends MechanicalBearingTileEntity {
@Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
lastGeneratedSpeed = compound.getFloat("LastGenerated");
if (!wasMoved)
lastGeneratedSpeed = compound.getFloat("LastGenerated");
super.fromTag(state, compound, clientPacket);
}

View file

@ -18,7 +18,6 @@ import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.vector.Vector3d;
@ -65,7 +64,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements
worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0);
return ActionResultType.SUCCESS;
}
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1);
AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
state = state.with(glueableSide, true);
}
}
@ -86,7 +85,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements
return ActionResultType.SUCCESS;
}
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1);
AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
worldIn.setBlockState(pos, state.with(affectedSide, isSlimeBall));
return ActionResultType.SUCCESS;
}

View file

@ -18,7 +18,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.SoundCategory;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
@ -91,8 +90,7 @@ public class StickerTileEntity extends SmartTileEntity implements IInstanceRende
@OnlyIn(Dist.CLIENT)
public void playSound(boolean attach) {
world.playSound(Minecraft.getInstance().player, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS,
0.35F, attach ? 0.75F : 0.2f);
AllSoundEvents.SLIME_ADDED.play(world, Minecraft.getInstance().player, pos, 0.35f, attach ? 0.75f : 0.2f);
}
}

View file

@ -58,6 +58,7 @@ import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData;
import net.minecraftforge.fml.network.NetworkHooks;
@ -96,12 +97,12 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
if (onValidSurface()) {
AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this),
new GlueEffectPacket(getHangingPosition(), getFacingDirection().getOpposite(), false));
playSound(AllSoundEvents.SLIME_ADDED.get(), 0.5F, 0.5F);
AllSoundEvents.SLIME_ADDED.playFrom(this, 0.5F, 0.5F);
}
}
public void playPlaceSound() {
playSound(AllSoundEvents.SLIME_ADDED.get(), 0.5F, 0.75F);
AllSoundEvents.SLIME_ADDED.playFrom(this, 0.5F, 0.75F);
}
protected void updateFacingWithBoundingBox() {
@ -170,7 +171,7 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
return false;
if (world instanceof WrappedWorld)
return true;
BlockPos pos = hangingPosition;
BlockPos pos2 = pos.offset(getFacingDirection().getOpposite());
return isValidFace(world, pos2, getFacingDirection()) != isValidFace(world, pos,
@ -185,7 +186,8 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
if (!isValidFace(world, pos2, getFacingDirection())
&& !isValidFace(world, pos, getFacingDirection().getOpposite()))
return false;
if (isSideSticky(world, pos2, getFacingDirection()) || isSideSticky(world, pos, getFacingDirection().getOpposite()))
if (isSideSticky(world, pos2, getFacingDirection())
|| isSideSticky(world, pos, getFacingDirection().getOpposite()))
return false;
return world.getEntitiesInAABBexcluding(this, getBoundingBox(), e -> e instanceof SuperGlueEntity)
.isEmpty();
@ -209,12 +211,12 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
if (AllBlocks.STICKER.has(state))
return state.get(DirectionalBlock.FACING) == direction;
if (state.getBlock() == Blocks.SLIME_BLOCK)
return true;
if (state.getBlock() == Blocks.HONEY_BLOCK)
return true;
if (AllBlocks.CART_ASSEMBLER.has(state))
return Direction.UP == direction;
@ -227,7 +229,8 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
if (state.getBlock() instanceof AbstractChassisBlock) {
BooleanProperty glueableSide = ((AbstractChassisBlock) state.getBlock()).getGlueableSide(state, direction);
if (glueableSide == null) return false;
if (glueableSide == null)
return false;
return state.get(glueableSide);
}
@ -255,7 +258,13 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
public boolean attackEntityFrom(DamageSource source, float amount) {
if (this.isInvulnerableTo(source))
return false;
if (isAlive() && !world.isRemote && isVisible()) {
Entity immediateSource = source.getImmediateSource();
if (!isVisible() && immediateSource instanceof PlayerEntity) {
if (!AllItems.SUPER_GLUE.isIn(((PlayerEntity) immediateSource).getHeldItemMainhand()))
return true;
}
if (isAlive() && !world.isRemote) {
remove();
markVelocityChanged();
onBroken(source.getTrueSource());
@ -297,6 +306,8 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat
@Override
public ActionResultType processInitialInteract(PlayerEntity player, Hand hand) {
if (player instanceof FakePlayer)
return ActionResultType.PASS;
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
triggerPlaceBlock(player, hand);
});

View file

@ -42,6 +42,7 @@ import net.minecraft.item.ItemUseContext;
import net.minecraft.loot.LootContext;
import net.minecraft.loot.LootParameters;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -137,54 +138,6 @@ public class CartAssemblerBlock extends AbstractRailBlock
return;
withTileEntityDo(world, pos, te -> {
/*
}
<<<<<<< HEAD
if (te.isMinecartUpdateValid()) {
switch (state.get(RAIL_TYPE)) {
case POWERED_RAIL:
if (state.get(POWERED)) {
assemble(world, pos, cart);
Direction facing = cart.getAdjustedHorizontalFacing();
float speed = getRailMaxSpeed(state, world, pos, cart);
cart.setMotion(facing.getXOffset() * speed, facing.getYOffset() * speed,
facing.getZOffset() * speed);
} else {
disassemble(world, pos, cart);
Vector3d diff = VecHelper.getCenterOf(pos)
.subtract(cart.getPositionVec());
cart.setMotion(diff.x / 16f, 0, diff.z / 16f);
}
break;
case REGULAR:
if (state.get(POWERED)) {
assemble(world, pos, cart);
} else {
disassemble(world, pos, cart);
}
break;
case ACTIVATOR_RAIL:
if (state.get(POWERED)) {
disassemble(world, pos, cart);
}
break;
case DETECTOR_RAIL:
if (cart.getPassengers()
.isEmpty()) {
assemble(world, pos, cart);
Direction facing = cart.getAdjustedHorizontalFacing();
float speed = getRailMaxSpeed(state, world, pos, cart);
cart.setMotion(facing.getXOffset() * speed, facing.getYOffset() * speed,
facing.getZOffset() * speed);
} else {
disassemble(world, pos, cart);
}
break;
default:
break;
}
te.resetTicksSinceMinecartUpdate();
=======*/
if (!te.isMinecartUpdateValid())
return;
@ -458,13 +411,6 @@ public class CartAssemblerBlock extends AbstractRailBlock
return PushReaction.BLOCK;
}
/* FIXME: Is there a 1.16 equivalent to be used? Or is this just removed?
@Override
public boolean isNormalCube(@Nonnull BlockState state, @Nonnull IBlockReader worldIn, @Nonnull BlockPos pos) {
return false;
}
*/
@Override
public Class<CartAssemblerTileEntity> getTileEntityClass() {
return CartAssemblerTileEntity.class;
@ -542,6 +488,11 @@ public class CartAssemblerBlock extends AbstractRailBlock
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
World world = context.getWorld();

View file

@ -1,19 +1,24 @@
package com.simibubi.create.content.contraptions.components.structureMovement.mounted;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import com.simibubi.create.AllItems;
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.contraptions.components.structureMovement.OrientedContraptionEntity;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.NBTHelper;
import net.minecraft.block.AbstractRailBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.DispenserBlock;
import net.minecraft.block.material.Material;
import net.minecraft.dispenser.DefaultDispenseItemBehavior;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.dispenser.IDispenseItemBehavior;
@ -26,12 +31,15 @@ import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.state.properties.RailShape;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -86,7 +94,7 @@ public class MinecartContraptionItem extends Item {
d3 = 0.1D;
}
} else {
if (!blockstate.isAir(world, blockpos) || !world.getBlockState(blockpos.down())
if (blockstate.getMaterial() != Material.AIR || !world.getBlockState(blockpos.down())
.isIn(BlockTags.RAILS)) {
return this.behaviourDefaultDispenseItem.dispense(source, stack);
}
@ -210,13 +218,32 @@ public class MinecartContraptionItem extends Item {
return;
OrientedContraptionEntity contraption = (OrientedContraptionEntity) passengers.get(0);
if (!event.getWorld().isRemote) {
player.inventory.placeItemBackInInventory(event.getWorld(),
create(type, contraption).setDisplayName(entity.getCustomName()));
contraption.remove();
entity.remove();
if (event.getWorld().isRemote) {
event.setCancellationResult(ActionResultType.SUCCESS);
event.setCanceled(true);
return;
}
ItemStack generatedStack = create(type, contraption).setDisplayName(entity.getCustomName());
try {
ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();
CompressedStreamTools.write(generatedStack.serializeNBT(), dataOutput);
int estimatedPacketSize = dataOutput.toByteArray().length;
if (estimatedPacketSize > 2_000_000) {
player.sendStatusMessage(Lang.translate("contraption.minecart_contraption_too_big")
.formatted(TextFormatting.RED), true);
return;
}
} catch (IOException e) {
e.printStackTrace();
return;
}
player.inventory.placeItemBackInInventory(event.getWorld(), generatedStack);
contraption.remove();
entity.remove();
event.setCancellationResult(ActionResultType.SUCCESS);
event.setCanceled(true);
}

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
import java.util.Random;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllSoundEvents;
@ -22,7 +24,6 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
@ -31,6 +32,7 @@ import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.Tags;
public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implements ITE<MechanicalPistonTileEntity> {
@ -88,7 +90,7 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implement
worldIn.addParticle(ParticleTypes.ITEM_SLIME, vec.x, vec.y, vec.z, 0, 0, 0);
return ActionResultType.SUCCESS;
}
worldIn.playSound(null, pos, AllSoundEvents.SLIME_ADDED.get(), SoundCategory.BLOCKS, .5f, 1);
AllSoundEvents.SLIME_ADDED.playOnServer(worldIn, pos, .5f, 1);
if (!player.isCreative())
player.getHeldItem(handIn)
.shrink(1);
@ -98,6 +100,35 @@ public class MechanicalPistonBlock extends DirectionalAxisKineticBlock implement
return ActionResultType.SUCCESS;
}
@Override
public void neighborChanged(BlockState state, World world, BlockPos pos, Block p_220069_4_, BlockPos fromPos,
boolean p_220069_6_) {
Direction direction = state.get(FACING);
if (!fromPos.equals(pos.offset(direction.getOpposite())))
return;
if (!world.isRemote && !world.getPendingBlockTicks()
.isTickPending(pos, this))
world.getPendingBlockTicks()
.scheduleTick(pos, this, 0);
}
@Override
public void scheduledTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random r) {
Direction direction = state.get(FACING);
BlockState pole = worldIn.getBlockState(pos.offset(direction.getOpposite()));
if (!AllBlocks.PISTON_EXTENSION_POLE.has(pole))
return;
if (pole.get(PistonExtensionPoleBlock.FACING)
.getAxis() != direction.getAxis())
return;
withTileEntityDo(worldIn, pos, te -> {
if (te.lastException == null)
return;
te.lastException = null;
te.sendData();
});
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return AllTileEntities.MECHANICAL_PISTON.create();

View file

@ -16,6 +16,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -111,4 +112,9 @@ public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements
FluidState FluidState = context.getWorld().getFluidState(context.getPos());
return super.getStateForPlacement(context).with(BlockStateProperties.WATERLOGGED, Boolean.valueOf(FluidState.getFluid() == Fluids.WATER));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -26,6 +26,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.ActionResultType;
@ -40,6 +41,7 @@ import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements IWrenchable, IWaterLoggable {
@ -50,6 +52,26 @@ public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements
setDefaultState(getDefaultState().with(FACING, Direction.UP).with(BlockStateProperties.WATERLOGGED, false));
}
@Override
public ToolType getHarvestTool(BlockState state) {
return null;
}
@Override
public boolean canHarvestBlock(BlockState state, IBlockReader world, BlockPos pos, PlayerEntity player) {
for (ToolType toolType : player.getHeldItemMainhand()
.getToolTypes()) {
if (isToolEffective(state, toolType))
return true;
}
return super.canHarvestBlock(state, world, pos, player);
}
@Override
public boolean isToolEffective(BlockState state, ToolType tool) {
return tool == ToolType.AXE || tool == ToolType.PICKAXE;
}
@Override
public PushReaction getPushReaction(BlockState state) {
return PushReaction.NORMAL;
@ -146,6 +168,11 @@ public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements
}
return state;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@MethodsReturnNonnullByDefault
public static class PlacementHelper extends PoleHelper<Direction> {

View file

@ -15,6 +15,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -97,6 +98,11 @@ public class PulleyBlock extends HorizontalAxisKineticBlock implements ITE<Pulle
super(properties);
setDefaultState(super.getDefaultState().with(BlockStateProperties.WATERLOGGED, false));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
@Override
public PushReaction getPushReaction(BlockState state) {

View file

@ -54,7 +54,7 @@ public class ContraptionInteractionPacket extends SimplePacketBase {
if (!(entityByID instanceof AbstractContraptionEntity))
return;
AbstractContraptionEntity contraptionEntity = (AbstractContraptionEntity) entityByID;
double d = sender.getAttribute(ForgeMod.REACH_DISTANCE.get()).getValue();
double d = sender.getAttribute(ForgeMod.REACH_DISTANCE.get()).getValue() + 10;
if (!sender.canEntityBeSeen(entityByID))
d -= 3;
d *= d;

View file

@ -93,7 +93,10 @@ public class CouplingPhysics {
public static void softCollisionStep(World world, Couple<AbstractMinecartEntity> carts, double couplingLength) {
Couple<Float> maxSpeed = carts.map(AbstractMinecartEntity::getMaxCartSpeedOnRail);
Couple<Boolean> canAddmotion = carts.map(MinecartSim2020::canAddMotion);
// Assuming Minecarts will never move faster than 1 block/tick
Couple<Vector3d> motions = carts.map(Entity::getMotion);
motions.replaceWithParams(VecHelper::clamp, Couple.create(1f, 1f));
Couple<Vector3d> nextPositions = carts.map(MinecartSim2020::predictNextPositionOf);
Couple<RailShape> shapes = carts.mapWithContext((cart, current) -> {

View file

@ -8,6 +8,7 @@ import com.google.common.collect.Maps;
import com.mojang.datafixers.util.Pair;
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController;
import com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.AbstractRailBlock;
import net.minecraft.block.BlockState;
@ -47,7 +48,7 @@ public class MinecartSim2020 {
public static Vector3d predictNextPositionOf(AbstractMinecartEntity cart) {
Vector3d position = cart.getPositionVec();
Vector3d motion = cart.getMotion();
Vector3d motion = VecHelper.clamp(cart.getMotion(), 1f);
return position.add(motion);
}

View file

@ -12,6 +12,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -106,5 +107,10 @@ public class TurntableBlock extends KineticBlock implements ITE<TurntableTileEnt
public Class<TurntableTileEntity> getTileEntityClass() {
return TurntableTileEntity.class;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -17,6 +17,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -173,4 +174,9 @@ public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable
world.removeTileEntity(pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
@ -109,5 +110,10 @@ public class ItemDrainBlock extends Block implements IWrenchable, ITE<ItemDrainT
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return ComparatorUtil.levelOfSmartFluidTank(worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -7,6 +7,7 @@ import com.simibubi.create.foundation.tileEntity.ComparatorUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext;
@ -45,5 +46,10 @@ public class SpoutBlock extends Block implements IWrenchable {
public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
return ComparatorUtil.levelOfSmartFluidTank(worldIn, pos);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -27,6 +27,7 @@ import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -274,4 +275,10 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable, IWren
return Optional.empty();
return Optional.of(new ItemStack(bracket.getBlock()));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.tileentity.TileEntity;
@ -129,5 +130,10 @@ public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxi
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random r) {
FluidPropagator.propagateChangedPipe(world, pos, state);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -15,6 +15,7 @@ import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -82,4 +83,10 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable
public ItemRequirement getRequiredItems(BlockState state) {
return ItemRequirement.of(AllBlocks.FLUID_PIPE.getDefaultState());
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalFaceBlock;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.network.DebugPacketSender;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.AttachFace;
import net.minecraft.tileentity.TileEntity;
@ -152,5 +153,10 @@ public class SmartFluidPipeBlock extends HorizontalFaceBlock implements IAxisPip
public Axis getAxis(BlockState state) {
return getPipeAxis(state);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -12,7 +12,9 @@ import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.ITextProperties;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
@ -25,24 +27,37 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
public GoggleConfigScreen() {
ITextComponent componentSpacing = new StringTextComponent(" ");
tooltip = new ArrayList<>();
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay1")));
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay2").formatted(TextFormatting.GRAY)));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay1")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay2")
.formatted(TextFormatting.GRAY)));
tooltip.add(StringTextComponent.EMPTY);
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay3")));
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay4")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay3")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay4")));
tooltip.add(StringTextComponent.EMPTY);
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay5").formatted(TextFormatting.GRAY)));
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay6").formatted(TextFormatting.GRAY)));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay5")
.formatted(TextFormatting.GRAY)));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay6")
.formatted(TextFormatting.GRAY)));
tooltip.add(StringTextComponent.EMPTY);
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay7")));
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay8")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay7")));
tooltip.add(componentSpacing.copy()
.append(Lang.translate("gui.config.overlay8")));
}
@Override
protected void init() {
Minecraft mc = Minecraft.getInstance();
this.width = mc.getWindow().getScaledWidth();
this.height = mc.getWindow().getScaledHeight();
this.width = mc.getWindow()
.getScaledWidth();
this.height = mc.getWindow()
.getScaledHeight();
offsetX = AllConfigs.CLIENT.overlayOffsetX.get();
offsetY = AllConfigs.CLIENT.overlayOffsetY.get();
@ -62,7 +77,8 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
}
@Override
public boolean mouseDragged(double p_mouseDragged_1_, double p_mouseDragged_3_, int p_mouseDragged_5_, double p_mouseDragged_6_, double p_mouseDragged_8_) {
public boolean mouseDragged(double p_mouseDragged_1_, double p_mouseDragged_3_, int p_mouseDragged_5_,
double p_mouseDragged_6_, double p_mouseDragged_8_) {
updateOffset(p_mouseDragged_1_, p_mouseDragged_3_);
return true;
@ -71,6 +87,23 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
private void updateOffset(double windowX, double windowY) {
offsetX = (int) (windowX - (this.width / 2));
offsetY = (int) (windowY - (this.height / 2));
int titleLinesCount = 1;
int tooltipTextWidth = 0;
for (ITextProperties textLine : tooltip) {
int textLineWidth = getMinecraft().fontRenderer.getWidth(textLine);
if (textLineWidth > tooltipTextWidth)
tooltipTextWidth = textLineWidth;
}
int tooltipHeight = 8;
if (tooltip.size() > 1) {
tooltipHeight += (tooltip.size() - 1) * 10;
if (tooltip.size() > titleLinesCount)
tooltipHeight += 2; // gap between title lines and next lines
}
offsetX = MathHelper.clamp(offsetX, -(width / 2) - 5, (width / 2) - tooltipTextWidth - 20);
offsetY = MathHelper.clamp(offsetY, -(height / 2) + 17, (height / 2) - tooltipHeight + 5);
}
@Override
@ -79,11 +112,13 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
int posY = this.height / 2 + offsetY;
renderTooltip(ms, tooltip, posX, posY);
//UIRenderHelper.breadcrumbArrow(ms, 50, 50, 100, 50, 20, 10, 0x80aa9999, 0x10aa9999);
//UIRenderHelper.breadcrumbArrow(ms, 100, 80, 0, -50, 20, -10, 0x80aa9999, 0x10aa9999);
// UIRenderHelper.breadcrumbArrow(ms, 50, 50, 100, 50, 20, 10, 0x80aa9999, 0x10aa9999);
// UIRenderHelper.breadcrumbArrow(ms, 100, 80, 0, -50, 20, -10, 0x80aa9999, 0x10aa9999);
ItemStack item = AllItems.GOGGLES.asStack();
GuiGameElement.of(item).at(posX + 10, posY - 16, 450).render(ms);
//GuiGameElement.of(item).at(0, 0, 450).render(ms);
GuiGameElement.of(item)
.at(posX + 10, posY - 16, 450)
.render(ms);
// GuiGameElement.of(item).at(0, 0, 450).render(ms);
}
}

View file

@ -31,6 +31,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.ITextProperties;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
@ -114,7 +115,8 @@ public class GoggleOverlayRenderer {
int poles = 1;
boolean pistonFound = false;
for (Direction dir : directions) {
int attachedPoles = PistonExtensionPoleBlock.PlacementHelper.get().attachedPoles(world, pos, dir);
int attachedPoles = PistonExtensionPoleBlock.PlacementHelper.get()
.attachedPoles(world, pos, dir);
poles += attachedPoles;
pistonFound |= world.getBlockState(pos.offset(dir, attachedPoles + 1))
.getBlock() instanceof MechanicalPistonBlock;
@ -139,8 +141,28 @@ public class GoggleOverlayRenderer {
.getScaledWidth(),
mc.getWindow()
.getScaledHeight());
int titleLinesCount = 1;
int tooltipTextWidth = 0;
for (ITextProperties textLine : tooltip) {
int textLineWidth = mc.fontRenderer.getWidth(textLine);
if (textLineWidth > tooltipTextWidth)
tooltipTextWidth = textLineWidth;
}
int tooltipHeight = 8;
if (tooltip.size() > 1) {
tooltipHeight += (tooltip.size() - 1) * 10;
if (tooltip.size() > titleLinesCount)
tooltipHeight += 2; // gap between title lines and next lines
}
int posX = tooltipScreen.width / 2 + AllConfigs.CLIENT.overlayOffsetX.get();
int posY = tooltipScreen.height / 2 + AllConfigs.CLIENT.overlayOffsetY.get();
posX = Math.min(posX, tooltipScreen.width - tooltipTextWidth - 20);
posY = Math.min(posY, tooltipScreen.height - tooltipHeight - 20);
tooltipScreen.renderTooltip(ms, tooltip, posX, posY);
ItemStack item = AllItems.GOGGLES.asStack();

View file

@ -38,7 +38,7 @@ public interface IHaveGoggleInformation {
static String format(double d) {
return numberFormat.get()
.format(d);
.format(d).replace("\u00A0", " ");
}
default boolean containedFluidTooltip(List<ITextComponent> tooltip, boolean isPlayerSneaking, LazyOptional<IFluidHandler> handler) {

View file

@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.processing;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.fluids.actors.GenericItemFilling;
import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
@ -23,6 +24,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.item.Items;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
@ -30,6 +32,8 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
@ -99,19 +103,30 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
if (EmptyingByBasin.canItemBeEmptied(worldIn, heldItem)
|| GenericItemFilling.canItemBeFilled(worldIn, heldItem))
return ActionResultType.SUCCESS;
if (heldItem.getItem().equals(Items.SPONGE) &&
!te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY).map(iFluidHandler ->
iFluidHandler.drain(Integer.MAX_VALUE, IFluidHandler.FluidAction.EXECUTE)).orElse(FluidStack.EMPTY).isEmpty()) {
if (heldItem.getItem()
.equals(Items.SPONGE)
&& !te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
.map(iFluidHandler -> iFluidHandler.drain(Integer.MAX_VALUE, IFluidHandler.FluidAction.EXECUTE))
.orElse(FluidStack.EMPTY)
.isEmpty()) {
return ActionResultType.SUCCESS;
}
return ActionResultType.PASS;
}
IItemHandlerModifiable inv = te.itemCapability.orElse(new ItemStackHandler(1));
boolean success = false;
for (int slot = 0; slot < inv.getSlots(); slot++) {
player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot));
ItemStack stackInSlot = inv.getStackInSlot(slot);
if (stackInSlot.isEmpty())
continue;
player.inventory.placeItemBackInInventory(worldIn, stackInSlot);
inv.setStackInSlot(slot, ItemStack.EMPTY);
success = true;
}
if (success)
worldIn.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, .2f,
1f + Create.random.nextFloat());
te.onEmptied();
} catch (TileEntityException e) {
}
@ -130,8 +145,13 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
return;
ItemEntity itemEntity = (ItemEntity) entityIn;
withTileEntityDo(worldIn, entityIn.getBlockPos(), te -> {
// Tossed items bypass the quarter-stack limit
te.inputInventory.withMaxStackSize(64);
ItemStack insertItem = ItemHandlerHelper.insertItem(te.inputInventory, itemEntity.getItem()
.copy(), false);
te.inputInventory.withMaxStackSize(16);
if (insertItem.isEmpty()) {
itemEntity.remove();
if (!itemEntity.world.isRemote)
@ -217,4 +237,9 @@ public class BasinBlock extends Block implements ITE<BasinTileEntity>, IWrenchab
return false;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -7,8 +7,11 @@ import net.minecraftforge.items.ItemHandlerHelper;
public class BasinInventory extends SmartInventory {
private BasinTileEntity te;
public BasinInventory(int slots, BasinTileEntity te) {
super(slots, te, 16, true);
this.te = te;
}
@Override
@ -19,5 +22,13 @@ public class BasinInventory extends SmartInventory {
return stack;
return super.insertItem(slot, stack, simulate);
}
@Override
public ItemStack extractItem(int slot, int amount, boolean simulate) {
ItemStack extractItem = super.extractItem(slot, amount, simulate);
if (!simulate && !extractItem.isEmpty())
te.notifyChangeOfContents();
return extractItem;
}
}

View file

@ -96,7 +96,8 @@ public class BasinTileEntity extends SmartTileEntity implements IHaveGoggleInfor
super(type);
inputInventory = new BasinInventory(9, this);
inputInventory.whenContentsChanged($ -> contentsChanged = true);
outputInventory = new BasinInventory(9, this).forbidInsertion();
outputInventory = new BasinInventory(9, this).forbidInsertion()
.withMaxStackSize(64);
areFluidsMoving = false;
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
contentsChanged = true;

View file

@ -29,6 +29,7 @@ import net.minecraft.loot.LootPool;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.conditions.BlockStateProperty;
import net.minecraft.loot.conditions.ILootCondition.IBuilder;
import net.minecraft.pathfinding.PathType;
import net.minecraft.loot.conditions.SurvivesExplosion;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -255,4 +256,10 @@ public class BlazeBurnerBlock extends Block implements ITE<BlazeBurnerTileEntity
return this.ordinal() >= heatLevel.ordinal();
}
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -5,7 +5,6 @@ import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerTil
import net.minecraft.entity.projectile.EggEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
@ -52,7 +51,7 @@ public class BlazeBurnerHandler {
heater.notifyUpdate();
}
world.playSound(null, heater.getPos(), AllSoundEvents.BLAZE_MUNCH.get(), SoundCategory.BLOCKS, .5F, 1F);
AllSoundEvents.BLAZE_MUNCH.playOnServer(world, heater.getPos());
}
}

View file

@ -11,6 +11,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.pathfinding.PathType;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
@ -114,5 +115,10 @@ public class LitBlazeBurnerBlock extends Block {
return AllBlocks.BLAZE_BURNER.get()
.getCollisionShape(state, reader, pos, context);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -24,6 +24,7 @@ import net.minecraft.item.BlockItem;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -269,6 +270,11 @@ public class GantryShaftBlock extends DirectionalKineticBlock {
public float getParticleInitialRadius() {
return .25f;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
public static class PlacementHelper extends PoleHelper<Direction> {

View file

@ -99,5 +99,10 @@ public class GantryShaftTileEntity extends KineticTileEntity {
return 0;
return MathHelper.clamp(-getSpeed() / 512f, -.49f, .49f);
}
@Override
protected boolean isNoisy() {
return false;
}
}

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.relays.advanced.sequencer;
import java.util.Random;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock;
@ -29,6 +31,7 @@ import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor;
@ -62,7 +65,14 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen
boolean isMoving) {
if (worldIn.isRemote)
return;
if (!worldIn.getPendingBlockTicks()
.isTickPending(pos, this))
worldIn.getPendingBlockTicks()
.scheduleTick(pos, this, 0);
}
@Override
public void scheduledTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random r) {
boolean previouslyPowered = state.get(STATE) != 0;
boolean isPowered = worldIn.isBlockPowered(pos);
withTileEntityDo(worldIn, pos, sgte -> sgte.onRedstoneUpdate(isPowered, previouslyPowered));

View file

@ -4,9 +4,12 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang3.mutable.MutableBoolean;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.processing.EmptyingByBasin;
@ -38,6 +41,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.loot.LootParameters;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -51,6 +55,8 @@ import net.minecraft.util.Direction.AxisDirection;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.Rotation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
@ -89,8 +95,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
@Override
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
return super.areStatesKineticallyEquivalent(oldState.with(CASING, false), newState.with(CASING, false))
&& oldState.get(PART) == newState.get(PART);
return super.areStatesKineticallyEquivalent(oldState, newState) && oldState.get(PART) == newState.get(PART);
}
@Override
@ -119,11 +124,14 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
return AllItems.BELT_CONNECTOR.asStack();
}
/* FIXME
@Override
public Material getMaterial(BlockState state) {
return state.get(CASING) ? Material.WOOD : Material.WOOL;
} */
/*
* FIXME
*
* @Override
* public Material getMaterial(BlockState state) {
* return state.get(CASING) ? Material.WOOD : Material.WOOL;
* }
*/
@SuppressWarnings("deprecation")
@Override
@ -253,11 +261,16 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
return ActionResultType.PASS;
if (world.isRemote)
return ActionResultType.SUCCESS;
MutableBoolean success = new MutableBoolean(false);
controllerBelt.getInventory()
.applyToEachWithin(belt.index + .5f, .55f, (transportedItemStack) -> {
player.inventory.placeItemBackInInventory(world, transportedItemStack.stack);
success.setTrue();
return TransportedResult.removeItem();
});
if (success.isTrue())
world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, .2f,
1f + Create.random.nextFloat());
}
if (isShaft) {
@ -381,7 +394,8 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
public static void initBelt(World world, BlockPos pos) {
if (world.isRemote)
return;
if (world instanceof ServerWorld && ((ServerWorld) world).getChunkProvider().getChunkGenerator() instanceof DebugChunkGenerator)
if (world instanceof ServerWorld && ((ServerWorld) world).getChunkProvider()
.getChunkGenerator() instanceof DebugChunkGenerator)
return;
BlockState state = world.getBlockState(pos);
@ -598,4 +612,9 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE<BeltTileEnt
return rotate;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -60,7 +60,6 @@ import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
public class BeltTileEntity extends KineticTileEntity implements LightUpdateListener {
public Map<Entity, TransportedEntityInfo> passengers;
@ -118,7 +117,8 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
if (light == null && world.isRemote) {
initializeLight();
LightUpdater.getInstance().startListening(getBeltVolume(), this);
LightUpdater.getInstance()
.startListening(getBeltVolume(), this);
}
getInventory().tick();
@ -423,6 +423,10 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
private boolean canInsertFrom(Direction side) {
if (getSpeed() == 0)
return false;
BlockState state = getBlockState();
if (state.contains(BeltBlock.SLOPE)
&& (state.get(BeltBlock.SLOPE) == BeltSlope.SIDEWAYS || state.get(BeltBlock.SLOPE) == BeltSlope.VERTICAL))
return false;
return getMovementFacing() != side.getOpposite();
}
@ -515,7 +519,10 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
@Override
public boolean shouldRenderAsTE() {
return isController();
if (world == null)
return isController();
BlockState state = getBlockState();
return state != null && state.contains(BeltBlock.PART) && state.get(BeltBlock.PART) == BeltPart.START;
}
@Override

View file

@ -17,6 +17,7 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
@ -29,13 +30,14 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock implements IWaterLoggable, IWrenchableWithBracket {
public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock
implements IWaterLoggable, IWrenchableWithBracket {
public AbstractShaftBlock(Properties properties) {
super(properties);
setDefaultState(super.getDefaultState().with(BlockStateProperties.WATERLOGGED, false));
}
@Override
public ActionResultType onWrenched(BlockState state, ItemUseContext context) {
return IWrenchableWithBracket.super.onWrenched(state, context);
@ -58,7 +60,7 @@ public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock imple
removeBracket(world, pos, true).ifPresent(stack -> Block.spawnAsEntity(world, pos, stack));
super.onReplaced(state, world, pos, newState, isMoving);
}
// IRotate:
@Override
@ -112,4 +114,10 @@ public abstract class AbstractShaftBlock extends RotatedPillarKineticBlock imple
return Optional.empty();
return Optional.of(new ItemStack(bracket.getBlock()));
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -20,9 +20,8 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
behaviours.add(
new BracketedTileEntityBehaviour(this, state -> state.getBlock() instanceof AbstractShaftBlock).withTrigger(
state -> AllTriggers.BRACKET_APPLY_TRIGGER.constructTriggerFor(state.getBlock())));
behaviours.add(new BracketedTileEntityBehaviour(this, state -> state.getBlock() instanceof AbstractShaftBlock)
.withTrigger(state -> AllTriggers.BRACKET_APPLY_TRIGGER.constructTriggerFor(state.getBlock())));
super.addBehaviours(behaviours);
}
@ -44,4 +43,9 @@ public class SimpleKineticTileEntity extends KineticTileEntity {
return neighbours;
}
@Override
protected boolean isNoisy() {
return false;
}
}

View file

@ -15,6 +15,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.particles.RedstoneParticleData;
import net.minecraft.pathfinding.PathType;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Direction.Axis;
@ -45,11 +46,11 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
public static GaugeBlock speed(Properties properties) {
return new GaugeBlock(properties, Type.SPEED);
}
public static GaugeBlock stress(Properties properties) {
return new GaugeBlock(properties, Type.STRESS);
}
protected GaugeBlock(Properties properties, Type type) {
super(properties);
this.type = type;
@ -67,18 +68,24 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
}
}
/* FIXME: Is there a new way of doing this in 1.16? Or cn we just delete it?
@SuppressWarnings("deprecation")
@Override
public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos) {
return Blocks.SPRUCE_PLANKS.getMaterialColor(state, worldIn, pos);
} */
/*
* FIXME: Is there a new way of doing this in 1.16? Or cn we just delete it?
*
* @SuppressWarnings("deprecation")
*
* @Override
* public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos) {
* return Blocks.SPRUCE_PLANKS.getMaterialColor(state, worldIn, pos);
* }
*/
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
World world = context.getWorld();
Direction face = context.getFace();
BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite());
BlockPos placedOnPos = context.getPos()
.offset(context.getFace()
.getOpposite());
BlockState placedOnState = world.getBlockState(placedOnPos);
Block block = placedOnState.getBlock();
@ -88,17 +95,14 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
Direction nearestLookingDirection = context.getNearestLookingDirection();
boolean lookPositive = nearestLookingDirection.getAxisDirection() == AxisDirection.POSITIVE;
if (face.getAxis() == Axis.X) {
toPlace = toPlace
.with(FACING, lookPositive ? Direction.NORTH : Direction.SOUTH)
.with(AXIS_ALONG_FIRST_COORDINATE, true);
toPlace = toPlace.with(FACING, lookPositive ? Direction.NORTH : Direction.SOUTH)
.with(AXIS_ALONG_FIRST_COORDINATE, true);
} else if (face.getAxis() == Axis.Y) {
toPlace = toPlace
.with(FACING, horizontalFacing.getOpposite())
.with(AXIS_ALONG_FIRST_COORDINATE, horizontalFacing.getAxis() == Axis.X);
toPlace = toPlace.with(FACING, horizontalFacing.getOpposite())
.with(AXIS_ALONG_FIRST_COORDINATE, horizontalFacing.getAxis() == Axis.X);
} else {
toPlace = toPlace
.with(FACING, lookPositive ? Direction.WEST : Direction.EAST)
.with(AXIS_ALONG_FIRST_COORDINATE, false);
toPlace = toPlace.with(FACING, lookPositive ? Direction.WEST : Direction.EAST)
.with(AXIS_ALONG_FIRST_COORDINATE, false);
}
return toPlace;
@ -114,20 +118,22 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
@Override
protected boolean getAxisAlignmentForPlacement(BlockItemUseContext context) {
return context.getPlacementHorizontalFacing().getAxis() != Axis.X;
return context.getPlacementHorizontalFacing()
.getAxis() != Axis.X;
}
public boolean shouldRenderHeadOnFace(World world, BlockPos pos, BlockState state, Direction face) {
if (face.getAxis().isVertical())
if (face.getAxis()
.isVertical())
return false;
if (face == state.get(FACING).getOpposite())
if (face == state.get(FACING)
.getOpposite())
return false;
if (face.getAxis() == getRotationAxis(state))
return false;
if (getRotationAxis(state) == Axis.Y && face != state.get(FACING))
return false;
if (!Block.shouldSideBeRendered(state, world, pos, face)
&& !(world instanceof WrappedWorld))
if (!Block.shouldSideBeRendered(state, world, pos, face) && !(world instanceof WrappedWorld))
return false;
return true;
}
@ -156,15 +162,15 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
continue;
for (int i = 0; i < particleCount; i++) {
Vector3d mul = VecHelper
.offsetRandomly(Vector3d.ZERO, rand, .25f)
.mul(new Vector3d(1, 1, 1).subtract(positiveFaceVec))
.normalize()
.scale(.3f);
Vector3d offset = VecHelper.getCenterOf(pos).add(faceVec.scale(.55)).add(mul);
worldIn
.addParticle(new RedstoneParticleData((float) rgb.x, (float) rgb.y, (float) rgb.z, 1), offset.x,
offset.y, offset.z, mul.x, mul.y, mul.z);
Vector3d mul = VecHelper.offsetRandomly(Vector3d.ZERO, rand, .25f)
.mul(new Vector3d(1, 1, 1).subtract(positiveFaceVec))
.normalize()
.scale(.3f);
Vector3d offset = VecHelper.getCenterOf(pos)
.add(faceVec.scale(.55))
.add(mul);
worldIn.addParticle(new RedstoneParticleData((float) rgb.x, (float) rgb.y, (float) rgb.z, 1), offset.x,
offset.y, offset.z, mul.x, mul.y, mul.z);
}
}
@ -191,4 +197,8 @@ public class GaugeBlock extends DirectionalAxisKineticBlock {
return 0;
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -10,4 +10,9 @@ public class GearboxTileEntity extends DirectionalShaftHalvesTileEntity {
super(type);
}
@Override
protected boolean isNoisy() {
return false;
}
}

View file

@ -20,6 +20,7 @@ import com.simibubi.create.foundation.utility.Iterate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.FluidState;
import net.minecraft.item.BlockItem;
@ -172,8 +173,8 @@ public class SymmetryWandItem extends Item {
public static boolean isEnabled(ItemStack stack) {
checkNBT(stack);
return stack.getTag()
.getBoolean(ENABLE);
CompoundNBT tag = stack.getTag();
return tag.getBoolean(ENABLE) && !tag.getBoolean("Simulate");
}
public static SymmetryMirror getMirror(ItemStack stack) {
@ -235,11 +236,16 @@ public class SymmetryWandItem extends Item {
FluidState ifluidstate = world.getFluidState(position);
world.setBlockState(position, ifluidstate.getBlockState(), BlockFlags.UPDATE_NEIGHBORS);
world.setBlockState(position, blockState);
if (ForgeEventFactory.onBlockPlace(player, blocksnapshot, Direction.UP)) {
CompoundNBT wandNbt = wand.getOrCreateTag();
wandNbt.putBoolean("Simulate", true);
boolean placeInterrupted = ForgeEventFactory.onBlockPlace(player, blocksnapshot, Direction.UP);
wandNbt.putBoolean("Simulate", false);
if (placeInterrupted) {
blocksnapshot.restore(true, false);
continue;
}
targets.add(position);
}
}
@ -286,7 +292,7 @@ public class SymmetryWandItem extends Item {
continue;
BlockState blockstate = world.getBlockState(position);
if (!blockstate.isAir(world, position)) {
if (blockstate.getMaterial() != Material.AIR) {
targets.add(position);
world.playEvent(2001, position, Block.getStateId(blockstate));
world.setBlockState(position, air, 3);

View file

@ -15,7 +15,6 @@ import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.state.properties.StairsShape;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
@ -33,7 +32,8 @@ public class ZapperInteractionHandler {
public static void leftClickingBlocksWithTheZapperSelectsTheBlock(PlayerInteractEvent.LeftClickBlock event) {
if (event.getWorld().isRemote)
return;
ItemStack heldItem = event.getPlayer().getHeldItemMainhand();
ItemStack heldItem = event.getPlayer()
.getHeldItemMainhand();
if (heldItem.getItem() instanceof ZapperItem && trySelect(heldItem, event.getPlayer())) {
event.setCancellationResult(ActionResultType.FAIL);
event.setCanceled(true);
@ -87,10 +87,8 @@ public class ZapperInteractionHandler {
data.remove("id");
}
CompoundNBT tag = stack.getOrCreateTag();
if (tag.contains("BlockUsed")
&& NBTUtil.readBlockState(
stack.getTag().getCompound("BlockUsed")) == newState
&& Objects.equals(data, tag.get("BlockData"))) {
if (tag.contains("BlockUsed") && NBTUtil.readBlockState(stack.getTag()
.getCompound("BlockUsed")) == newState && Objects.equals(data, tag.get("BlockData"))) {
return false;
}
@ -99,9 +97,8 @@ public class ZapperInteractionHandler {
tag.remove("BlockData");
else
tag.put("BlockData", data);
player.world.playSound(null, player.getBlockPos(), AllSoundEvents.BLOCKZAPPER_CONFIRM.get(),
SoundCategory.BLOCKS, 0.5f, 0.8f);
AllSoundEvents.BLOCKZAPPER_CONFIRM.playOnServer(player.world, player.getBlockPos());
return true;
}

View file

@ -30,7 +30,6 @@ import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.HandSide;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceContext;
@ -144,8 +143,7 @@ public abstract class ZapperItem extends Item {
// Check if can be used
ITextComponent msg = validateUsage(item);
if (msg != null) {
world.playSound(player, player.getBlockPos(), AllSoundEvents.BLOCKZAPPER_DENY.get(), SoundCategory.BLOCKS,
1f, 0.5f);
AllSoundEvents.BLOCKZAPPER_DENY.play(world, player, player.getBlockPos());
player.sendStatusMessage(msg.copy().formatted(TextFormatting.RED), true);
return new ActionResult<>(ActionResultType.FAIL, item);
}

View file

@ -21,7 +21,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.util.Hand;
import net.minecraft.util.HandSide;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
@ -82,21 +81,21 @@ public class ZapperRenderHandler {
lastRightHandAnimation = rightHandAnimation;
leftHandAnimation *= 0.8f;
rightHandAnimation *= 0.8f;
if (cachedBeams == null)
cachedBeams = new LinkedList<>();
cachedBeams.removeIf(b -> b.itensity < .1f);
if (cachedBeams.isEmpty())
return;
cachedBeams.forEach(beam -> {
CreateClient.outliner.endChasingLine(beam, beam.start, beam.end, 1 - beam.itensity)
.disableNormals()
.colored(0xffffff)
.lineWidth(beam.itensity * 1 / 8f);
.disableNormals()
.colored(0xffffff)
.lineWidth(beam.itensity * 1 / 8f);
});
cachedBeams.forEach(b -> b.itensity *= .6f);
}
@ -115,8 +114,8 @@ public class ZapperRenderHandler {
public static void playSound(Hand hand, BlockPos position) {
float pitch = hand == Hand.MAIN_HAND ? 2f : 0.9f;
Minecraft.getInstance().world.playSound(position, AllSoundEvents.BLOCKZAPPER_PLACE.get(), SoundCategory.BLOCKS,
0.8f, pitch, false);
Minecraft mc = Minecraft.getInstance();
AllSoundEvents.BLOCKZAPPER_PLACE.play(mc.world, mc.player, position, 0.8f, pitch);
}
public static void addBeam(LaserBeam beam) {
@ -166,7 +165,7 @@ public class ZapperRenderHandler {
float f4 = -0.4F * MathHelper.sin(event.getSwingProgress() * (float) Math.PI);
float f5 = MathHelper.sin(event.getSwingProgress() * event.getSwingProgress() * (float) Math.PI);
float f6 = MathHelper.sin(f1 * (float) Math.PI);
ms.translate(f * (f2 + 0.64000005F - .1f), f3 + -0.4F + equipProgress * -0.6F,
f4 + -0.71999997F + .3f + recoil);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 75.0F));
@ -181,7 +180,7 @@ public class ZapperRenderHandler {
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * -135.0F));
ms.translate(f * 5.6F, 0.0F, 0.0F);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(f * 40.0F));
PlayerRenderer playerrenderer = (PlayerRenderer) mc.getRenderManager()
.getRenderer(abstractclientplayerentity);
if (rightHand) {

View file

@ -6,6 +6,7 @@ import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.utility.BlockHelper;
import com.simibubi.create.foundation.utility.Iterate;
@ -49,7 +50,7 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
public static boolean isOpenChute(BlockState state) {
return isChute(state) && ((AbstractChuteBlock) state.getBlock()).isOpen(state);
}
public static boolean isTransparentChute(BlockState state) {
return isChute(state) && ((AbstractChuteBlock) state.getBlock()).isTransparent(state);
}
@ -66,7 +67,7 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
public boolean isOpen(BlockState state) {
return true;
}
public boolean isTransparent(BlockState state) {
return false;
}
@ -128,6 +129,7 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState p_196243_4_, boolean p_196243_5_) {
boolean differentBlock = state.getBlock() != p_196243_4_.getBlock();
if (state.hasTileEntity() && (differentBlock || !p_196243_4_.hasTileEntity())) {
TileEntityBehaviour.destroy(world, pos, FilteringBehaviour.TYPE);
withTileEntityDo(world, pos, c -> c.onRemoved(state));
world.removeTileEntity(pos);
}
@ -140,7 +142,10 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
BlockPos toUpdate = pos.up()
.offset(direction);
BlockState stateToUpdate = world.getBlockState(toUpdate);
BlockState updated = updateChuteState(stateToUpdate, world.getBlockState(toUpdate.up()), world, toUpdate);
if (!isChute(stateToUpdate))
continue;
BlockState updated = ((AbstractChuteBlock) stateToUpdate.getBlock()).updateChuteState(stateToUpdate,
world.getBlockState(toUpdate.up()), world, toUpdate);
if (stateToUpdate != updated && !world.isRemote)
world.setBlockState(toUpdate, updated);
}
@ -157,9 +162,11 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
@Override
public void neighborChanged(BlockState p_220069_1_, World world, BlockPos pos, Block p_220069_4_,
BlockPos neighbourPos, boolean p_220069_6_) {
if (pos.down().equals(neighbourPos))
if (pos.down()
.equals(neighbourPos))
withTileEntityDo(world, pos, ChuteTileEntity::blockBelowChanged);
else if (pos.up().equals(neighbourPos))
else if (pos.up()
.equals(neighbourPos))
withTileEntityDo(world, pos, chute -> chute.capAbove = LazyOptional.empty());
}
@ -171,13 +178,13 @@ public abstract class AbstractChuteBlock extends Block implements IWrenchable, I
BlockHelper.addReducedDestroyEffects(state, world, pos, manager);
return true;
}
@Override
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_,
ISelectionContext p_220053_4_) {
return ChuteShapes.getShape(p_220053_1_);
}
@Override
public VoxelShape getCollisionShape(BlockState p_220071_1_, IBlockReader p_220071_2_, BlockPos p_220071_3_,
ISelectionContext p_220071_4_) {

View file

@ -12,6 +12,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext;
import net.minecraft.pathfinding.PathType;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.EnumProperty;
import net.minecraft.state.Property;
@ -145,5 +146,10 @@ public class ChuteBlock extends AbstractChuteBlock {
return state.with(SHAPE, Shape.NORMAL);
return state.with(SHAPE, Shape.INTERSECTION);
}
@Override
public boolean allowsMovement(BlockState state, IBlockReader reader, BlockPos pos, PathType type) {
return false;
}
}

View file

@ -1,6 +1,10 @@
package com.simibubi.create.content.logistics.block.chute;
import java.util.Random;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
@ -13,6 +17,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
public class SmartChuteBlock extends AbstractChuteBlock {
@ -29,6 +34,14 @@ public class SmartChuteBlock extends AbstractChuteBlock {
super.neighborChanged(state, worldIn, pos, blockIn, fromPos, isMoving);
if (worldIn.isRemote)
return;
if (!worldIn.getPendingBlockTicks()
.isTickPending(pos, this))
worldIn.getPendingBlockTicks()
.scheduleTick(pos, this, 0);
}
@Override
public void scheduledTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random r) {
boolean previouslyPowered = state.get(POWERED);
if (previouslyPowered != worldIn.isBlockPowered(pos))
worldIn.setBlockState(pos, state.cycle(POWERED), 2);

Some files were not shown because too many files have changed in this diff Show more