diff --git a/1.12/Makefile b/1.12/Makefile index 4a2d37b..12a5f78 100644 --- a/1.12/Makefile +++ b/1.12/Makefile @@ -28,7 +28,7 @@ wildcardr=$(foreach d,$(wildcard $1*),$(call wildcardr,$d/,$2) $(filter $(subst # # Targets # -.PHONY: default mod init clean clean-all all run install sanatize dist-check dist start-server +.PHONY: default mod init clean clean-all mrproper all run install sanatize dist-check dist start-server port-languages default: mod @@ -46,8 +46,17 @@ clean: clean-all: clean @echo "[1.12] Cleaning using gradle ..." @rm -f dist/* + @rm -rf run/logs/ + @rm -rf run/crash-reports/ @$(GRADLE) clean cleanCache +mrproper: clean-all + @rm -f meta/*.* + @rm -rf run/ + @rm -rf out/ + @rm -f .project + @rm -f .classpath + init: @echo "[1.12] Initialising eclipse workspace using gradle ..." @$(GRADLE) setupDecompWorkspace @@ -90,3 +99,7 @@ dist: sanatize dist-check clean-all mod @mkdir -p dist @cp build/libs/$(MOD_JAR_PREFIX)* dist/ @djs tasks.js dist + +port-languages: + @echo "[1.12] Porting language files to 1.13/1.14 ..." + @djs tasks.js port-languages diff --git a/1.12/build.gradle b/1.12/build.gradle index 0cb3819..e3ed998 100644 --- a/1.12/build.gradle +++ b/1.12/build.gradle @@ -24,6 +24,11 @@ archivesBaseName = "engineersdecor-${version_minecraft}" def signing = { -> def sp = new Properties() + sp.keystore_file = project.keystore_file + sp.keystore_alias = project.keystore_alias + sp.keystore_pass = project.keystore_pass + sp.keystore_keypass = project.keystore_keypass + sp.fingerprint_sha1 = project.fingerprint_sha1 if(file("signing.properties").exists()) file("signing.properties").withInputStream { sp.load(it) } return sp }() diff --git a/1.12/gradle.properties b/1.12/gradle.properties index 1a40bc4..aff41d6 100644 --- a/1.12/gradle.properties +++ b/1.12/gradle.properties @@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx8G version_minecraft=1.12.2 version_forge=14.23.5.2768 version_jei=4.10.0.198 -version_engineersdecor=1.0.8 +version_engineersdecor=1.0.9 diff --git a/1.12/meta/update.json b/1.12/meta/update.json index ba18c8f..3e70560 100644 --- a/1.12/meta/update.json +++ b/1.12/meta/update.json @@ -1,6 +1,10 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.9": "[R] Release based on v1.0.9-b3. Release-to-release changes: * Slabs for clinker, concrete, slag bricks. * Slab slices for sheet metals, treated wood, and concretes. * Language updates. * Block hardness adaptions. * 1st/3rd person item model fixes. * Furnace initialisation issue fixed.", + "1.0.9-b3": "[A] Added missing recipes for slabs.\n[A] Added slab slices for IE sheet metals, treated wood, and concretes (stackable \"quater-slabs\").\n[M] Updated 1st/3rd person item model rotations/translations.\n[M] Hardness of valves and furni slightly increased.", + "1.0.9-b2": "[A] Added slabs for Clinker Brick, Slag Brick, Rebar Concrete, and Stained Clinker. Texture variations like the base blocks. Allow fast pick-up (see tooltip help or config).\n[F] Fixed lab/electrical furnace initialisation issue (first item inserted was smelted directly).", + "1.0.9-b1": "[U] Lang file ru_ru updated (PR#31, yaroslav4167).\n[M] Block hardness adaptions (issue #32).", "1.0.8": "[R] Release based on v1.0.8-b2. Release-to-release changes: * Added factory area sign. * Added stained clinker. * Config opt-out fixes, detailed feature selection possible now. * Recipe adaptions and fixes. * Lang files updated.\n[A] Added stained clinker brick block/stairs. Can be mixed with \"normal\" clinkers.\n[A] Added opt-out option for CTRL-SHIFT tooltips.\n[M] Recipe condition requirements updated, recipes categorized.", "1.0.8-b2": "[F] Config opt-out fixed (thx IronPiston for the report #30).\n[A] Added opt-out config for detailed including/excluding of features (using registry name wildcard matching).", "1.0.8-b1": "[A] Added \"Factory area\" sign.\n[M] Electrical furnace recipe changed (hoppers to conveyors).\n[A] Opt-out config options added.\n[F] Lang file fixes for en_us (Angela, PR#29).", @@ -43,7 +47,7 @@ "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table." }, "promos": { - "1.12.2-recommended": "1.0.8", - "1.12.2-latest": "1.0.8" + "1.12.2-recommended": "1.0.9", + "1.12.2-latest": "1.0.9" } } \ No newline at end of file diff --git a/1.12/readme.md b/1.12/readme.md index a7dd1d6..6fef5a9 100644 --- a/1.12/readme.md +++ b/1.12/readme.md @@ -8,277 +8,302 @@ Mod sources for Minecraft version 1.12.2. - Compiled mod distribution channel is curseforge: https://www.curseforge.com/minecraft/mc-mods/engineers-decor/files. ---- -## Revision history +## Version history - ------------------------------------------------------------------- - - v1.0.8 [R] Release based on v1.0.8-b2. Release-to-release changes: - * Added factory area sign. - * Added stained clinker. - * Config opt-out fixes, detailed feature selection possible now. - * Recipe adaptions and fixes. - * Lang files updated. - ------------------------------------------------------------------- - [A] Added stained clinker brick block/stairs. Can be mixed with - "normal" clinkers. - [A] Added opt-out option for CTRL-SHIFT tooltips. - [M] Recipe condition requirements updated, recipes categorized. + ------------------------------------------------------------------- + - v1.0.9 [R] Release based on v1.0.9-b3. Release-to-release changes: + * Slabs for clinker, concrete, slag bricks. + * Slab slices for sheet metals, treated wood, and concretes. + * Language updates. + * Block hardness adaptions. + * 1st/3rd person item model fixes. + * Furnace initialisation issue fixed. + ------------------------------------------------------------------- - - v1.0.8-b2 [F] Config opt-out fixed (thx IronPiston for the report #30). - [A] Added opt-out config for detailed including/excluding - of features (using registry name wildcard matching). + - v1.0.9-b3 [A] Added missing recipes for slabs. + [A] Added slab slices for IE sheet metals, treated wood, + and concretes (stackable "quater-slabs"). + [M] Updated 1st/3rd person item model rotations/translations. + [M] Hardness of valves and furni slightly increased. - - v1.0.8-b1 [A] Added "Factory area" sign. - [M] Electrical furnace recipe changed (hoppers to conveyors). - [A] Opt-out config options added. - [F] Lang file fixes for en_us (Angela, PR#29). + - v1.0.9-b2 [A] Added slabs for Clinker Brick, Slag Brick, Rebar Concrete, + and Stained Clinker. Texture variations like the base blocks. + Allow fast pick-up (see tooltip help or config). + [F] Fixed lab/electrical furnace initialisation issue (first item + inserted was smelted directly). - ------------------------------------------------------------------- - - v1.0.7 [R] Release based on v1.0.7-b2. Release-to-release changes: - * Factory dropper added. - * Defense system warning sign added. - * Warning sign backgrounds adapted. - * Standalone recipes added. - * Lang files updated. - ------------------------------------------------------------------- - [A] Added standalone recipes for signs, factory dropper, and - electrical furnace. - [M] Adapted "Caution" sign backgrounds to the yellow defense - system warning background. + - v1.0.9-b1 [U] Lang file ru_ru updated (PR#31, yaroslav4167). + [M] Block hardness adaptions (issue #32). - - v1.0.7-b2 [A] Added Defense System Warning sign (design by J. Carver). - [M] Factory dropper non-experimental now. GUI click area tuning. - "Fast drop" symbol replaced from arrow to dog icon (thx - overchoice for that icon). - [M] Lang files updated. + ------------------------------------------------------------------- + - v1.0.8 [R] Release based on v1.0.8-b2. Release-to-release changes: + * Added factory area sign. + * Added stained clinker. + * Config opt-out fixes, detailed feature selection possible now. + * Recipe adaptions and fixes. + * Lang files updated. + ------------------------------------------------------------------- + [A] Added stained clinker brick block/stairs. Can be mixed with + "normal" clinkers. + [A] Added opt-out option for CTRL-SHIFT tooltips. + [M] Recipe condition requirements updated, recipes categorized. - - v1.0.7-b1 [M] Factory dropper (config:experimental) button placement fixed, - GUI vs external view x/y markers added, internal trigger logic - simplified. Thx @overchoice for beta testing! + - v1.0.8-b2 [F] Config opt-out fixed (thx IronPiston for the report #30). + [A] Added opt-out config for detailed including/excluding + of features (using registry name wildcard matching). - ------------------------------------------------------------------- - - v1.0.6 [R] Release based on v1.0.6-b1. Release-to-release changes: - * Fixed FML remapping issue (COULD CAUSE CRASHES). - * Small waste incinerator added. - * Lang files updated/corrections. - * Metal ladder easier to break. - ------------------------------------------------------------------- - [A] Added factory dropper (config:experimental). - [C] Thx to abdurraslan for the detailed issue #25. + - v1.0.8-b1 [A] Added "Factory area" sign. + [M] Electrical furnace recipe changed (hoppers to conveyors). + [A] Opt-out config options added. + [F] Lang file fixes for en_us (Angela, PR#29). - - v1.0.6-b1 [A] Added small waste incinerator (delayed fifo-buffered item disposal). - [M] Fixed item/block name capitalization (by Voxelo). - [M] Metal ladders are easier to break/harvest. - [F] Fixed FML remapping issue by using dedicated IItemHandler instances. + ------------------------------------------------------------------- + - v1.0.7 [R] Release based on v1.0.7-b2. Release-to-release changes: + * Factory dropper added. + * Defense system warning sign added. + * Warning sign backgrounds adapted. + * Standalone recipes added. + * Lang files updated. + ------------------------------------------------------------------- + [A] Added standalone recipes for signs, factory dropper, and + electrical furnace. + [M] Adapted "Caution" sign backgrounds to the yellow defense + system warning background. - ------------------------------------------------------------------- - - v1.0.5 [R] Release based on v1.0.5-b1. Release-to-release changes: - * Small electrical passthrough-furnace added. - * Passive fluid accumulator added. - * Config options added. - * Sign plates added. - * Minor bug fixes. - ------------------------------------------------------------------- - [A] Added sign "Electrical hazard"/"Caution hot wire". - [A] Added sign "Caution dangerous there" (skull/bones). + - v1.0.7-b2 [A] Added Defense System Warning sign (design by J. Carver). + [M] Factory dropper non-experimental now. GUI click area tuning. + "Fast drop" symbol replaced from arrow to dog icon (thx + overchoice for that icon). + [M] Lang files updated. - - v1.0.5-b1 [A] Added passive fluid accumulator. - [A] Added small electrical passthrough-furnace. - [F] Fixed version check URL. - [M] Opt-out config options for valves, passive fluid accumulator, - and furni. + - v1.0.7-b1 [M] Factory dropper (config:experimental) button placement fixed, + GUI vs external view x/y markers added, internal trigger logic + simplified. Thx @overchoice for beta testing! - ------------------------------------------------------------------- - - v1.0.4 [R] Release based on v1.0.4-b9. Release-to-release changes: - * Crafting table: Quick crafting history re-fab, JEI integration. - * Rendering improvements and issue fixes (stairs, ambient occlusion, - optifine, etc). - * Walls with texture variations. - * Thin/thick steel poles with support feet/heads. - * Horizontal steel double-T support beams added. - * Fluid pipe valves added: Check valve, redstone controlled valve, - analog redstone controlled valve. Support pressurized transfer. - * Tool tip documentation (CTRL-SHIFT) for stairs added. - * Internal code cleanups. - * Recipes tuned. - ------------------------------------------------------------------- - [E] Added pass-through electrical furnace (experimental, see config). + ------------------------------------------------------------------- + - v1.0.6 [R] Release based on v1.0.6-b1. Release-to-release changes: + * Fixed FML remapping issue (COULD CAUSE CRASHES). + * Small waste incinerator added. + * Lang files updated/corrections. + * Metal ladder easier to break. + ------------------------------------------------------------------- + [A] Added factory dropper (config:experimental). + [C] Thx to abdurraslan for the detailed issue #25. - - v1.0.4-b9 [F] Inserting fluids with pressurized tag only into IE piping. - [F] Valve redstone connector rendering does not check for - "can connect redstone" but only for "can provide power". - [M] Valves are adapted to be detected as pipe by IE. + - v1.0.6-b1 [A] Added small waste incinerator (delayed fifo-buffered item disposal). + [M] Fixed item/block name capitalization (by Voxelo). + [M] Metal ladders are easier to break/harvest. + [F] Fixed FML remapping issue by using dedicated IItemHandler instances. - - v1.0.4-b8 [F] Fixed stairs rendering without smooth light (thanks rastot9). - [E] Added passive fluid accumulator (experimental feature, see config). + ------------------------------------------------------------------- + - v1.0.5 [R] Release based on v1.0.5-b1. Release-to-release changes: + * Small electrical passthrough-furnace added. + * Passive fluid accumulator added. + * Config options added. + * Sign plates added. + * Minor bug fixes. + ------------------------------------------------------------------- + [A] Added sign "Electrical hazard"/"Caution hot wire". + [A] Added sign "Caution dangerous there" (skull/bones). - - v1.0.4-b7 [F] Fixed recipe loading issue if IE is not installed. - [M] Valves support IE pressurized fluid transfer. + - v1.0.5-b1 [A] Added passive fluid accumulator. + [A] Added small electrical passthrough-furnace. + [F] Fixed version check URL. + [M] Opt-out config options for valves, passive fluid accumulator, + and furni. - - v1.0.4-b6 [A] Added redstone controlled fluid valve. - [A] Added redstone controlled analog fluid valve. - [M] Check valve recipe adapted (thanks majijn). + ------------------------------------------------------------------- + - v1.0.4 [R] Release based on v1.0.4-b9. Release-to-release changes: + * Crafting table: Quick crafting history re-fab, JEI integration. + * Rendering improvements and issue fixes (stairs, ambient occlusion, + optifine, etc). + * Walls with texture variations. + * Thin/thick steel poles with support feet/heads. + * Horizontal steel double-T support beams added. + * Fluid pipe valves added: Check valve, redstone controlled valve, + analog redstone controlled valve. Support pressurized transfer. + * Tool tip documentation (CTRL-SHIFT) for stairs added. + * Internal code cleanups. + * Recipes tuned. + ------------------------------------------------------------------- + [E] Added pass-through electrical furnace (experimental, see config). - - v1.0.4-b5 [A] Horizontal steel double-T support beam with pole connections. - [A] Added fluid pipe check valve (straight, conducts only one way). - [M] Internal registration block/te handling changed. + - v1.0.4-b9 [F] Inserting fluids with pressurized tag only into IE piping. + [F] Valve redstone connector rendering does not check for + "can connect redstone" but only for "can provide power". + [M] Valves are adapted to be detected as pipe by IE. - - v1.0.4-b4 [F] Clinker/slag brick wall side cullfacing disabled to prevent - texture leaks when connecting to concrete walls. - [F] Unused treated wood pole texture regions filled (optifine). - [F] Using mipped cutout format for window multi-layer model - (issue #19, thanks rixmswey for reporting and details). - [M] Recipe tuning, added standalone recipe for all mod blocks. - [M] In-game CTRL-SHIFT tooltip documentation updated. - [M] Panzer glass block: Ambient occlusion and light opacity tuned. - [M] Stairs: Light opacity tuned. - [A] Tooltip documentation added for mod stairs. - [E] Horizontal steel double-T support beam (config:experimental). + - v1.0.4-b8 [F] Fixed stairs rendering without smooth light (thanks rastot9). + [E] Added passive fluid accumulator (experimental feature, see config). - - v1.0.4-b3 [A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles. - [A] Added support head/foot components for thin and thick steel poles. + - v1.0.4-b7 [F] Fixed recipe loading issue if IE is not installed. + [M] Valves support IE pressurized fluid transfer. - - v1.0.4-b2 [A] Added position dependent texture variation to clinker wall, - slag brick wall and rebar concrete wall. + - v1.0.4-b6 [A] Added redstone controlled fluid valve. + [A] Added redstone controlled analog fluid valve. + [M] Check valve recipe adapted (thanks majijn). - - v1.0.4-b1 [A] Crafting table: JEI integration for recipe placement added. - [A] Crafting table: History re-fab added, allowing to quickly select - and re-craft recent recipes. Selection with arrow buttons, - ingredient placement by clicking the result slot. Automatic - item distribution on shift-click. Quick-move buttons. - [F] Crafting table textures modified to prevent optifine glitches - on the edges of the legs. + - v1.0.4-b5 [A] Horizontal steel double-T support beam with pole connections. + [A] Added fluid pipe check valve (straight, conducts only one way). + [M] Internal registration block/te handling changed. - ------------------------------------------------------------------- - - v1.0.3 [R] Release based on v1.0.3-b5. Release-to-release changes: - * Small laboratory furnace added. - * Extensive config options for mod packing and tuning added. - * Rendering issues fixes (window bleeding, optifine). - * Steel framed window added. - * Treated wood pole "end pieces" added (two support variants). - * Sitting on treated wood stool added including mobs (but not - villagers, as these are obviously very upright people). - * Lang ru_ru added (github contribution from Yaroslavik). - * Creative tab logo changed to mod logo. - * Table/crafting table bounding boxes refined. - * Standalone "escape" recipes added if IE is not installed. - ------------------------------------------------------------------- + - v1.0.4-b4 [F] Clinker/slag brick wall side cullfacing disabled to prevent + texture leaks when connecting to concrete walls. + [F] Unused treated wood pole texture regions filled (optifine). + [F] Using mipped cutout format for window multi-layer model + (issue #19, thanks rixmswey for reporting and details). + [M] Recipe tuning, added standalone recipe for all mod blocks. + [M] In-game CTRL-SHIFT tooltip documentation updated. + [M] Panzer glass block: Ambient occlusion and light opacity tuned. + [M] Stairs: Light opacity tuned. + [A] Tooltip documentation added for mod stairs. + [E] Horizontal steel double-T support beam (config:experimental). - - v1.0.3-b5 [F] Fixed typo in en-en lang file. - [F] Fixed IE concrete texture missing bailout in log if IE is not installed. - [F] Using forge multi-layer models for windows to circumvent glitches. - [M] Changed creative tab logo to the mod logo. - [A] Added alternative recipes for crafting table and furnace if main - IE ingredients are missing (for "stand-alone" mod usage). + - v1.0.4-b3 [A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles. + [A] Added support head/foot components for thin and thick steel poles. - - v1.0.3-b4 [A] Lab furnace supports electrical speedup when a IE external - is placed in one of the two auxiliary slots. - [F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE). - [M] Updated ru_ru lang file (Yaroslavik). + - v1.0.4-b2 [A] Added position dependent texture variation to clinker wall, + slag brick wall and rebar concrete wall. - - v1.0.3-b3 [A] Added sitting on treated wood stool, Zombies included. - [A] Added steel framed window. - [A] Added treated wood pole support head/foot and heavy duty support. - [A] Added language Russian language support, thanks to yaroslav4167. - [A] Added config for furnace smelting speed (percent of vanilla furnace). - [A] Added config for furnace fuel efficiency (in percent, ref is vanilla). - [F] Treated pole model changed to circumvent potential texture bleeding. - [M] Treated wood table bounding box aligned with the legs. - [M] Treated wood crafting table bounding box aligned with the legs. - [M] Treated wood window can be vertically placed for rooflights. + - v1.0.4-b1 [A] Crafting table: JEI integration for recipe placement added. + [A] Crafting table: History re-fab added, allowing to quickly select + and re-craft recent recipes. Selection with arrow buttons, + ingredient placement by clicking the result slot. Automatic + item distribution on shift-click. Quick-move buttons. + [F] Crafting table textures modified to prevent optifine glitches + on the edges of the legs. - - v1.0.3-b2 [A] Added config options for selective feature opt-outs (soft opt-out). - [A] Added config skip registration of opt-out features (hard opt-out). - [A] Added config to disable all internal recipes (for packs). - [A] Added JEI API adapter for soft opt-outs. - [A] Added lab furnace recipe override config to smelt ores to nuggets + ------------------------------------------------------------------- + - v1.0.3 [R] Release based on v1.0.3-b5. Release-to-release changes: + * Small laboratory furnace added. + * Extensive config options for mod packing and tuning added. + * Rendering issues fixes (window bleeding, optifine). + * Steel framed window added. + * Treated wood pole "end pieces" added (two support variants). + * Sitting on treated wood stool added including mobs (but not + villagers, as these are obviously very upright people). + * Lang ru_ru added (github contribution from Yaroslavik). + * Creative tab logo changed to mod logo. + * Table/crafting table bounding boxes refined. + * Standalone "escape" recipes added if IE is not installed. + ------------------------------------------------------------------- + + - v1.0.3-b5 [F] Fixed typo in en-en lang file. + [F] Fixed IE concrete texture missing bailout in log if IE is not installed. + [F] Using forge multi-layer models for windows to circumvent glitches. + [M] Changed creative tab logo to the mod logo. + [A] Added alternative recipes for crafting table and furnace if main + IE ingredients are missing (for "stand-alone" mod usage). + + - v1.0.3-b4 [A] Lab furnace supports electrical speedup when a IE external + is placed in one of the two auxiliary slots. + [F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE). + [M] Updated ru_ru lang file (Yaroslavik). + + - v1.0.3-b3 [A] Added sitting on treated wood stool, Zombies included. + [A] Added steel framed window. + [A] Added treated wood pole support head/foot and heavy duty support. + [A] Added language Russian language support, thanks to yaroslav4167. + [A] Added config for furnace smelting speed (percent of vanilla furnace). + [A] Added config for furnace fuel efficiency (in percent, ref is vanilla). + [F] Treated pole model changed to circumvent potential texture bleeding. + [M] Treated wood table bounding box aligned with the legs. + [M] Treated wood crafting table bounding box aligned with the legs. + [M] Treated wood window can be vertically placed for rooflights. + + - v1.0.3-b2 [A] Added config options for selective feature opt-outs (soft opt-out). + [A] Added config skip registration of opt-out features (hard opt-out). + [A] Added config to disable all internal recipes (for packs). + [A] Added JEI API adapter for soft opt-outs. + [A] Added lab furnace recipe override config to smelt ores to nuggets that would normally be smelted into ingots. Can be changed on-the-fly. - - v1.0.3-b1 [A] Added small laboratory furnace. - [M] Panzer glass opacity/light level set explicitly 0. + - v1.0.3-b1 [A] Added small laboratory furnace. + [M] Panzer glass opacity/light level set explicitly 0. - ------------------------------------------------------------------- - - v1.0.2 [R] Release based on v1.0.2-b3 - * Fixes: Spawning. - * Crafting table: Shift-click. - * Ladders: Faster climbing/descending. - * Concrete: Rebar tiles, tile stairs. - * Treated wood: window, windowsill. - * Slag brick: wall. - * Panzer glass: added. - * Recipes: Adaptions, added decompositions. - ------------------------------------------------------------------- + ------------------------------------------------------------------- + - v1.0.2 [R] Release based on v1.0.2-b3 + * Fixes: Spawning. + * Crafting table: Shift-click. + * Ladders: Faster climbing/descending. + * Concrete: Rebar tiles, tile stairs. + * Treated wood: window, windowsill. + * Slag brick: wall. + * Panzer glass: added. + * Recipes: Adaptions, added decompositions. + ------------------------------------------------------------------- - - v1.0.2-b3 [A] Added slag brick wall. - [A] Added wall decomposition recipes. - [A] Added treated wood window. - [M] Climbing/descending mod ladders is faster when - looking up or down and not sneaking. - [M] Panzer glass material definition changed. - [M] Explicitly preventing spawning in and on "non-full" - blocks of the mod. + - v1.0.2-b3 [A] Added slag brick wall. + [A] Added wall decomposition recipes. + [A] Added treated wood window. + [M] Climbing/descending mod ladders is faster when + looking up or down and not sneaking. + [M] Panzer glass material definition changed. + [M] Explicitly preventing spawning in and on "non-full" + blocks of the mod. - - v1.0.2-b2 [A] Added rebar concrete tile stairs. - [A] Added treated wood window sill. - [A] Added decomposition recipes for stairs and tiles. - [M] Changed stair recipe yield quantity from 9 to 6. + - v1.0.2-b2 [A] Added rebar concrete tile stairs. + [A] Added treated wood window sill. + [A] Added decomposition recipes for stairs and tiles. + [M] Changed stair recipe yield quantity from 9 to 6. - - v1.0.2-b1 [A] Added rebar concrete tile. - [A] Added panzer glass (explosion-resistant reinforced glass). - [M] Treated wood crafting table supports shift-click to transfer - stacks between player inventory and crafting table storage - (thanks majijn for the hint). + - v1.0.2-b1 [A] Added rebar concrete tile. + [A] Added panzer glass (explosion-resistant reinforced glass). + [M] Treated wood crafting table supports shift-click to transfer + stacks between player inventory and crafting table storage + (thanks majijn for the hint). - ------------------------------------------------------------------- - - v1.0.1 [R] Release based on v1.0.1-b4 - * Treated wood crafting table - * Clinker brick wall - * Treated wood stool - * Inset spot light - * Recipe fixes - * Logo updated - ------------------------------------------------------------------- + ------------------------------------------------------------------- + - v1.0.1 [R] Release based on v1.0.1-b4 + * Treated wood crafting table + * Clinker brick wall + * Treated wood stool + * Inset spot light + * Recipe fixes + * Logo updated + ------------------------------------------------------------------- - - v1.0.1-b4 [M] Crafting table keeps inventory and has eight storage slots. - [M] Adapted inset light strength and harvest tool. - [M] Crafting table recipe adapted. + - v1.0.1-b4 [M] Crafting table keeps inventory and has eight storage slots. + [M] Adapted inset light strength and harvest tool. + [M] Crafting table recipe adapted. - - v1.0.1-b3 [A] Added inset light (glowstone-metal, light level like torch, - can be used as floor/ceiling/wall light). - [M] Crafting table model updated (issue #7, thanks majijn). - [M] Logo image updated. + - v1.0.1-b3 [A] Added inset light (glowstone-metal, light level like torch, + can be used as floor/ceiling/wall light). + [M] Crafting table model updated (issue #7, thanks majijn). + [M] Logo image updated. - - v1.0.1-b2 [A] Added treated wood crafting table. - [A] Added treated wood stool. - [F] Fixed ladder bounding boxes to allow climbing connected trap doors - (issue #6, thanks to Forgilageord). - [M] Improved wall-block connections (wall elements only connect to other - walls or gates, as well as to solid blocks if these blocks are in - a straight line with at least two wall elements). - [M] Decor walls are defined "solid" on top, so that e.g. torches and - redstone tracks can be placed on them. + - v1.0.1-b2 [A] Added treated wood crafting table. + [A] Added treated wood stool. + [F] Fixed ladder bounding boxes to allow climbing connected trap doors + (issue #6, thanks to Forgilageord). + [M] Improved wall-block connections (wall elements only connect to other + walls or gates, as well as to solid blocks if these blocks are in + a straight line with at least two wall elements). + [M] Decor walls are defined "solid" on top, so that e.g. torches and + redstone tracks can be placed on them. - - v1.0.1-b1 [F] Fixed missing condition for ie:stone_deco in recipe constants. - [A] Added clinker brick wall. + - v1.0.1-b1 [F] Fixed missing condition for ie:stone_deco in recipe constants. + [A] Added clinker brick wall. - ------------------------------------------------------------------- - - v1.0.0 [R] Release based on v1.0.0-b4 - ------------------------------------------------------------------- + ------------------------------------------------------------------- + - v1.0.0 [R] Release based on v1.0.0-b4 + ------------------------------------------------------------------- - - v1.0.0-b4 [F] Fixed vanished recipe for the rebar concrete wall. - [A] Concrete wall, material: IE concrete. + - v1.0.0-b4 [F] Fixed vanished recipe for the rebar concrete wall. + [A] Concrete wall, material: IE concrete. - - v1.0.0-b3 [A] Textures of rebar concrete and treated wood table improved. - [A] Added rebar concrete wall. + - v1.0.0-b3 [A] Textures of rebar concrete and treated wood table improved. + [A] Added rebar concrete wall. - - v1.0.0-b2 [A] Added rebar concrete (steel reinforced, expensive, creeper-proof). + - v1.0.0-b2 [A] Added rebar concrete (steel reinforced, expensive, creeper-proof). - - v1.0.0-b1 [A] Initial structure. - [A] Added clinker bricks and clinker brick stairs. - [A] Added slag bricks and slag brick stairs. - [A] Added metal rung ladder. - [A] Added staggered metal steps ladder. - [A] Added treated wood ladder. - [A] Added treated wood pole. - [A] Added treated wood table. + - v1.0.0-b1 [A] Initial structure. + [A] Added clinker bricks and clinker brick stairs. + [A] Added slag bricks and slag brick stairs. + [A] Added metal rung ladder. + [A] Added staggered metal steps ladder. + [A] Added treated wood ladder. + [A] Added treated wood pole. + [A] Added treated wood table. ---- diff --git a/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java b/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java index 87a9e35..72f9f6e 100644 --- a/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java +++ b/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java @@ -8,7 +8,6 @@ */ package wile.engineersdecor; -import net.minecraft.item.crafting.IRecipe; import wile.engineersdecor.detail.*; import wile.engineersdecor.blocks.*; import wile.engineersdecor.items.*; @@ -21,6 +20,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.item.Item; +import net.minecraft.item.crafting.IRecipe; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.network.IGuiHandler; @@ -78,6 +78,7 @@ public class ModEngineersDecor default void init(final FMLInitializationEvent e) {} default void postInit(final FMLPostInitializationEvent e) {} default World getWorlClientSide() { return null; } + default EntityPlayer getPlayerClientSide() { return null; } } //-------------------------------------------------------------------------------------------------------------------- diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java index 0c0abba..ad0877d 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java @@ -1,5 +1,5 @@ /* - * @file BlockDecorFull.java + * @file BlockDecor.java * @author Stefan Wilhelm (wile) * @copyright (C) 2019 Stefan Wilhelm * @license MIT (see https://opensource.org/licenses/MIT) @@ -30,6 +30,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.*; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.entity.Entity; +import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; @@ -58,9 +60,15 @@ public class BlockDecor extends Block public static final long CFG_ANALOG = 0x0000000000040000L; // Denotes if a component has analog behaviour public static final long CFG_HARD_IE_DEPENDENT = 0x8000000000000000L; // Defines that this block abolutely needs IE to be installed. - protected final AxisAlignedBB aabb; + protected final AxisAlignedBB[] aabb; + + public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound) + { this(registryName, config, material, hardness, resistance, sound, (new AxisAlignedBB[]{FULL_BLOCK_AABB})); } public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nullable AxisAlignedBB boundingbox) + { this(registryName, config, material, hardness, resistance, sound, (boundingbox==null) ? (new AxisAlignedBB[]{FULL_BLOCK_AABB}) : (new AxisAlignedBB[]{boundingbox})); } + + public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB[] boundingboxes) { super((material!=null) ? (material) : (Material.IRON)); setCreativeTab(ModEngineersDecor.CREATIVE_TAB_ENGINEERSDECOR); @@ -74,12 +82,9 @@ public class BlockDecor extends Block // @todo double check that instance variable // not sure here ... if((config & CFG_TRANSLUCENT) != 0) this.translucent = true; this.config = config; - this.aabb = (boundingbox==null) ? (FULL_BLOCK_AABB) : (boundingbox); + this.aabb = boundingboxes; } - public BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound) - { this(registryName, config, material, hardness, resistance, sound, null); } - @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) @@ -166,12 +171,19 @@ public class BlockDecor extends Block @Override @SuppressWarnings("deprecation") public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) - { return aabb; } + { return aabb[0]; } @SideOnly(Side.CLIENT) @SuppressWarnings("deprecation") - public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos) - { return state.getBoundingBox(worldIn, pos).offset(pos); } + public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos) + { return state.getBoundingBox(world, pos).offset(pos); } + + @SuppressWarnings("deprecation") + public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, @Nullable Entity entityIn, boolean isActualState) + { + addCollisionBoxToList(pos, entityBox, collidingBoxes, getBoundingBox(state, world, pos)); + for(int i=1; i stacks_; public static void on_config(int speed_percent, int fuel_efficiency_percent, int boost_energy_per_tick) @@ -482,10 +483,11 @@ public class BlockDecorFurnace extends BlockDecorDirected protected void reset() { stacks_ = NonNullList.withSize(NUM_OF_SLOTS, ItemStack.EMPTY); + current_smelting_input_stack_ = ItemStack.EMPTY; proc_time_elapsed_ = 0; proc_time_needed_ = 0; burntime_left_ = 0; - fuel_burntime_ = 0; + fuel_burntime_ = -1; fifo_timer_ = 0; tick_timer_ = 0; } @@ -496,16 +498,17 @@ public class BlockDecorFurnace extends BlockDecorDirected ItemStackHelper.loadAllItems(compound, this.stacks_); while(this.stacks_.size() < NUM_OF_SLOTS) this.stacks_.add(ItemStack.EMPTY); burntime_left_ = compound.getInteger("BurnTime"); - proc_time_elapsed_ = compound.getInteger("CookTime"); - proc_time_needed_ = compound.getInteger("CookTimeTotal"); - fuel_burntime_ = getItemBurnTime(stacks_.get(SMELTING_FUEL_SLOT_NO)); + proc_time_needed_ = MathHelper.clamp(compound.getInteger("CookTimeTotal"), 10, 65535); + proc_time_elapsed_ = MathHelper.clamp(compound.getInteger("CookTime"), 0, proc_time_needed_); + fuel_burntime_ = compound.getInteger("FuelBurnTime"); } protected void writenbt(NBTTagCompound compound) { compound.setInteger("BurnTime", MathHelper.clamp(burntime_left_,0 , MAX_BURNTIME)); compound.setInteger("CookTime", MathHelper.clamp(proc_time_elapsed_, 0, MAX_BURNTIME)); - compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 0, MAX_BURNTIME)); + compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 10, MAX_BURNTIME)); + compound.setInteger("FuelBurnTime", MathHelper.clamp(fuel_burntime_, 0, MAX_BURNTIME)); ItemStackHelper.saveAllItems(compound, stacks_); } @@ -688,8 +691,9 @@ public class BlockDecorFurnace extends BlockDecorDirected protected boolean canSmelt() { - if(stacks_.get(SMELTING_INPUT_SLOT_NO).isEmpty()) return false; - final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO)); + final ItemStack in_stack = stacks_.get(SMELTING_INPUT_SLOT_NO); + if(in_stack.isEmpty()) return false; + final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(in_stack); if(recipe_result_items.isEmpty()) return false; final ItemStack result_stack = stacks_.get(SMELTING_OUTPUT_SLOT_NO); if(result_stack.isEmpty()) return true; @@ -807,6 +811,7 @@ public class BlockDecorFurnace extends BlockDecorDirected tick_timer_ = TICK_INTERVAL; final boolean was_burning = isBurning(); if(was_burning) burntime_left_ -= TICK_INTERVAL; + if(fuel_burntime_ < 0) fuel_burntime_ = getItemBurnTime(stacks_.get(SMELTING_FUEL_SLOT_NO)); if(burntime_left_ < 0) burntime_left_ = 0; if(world.isRemote) return; boolean dirty = false; @@ -823,9 +828,16 @@ public class BlockDecorFurnace extends BlockDecorDirected || (stacks_.get(AUX_0_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER) || (stacks_.get(AUX_1_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER); } - ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO); - if(isBurning() || (!fuel.isEmpty()) && (!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) { - if(!isBurning() && canSmelt()) { + final ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO); + final ItemStack last_inp_stack = current_smelting_input_stack_; + current_smelting_input_stack_ = stacks_.get(SMELTING_INPUT_SLOT_NO); + if(isBurning() || (!fuel.isEmpty()) && (!current_smelting_input_stack_.isEmpty())) { + if(!current_smelting_input_stack_.isItemEqual(last_inp_stack)) { + proc_time_elapsed_ = 0; + proc_time_needed_ = getCookTime(current_smelting_input_stack_); + } + final boolean can_smelt = canSmelt(); + if(can_smelt && (burntime_left_ <= 0)) { // Refuel burntime_left_ = (int)MathHelper.clamp((proc_fuel_efficiency_ * getItemBurnTime(fuel)), 0, MAX_BURNTIME); fuel_burntime_ = (burntime_left_ * proc_speed_interval_) / VANILLA_FURNACE_SPEED_INTERVAL; if(isBurning()) { @@ -837,17 +849,17 @@ public class BlockDecorFurnace extends BlockDecorDirected } } } - if(isBurning() && canSmelt()) { + if((burntime_left_ > 0) && can_smelt) { // Smelting process proc_time_elapsed_ += TICK_INTERVAL; if(heater_inserted_ && (boost_energy_ >= boost_energy_consumption)) { boost_energy_ = 0; proc_time_elapsed_ += TICK_INTERVAL; } if(proc_time_elapsed_ >= proc_time_needed_) { proc_time_elapsed_ = 0; - proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO)); + proc_time_needed_ = getCookTime(current_smelting_input_stack_); smeltItem(); dirty = true; } } else { - proc_time_elapsed_ = 0; + proc_time_elapsed_ = MathHelper.clamp(proc_time_elapsed_-2, 0, proc_time_needed_); } } else if(!isBurning() && (proc_time_elapsed_ > 0)) { proc_time_elapsed_ = MathHelper.clamp(proc_time_elapsed_-2, 0, proc_time_needed_); diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java index e73ff59..a10f9a3 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java @@ -682,9 +682,15 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace if(transferItems(FIFO_INPUT_0_SLOT_NO, SMELTING_INPUT_SLOT_NO, 64)) dirty = true; if(transferItems(FIFO_INPUT_1_SLOT_NO, FIFO_INPUT_0_SLOT_NO, 64)) { dirty = true; } else { shift_in = true; } } - if((!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty()) && (energy_stored_ >= energy_consumption_)) { + final ItemStack last_inp_stack = current_smelting_input_stack_; + current_smelting_input_stack_ = stacks_.get(SMELTING_INPUT_SLOT_NO); + if((!current_smelting_input_stack_.isEmpty()) && (energy_stored_ >= energy_consumption_)) { + if(!current_smelting_input_stack_.isItemEqual(current_smelting_input_stack_)) { + proc_time_elapsed_ = 0; + proc_time_needed_ = getCookTime(current_smelting_input_stack_); + } final boolean can_smelt = canSmelt(); - if((!can_smelt) && (BRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) { + if((!can_smelt) && (BRecipes.instance().getSmeltingResult(current_smelting_input_stack_).isEmpty())) { // bypass if(transferItems(SMELTING_INPUT_SLOT_NO, SMELTING_OUTPUT_SLOT_NO, 1)) dirty = true; } else { @@ -697,7 +703,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace proc_time_elapsed_ += (TICK_INTERVAL * proc_speed_percent_/100); if(proc_time_elapsed_ >= proc_time_needed_) { proc_time_elapsed_ = 0; - proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO)); + proc_time_needed_ = getCookTime(current_smelting_input_stack_); smeltItem(); dirty = true; shift_out = true; diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHalfSlab.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHalfSlab.java index 879012e..0715551 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHalfSlab.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHalfSlab.java @@ -4,10 +4,13 @@ * @copyright (C) 2019 Stefan Wilhelm * @license MIT (see https://opensource.org/licenses/MIT) * - * Half slab characteristics class. + * Half slab ("slab slices") characteristics class. Actually + * it's now a quater slab, but who cares. */ package wile.engineersdecor.blocks; +import wile.engineersdecor.detail.ModAuxiliaries; +import wile.engineersdecor.detail.ModConfig; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -26,15 +29,17 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.IBlockAccess; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraft.client.util.ITooltipFlag; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.util.List; public class BlockDecorHalfSlab extends BlockDecor @@ -61,6 +66,16 @@ public class BlockDecorHalfSlab extends BlockDecor protected boolean is_cube(IBlockState state) { return state.getValue(PARTS) == 0x07; } + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) + { + if(!ModAuxiliaries.Tooltip.addInformation(stack, world, tooltip, flag, true)) return; + if(!ModConfig.optout.without_direct_slab_pickup) { + ModAuxiliaries.Tooltip.addInformation("engineersdecor.tooltip.slabpickup", "engineersdecor.tooltip.slabpickup", tooltip, flag, true); + } + } + @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getRenderLayer() @@ -167,7 +182,7 @@ public class BlockDecorHalfSlab extends BlockDecor @Override public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) { - if(world.isRemote) return; + if((world.isRemote) || (ModConfig.optout.without_direct_slab_pickup)) return; final ItemStack stack = player.getHeldItemMainhand(); if(stack.isEmpty() || (Block.getBlockFromItem(stack.getItem()) != this)) return; if(stack.getCount() >= stack.getMaxStackSize()) return; diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java new file mode 100644 index 0000000..6a733be --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java @@ -0,0 +1,716 @@ +/* + * @file BlockDecorMineralSmelter.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Small highly insulated stone liquification furnace + * (magmatic phase). + */ +package wile.engineersdecor.blocks; + +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.world.IBlockAccess; +import wile.engineersdecor.ModEngineersDecor; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.world.World; +import net.minecraft.world.Explosion; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.init.SoundEvents; +import net.minecraft.item.*; +import net.minecraft.inventory.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.*; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; + +public class BlockDecorMineralSmelter extends BlockDecorDirectedHorizontal +{ + public static final int PHASE_MAX = 3; + public static final PropertyInteger PHASE = PropertyInteger.create("phase", 0, PHASE_MAX); + + public BlockDecorMineralSmelter(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) + { + super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); + setLightOpacity(0); + } + + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, FACING, PHASE); } + + @Override + public IBlockState getStateFromMeta(int meta) + { return super.getStateFromMeta(meta).withProperty(PHASE, (meta>>2) & 0x3); } + + @Override + public int getMetaFromState(IBlockState state) + { return super.getMetaFromState(state) | (state.getValue(PHASE)<<2); } + + @Override + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) + { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(PHASE, 0); } + + @Override + public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) + { return BlockFaceShape.SOLID; } + + @Override + @SuppressWarnings("deprecation") + public boolean hasComparatorInputOverride(IBlockState state) + { return true; } + + @Override + @SuppressWarnings("deprecation") + public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) + { return MathHelper.clamp((state.getValue(PHASE)*5), 0, 15); } + + @Override + public boolean hasTileEntity(IBlockState state) + { return true; } + + @Nullable + public TileEntity createTileEntity(World world, IBlockState state) + { return new BlockDecorMineralSmelter.BTileEntity(); } + + @Override + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) + {} + + @Override + public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) + { + if(world.isRemote) return true; + BTileEntity te = getTe(world, pos); + if(te==null) return super.removedByPlayer(state, world, pos, player, willHarvest); + ItemStack st = ItemStack.EMPTY; + if(!te.getStackInSlot(1).isEmpty()) { + st = te.getStackInSlot(1).copy(); + } else if(!te.getStackInSlot(0).isEmpty()) { + st = te.getStackInSlot(0).copy(); + } + te.reset_process(); + ItemStack stack = new ItemStack(this, 1); + world.spawnEntity(new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack)); + world.setBlockToAir(pos); + world.removeTileEntity(pos); + if(!st.isEmpty()) { + st.setCount(1); + world.spawnEntity(new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, st)); + } + return false; + } + + @Override + public void onBlockExploded(World world, BlockPos pos, Explosion explosion) + { + if(world.isRemote) return; + BTileEntity te = getTe(world, pos); + if(te==null) return; + te.reset_process(); + super.onBlockExploded(world, pos, explosion); + } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if(world.isRemote) return true; + if(player.isSneaking()) return false; + BTileEntity te = getTe(world, pos); + if(te==null) return true; + final ItemStack stack = player.getHeldItem(hand); + boolean dirty = false; + if(te.accepts_lava_container(stack)) { + if(stack.isItemEqualIgnoreDurability(BTileEntity.BUCKET_STACK)) { // check how this works with item capabilities or so + if(te.fluid_level() >= BTileEntity.MAX_BUCKET_EXTRACT_FLUID_LEVEL) { + if(stack.getCount() > 1) { + int target_stack_index = -1; + for(int i=0; i= 0) { + te.reset_process(); + stack.shrink(1); + player.setHeldItem(hand, stack); + player.inventory.setInventorySlotContents(target_stack_index, BTileEntity.LAVA_BUCKET_STACK.copy()); + world.playSound(null, pos, SoundEvents.ITEM_BUCKET_FILL_LAVA, SoundCategory.BLOCKS, 1f, 1f); + dirty = true; + } + } else { + te.reset_process(); + player.setHeldItem(hand, BTileEntity.LAVA_BUCKET_STACK.copy()); + world.playSound(null, pos, SoundEvents.ITEM_BUCKET_FILL_LAVA, SoundCategory.BLOCKS, 1f, 1f); + dirty = true; + } + } + } + } else if(stack.getItem() == Items.AIR) { + final ItemStack istack = te.getStackInSlot(1).copy(); + if(te.phase() > BTileEntity.PHASE_WARMUP) player.setFire(1); + if(!istack.isEmpty()) { + istack.setCount(1); + player.setHeldItem(hand, istack); + te.reset_process(); + dirty = true; + } + } else if(te.insert(stack.copy(),false)) { + stack.shrink(1); + dirty = true; + } + if(dirty) player.inventory.markDirty(); + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rnd) + { + if(state.getBlock()!=this) return; + EnumParticleTypes particle = EnumParticleTypes.SMOKE_NORMAL; + switch(state.getValue(PHASE)) { + case BTileEntity.PHASE_WARMUP: + return; + case BTileEntity.PHASE_HOT: + if(rnd.nextInt(10) > 4) return; + break; + case BTileEntity.PHASE_MAGMABLOCK: + if(rnd.nextInt(10) > 7) return; + particle = EnumParticleTypes.SMOKE_LARGE; + break; + case BTileEntity.PHASE_LAVA: + if(rnd.nextInt(10) > 2) return; + particle = EnumParticleTypes.LAVA; + break; + default: + return; + } + final double x=0.5+pos.getX(), y=0.5+pos.getY(), z=0.5+pos.getZ(); + final double xr=rnd.nextDouble()*0.4-0.2, yr=rnd.nextDouble()*0.5, zr=rnd.nextDouble()*0.4-0.2; + world.spawnParticle(particle, x+xr, y+yr, z+zr, 0.0, 0.0, 0.0); + } + + @Nullable + private BTileEntity getTe(World world, BlockPos pos) + { final TileEntity te=world.getTileEntity(pos); return (!(te instanceof BTileEntity)) ? (null) : ((BTileEntity)te); } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends TileEntity implements ITickable, ISidedInventory, IEnergyStorage + { + public static final int TICK_INTERVAL = 20; + public static final int MAX_FLUID_LEVEL = 1000; + public static final int MAX_BUCKET_EXTRACT_FLUID_LEVEL = 900; + public static final int MAX_ENERGY_BUFFER = 32000; + public static final int MAX_ENERGY_TRANSFER = 8192; + public static final int DEFAULT_ENERGY_CONSUMPTION = 92; + public static final int DEFAULT_HEATUP_RATE = 2; // -> 50s for one smelting process + public static final int PHASE_WARMUP = 0; + public static final int PHASE_HOT = 1; + public static final int PHASE_MAGMABLOCK = 2; + public static final int PHASE_LAVA = 3; + private static final ItemStack MAGMA_STACK = new ItemStack(Blocks.MAGMA); + private static final ItemStack BUCKET_STACK = new ItemStack(Items.BUCKET); + private static final ItemStack LAVA_BUCKET_STACK = new ItemStack(Items.LAVA_BUCKET); + private static int energy_consumption = DEFAULT_ENERGY_CONSUMPTION; + private static int heatup_rate = DEFAULT_HEATUP_RATE; + private static int cooldown_rate = 1; + private static Set accepted_minerals = new HashSet(); + private static Set accepted_lava_contrainers = new HashSet(); + + private int tick_timer_; + private int energy_stored_; + private int progress_; + private int fluid_level_; + private boolean force_block_update_; + private NonNullList stacks_ = NonNullList.withSize(2, ItemStack.EMPTY); + + static { + // Mineals: No Nether brick (made of Netherrack), + // no glazed terracotta, no obsidian, no stairs, slabs etc. + accepted_minerals.add(Item.getItemFromBlock(Blocks.COBBLESTONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.STONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.SANDSTONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.PRISMARINE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.END_STONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.MOSSY_COBBLESTONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.RED_SANDSTONE)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.QUARTZ_BLOCK)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.BRICK_BLOCK)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.END_BRICKS)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.HARDENED_CLAY)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.STAINED_HARDENED_CLAY)); + accepted_minerals.add(Item.getItemFromBlock(Blocks.STONEBRICK)); + // Lava containers + accepted_lava_contrainers.add(Items.BUCKET); + } + + public static void on_config(int energy_consumption, int heatup_per_second) + { + energy_consumption = MathHelper.clamp(energy_consumption, 32, 4096); + heatup_rate = MathHelper.clamp(heatup_per_second, 1, 5); + cooldown_rate = MathHelper.clamp(heatup_per_second/2, 1, 5); + ModEngineersDecor.logger.info("Config mineal smelter energy consumption:" + energy_consumption + "rf/t, heat-up rate: " + heatup_rate + "%/s."); + } + + public BTileEntity() + { reset_process(); } + + public int progress() + { return progress_; } + + public int phase() + { + if(progress_ >= 100) return PHASE_LAVA; + if(progress_ >= 90) return PHASE_MAGMABLOCK; + if(progress_ >= 5) return PHASE_HOT; + return PHASE_WARMUP; + } + + public int fluid_level() + { return fluid_level_; } + + public int fluid_level_drain(int amount) + { amount = MathHelper.clamp(amount, 0, fluid_level_); fluid_level_ -= amount; return amount; } + + public int comparator_signal() + { return phase() * 5; } // -> 0..15 + + private boolean accepts_lava_container(ItemStack stack) + { return accepted_lava_contrainers.contains(stack.getItem()); } + + private boolean accepts_input(ItemStack stack) + { + if(!stacks_.get(0).isEmpty()) return false; + if(fluid_level() > MAX_BUCKET_EXTRACT_FLUID_LEVEL) { + return accepts_lava_container(stack); + } else { + return accepted_minerals.contains(stack.getItem()); + } + } + + public boolean insert(final ItemStack stack, boolean simulate) + { + if(stack.isEmpty() || (!accepts_input(stack))) return false; + if(!simulate) { + ItemStack st = stack.copy(); + st.setCount(st.getMaxStackSize()); + stacks_.set(0, st); + if(!accepts_lava_container(stack)) progress_ = 0; + force_block_update_ = true; + } + return true; + } + + public ItemStack extract(boolean simulate) + { + ItemStack stack = stacks_.get(1).copy(); + if(stack.isEmpty()) return ItemStack.EMPTY; + if(!simulate) reset_process(); + return stack; + } + + protected void reset_process() + { + stacks_ = NonNullList.withSize(2, ItemStack.EMPTY); + force_block_update_ = true; + fluid_level_ = 0; + tick_timer_ = 0; + progress_ = 0; + } + + public void readnbt(NBTTagCompound nbt) + { + energy_stored_ = nbt.getInteger("energy"); + progress_ = nbt.getInteger("progress"); + fluid_level_ = nbt.getInteger("fluidlevel"); + ItemStackHelper.loadAllItems(nbt, stacks_); + if(stacks_.size() != 1) reset_process(); + } + + protected void writenbt(NBTTagCompound nbt) + { + nbt.setInteger("energy", MathHelper.clamp(energy_stored_,0 , MAX_ENERGY_BUFFER)); + nbt.setInteger("progress", MathHelper.clamp(progress_,0 , 100)); + nbt.setInteger("fluidlevel", MathHelper.clamp(fluid_level_,0 , MAX_FLUID_LEVEL)); + ItemStackHelper.saveAllItems(nbt, stacks_); + } + + // TileEntity ------------------------------------------------------------------------------ + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns) + { return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorMineralSmelter)); } + + @Override + public void readFromNBT(NBTTagCompound compound) + { super.readFromNBT(compound); readnbt(compound); } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound compound) + { super.writeToNBT(compound); writenbt(compound); return compound; } + + // IWorldNamable --------------------------------------------------------------------------- + + @Override + public String getName() + { final Block block=getBlockType(); return (block!=null) ? (block.getTranslationKey() + ".name") : (""); } + + @Override + public boolean hasCustomName() + { return false; } + + @Override + public ITextComponent getDisplayName() + { return new TextComponentTranslation(getName(), new Object[0]); } + + // IInventory ------------------------------------------------------------------------------ + + @Override + public int getSizeInventory() + { return stacks_.size(); } + + @Override + public boolean isEmpty() + { for(ItemStack stack: stacks_) { if(!stack.isEmpty()) return false; } return true; } + + @Override + public ItemStack getStackInSlot(int index) + { return ((index >= 0) && (index < getSizeInventory())) ? stacks_.get(index) : ItemStack.EMPTY; } + + @Override + public ItemStack decrStackSize(int index, int count) + { return ItemStackHelper.getAndSplit(stacks_, index, count); } + + @Override + public ItemStack removeStackFromSlot(int index) + { return ItemStackHelper.getAndRemove(stacks_, index); } + + @Override + public void setInventorySlotContents(int index, ItemStack stack) + { if(stack.getCount()>getInventoryStackLimit()){stack.setCount(getInventoryStackLimit());} stacks_.set(index, stack); markDirty(); } + + @Override + public int getInventoryStackLimit() + { return 1; } + + @Override + public void markDirty() + { super.markDirty(); } + + @Override + public boolean isUsableByPlayer(EntityPlayer player) + { return ((world.getTileEntity(pos) == this) && (player.getDistanceSq(pos.getX()+0.5d, pos.getY()+0.5d, pos.getZ()+0.5d) <= 64.0d)); } + + @Override + public void openInventory(EntityPlayer player) + {} + + @Override + public void closeInventory(EntityPlayer player) + { markDirty(); } + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) + { return ((index==0) && accepts_input(stack)) || (index==1); } + + @Override + public int getField(int id) + { return 0; } + + @Override + public void setField(int id, int value) + {} + + @Override + public int getFieldCount() + { return 0; } + + @Override + public void clear() + { reset_process(); } + + // ISidedInventory ---------------------------------------------------------------------------- + + private static final int[] SIDED_INV_SLOTS = new int[] {0,1}; + + @Override + public int[] getSlotsForFace(EnumFacing side) + { return SIDED_INV_SLOTS; } + + @Override + public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) + { return (index==0) && isItemValidForSlot(index, stack); } + + @Override + public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) + { return (index==1) && (!stacks_.get(1).isEmpty()); } + + // IEnergyStorage ---------------------------------------------------------------------------- + + @Override + public boolean canExtract() + { return false; } + + @Override + public boolean canReceive() + { return true; } + + @Override + public int getMaxEnergyStored() + { return MAX_ENERGY_BUFFER; } + + @Override + public int getEnergyStored() + { return energy_stored_; } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) + { return 0; } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate) + { + if(energy_stored_ >= MAX_ENERGY_BUFFER) return 0; + int n = Math.min(maxReceive, (MAX_ENERGY_BUFFER - energy_stored_)); + if(n > MAX_ENERGY_TRANSFER) n = MAX_ENERGY_TRANSFER; + if(!simulate) {energy_stored_ += n; markDirty(); } + return n; + } + + // IItemHandler -------------------------------------------------------------------------------- + + protected static class BItemHandler implements IItemHandler + { + private BTileEntity te; + + BItemHandler(BTileEntity te) + { this.te = te; } + + @Override + public int getSlots() + { return 2; } + + @Override + public int getSlotLimit(int index) + { return te.getInventoryStackLimit(); } + + @Override + public boolean isItemValid(int slot, @Nonnull ItemStack stack) + { return te.isItemValidForSlot(slot, stack); } + + @Override + @Nonnull + public ItemStack insertItem(int index, @Nonnull ItemStack stack, boolean simulate) + { + ItemStack rstack = stack.copy(); + if((index!=0) || (!te.insert(stack.copy(), simulate))) return rstack; + rstack.shrink(1); + return rstack; + } + + @Override + @Nonnull + public ItemStack extractItem(int index, int amount, boolean simulate) + { return (index!=1) ? ItemStack.EMPTY : te.extract(simulate); } + + @Override + @Nonnull + public ItemStack getStackInSlot(int index) + { return te.getStackInSlot(index); } + } + + private BItemHandler item_handler_ = new BItemHandler(this); + + // IFluidHandler -------------------------------------------------------------------------------- + + private static class BFluidHandler implements IFluidHandler, IFluidTankProperties + { + private final FluidStack lava; + private final BTileEntity te; + private final IFluidTankProperties[] props_ = {this}; + BFluidHandler(BTileEntity te) { this.te=te; lava = new FluidStack(FluidRegistry.LAVA, 1); } + @Override @Nullable public FluidStack getContents() { return new FluidStack(lava, te.fluid_level()); } + @Override public IFluidTankProperties[] getTankProperties() { return props_; } + @Override public int fill(FluidStack resource, boolean doFill) { return 0; } + @Override public int getCapacity() { return 1000; } + @Override public boolean canFill() { return false; } + @Override public boolean canDrain() { return true; } + @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } + @Override public boolean canDrainFluidType(FluidStack fluidStack) { return fluidStack.isFluidEqual(lava); } + + @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) + { + if((te.fluid_level() <= 0) || (!resource.isFluidEqual(lava))) return null; + FluidStack fs = getContents(); + if(doDrain) te.fluid_level_drain(fs.amount); + return fs; + } + + @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) + { + if(te.fluid_level() <= 0) return null; + maxDrain = (doDrain) ? (te.fluid_level_drain(maxDrain)) : (Math.min(maxDrain, te.fluid_level())); + return new FluidStack(FluidRegistry.LAVA, maxDrain); + } + } + + private final BFluidHandler fluid_handler_ = new BFluidHandler(this); + + // Capability export ---------------------------------------------------------------------------- + + @Override + public boolean hasCapability(Capability cap, EnumFacing facing) + { return ((cap==CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + || (cap==CapabilityEnergy.ENERGY) + || (cap==CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + || (super.hasCapability(cap, facing)) + ); + } + + @Override + @SuppressWarnings("unchecked") + @Nullable + public T getCapability(Capability capability, @Nullable EnumFacing facing) + { + if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + return (T)item_handler_; + } else if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { + return (T)fluid_handler_; + } else if(capability == CapabilityEnergy.ENERGY) { + return (T)this; + } else { + return super.getCapability(capability, facing); + } + } + + // ITickable ------------------------------------------------------------------------------------ + + @Override + public void update() + { + if(world.isRemote) return; + if(--tick_timer_ > 0) return; + tick_timer_ = TICK_INTERVAL; + boolean dirty = false; + final int last_phase = phase(); + final ItemStack istack = stacks_.get(0); + if(istack.isEmpty() && (fluid_level()==0)) { + progress_ = 0; + } else if((energy_stored_ <= 0) || (world.isBlockPowered(pos))) { + progress_ = MathHelper.clamp(progress_-cooldown_rate, 0,100); + } else if(progress_ >= 100) { + progress_ = 100; + energy_stored_ = MathHelper.clamp(energy_stored_-((energy_consumption*TICK_INTERVAL)/20), 0, MAX_ENERGY_BUFFER); + } else { + energy_stored_ = MathHelper.clamp(energy_stored_-(energy_consumption*TICK_INTERVAL), 0, MAX_ENERGY_BUFFER); + progress_ = MathHelper.clamp(progress_+heatup_rate, 0, 100); + } + int new_phase = phase(); + boolean is_lava_container = accepts_lava_container(istack); + if(is_lava_container || (new_phase != last_phase)) { + if(is_lava_container) { + // That stays in the slot until its extracted or somone takes it out. + if(istack.isItemEqual(BUCKET_STACK)) { + if(!stacks_.get(1).isItemEqual(LAVA_BUCKET_STACK)) { + if(fluid_level() >= MAX_BUCKET_EXTRACT_FLUID_LEVEL) { + stacks_.set(1, LAVA_BUCKET_STACK); + world.playSound(null, pos, SoundEvents.ITEM_BUCKET_FILL_LAVA, SoundCategory.BLOCKS, 0.2f, 1.3f); + } else { + stacks_.set(1, istack.copy()); + } + dirty = true; + } + } else { + stacks_.set(1, istack.copy()); + // Out stack -> Somehow the filled container or container with fluid+fluid_level(). + } + } else if(new_phase > last_phase) { + switch(new_phase) { + case PHASE_LAVA: + fluid_level_ = MAX_FLUID_LEVEL; + stacks_.set(1, ItemStack.EMPTY); + stacks_.set(0, ItemStack.EMPTY); + world.playSound(null, pos, SoundEvents.BLOCK_LAVA_AMBIENT, SoundCategory.BLOCKS, 0.2f, 1.0f); + dirty = true; + break; + case PHASE_MAGMABLOCK: + stacks_.set(1, MAGMA_STACK.copy()); + world.playSound(null, pos, SoundEvents.BLOCK_FIRE_AMBIENT, SoundCategory.BLOCKS, 0.2f, 0.8f); + dirty = true; + break; + case PHASE_HOT: + world.playSound(null, pos, SoundEvents.BLOCK_FIRE_AMBIENT, SoundCategory.BLOCKS, 0.2f, 0.8f); + break; + } + } else { + switch(new_phase) { + case PHASE_MAGMABLOCK: + stacks_.set(0, (fluid_level_ >= MAX_BUCKET_EXTRACT_FLUID_LEVEL) ? (MAGMA_STACK.copy()) : (ItemStack.EMPTY)); + stacks_.set(1, stacks_.get(0).copy()); + fluid_level_ = 0; + world.playSound(null, pos, SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCKS, 0.5f, 1.1f); + dirty = true; + break; + case PHASE_HOT: + if(istack.isItemEqual(MAGMA_STACK)) { + stacks_.set(1, new ItemStack(Blocks.OBSIDIAN)); + } else { + stacks_.set(1, new ItemStack(Blocks.COBBLESTONE)); + } + world.playSound(null, pos, SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCKS, 0.3f, 0.9f); + dirty = true; + break; + case PHASE_WARMUP: + world.playSound(null, pos, SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCKS, 0.3f, 0.7f); + break; + } + } + } + IBlockState state = world.getBlockState(pos); + if((state.getBlock() instanceof BlockDecorMineralSmelter) && (force_block_update_ || (state.getValue(PHASE) != new_phase))) { + state = state.withProperty(PHASE, new_phase); + world.setBlockState(pos, state,3|16); + world.notifyNeighborsOfStateChange(pos, state.getBlock(),false); + force_block_update_ = false; + } + if(dirty) markDirty(); + } + } + +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorSlab.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorSlab.java new file mode 100644 index 0000000..bcf2ae9 --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorSlab.java @@ -0,0 +1,201 @@ +/* + * @file BlockDecorSlab.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Standard half block horizontal slab characteristics class. + */ +package wile.engineersdecor.blocks; + +import wile.engineersdecor.detail.ModAuxiliaries; +import wile.engineersdecor.detail.ModConfig; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.EnumHand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.IBlockAccess; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; + + +public class BlockDecorSlab extends BlockDecor +{ + public static final PropertyInteger PARTS = PropertyInteger.create("parts", 0, 2); + public static final PropertyInteger TEXTURE_VARIANT = PropertyInteger.create("tvariant", 0, 7); + + protected static final AxisAlignedBB AABBs[] = { + new AxisAlignedBB(0, 0./16, 0, 1, 8./16, 1), // bottom slab + new AxisAlignedBB(0, 8./16, 0, 1, 16./16, 1), // top slab + new AxisAlignedBB(0, 0./16, 0, 1, 16./16, 1), // both slabs + new AxisAlignedBB(0, 0./16, 0, 1, 16./16, 1) // << 2bit fill + }; + protected static final int num_slabs_contained_in_parts_[] = { 1,1,2,2 }; + + public BlockDecorSlab(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound) + { super(registryName, config, material, hardness, resistance, sound); } + + protected boolean is_cube(IBlockState state) + { return state.getValue(PARTS) >= 2; } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) + { + if(!ModAuxiliaries.Tooltip.addInformation(stack, world, tooltip, flag, true)) return; + if(!ModConfig.optout.without_direct_slab_pickup) { + ModAuxiliaries.Tooltip.addInformation("engineersdecor.tooltip.slabpickup", "engineersdecor.tooltip.slabpickup", tooltip, flag, true); + } + } + + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getRenderLayer() + { return (((config & CFG_TRANSLUCENT)!=0) ? (BlockRenderLayer.TRANSLUCENT) : (BlockRenderLayer.CUTOUT)); } + + @Override + @SuppressWarnings("deprecation") + public IBlockState getStateFromMeta(int meta) + { return getDefaultState().withProperty(PARTS, MathHelper.clamp(meta, 0, 2)); } + + @Override + public int getMetaFromState(IBlockState state) + { return state.getValue(PARTS); } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) + { + long prnd = pos.toLong(); prnd = (prnd>>29) ^ (prnd>>17) ^ (prnd>>9) ^ (prnd>>4) ^ pos.getX() ^ pos.getY() ^ pos.getZ(); + return state.withProperty(TEXTURE_VARIANT, ((int)prnd) & 0x7); + } + + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, PARTS, TEXTURE_VARIANT); } + + @Override + @SuppressWarnings("deprecation") + public boolean isOpaqueCube(IBlockState state) + { return ((config & CFG_TRANSLUCENT)==0) && is_cube(state); } + + @Override + @SuppressWarnings("deprecation") + public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) + { return (state.getValue(PARTS) >= 2) ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED; } + + @Override + @SuppressWarnings("deprecation") + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { return AABBs[state.getValue(PARTS) & 0x3]; } + + @Override + @Nullable + public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) + { return getBoundingBox(state, world, pos); } + + @Override + @SuppressWarnings("deprecation") + public boolean isFullCube(IBlockState state) + { return is_cube(state); } + + @Override + @SuppressWarnings("deprecation") + public boolean isNormalCube(IBlockState state) + { return is_cube(state); } + + @Override + @SuppressWarnings("deprecation") + public boolean canEntitySpawn(IBlockState state, Entity entity) + { return false; } + + @Override + public void harvestBlock(World world, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack stack) + { spawnAsEntity(world, pos, new ItemStack(Item.getItemFromBlock(this), num_slabs_contained_in_parts_[state.getValue(PARTS) & 0x3])); } + + @Override + public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) + { return world.getBlockState(pos).getBlock() != this; } + + @Override + @SuppressWarnings("deprecation") + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + { return getDefaultState().withProperty(PARTS, ((facing==EnumFacing.UP) || ((facing!=EnumFacing.DOWN) && (hitY < 0.6))) ? 0 : 1); } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + final ItemStack stack = player.getHeldItem(hand); + if(stack.isEmpty() || (Block.getBlockFromItem(stack.getItem()) != this)) return false; + int parts = state.getValue(PARTS); + if(((facing == EnumFacing.UP) && (parts == 0)) || ((facing == EnumFacing.DOWN) && (parts == 1))) { + world.setBlockState(pos, state.withProperty(PARTS, 2), 3); + } else { + return false; // "not handled" -> let parent decide if a new slab has to be placed on top/bottom. + } + if(world.isRemote) return true; + if(!player.isCreative()) { + stack.shrink(1); + if(player.inventory != null) player.inventory.markDirty(); + } + SoundType st = this.getSoundType(state, world, pos, null); + world.playSound(null, pos, st.getPlaceSound(), SoundCategory.BLOCKS, (st.getVolume()+1f)/2.5f, 0.9f*st.getPitch()); + return true; + } + + @Override + public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) + { + if((world.isRemote) || (ModConfig.optout.without_direct_slab_pickup)) return; + final ItemStack stack = player.getHeldItemMainhand(); + if(stack.isEmpty() || (Block.getBlockFromItem(stack.getItem()) != this)) return; + if(stack.getCount() >= stack.getMaxStackSize()) return; + Vec3d lv = player.getLookVec(); + EnumFacing facing = EnumFacing.getFacingFromVector((float)lv.x, (float)lv.y, (float)lv.z); + if((facing != EnumFacing.UP) && (facing != EnumFacing.DOWN)) return; + IBlockState state = world.getBlockState(pos); + if(state.getBlock() != this) return; + int parts = state.getValue(PARTS); + if(facing == EnumFacing.DOWN) { + if(parts == 2) { + world.setBlockState(pos, state.withProperty(PARTS, 0), 3); + } else { + world.setBlockToAir(pos); + } + } else if(facing == EnumFacing.UP) { + if(parts == 2) { + world.setBlockState(pos, state.withProperty(PARTS, 1), 3); + } else { + world.setBlockToAir(pos); + } + } + if(!player.isCreative()) { + stack.grow(1); + if(player.inventory != null) player.inventory.markDirty(); // @todo: check if inventory can actually be null + } + SoundType st = this.getSoundType(state, world, pos, null); + world.playSound(player, pos, st.getPlaceSound(), SoundCategory.BLOCKS, (st.getVolume()+1f)/2.5f, 0.9f*st.getPitch()); + } +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java index ff8fe25..3865179 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java @@ -44,19 +44,25 @@ public class ModBlocks public static final BlockDecorFull CLINKER_BRICK_BLOCK = new BlockDecorFull("clinker_brick_block", 0, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorStairs CLINKER_BRICK_STAIRS = new BlockDecorStairs("clinker_brick_stairs", CLINKER_BRICK_BLOCK.getDefaultState()); public static final BlockDecorWall CLINKER_BRICK_WALL = new BlockDecorWall("clinker_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 20f, SoundType.STONE); + public static final BlockDecorSlab CLINKER_BRICK_SLAB = new BlockDecorSlab("clinker_brick_slab", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 20f, SoundType.STONE); public static final BlockDecorFull CLINKER_BRICK_STAINED_BLOCK = new BlockDecorFull("clinker_brick_stained_block", 0, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorStairs CLINKER_BRICK_STAINED_STAIRS = new BlockDecorStairs("clinker_brick_stained_stairs", CLINKER_BRICK_STAINED_BLOCK.getDefaultState()); + public static final BlockDecorSlab CLINKER_BRICK_STAINED_SLAB = new BlockDecorSlab("clinker_brick_stained_slab", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 20f, SoundType.STONE); public static final BlockDecorFull SLAG_BRICK_BLOCK = new BlockDecorFull("slag_brick_block", 0, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorStairs SLAG_BRICK_STAIRS = new BlockDecorStairs("slag_brick_stairs", SLAG_BRICK_BLOCK.getDefaultState()); public static final BlockDecorWall SLAG_BRICK_WALL = new BlockDecorWall("slag_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 15f, SoundType.STONE); + public static final BlockDecorSlab SLAG_BRICK_SLAB = new BlockDecorSlab("slag_brick_slab", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorFull REBAR_CONCRETE_BLOCK = new BlockDecorFull("rebar_concrete", 0, Material.ROCK, 5f, 2000f, SoundType.STONE); public static final BlockDecorStairs REBAR_CONCRETE_STAIRS = new BlockDecorStairs("rebar_concrete_stairs", REBAR_CONCRETE_BLOCK.getDefaultState()); public static final BlockDecorWall REBAR_CONCRETE_WALL = new BlockDecorWall("rebar_concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 2000f, SoundType.STONE); + public static final BlockDecorSlab REBAR_CONCRETE_SLAB = new BlockDecorSlab("rebar_concrete_slab", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 2000f, SoundType.STONE); + public static final BlockDecorFull REBAR_CONCRETE_TILE = new BlockDecorFull("rebar_concrete_tile", 0, Material.ROCK, 5f, 2000f, SoundType.STONE); public static final BlockDecorStairs REBAR_CONCRETE_TILE_STAIRS = new BlockDecorStairs("rebar_concrete_tile_stairs", REBAR_CONCRETE_TILE.getDefaultState()); + public static final BlockDecorSlab REBAR_CONCRETE_TILE_SLAB = new BlockDecorSlab("rebar_concrete_tile_slab", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 2000f, SoundType.STONE); public static final BlockDecorWall CONCRETE_WALL = new BlockDecorWall("concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 20f, SoundType.STONE); @@ -64,7 +70,9 @@ public class ModBlocks public static final BlockDecorLadder METAL_RUNG_STEPS = new BlockDecorLadder("metal_rung_steps", 0, Material.IRON, 0.5f, 20f, SoundType.METAL); public static final BlockDecorLadder TREATED_WOOD_LADDER = new BlockDecorLadder("treated_wood_ladder", 0, Material.WOOD, 0.5f, 10f, SoundType.WOOD); - public static final BlockDecorGlassBlock PANZERGLASS_BLOCK = new BlockDecorGlassBlock("panzerglass_block", 0, Material.GLASS, 0.8f, 2000f, SoundType.GLASS); + public static final BlockDecorGlassBlock PANZERGLASS_BLOCK = new BlockDecorGlassBlock("panzerglass_block", 0, Material.GLASS, 1f, 2000f, SoundType.GLASS); + public static final BlockDecorSlab PANZERGLASS_SLAB = new BlockDecorSlab("panzerglass_slab", BlockDecor.CFG_TRANSLUCENT, Material.GLASS, 1f, 2000f, SoundType.GLASS); + public static final BlockDecorStraightPole TREATED_WOOD_POLE = new BlockDecorStraightPole( "treated_wood_pole", @@ -90,28 +98,28 @@ public class ModBlocks public static final BlockDecorStraightPole THIN_STEEL_POLE = new BlockDecorStraightPole( "thin_steel_pole", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, - Material.IRON, 1.0f, 15f, SoundType.METAL, + Material.IRON, 2.0f, 15f, SoundType.METAL, ModAuxiliaries.getPixeledAABB(6,6,0, 10,10,16) ); public static final BlockDecorStraightPole THIN_STEEL_POLE_HEAD = new BlockDecorStraightPole( "thin_steel_pole_head", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, - Material.IRON, 1.0f, 15f, SoundType.METAL, + Material.IRON, 2.0f, 15f, SoundType.METAL, ModAuxiliaries.getPixeledAABB(6,6,0, 10,10,16) ); public static final BlockDecorStraightPole THICK_STEEL_POLE = new BlockDecorStraightPole( "thick_steel_pole", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, - Material.IRON, 1.0f, 15f, SoundType.METAL, + Material.IRON, 2.0f, 15f, SoundType.METAL, ModAuxiliaries.getPixeledAABB(5,5,0, 11,11,16) ); public static final BlockDecorStraightPole THICK_STEEL_POLE_HEAD = new BlockDecorStraightPole( "thick_steel_pole_head", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, - Material.IRON, 1.0f, 15f, SoundType.METAL, + Material.IRON, 2.0f, 15f, SoundType.METAL, ModAuxiliaries.getPixeledAABB(5,5,0, 11,11,16) ); @@ -129,6 +137,13 @@ public class ModBlocks ModAuxiliaries.getPixeledAABB(4.1,0,4.1, 11.8,8.8,11.8) ); + public static final BlockDecor TREATED_WOOD_SIDE_TABLE = new BlockDecor( + "treated_wood_side_table", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT, + Material.WOOD, 1.0f, 15f, SoundType.WOOD, + ModAuxiliaries.getPixeledAABB(2,0,2, 14,15.9,14) + ); + public static final BlockDecorCraftingTable TREATED_WOOD_CRAFTING_TABLE = new BlockDecorCraftingTable( "treated_wood_crafting_table", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT, @@ -139,7 +154,7 @@ public class ModBlocks public static final BlockDecorDirected INSET_LIGHT_IRON = new BlockDecorDirected( "iron_inset_light", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_OPPOSITE_PLACEMENT|(14<=0}).length) fails.push("No tag version not found matching the gradle properties version."); - if(git_remote.replace(/[\s]/g,"").indexOf("git@github.com:stfwi/engineers-decor.git(push)") < 0) fails.push("Not the reference repository."); - if((git_branch != "develop") && (git_branch != "master")) { - fails.push("No valid branch for dist. (branch:'"+git_branch+"')"); - } else if((git_branch == "develop") && (version_engineersdecor.replace(/[^ab]/g,"")=="")) { - fails.push("Cannot make release dist on develop branch."); - } else if((git_branch == "master") && (version_engineersdecor.replace(/[^ab]/g,"")!="")) { - fails.push("Cannot make beta dist on master branch."); - } - if(git_diff !== "") fails.push("Not everything committed to the GIT repository."); - if((!fs.isfile("signing.jks")) || (!fs.isfile("signing.properties"))) fails.push("Jar signing files missing."); - if(fails.length>0) { - for(var i in fails) fails[i] = " - " + fails[i]; - alert("Dist check failed"); - alert(fails.join("\n")+"\n"); - exit(1); - } -}; - tasks["sync-languages"] = function() { - function load() { - var lang_data = {}; - fs.find("./src/main/resources/assets/engineersdecor/lang", '*.lang', function(f){ - var lang_code = fs.basename(f).replace(/\..*$/,"").trim().toLowerCase(); - var lines = fs.readfile(f).trim().split("\n"); - var was_eol_escape = false; - for(var i in lines) { - if(was_eol_escape) { - var k=0; - for(k=i-1; k>=0; --k) { - if(lines[k] != null) { - lines[k] += "\n" + lines[i]; - break; - } - } - was_eol_escape = lines[i].match(/[^\\][\\]$/) != null; - lines[i] = null; - } else { - lines[i] = lines[i].trim(); - was_eol_escape = lines[i].match(/[^\\][\\]$/) != null; - } - } - lang_data[lang_code] = lines.filter(function(l){return (l!==null);}); - return false; - }); - return lang_data; - } - function reference_content(lang_data, reflang_code) { - var lang_lines = []; - for(var i in lang_data[reflang_code]) { - var txt = lang_data[reflang_code][i].trim(); - if((txt.search(/^#/)>=0) || (txt.search("=")<0)) { lang_lines.push(txt); continue; }; // comment "#" or empty line in the ref lang file - var kv = txt.split("=", 2); - var key = kv[0].trim(); - var val = kv[1].trim(); - var o = {key:key, tr:{}}; - o.tr[reflang_code] = val; - lang_lines.push(o); - } - delete lang_data[reflang_code]; - return lang_lines; - } - function add_language(lang_lines, lang_name, lang_data) { - const find_line = function(lines, key) { - for(var i in lines) { - if((typeof(lines[i]) !== "object")) continue; - if(lines[i].key.toLowerCase()==key.toLowerCase()) return i; - } - return -1; - }; - for(var i in lang_data) { - var txt = lang_data[i].trim(); - if(txt.search(/^#/)>=0) continue; - if(txt.search("=")<0) continue; - var kv = txt.split("=", 2); - var key = kv[0].trim(); - var val = kv[1].trim(); - var line_i = find_line(lang_lines, key); - if(line_i >= 0) { - lang_data[i] = undefined; - lang_lines[line_i].tr[lang_name] = val; - } - } - return lang_data; - } - - function complete_lang_lines(lang_lines, lang_names, reflang_code) { - var lang_outputs = {}; - for(var i in lang_names) lang_outputs[lang_names[i]] = []; - for(var i_line in lang_lines) { - var entry = lang_lines[i_line]; - if(typeof(entry) !== "object") { - for(var i in lang_names) lang_outputs[lang_names[i]].push(entry); - } else { - for(var i in lang_names) { - var name = lang_names[i]; - if(entry.tr[name] !== undefined) { - lang_outputs[name].push(entry.key + "=" + entry.tr[name]); - } else { - var added = entry.key + "=" + entry.tr[reflang_code]; - if((entry.key.search(/\.tip$/)>0) || (entry.key.search(/\.help$/)>0)) added = "#" + added; - lang_outputs[name].push(added); - if(added.search(/^#/)<0) print("[warn] Lang: Added default language for missing entry in " + name + ": '" + added + "'"); - } - } - } - } - return lang_outputs; - } - - const reflang_code = "en_us"; - var lang_data = load(); - var lang_names = Object.keys(lang_data); - var lang_lines = reference_content(lang_data, reflang_code); - for(var lang_name in lang_data) { - lang_data[lang_name] = add_language(lang_lines, lang_name, lang_data[lang_name]); - lang_data[lang_name] = lang_data[lang_name].filter(function(l){ return !!l; }); - if(lang_data[lang_name].length == 0) delete lang_data[lang_name]; - } - var output_data = complete_lang_lines(lang_lines, lang_names, reflang_code); - for(var i in output_data) output_data[i] = output_data[i].join("\n") + "\n\n"; - - // Remaining lines in lang files (not in the reference lang file) - for(var lang_name in lang_data) { - for(var i in lang_data[lang_name]) { - if(lang_data[lang_name][i].search(/^#/)<0) { - var added = "# " + lang_data[lang_name][i].replace(/^[#\s]+/,""); - output_data[lang_name] += added + "\n"; - print("[warn] Lang: Commented out unknown key in " + lang_name + ": '" + added + "'"); - } - } - } - for(var name in output_data) output_data[name] = output_data[name].trim() + "\n"; - - for(var name in output_data) { - fs.writefile("./src/main/resources/assets/engineersdecor/lang/" + name + ".lang", output_data[name]); - } + liblang.sync_languages(); }; -tasks["tabs-to-spaces"] = function() { - var file_list = (function() { - var ls = []; - const ext = ['java','lang']; - for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i])); - for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/"); - ls.sort(); - ls.push("readme.md"); - return ls; - })(); - for(var file_i in file_list) { - var file = file_list[file_i]; - var txt = fs.readfile(file); - if(txt===undefined) throw new Error("Failed to read '" + file + "'"); - const txt_length = txt.length; - txt = txt.replace(/[\t]/g," "); - const n = txt.length - txt_length; - if(n > 0) { - print("File '" + file + "': Changed " + n + " tabs to 2 spaces." ); - fs.writefile(file, txt); - } - } -}; - -tasks["trailing-whitespaces"] = function() { - var file_list = (function() { - var ls = []; - const ext = ['java','json','lang']; - for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i])); - for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/"); - ls.sort(); - ls.push("readme.md"); - return ls; - })(); - for(var file_i in file_list) { - var file = file_list[file_i]; - var txt = fs.readfile(file); - if(txt===undefined) throw new Error("Failed to read '" + file + "'"); - const txt_length = txt.length; - txt = txt.replace(/[\r\t ]+[\n]/g,"\n"); - const n = txt_length - txt.length; - if(n > 0) { - print("File '" + file + "': Fixed " + n + " lines with trailing whitespaces." ); - fs.writefile(file, txt); - } - } -}; - -tasks["version-check"] = function() { - var version_minecraft=""; - var version_forge=""; - var version_engineersdecor=""; - fs.readfile("gradle.properties", function(line){ - if(line.search(/^[\s]*version_minecraft[\s]*=/i) >= 0) { - version_minecraft = line.replace(/^[^=]+=/,"").trim(); - } else if(line.search(/^[\s]*version_forge[\s]*=/i) >= 0) { - version_forge = line.replace(/^[^=]+=/,"").trim(); - } else if(line.search(/^[\s]*version_engineersdecor[\s]*=/i) >= 0) { - version_engineersdecor = line.replace(/^[^=]+=/,"").trim(); - } +tasks["port-languages"] = function() { + fs.find("src/main/resources/assets/"+ constants.mod_registry_name() +"/lang", '*.lang', function(path){ + const unified = liblang.load(path); + path = path.replace(/\.lang$/,""); + liblang13.save("../1.13/"+path+".json", unified); + liblang14.save("../1.14/"+path+".json", unified); return false; - }) - const combined_version = version_minecraft + "-" + version_engineersdecor; - var readme_version_found = fs.readfile("readme.md", function(line){ - var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i); - if((!m) || (!m.length) || (m.length < 2)) { - m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i); - if((!m) || (!m.length) || (m.length < 2)) return false; - } - return m[1]==version_engineersdecor; }); - var ok=true; - if(!readme_version_found) { - alert("Version 'v" + version_engineersdecor + "' not found in the readme changelog."); - ok = false; - } - if(!ok) { - alert("Version data:"); - alert(" - combined_version : '" + combined_version + "'"); - alert(" - version_forge : '" + version_forge + "'"); - exit(1); - } }; -tasks["dist"] = function() { - function readme_history(file_path) { - var readme = fs.readfile(file_path); - if(!readme) throw new Error("Failed to load readme.md"); - readme = readme.split(/[\r]?[\n]/); - while((readme.length > 0) && readme[0].search(/^## Revision history/i)<0) readme.shift(); - while((readme.length > 0) && readme[0].trim()=="") readme.shift(); - // revision history section - if(!readme.length) throw new Error("Revision history section not found in readme"); - readme.shift(); - var end_of_history = readme.length; - for(var i=0; i= 0) { end_of_history=i; break; } - if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker."); - // remove empty lines, splitters - while(readme.length >= end_of_history) readme.pop(); - while((readme.length >0) && (readme[readme.length-1].replace(/[\s-]/g,"")=="")) readme.pop(); - - const min_indent = readme - .map(function(s){return s.search(/[^\s]/)}) - .filter(function(e){return e>=0}) - .reduce(function(acc,e){return (e 1) { - for(var i in readme) { readme[i] = readme[i].substr(min_indent-2); } - } - return readme.join("\n"); - } - const html = "
\n" + (readme_history("readme.md").replace(/&/g, "&").replace(/>/g, ">").replace(/";
-  fs.writefile("dist/revision-history.html", html);
-};
-
-tasks["update-json"] = function() {
-  const root_dir = fs.cwd();
-  function read_history() {
-    var readme = fs.readfile(root_dir + "/readme.md");
-    if(!readme) throw new Error("Failed to load readme.md");
-    readme = readme.split(/[\r]?[\n]/);
-    while((readme.length > 0) && readme[0].search(/^## Revision history/i)<0) readme.shift();
-    // revision history section
-    if(!readme.length) throw new Error("Revision history section not found in readme");
-    readme.shift();
-    var end_of_history = readme.length;
-    for(var i=0; i= 0) { end_of_history=i; break; }
-    if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker.");
-    // remove empty lines, splitters
-    while(readme.length >= end_of_history) readme.pop();
-    for(var i in readme) readme[i] = readme[i].replace(/[\s]+$/g,"").replace(/[\t]/g,"  ");
-    readme = readme.filter(function(a){return a.replace(/[\s-]+/g,"")!="";});
-    // condense multilines to single line entries for each fix or feature. ([A] ... [M] ...)
-    for(var i=readme.length-1; i>0; --i) {
-      var line = readme[i].replace(/^\s+/,"");
-      if(line.search(/^[\[\-]/) < 0) {
-        readme[i-1] += " " + line;
-        readme[i] = "";
-      }
-    }
-    readme = readme.filter(function(a){return a!="";});
-    // Condense log entries sepatated with newlines to one line for each version
-    for(var i=readme.length-1; i>0; --i) {
-      var line = readme[i].replace(/^\s+/,"");
-      if(line.search(/^[-~]/) < 0) {
-        readme[i-1] += "\n" + line;
-        readme[i] = "";
-      }
-    }
-    readme = readme.filter(function(a){return a!="";});
-    // Separate versions.
-    var history = {};
-    for(var i in readme) {
-      var line = readme[i].replace(/^[\sv-]+/g,"").trim();
-      var ver = line.substr(0, line.search(" ")).trim().toLowerCase();
-      var txt = line.substr(line.search(" ")).trim();
-      if(ver.search("~")===0) continue;
-      if(history[ver] !== undefined) throw new Error("Double definition of version '" + ver + "' in the readme revision history.");
-      history[ver] = txt;
-    }
-    return history;
-  }
-  var history = read_history();
-  var latest_release = "";
-  var latest_beta = "";
-  for(var ver in history) { latest_beta=ver; break; }
-  for(var ver in history) if(ver.search(/(rc|b|a)/) < 0) { latest_release=ver; break; }
-  var update_json = {
-    homepage: "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
-    "1.12.2": history,
-    promos: {
-      "1.12.2-recommended": latest_release,
-      "1.12.2-latest": latest_beta,
-    }
-  }
-  fs.mkdir(root_dir + "/meta");
-  fs.writefile(root_dir + "/meta/update.json", JSON.stringify(update_json, null, 2));
-};
-
-const task_name = sys.args[0];
-if((task_name===undefined) || (tasks[task_name])===undefined) {
-  alert("No task ", task_name);
-  exit(1);
-} else {
-  tasks[task_name]();
-}
+libtask.run(tasks, sys.args);
diff --git a/1.13/Makefile b/1.13/Makefile
index ef6783d..671af46 100644
--- a/1.13/Makefile
+++ b/1.13/Makefile
@@ -24,7 +24,7 @@ wildcardr=$(foreach d,$(wildcard $1*),$(call wildcardr,$d/,$2) $(filter $(subst
 #
 # Targets
 #
-.PHONY: default mod init clean clean-all all run install sanatize dist-check dist start-server
+.PHONY: default mod init clean clean-all mrproper all run install sanatize dist-check dist start-server
 
 default: mod
 
@@ -42,8 +42,17 @@ clean:
 clean-all:
 	@echo "[1.13] Cleaning using gradle ..."
 	@rm -f dist/*
+	@rm -rf run/logs/
+	@rm -rf run/crash-reports/
 	@$(GRADLE) clean cleanCache
 
+mrproper: clean-all
+	@rm -f meta/*.*
+	@rm -rf run/
+	@rm -rf out/
+	@rm -f .project
+	@rm -f .classpath
+
 init:
 	@echo "[1.13] Initialising eclipse workspace using gradle ..."
 	@$(GRADLE) eclipse
diff --git a/1.13/build.gradle b/1.13/build.gradle
index 5d48315..9b689b8 100644
--- a/1.13/build.gradle
+++ b/1.13/build.gradle
@@ -12,6 +12,7 @@ buildscript {
 }
 apply plugin: 'net.minecraftforge.gradle'
 apply plugin: 'eclipse'
+apply plugin: 'maven-publish'
 sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
 //-----------------------------------------------------------------------------
 version = "${version_engineersdecor}"
@@ -77,3 +78,21 @@ jar {
     ])
   }
 }
+
+def reobfFile = file("$buildDir/reobfJar/output.jar")
+def reobfArtifact = artifacts.add('default', reobfFile) {
+  type 'jar'
+  builtBy 'reobfJar'
+}
+publishing {
+  publications {
+    mavenJava(MavenPublication) {
+      artifact reobfArtifact
+    }
+  }
+  repositories {
+    maven {
+      url "file:///${project.projectDir}/mcmodsrepo"
+    }
+  }
+}
diff --git a/1.13/gradle.properties b/1.13/gradle.properties
index b6af3b5..4f7023e 100644
--- a/1.13/gradle.properties
+++ b/1.13/gradle.properties
@@ -2,8 +2,8 @@
 org.gradle.daemon=false
 org.gradle.jvmargs=-Xmx8G
 version_minecraft=1.13.2
-version_forge_minecraft=1.13.2-25.0.44
-version_engineersdecor=1.0.0-a1
+version_forge_minecraft=1.13.2-25.0.219
+version_engineersdecor=1.0.7-b6
 #
 # jar signing data loaded from signing.properties in the project root.
 #
diff --git a/1.13/meta/update.json b/1.13/meta/update.json
index ea1dd08..14c8075 100644
--- a/1.13/meta/update.json
+++ b/1.13/meta/update.json
@@ -1,6 +1,13 @@
 {
   "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
   "1.13.2": {
+    "1.0.7-b5": "[A] Added translation zh_cn (PR#33, XuyuEre)\n[M] Updated textures.\n[M] Updated 1st/3rd person item model rotations/translations.",
+    "1.0.7-b4": "[A] Added stained clinker brick block/stairs.",
+    "1.0.7-b3": "[V] Version assignment: All features of v1.0.7-b3-1.12.2 that can be ported to 1.13.2 implemented/prepared, therefore version re-assigned.\n[A] Added \"Factory Area\" sign.\n[M] Sign background colors adapted.\n[M] EN lang file updated (PR#28, Voxelo).",
+    "1.0.4-b6": "[A] Added Small Electrical Furnace.\n[A] Added Small Waste Incinerator.\n[A] Experimental: Added fluid check valve.\n[A] Experimental: Added fluid redstone controlled valve.\n[A] Experimental: Added fluid redstone analog valve.\n[A] Experimental: Added passive fluid accumulator.",
+    "1.0.4-b5": "[A] Added Factory Dropper.\n[A] Added \"Caution Defense System Ahead\" sign.",
+    "1.0.4-b4": "[U] Updated forge dependency: REQUIRES FORGE >= 1.13.2-25.0.214.\n[A] Added sign \"Electrical hazard\"/\"Caution hot wire\".\n[A] Added sign \"Caution dangerous there\" (skull/bones).\n[A] Added horizontal steel double-T support beam with pole connections.",
+    "1.0.4-b3": "[V] Version assignment: All features of v1.0.4-b3-1.12.2 that can be ported to 1.13.2 implemented/prepared, therefore version re-iterated.\n[A] Lab furnace ported to 1.13.\n[A] Treated wood crafting table: Added crafting table history/quick craft.\n[A] Treated wood stool: Sitting on the stool implemented.\n[A] Steel poles (thick/thin) with support heads/foots added.\n[E] Prepared position dependent texture variation for walls (clinker, slag, rebar concrete), missing one forge feature yet for completion.\n[E] Prepared multi-layer rendering for windows, needs forge feature implementation.",
     "1.0.2-b3": "[A] Added treated wood window.\n[A] Added treated wood pole support.\n[A] Added treated wood pole head.\n[A] Added steel framed window.",
     "1.0.2-b2": "[A] Added wall decomposition recipes.\n[A] Added slag brick wall.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.",
     "1.0.2-b1": "[A] Added Treated wood crafting table.\n[A] Added decomposition recipes for stairs and tiles.\n[N] Note: All v1.0.2-b1-mc1.12.2 blocks are ported to 1.13.2 (alpha -^ beta version).\n[N] Note: Until IE is out for 1.13.2, the recipes are temporary with vanilla items.",
@@ -10,6 +17,6 @@
   },
   "promos": {
     "1.13.2-recommended": "",
-    "1.13.2-latest": "1.0.2-b3"
+    "1.13.2-latest": "1.0.7-b5"
   }
 }
\ No newline at end of file
diff --git a/1.13/readme.md b/1.13/readme.md
index 75a3ac8..73acc8e 100644
--- a/1.13/readme.md
+++ b/1.13/readme.md
@@ -8,9 +8,16 @@ Mod sources for Minecraft version 1.13.2.
 - Compiled mod distribution channel is curseforge: https://www.curseforge.com/minecraft/mc-mods/engineers-decor/files.
 
 ----
-## Revision history
+## Version history
 
-    ~ v1.0.7-b4 [A]
+    ~ v1.0.7-b6 [F] Fixed recipe collision of Metal Rung Ladder (issue #37,
+                    thx ProsperCraft for reporting).
+
+    - v1.0.7-b5 [A] Added translation zh_cn (PR#33, XuyuEre)
+                [M] Updated textures.
+                [M] Updated 1st/3rd person item model rotations/translations.
+
+    - v1.0.7-b4 [A] Added stained clinker brick block/stairs.
 
     - v1.0.7-b3 [V] Version assignment: All features of v1.0.7-b3-1.12.2 that can be ported
                     to 1.13.2 implemented/prepared, therefore version re-assigned.
diff --git a/1.13/src/main/resources/assets/engineersdecor/lang/zh_cn.json b/1.13/src/main/resources/assets/engineersdecor/lang/zh_cn.json
new file mode 100644
index 0000000..08710a4
--- /dev/null
+++ b/1.13/src/main/resources/assets/engineersdecor/lang/zh_cn.json
@@ -0,0 +1,53 @@
+{
+  "language": "Chinese",
+  "language.region": "China",
+  "language.code": "zh_cn",
+
+  "itemGroup.tabengineersdecor":"工程师的装饰",
+
+  "engineersdecor.config.title":"工程师的装饰配置",
+  "engineersdecor.tooltip.hint.extended":"§6[按§9SHIFT§r获取更多信息§6]§r",
+  "engineersdecor.tooltip.hint.help":"§6[按§9CTRL-SHIFT§r获取帮助§6]§r",
+
+  "block.engineersdecor.clinker_brick_block":"熟料砖",
+  "block.engineersdecor.clinker_brick_block.help":"§6具有位置相关纹理变化的砖块.§r\n看起来比原版砖块稍暗,颜色更浓.",
+  "block.engineersdecor.clinker_brick_stairs":"熟料砖楼梯",
+  "block.engineersdecor.clinker_brick_stairs.help":"§6看起来比原版砖块稍暗,颜色更浓.",
+
+  "block.engineersdecor.slag_brick_block":"炉渣砖",
+  "block.engineersdecor.slag_brick_block.help":"§6灰褐色砖块,具有位置相关的纹理变化.",
+  "block.engineersdecor.slag_brick_stairs":"炉渣砖楼梯",
+  "block.engineersdecor.slag_brick_stairs.help":"§6灰褐色砖块楼梯.",
+
+  "block.engineersdecor.rebar_concrete":"钢筋混凝土",
+  "block.engineersdecor.rebar_concrete.help":"§6钢筋混凝土砌块.§r 昂贵,但像黑曜石一样防苦力怕.",
+  "block.engineersdecor.rebar_concrete_stairs":"钢筋混凝土楼梯",
+  "block.engineersdecor.rebar_concrete_stairs.help":"§6钢筋混凝土楼梯.§r 昂贵,但像黑曜石一样防苦力怕.",
+  "block.engineersdecor.rebar_concrete_wall":"钢筋混凝土墙",
+  "block.engineersdecor.rebar_concrete_wall.help":"§6钢筋混凝土墙.§r 昂贵,但像黑曜石一样防苦力怕.",
+
+  "block.engineersdecor.concrete_wall":"水泥墙",
+  "block.engineersdecor.concrete_wall.help":"§6墙由坚固的混凝土制成.",
+
+  "block.engineersdecor.metal_rung_ladder":"金属环梯",
+  "block.engineersdecor.metal_rung_ladder.help":"§6典型的工业墙梯,包括水平金属杆横档.",
+
+  "block.engineersdecor.metal_rung_steps":"交错的金属台阶",
+  "block.engineersdecor.metal_rung_steps.help":"§6贴在墙上的交错的杆横档,允许爬上,爬下等等.",
+
+  "block.engineersdecor.treated_wood_ladder":"经过处理的木梯",
+  "block.engineersdecor.treated_wood_ladder.help":"§6防风雨的木梯.",
+
+
+
+
+  "block.engineersdecor.iron_sheet_roof":"铁板金属屋顶",
+  "block.engineersdecor.iron_sheet_roof.help":"§6嗯,这是一个屋顶.",
+
+  "block.engineersdecor.treated_wood_pole":"直立处理木杆",
+  "block.engineersdecor.treated_wood_pole.help":"§6具有导线继电器直径的直极片段.§r\n如果需要特殊的特殊长度,或作为结构的支撑,可以作为线柱的替代品.",
+
+  "block.engineersdecor.treated_wood_table":"经过处理的木桌",
+  "block.engineersdecor.treated_wood_table.help":"§6坚固的四足木桌."
+
+}
diff --git a/1.13/tasks.js b/1.13/tasks.js
index bb7e81e..69e1a44 100644
--- a/1.13/tasks.js
+++ b/1.13/tasks.js
@@ -1,233 +1,13 @@
 #!/usr/bin/djs
 // Note for reviewers/clones: This file is a auxiliary script for my setup. It's not needed to build the mod.
 "use strict";
-if(!fs.chdir(fs.dirname(fs.realpath(sys.script)))) throw new Error("Failed to switch to mod source directory.");
-if(!fs.isdir("../.git")) throw new Error("Missing git repository in parent directory of mod source.");
-
+const constants = include("../meta/lib/constants.js")();
+const libtask = include("../meta/lib/libtask.js")(constants);
+const liblang = include("../meta/lib/liblang.1.13.js")(constants);
 var tasks = {};
 
-tasks["dist-check"] = function() {
-  const uncommitted_changes = sys.shell("git status -s").trim();
-  const gittags = sys.shell('git log -1 --format="%D"')
-                  .replace(/[\s]/g,"").split(",")
-                  .filter(function(s){ return s.indexOf("tag:")==0;})
-                  .map(function(s){ return s.replace(/^tag:/,"");});
-  const version_engineersdecor = fs.readfile("gradle.properties", function(line){
-    if(line.trim().indexOf("version_engineersdecor")!=0) return false;
-    return line.replace(/^.*?=/,"").trim()
-  }).trim();
-  const git_remote = sys.shell("git remote -v").trim();
-  const git_branch = sys.shell("git rev-parse --abbrev-ref HEAD").trim();
-  const git_diff = sys.shell("git diff").trim();
-  var fails = [];
-  if(version_engineersdecor=="") fails.push("Could not determine 'version_engineersdecor' from gradle properties.");
-  if(!gittags.length) fails.push("Version not tagged.");
-  if(!gittags.filter(function(s){return s.indexOf(version_engineersdecor.replace(/[-]/g,""))>=0}).length) fails.push("No tag version not found matching the gradle properties version.");
-  if(git_remote.replace(/[\s]/g,"").indexOf("git@github.com:stfwi/engineers-decor.git(push)") < 0) fails.push("Not the reference repository.");
-  if((git_branch != "develop") && (git_branch != "master")) {
-    fails.push("No valid branch for dist. (branch:'"+git_branch+"')");
-  } else if((git_branch == "develop") && (version_engineersdecor.replace(/[^ab]/g,"")=="")) {
-    fails.push("Cannot make release dist on develop branch.");
-  } else if((git_branch == "master") && (version_engineersdecor.replace(/[^ab]/g,"")!="")) {
-    fails.push("Cannot make beta dist on master branch.");
-  }
-  if(git_diff !== "") fails.push("Not everything committed to the GIT repository.");
-  if((!fs.isfile("signing.jks")) || (!fs.isfile("signing.properties"))) fails.push("Jar signing files missing.");
-  if(fails.length>0) {
-    for(var i in fails) fails[i] = "  - " + fails[i];
-    alert("Dist check failed");
-    alert(fails.join("\n")+"\n");
-    exit(1);
-  }
-};
-
 tasks["sync-languages"] = function() {
- // @todo: has become easier but needs impl.
+  liblang.sync_languages();
 };
 
-tasks["tabs-to-spaces"] = function() {
-  var file_list = (function() {
-    var ls = [];
-    const ext = ['java'];
-    for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i]));
-    for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/");
-    ls.sort();
-    ls.push("readme.md");
-    return ls;
-  })();
-  for(var file_i in file_list) {
-    var file = file_list[file_i];
-    var txt = fs.readfile(file);
-    if(txt===undefined) throw new Error("Failed to read '" + file + "'");
-    const txt_length = txt.length;
-    txt = txt.replace(/[\t]/g,"  ");
-    const n = txt.length - txt_length;
-    if(n > 0) {
-      print("File '" + file + "': Changed " + n + " tabs to 2 spaces." );
-      fs.writefile(file, txt);
-    }
-  }
-};
-
-tasks["trailing-whitespaces"] = function() {
-  var file_list = (function() {
-    var ls = [];
-    const ext = ['java','json','lang'];
-    for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i]));
-    for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/");
-    ls.sort();
-    ls.push("readme.md");
-    return ls;
-  })();
-  for(var file_i in file_list) {
-    var file = file_list[file_i];
-    var txt = fs.readfile(file);
-    if(txt===undefined) throw new Error("Failed to read '" + file + "'");
-    const txt_length = txt.length;
-    txt = txt.replace(/[\r\t ]+[\n]/g,"\n");
-    const n = txt_length - txt.length;
-    if(n > 0) {
-      print("File '" + file + "': Fixed " + n + " lines with trailing whitespaces." );
-      fs.writefile(file, txt);
-    }
-  }
-};
-
-tasks["version-check"] = function() {
-  var version_minecraft="";
-  var version_forge="";
-  var version_engineersdecor="";
-  fs.readfile("gradle.properties", function(line){
-    if(line.search(/^[\s]*version_minecraft[\s]*=/i) >= 0) {
-      version_minecraft = line.replace(/^[^=]+=/,"").trim();
-    } else if(line.search(/^[\s]*version_forge[\s]*=/i) >= 0) {
-      version_forge = line.replace(/^[^=]+=/,"").trim();
-    } else if(line.search(/^[\s]*version_engineersdecor[\s]*=/i) >= 0) {
-      version_engineersdecor = line.replace(/^[^=]+=/,"").trim();
-    }
-    return false;
-  })
-  const combined_version = version_minecraft + "-" + version_engineersdecor;
-  var readme_version_found = fs.readfile("readme.md", function(line){
-    var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
-    if((!m) || (!m.length) || (m.length < 2)) {
-      m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
-      if((!m) || (!m.length) || (m.length < 2)) return false;
-    }
-    return m[1]==version_engineersdecor;
-  });
-  var ok=true;
-  if(!readme_version_found) {
-    alert("Version 'v" + version_engineersdecor + "' not found in the readme changelog.");
-    ok = false;
-  }
-  if(!ok) {
-    alert("Version data:");
-    alert(" - combined_version  : '" + combined_version + "'");
-    alert(" - version_forge     : '" + version_forge + "'");
-    exit(1);
-  }
-};
-
-tasks["dist"] = function() {
-  function readme_history(file_path) {
-    var readme = fs.readfile(file_path);
-    if(!readme) throw new Error("Failed to load readme.md");
-    readme = readme.split(/[\r]?[\n]/);
-    while((readme.length > 0) && readme[0].search(/^## Revision history/i)<0) readme.shift();
-    while((readme.length > 0) && readme[0].trim()=="") readme.shift();
-    // revision history section
-    if(!readme.length) throw new Error("Revision history section not found in readme");
-    readme.shift();
-    var end_of_history = readme.length;
-    for(var i=0; i= 0) { end_of_history=i; break; }
-    if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker.");
-    // remove empty lines, splitters
-    while(readme.length >= end_of_history) readme.pop();
-    while((readme.length >0) && (readme[readme.length-1].replace(/[\s-]/g,"")=="")) readme.pop();
-
-    const min_indent = readme
-      .map(function(s){return s.search(/[^\s]/)})
-      .filter(function(e){return e>=0})
-      .reduce(function(acc,e){return (e 1) {
-      for(var i in readme) { readme[i] = readme[i].substr(min_indent-2); }
-    }
-    return readme.join("\n");
-  }
-  const html = "
\n" + (readme_history("readme.md").replace(/&/g, "&").replace(/>/g, ">").replace(/";
-  fs.writefile("dist/revision-history.html", html);
-};
-
-tasks["update-json"] = function() {
-  const root_dir = fs.cwd();
-  function read_history() {
-    var readme = fs.readfile(root_dir + "/readme.md");
-    if(!readme) throw new Error("Failed to load readme.md");
-    readme = readme.split(/[\r]?[\n]/);
-    while((readme.length > 0) && readme[0].search(/^## Revision history/i)<0) readme.shift();
-    // revision history section
-    if(!readme.length) throw new Error("Revision history section not found in readme");
-    readme.shift();
-    var end_of_history = readme.length;
-    for(var i=0; i= 0) { end_of_history=i; break; }
-    if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker.");
-    // remove empty lines, splitters
-    while(readme.length >= end_of_history) readme.pop();
-    for(var i in readme) readme[i] = readme[i].replace(/[\s]+$/g,"").replace(/[\t]/g,"  ");
-    readme = readme.filter(function(a){return a.replace(/[\s-]+/g,"")!="";});
-    // condense multilines to single line entries for each fix or feature. ([A] ... [M] ...)
-    for(var i=readme.length-1; i>0; --i) {
-      var line = readme[i].replace(/^\s+/,"");
-      if(line.search(/^[\[\-]/) < 0) {
-        readme[i-1] += " " + line;
-        readme[i] = "";
-      }
-    }
-    readme = readme.filter(function(a){return a!="";});
-    // Condense log entries sepatated with newlines to one line for each version
-    for(var i=readme.length-1; i>0; --i) {
-      var line = readme[i].replace(/^\s+/,"");
-      if(line.search(/^[-~]/) < 0) {
-        readme[i-1] += "\n" + line;
-        readme[i] = "";
-      }
-    }
-    readme = readme.filter(function(a){return a!="";});
-    // Separate versions.
-    var history = {};
-    for(var i in readme) {
-      var line = readme[i].replace(/^[\sv-]+/g,"").trim();
-      var ver = line.substr(0, line.search(" ")).trim().toLowerCase();
-      var txt = line.substr(line.search(" ")).trim();
-      if(ver.search("~")===0) continue;
-      if(history[ver] !== undefined) throw new Error("Double definition of version '" + ver + "' in the readme revision history.");
-      history[ver] = txt;
-    }
-    return history;
-  }
-  var history = read_history();
-  var latest_release = "";
-  var latest_beta = "";
-  for(var ver in history) { latest_beta=ver; break; }
-  for(var ver in history) if(ver.search(/(rc|b|a)/) < 0) { latest_release=ver; break; }
-  var update_json = {
-    homepage: "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
-    "1.13.2": history,
-    promos: {
-      "1.13.2-recommended": latest_release,
-      "1.13.2-latest": latest_beta,
-    }
-  }
-  fs.mkdir(root_dir + "/meta");
-  fs.writefile(root_dir + "/meta/update.json", JSON.stringify(update_json, null, 2));
-};
-
-const task_name = sys.args[0];
-if((task_name===undefined) || (tasks[task_name])===undefined) {
-  alert("No task ", task_name);
-  exit(1);
-} else {
-  tasks[task_name]();
-}
+libtask.run(tasks, sys.args);
diff --git a/1.14/.gitignore b/1.14/.gitignore
new file mode 100644
index 0000000..af7450c
--- /dev/null
+++ b/1.14/.gitignore
@@ -0,0 +1,37 @@
+bin
+*.launch
+.settings
+.metadata
+.classpath
+.project
+out
+*.ipr
+*.iws
+*.iml
+.idea
+build
+.gradle
+*.tmp
+*.log
+*.jks
+eclipse
+run
+tests
+/dist
+signing.*
+src/main/java/archive
+src/main/resources/assets/minecraft
+.vscode
+/classes
+/dev
+/tmp
+/archive
+/assets-src
+.gimp
+*.xcf
+desktop.ini
+.DS_Store
+Thumbs.db
+forge*changelog.txt
+/*.txt
+mcmodsrepo
\ No newline at end of file
diff --git a/1.14/Makefile b/1.14/Makefile
new file mode 100644
index 0000000..4874f82
--- /dev/null
+++ b/1.14/Makefile
@@ -0,0 +1,84 @@
+# @file Makefile
+# @author Stefan Wilhelm (wile)
+# @license MIT
+#
+# GNU Make makefile based build relay.
+# Note for reviewers/clones: This file is a auxiliary script for my setup.
+# It's not needed to build the mod.
+#
+MOD_JAR_PREFIX=engineersdecor-
+MOD_JAR=$(filter-out %-sources.jar,$(wildcard build/libs/${MOD_JAR_PREFIX}*.jar))
+
+ifeq ($(OS),Windows_NT)
+GRADLE=gradlew.bat --no-daemon
+GRADLE_STOP=gradlew.bat --stop
+DJS=djs
+else
+GRADLE=./gradlew --no-daemon
+GRADLE_STOP=./gradlew --stop
+DJS=djs
+endif
+
+wildcardr=$(foreach d,$(wildcard $1*),$(call wildcardr,$d/,$2) $(filter $(subst *,%,$2),$d))
+
+#
+# Targets
+#
+.PHONY: default mod init clean clean-all mrproper all run install sanatize dist-check dist start-server assets
+
+default: mod
+
+all: clean clean-all mod | install
+
+mod:
+	@echo "[1.14] Building mod using gradle ..."
+	@$(GRADLE) build $(GRADLE_OPTS)
+
+clean:
+	@echo "[1.14] Cleaning ..."
+	@rm -rf mcmodsrepo
+	@rm -f build/libs/*
+	@$(GRADLE) clean
+
+clean-all:
+	@echo "[1.14] Cleaning using gradle ..."
+	@rm -rf mcmodsrepo
+	@rm -f dist/*
+	@rm -rf run/logs/
+	@rm -rf run/crash-reports/
+	@$(GRADLE) clean
+
+mrproper: clean-all
+	@rm -f meta/*.*
+	@rm -rf run/
+	@rm -rf out/
+	@rm -f .project
+	@rm -f .classpath
+
+init:
+	@echo "[1.14] Initialising eclipse workspace using gradle ..."
+	@$(GRADLE) eclipse
+
+sanatize:
+	@echo "[1.14] Running sanatising tasks ..."
+	@djs tasks.js trailing-whitespaces
+	@djs tasks.js tabs-to-spaces
+	@djs tasks.js sync-languages
+	@djs tasks.js version-check
+	@djs tasks.js update-json
+	@git status -s .
+
+dist-check:
+	@echo "[1.14] Running dist checks ..."
+	@djs tasks.js dist-check
+
+dist: sanatize dist-check clean-all mod
+	@echo "[1.14] Distribution files ..."
+	@mkdir -p dist
+	@cp build/libs/$(MOD_JAR_PREFIX)* dist/
+	@djs tasks.js dist
+
+assets:
+	@echo "[1.14] Running asset generators ..."
+	@djs tasks.js create-slab-assets
+	@djs tasks.js create-half-slab-assets
\ No newline at end of file
diff --git a/1.14/build.gradle b/1.14/build.gradle
new file mode 100644
index 0000000..406d07a
--- /dev/null
+++ b/1.14/build.gradle
@@ -0,0 +1,95 @@
+// @file build.gradle
+// Engineer's decor mod gradle build relay (mc1.13.2)
+buildscript {
+  repositories {
+    maven { url = 'https://files.minecraftforge.net/maven' }
+    jcenter()
+    mavenCentral()
+  }
+  dependencies {
+    classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
+  }
+}
+apply plugin: 'net.minecraftforge.gradle'
+apply plugin: 'eclipse'
+apply plugin: 'maven-publish'
+sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
+//-----------------------------------------------------------------------------
+version = "${version_engineersdecor}"
+group = "wile.engineersdecor"
+archivesBaseName = "engineersdecor-${version_minecraft}"
+
+def signing = { ->
+  def sp = new Properties()
+  if(file("signing.properties").exists()) file("signing.properties").withInputStream { sp.load(it) }
+  return sp
+}()
+
+def git_version = { ->
+  def stdout = new ByteArrayOutputStream()
+  exec {
+    commandLine 'git', 'log', '-1', '--format=%h'
+    standardOutput = stdout
+  }
+  return stdout.toString().trim()
+}()
+
+repositories {
+  maven { name = "Progwml6 maven"; url = "https://dvs1.progwml6.com/files/maven/" } // JEI files
+  maven { name = "ModMaven"; url = "modmaven.k-4u.nl" } // JEI files, fallback
+}
+
+minecraft {
+  mappings channel: 'snapshot', version: "${version_fml_mappings}"
+  // accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
+  runs {
+    client {
+      workingDirectory project.file('run')
+      property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
+      property 'forge.logging.console.level', 'debug'
+      mods {
+        engineersdecor {
+          source sourceSets.main
+        }
+      }
+    }
+    server {
+      workingDirectory project.file('run')
+      property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
+      property 'forge.logging.console.level', 'debug'
+      mods {
+        engineersdecor {
+          source sourceSets.main
+        }
+      }
+    }
+  }
+}
+
+dependencies {
+  minecraft "net.minecraftforge:forge:${version_forge_minecraft}"
+  compileOnly fg.deobf("mezz.jei:jei-${version_minecraft}:${version_jei}:api")
+  runtimeOnly fg.deobf("mezz.jei:jei-${version_minecraft}:${version_jei}")
+}
+
+jar {
+  manifest {
+    attributes([
+      "Specification-Title": "engineersdecor",
+      "Specification-Vendor": "wilechaote",
+      "Specification-Version": "1", // We are version 1 of ourselves
+      "Implementation-Title": project.name,
+      "Implementation-Version": "${version_engineersdecor}",
+      "Implementation-Vendor" :"wilechaote",
+      "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
+    ])
+  }
+}
+
+def reobfFile = file("$buildDir/reobfJar/output.jar")
+def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar'; builtBy 'reobfJar'; }
+
+publishing {
+  publications { mavenJava(MavenPublication) { artifact reobfArtifact } }
+  repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } }
+}
diff --git a/1.14/gradle.properties b/1.14/gradle.properties
new file mode 100644
index 0000000..e67bc88
--- /dev/null
+++ b/1.14/gradle.properties
@@ -0,0 +1,16 @@
+# @file gradle.properties
+org.gradle.daemon=false
+org.gradle.jvmargs=-Xmx8G
+version_minecraft=1.14.3
+version_forge_minecraft=1.14.3-27.0.25
+version_fml_mappings=20190621-1.14.2
+version_jei=6.0.0.7
+version_engineersdecor=1.0.9-b4
+#
+# jar signing data loaded from signing.properties in the project root.
+#
+#signing.keystore_file=
+#signing.keystore_alias=
+#signing.keystore_pass=
+#signing.keystore_keypass=
+#fingerprint_sha1.fp_sha1=
diff --git a/1.14/gradle/wrapper/gradle-wrapper.jar b/1.14/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..7a3265e
Binary files /dev/null and b/1.14/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/1.14/gradle/wrapper/gradle-wrapper.properties b/1.14/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..949819d
--- /dev/null
+++ b/1.14/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
diff --git a/1.14/gradlew b/1.14/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/1.14/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+    echo "$*"
+}
+
+die () {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/1.14/gradlew.bat b/1.14/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/1.14/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/1.14/meta/lib/halfslab_assets.js b/1.14/meta/lib/halfslab_assets.js
new file mode 100644
index 0000000..be82d07
--- /dev/null
+++ b/1.14/meta/lib/halfslab_assets.js
@@ -0,0 +1,61 @@
+#!/usr/bin/djs
+// run from tasks.js directory
+"use strict";
+(function(constants, libassets){
+  const me = {};
+  const modid = constants.mod_registry_name();
+  const assets_root = constants.local_assets_root();
+  const hexchar = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e']; // ('a'+parts) won't work so here we go
+
+  const create_item_model = function(prefix, texture) {
+    const model = {
+      parent: modid+":block/slab/generic/halfslab_inventory_model",
+      textures: { all: texture }
+    }
+    const path = "models/item/halfslab_"+prefix+".json";
+    if(!fs.writefile(path, JSON.stringify(model))) {
+      throw new Error("Failed to write item model file '"+ path +"'");
+    }
+  };
+
+  const create_block_models = function(prefix, texture) {
+    for(var parts=0; parts<15; ++parts) {
+      const model = {
+        parent: modid+":block/slab/generic/halfslab_s"+hexchar[parts]+"_model",
+        textures: { all:texture }
+      }
+      const path = "models/block/slab/specific/halfslab_"+prefix+"_s"+hexchar[parts]+"_model.json";
+      if(!fs.writefile(path, JSON.stringify(model))) {
+        throw new Error("Failed to write model file '"+ path +"'");
+      }
+    }
+  };
+
+  const create_blockstate = function(prefix) {
+    var variants = {};
+    for(var parts=0; parts<15; ++parts) {
+      variants[ ("parts="+parts).replace(/[\s]/g,"") ] = {
+        model: (modid+":block/slab/specific/halfslab_"+prefix+"_s"+hexchar[parts]+"_model").replace(/[\s]/g,"")
+      }
+    }
+    const path = "blockstates/halfslab_"+prefix+".json";
+    if(!fs.writefile(path, JSON.stringify({variants:variants},null,1))) throw new Error("Failed to write blockstate '"+path+"'");
+    return path;
+  };
+
+  me.create = function(data) {
+    const here = fs.cwd()
+    const registry_name_prefix = data.name_prefix;
+    const texture = data.texture;
+    if(!fs.chdir(assets_root)) throw new Error("Could not switch to assets root folder: '" + assets_root + "'");
+    try {
+      create_block_models(registry_name_prefix, texture);
+      create_item_model(registry_name_prefix, texture);
+      create_blockstate(registry_name_prefix, texture);
+    } finally {
+      fs.chdir(here);
+    }
+  }
+  Object.freeze(me);
+  return me;
+});
diff --git a/1.14/meta/lib/slab_assets.js b/1.14/meta/lib/slab_assets.js
new file mode 100644
index 0000000..8ddf39c
--- /dev/null
+++ b/1.14/meta/lib/slab_assets.js
@@ -0,0 +1,64 @@
+#!/usr/bin/djs
+// run from tasks.js directory
+"use strict";
+(function(constants, libassets){
+  const me = {};
+  const modid = constants.mod_registry_name();
+  const assets_root = constants.local_assets_root();
+
+  const create_item_model = function(prefix, texture_prefix) {
+    const model = {
+      parent: modid+":block/slab/generic/slab_inventory_model",
+      textures: { all: modid+":block/"+texture_prefix+"0" }
+    }
+    const path = "models/item/"+prefix+"_slab.json";
+    if(!fs.writefile(path, JSON.stringify(model))) {
+      throw new Error("Failed to write item model file '"+ path +"'");
+    }
+  };
+
+  const create_block_models = function(prefix, texture_prefix) {
+    for(var parts=0; parts<3; ++parts) {
+      for(var tvariant=0; tvariant<4; ++tvariant) {
+        const model = {
+          parent: modid+":block/slab/generic/slab_s"+parts+"_model",
+          textures: { all: modid+":block/"+texture_prefix+tvariant }
+        }
+        const path = "models/block/slab/specific/"+prefix+"_slab_s"+parts+"v"+tvariant+"_model.json";
+        if(!fs.writefile(path, JSON.stringify(model))) {
+          throw new Error("Failed to write model file '"+ path +"'");
+        }
+      }
+    }
+  };
+
+  const create_blockstate = function(prefix) {
+    var variants = {};
+    for(var parts=0; parts<3; ++parts) {
+      for(var tvariant=0; tvariant<4; ++tvariant) {
+        variants[ ("parts="+parts+",tvariant="+tvariant).replace(/[\s]/g,"") ] = {
+          model: (modid+":block/slab/specific/"+prefix+"_slab_s"+parts+"v"+tvariant+"_model").replace(/[\s]/g,"")
+        }
+      }
+    }
+    const path = "blockstates/"+prefix+"_slab.json";
+    if(!fs.writefile(path, JSON.stringify({variants:variants},null,1))) throw new Error("Failed to write blockstate '"+path+"'");
+    return path;
+  };
+
+  me.create = function(prefixes) {
+    const here = fs.cwd()
+    const registry_name_prefix = prefixes.name_prefix;
+    const texture_prefix = prefixes.texture_prefix;
+    if(!fs.chdir(assets_root)) throw new Error("Could not switch to assets root folder: '" + assets_root + "'");
+    try {
+      create_block_models(registry_name_prefix, texture_prefix);
+      create_item_model(registry_name_prefix, texture_prefix);
+      create_blockstate(registry_name_prefix, texture_prefix);
+    } finally {
+      fs.chdir(here);
+    }
+  }
+  Object.freeze(me);
+  return me;
+});
diff --git a/1.14/meta/update.json b/1.14/meta/update.json
new file mode 100644
index 0000000..6d15301
--- /dev/null
+++ b/1.14/meta/update.json
@@ -0,0 +1,19 @@
+{
+  "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
+  "1.14.3": {
+    "1.0.9-b4": "[E] Experimental: Config skel ported (!not all options have effect yet).\n[E] Experimental: JEI integration for opt-outs and crafting table ported (also addresses issue #38).",
+    "1.0.9-b3": "[F] Additional item drop fixes when blocks are destroyed (issue #39).",
+    "1.0.9-b2": "[U] Updated to Forge 1.14.3-27.0.25/20190621-1.14.2.\n[F] Fixed recipe collision of Metal Rung Ladder (issue #37, thx ProsperCraft for reporting).\n[F] Fixed opening crafting table, furni, dropper server crash issue #35 (thx ProsperCraft also here).\n[F] Fixed missing pole/support item drops (issue #36, ProsperCraft).",
+    "1.0.9-b1": "[U] Updated to MC1.14.3, Forge 1.14.3-27.0.17/20190621-1.14.2.\n[A] Added Small Mineral Smelter.",
+    "1.0.8-b3": "[A] Ported slabs and slab slices from 1.12.2.\n[A] IE independent (\"standalone\") recipes ported.",
+    "1.0.8-b2": "[U] Updated to Forge BETA 1.14.2-26.0.63/20190621-1.14.2, code adapted to new mappings.\n[M] Updated 1st/3rd person item model rotations/translations.",
+    "1.0.8-b1": "[V] Feature set of 1.12 ported.\n[A] CTRL-SHIFT tooltips ported.\n[A] Ported stained clinker block/stairs.\n[M] Updated textures.\n[I] Issue: Scoped recipe constants still not working.",
+    "1.0.7-b5": "[U] Updated to Forge BETA 1.14.2-26.0.35/20190608-1.14.2.\n[A] Factory dropper functionality ported.\n[A] Small lab furnace functionality ported.\n[A] Small electrical lab furnace functionality ported.\n[A] Small waste incinerator functionality ported.\n[A] Fluid valves, Passive Fluid Accumulator ported.\n[I] Issue: Scoped recipe constants still not working.",
+    "1.0.7-b4": "[U] Updated to Forge BETA 1.14.2-26.0.32/20190608-1.14.2.\n[A] Sitting on the stool ported.\n[A] Ladder climbing speed boost ported.\n[A] Crafting table functionality ported.\n[I] Issue: Scoped recipe constants not working yet with the current Forge version (or somehow changed).",
+    "1.0.7-b3": "[A] Initial 1.14.2 port of decorative blocks."
+  },
+  "promos": {
+    "1.14.3-recommended": "",
+    "1.14.3-latest": "1.0.9-b4"
+  }
+}
\ No newline at end of file
diff --git a/1.14/readme.md b/1.14/readme.md
new file mode 100644
index 0000000..9a5756b
--- /dev/null
+++ b/1.14/readme.md
@@ -0,0 +1,59 @@
+
+## Engineer's Decor (MC1.14.3)
+
+Mod sources for Minecraft version 1.14.3.
+
+- Description, credits, and features: Please see the readme in the repository root.
+
+- Compiled mod distribution channel is curseforge: https://www.curseforge.com/minecraft/mc-mods/engineers-decor/files.
+
+----
+## Version history
+
+    - v1.0.9-b4 [E] Experimental: Config skel ported (!not all options have effect yet).
+                [E] Experimental: JEI integration for opt-outs and crafting table ported
+                    (also addresses issue #38).
+
+    - v1.0.9-b3 [F] Additional item drop fixes when blocks are destroyed (issue #39).
+
+    - v1.0.9-b2 [U] Updated to Forge 1.14.3-27.0.25/20190621-1.14.2.
+                [F] Fixed recipe collision of Metal Rung Ladder (issue #37,
+                    thx ProsperCraft for reporting).
+                [F] Fixed opening crafting table, furni, dropper server crash
+                    issue #35 (thx ProsperCraft also here).
+                [F] Fixed missing pole/support item drops (issue #36, ProsperCraft).
+
+    - v1.0.9-b1 [U] Updated to MC1.14.3, Forge 1.14.3-27.0.17/20190621-1.14.2.
+                [A] Added Small Mineral Smelter.
+
+    - v1.0.8-b3 [A] Ported slabs and slab slices from 1.12.2.
+                [A] IE independent ("standalone") recipes ported.
+
+    - v1.0.8-b2 [U] Updated to Forge BETA 1.14.2-26.0.63/20190621-1.14.2,
+                    code adapted to new mappings.
+                [M] Updated 1st/3rd person item model rotations/translations.
+
+    - v1.0.8-b1 [V] Feature set of 1.12 ported.
+                [A] CTRL-SHIFT tooltips ported.
+                [A] Ported stained clinker block/stairs.
+                [M] Updated textures.
+                [I] Issue: Scoped recipe constants still not working.
+
+    - v1.0.7-b5 [U] Updated to Forge BETA 1.14.2-26.0.35/20190608-1.14.2.
+                [A] Factory dropper functionality ported.
+                [A] Small lab furnace functionality ported.
+                [A] Small electrical lab furnace functionality ported.
+                [A] Small waste incinerator functionality ported.
+                [A] Fluid valves, Passive Fluid Accumulator ported.
+                [I] Issue: Scoped recipe constants still not working.
+
+    - v1.0.7-b4 [U] Updated to Forge BETA 1.14.2-26.0.32/20190608-1.14.2.
+                [A] Sitting on the stool ported.
+                [A] Ladder climbing speed boost ported.
+                [A] Crafting table functionality ported.
+                [I] Issue: Scoped recipe constants not working yet with
+                    the current Forge version (or somehow changed).
+
+    - v1.0.7-b3 [A] Initial 1.14.2 port of decorative blocks.
+
+----
diff --git a/1.14/tasks.js b/1.14/tasks.js
new file mode 100644
index 0000000..f0920ad
--- /dev/null
+++ b/1.14/tasks.js
@@ -0,0 +1,45 @@
+#!/usr/bin/djs
+// Note for reviewers/clones: This file is a auxiliary script for my setup. It's not needed to build the mod.
+"use strict";
+const constants = include("../meta/lib/constants.js")();
+const libtask = include("../meta/lib/libtask.js")(constants);
+const liblang = include("../meta/lib/liblang.1.13.js")(constants); // 1.14 lang same as 1.13
+var tasks = {};
+
+tasks["sync-languages"] = function() {
+  liblang.sync_languages();
+};
+
+tasks["create-slab-assets"] = function() {
+  const libassets = include("../meta/lib/libassets.js")(constants);
+  const slab_assets = include("meta/lib/slab_assets.js")(constants, libassets);
+  const block_prefixes = [
+    { name_prefix:"clinker_brick", texture_prefix:"clinker_brick/clinker_brick_texture" },
+    { name_prefix:"clinker_brick_stained", texture_prefix:"clinker_brick/clinker_brick_stained_texture" },
+    { name_prefix:"panzerglass", texture_prefix:"glass/panzerglass_block_texture" },
+    { name_prefix:"rebar_concrete", texture_prefix:"concrete/rebar_concrete_texture" },
+    { name_prefix:"rebar_concrete_tile", texture_prefix:"concrete/rebar_concrete_tile_texture" },
+    { name_prefix:"slag_brick", texture_prefix:"slag_brick/slag_brick_texture" },
+  ];
+  for(var i in block_prefixes) slab_assets.create(block_prefixes[i]);
+}
+
+tasks["create-half-slab-assets"] = function() {
+  const libassets = include("../meta/lib/libassets.js")(constants);
+  const halfslab_assets = include("meta/lib/halfslab_assets.js")(constants, libassets);
+  const modid = constants.mod_registry_name();
+  const block_data = [
+    { name_prefix:"rebar_concrete", texture:modid+":block/concrete/rebar_concrete_texture0" },
+    { name_prefix:"concrete", texture:modid+":block/ieoriginal/ie_stone_decoration_concrete" },
+    { name_prefix:"treated_wood", texture:"immersiveengineering:blocks/treated_wood" },
+    { name_prefix:"sheetmetal_iron", texture:"immersiveengineering:blocks/sheetmetal_iron" },
+    { name_prefix:"sheetmetal_steel", texture:"immersiveengineering:blocks/sheetmetal_steel" },
+    { name_prefix:"sheetmetal_copper", texture:"immersiveengineering:blocks/sheetmetal_copper" },
+    { name_prefix:"sheetmetal_gold", texture:"immersiveengineering:blocks/sheetmetal_gold" },
+    { name_prefix:"sheetmetal_aluminum", texture:"immersiveengineering:blocks/sheetmetal_aluminum" },
+ // { name_prefix:"clinker_brick", texture:modid+":block/clinker_brick/clinker_brick_texture0" }
+  ];
+  for(var i in block_data) halfslab_assets.create(block_data[i]);
+}
+
+libtask.run(tasks, sys.args);
diff --git a/Makefile b/Makefile
index 3c85508..dbbd626 100644
--- a/Makefile
+++ b/Makefile
@@ -6,24 +6,26 @@
 # Note for reviewers/clones: This file is a auxiliary script for my setup.
 # It's not needed to build the mod.
 #
-.PHONY: default init clean clean-all dist sync-main-repo sanatize update-json
-.PHONY: init-1.12 clean-1.12 clean-all-1.12 dist-1.12 sanatize-1.12
-.PHONY: init-1.13 clean-1.13 clean-all-1.13 dist-1.13 sanatize-1.13
+.PHONY: default init clean clean-all mrproper sanatize dist update-json sync-main-repo compare migrate-from-112
 
-default:	;	@echo "(You are not in a MC specific version directory)"
-clean: clean-1.12 clean-1.13
-clean-all: clean-all-1.13
-init: init-1.12 init-1.13
+default:	;	@echo "First change to specific version directory."
+init: default
+dist: default
 
-clean-1.12: 		; -@cd 1.12; make -s clean
-clean-1.13: 		; -@cd 1.13; make -s clean
-clean-all-1.12: ;	-@cd 1.12; make -s clean-all
-clean-all-1.13: ;	-@cd 1.13; make -s clean-all
-init-1.12:			; -@cd 1.12; make -s init
-init-1.13:			; -@cd 1.13; make -s init
-dist-1.12:			; @cd 1.12; make -s dist
-dist-1.13:			; @cd 1.13; make -s dist
-dist:           ; @echo "First change to specific version directory."
+clean:
+	-@cd 1.12; make -s clean
+	-@cd 1.13; make -s clean
+	-@cd 1.14; make -s clean
+
+clean-all:
+	-@cd 1.12; make -s clean-all
+	-@cd 1.13; make -s clean-all
+	-@cd 1.14; make -s clean-all
+
+mrproper:
+	-@cd 1.12; make -s mrproper
+	-@cd 1.13; make -s mrproper
+	-@cd 1.14; make -s mrproper
 
 update-json:
 	@echo "[main] Update update.json ..."
@@ -32,8 +34,17 @@ update-json:
 sanatize:
 	@cd 1.12; make -s sanatize
 	@cd 1.13; make -s sanatize
+	@cd 1.14; make -s sanatize
 	@make -s update-json
 
+compare:
+	@djs tasks.js compare-blockstates -v
+	@djs tasks.js compare-textures -v
+
+migrate-from-112:
+	@cd 1.12; make -s port-languages
+	@djs tasks.js migrate-textures -v
+
 # For reviewers: I am using a local repository for experimental changes,
 # this target copies the local working tree to the location of the
 # repository that you cloned.
diff --git a/meta/lib/constants.js b/meta/lib/constants.js
new file mode 100644
index 0000000..8ac4431
--- /dev/null
+++ b/meta/lib/constants.js
@@ -0,0 +1,20 @@
+"use strict";
+(function(){
+  var c = {};
+  c.mod_registry_name = function() { return "engineersdecor" }
+  c.local_assets_root = function() { return "src/main/resources/assets/" + c.mod_registry_name(); }
+  c.reference_repository = function() { return "git@github.com:stfwi/engineers-decor.git"; }
+  c.gradle_property_modversion = function() { return "version_engineersdecor"; }
+  c.gradle_property_version_minecraft = function() { return "version_minecraft"; }
+  c.gradle_property_version_forge = function() { return "version_forge"; }
+  c.project_download_inet_page = function() { return "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/"; }
+  c.languages = {
+    "en_us": { code:"en_us", name:"English", region:"United States" },
+    "de_de": { code:"de_de", name:"German", region:"Germany" },
+    "ru_ru": { code:"ru_ru", name:"Russian", region:"Russia" },
+    "zh_cn": { code:"zh_cn", name:"Chinese", region:"China" }
+  }
+  Object.freeze(c.languages);
+  Object.freeze(c);
+  return c;
+});
diff --git a/meta/lib/libassets.js b/meta/lib/libassets.js
new file mode 100644
index 0000000..3563a9a
--- /dev/null
+++ b/meta/lib/libassets.js
@@ -0,0 +1,127 @@
+"use strict";
+(function(constants){
+  var me = {};
+
+
+  /**
+   * Determines a list of all textures in the given path as plain object,
+   * where the keys are the unified texture path (e.g. "block/", not "blocks/"),
+   * and the value an object containing file path, SHA1, size, etc.
+   * @returns {object}
+   */
+  me.load_texture_data = function(textures_path) {
+    const wd = fs.cwd();
+    var data = {};
+    try {
+      if(!fs.chdir(textures_path)) throw new Error("Texture root path does not exist: '" + textures_path + "'");
+      fs.find(".", '*.*', function(path) {
+        const file = path.replace(/[\\]/g, "/").replace(/^\.\//,"");
+        const unified_file = file.replace(/^blocks\//, "block/");
+        data[unified_file] = { path:file, size:fs.size(file), sha:sys.hash.sha1(path, true) };
+        return false;
+      });
+      return data;
+    } finally {
+      fs.chdir(wd);
+    }
+  }
+
+  /**
+   * Compares texture files and mcdata files two given assets paths, returns the
+   * lists of both file trees and the differences as object.
+   * @returns {object}
+   */
+  me.compare_textures = function(assets_path_a, assets_path_b) {
+    const txpath_a = assets_path_a + "/" + constants.mod_registry_name() + "/textures";
+    const txpath_b = assets_path_b + "/" + constants.mod_registry_name() + "/textures";
+    const a = me.load_texture_data(txpath_a);
+    const b = me.load_texture_data(txpath_b);
+    const txpath_a_is112 = fs.isdir(txpath_a + "/blocks");
+    const txpath_b_is112 = fs.isdir(txpath_b + "/blocks");
+    const cmp = {a:{},b:{}};
+    cmp.a.path = txpath_a;
+    cmp.b.path = txpath_b;
+    cmp.a.is112 = txpath_a_is112;
+    cmp.b.is112 = txpath_b_is112;
+    cmp.a.files = Object.assign({},a);
+    cmp.b.files = Object.assign({},b);
+    cmp.match = {}
+    cmp.differ = {}
+    cmp.onlyin_a = {}
+    cmp.onlyin_b = {}
+    for(var key in a) {
+      if(b[key] === undefined) {
+        cmp.onlyin_a[key] = a[key];
+        continue;
+      }
+      if(a[key].sha === b[key].sha) {
+        cmp.match[key] = a[key];
+        b[key]=undefined; delete b[key];
+      } else {
+        cmp.differ[key] = { a:a[key], b:b[key] };
+        b[key]=undefined; delete b[key];
+      }
+    }
+    a = undefined;
+    for(var key in b) {
+      cmp.onlyin_b[key] = b[key];
+    }
+    b = undefined;
+    return cmp;
+  };
+
+  /**
+   * Loads all blockstate files in the given assets path, and returns the parsed JSON
+   * data as plain object, where the keys are the blockstate names, and the value the
+   * parsed JSON files.
+   * @returns {object}
+   */
+  me.load_blockstates = function(assets_path) {
+    const wd = fs.cwd();
+    var data = {};
+    try {
+      if(!fs.chdir(assets_path+"/blockstates")) throw new Error("blockstates path not found in: '" + assets_path + "'");
+      fs.find(".", '*.json', function(path) {
+        const file = path.replace(/[\\]/g, "/").replace(/^\.\//,"");
+        if(fs.basename(file) != fs.basename(file).toLowerCase()) throw new Error("Blockstate file must be lowercase: '"+file+"'"); // hard fail
+        const blockstate_name = fs.basename(file).replace(/[\.]json/i, "");
+        if(blockstate_name.search(/[^a-z0-9_]/) >= 0) throw new Error("Blockstate file name contains invalid characters: '"+file+"'"); // here, too
+        var json = fs.readfile(path);
+        if(json===undefined) throw new Error("Failed to read blockstate file '"+file+"' (could not open file)");
+        try { json=JSON.parse(json); } catch(ex) { throw new Error("Failed to parse blockstate file '"+file+"' (invalid JSON)"); }
+        data[blockstate_name] = {file:(assets_path+"/blockstates/"+file), data:json};
+        return false;
+      });
+      return data;
+    } finally {
+      fs.chdir(wd);
+    }
+  };
+
+  me.compare_blockstates = function(assets_path_a, assets_path_b) {
+    const a = me.load_blockstates(assets_path_a);
+    const b = me.load_blockstates(assets_path_b);
+    const onlyin_a = {};
+    const onlyin_b = {};
+    for(var key in a) {
+      if(b[key] === undefined) {
+        onlyin_a[key] = a[key];
+        continue;
+      } else {
+        b[key]=undefined; delete b[key];
+      }
+    }
+    a = undefined;
+    for(var key in b) {
+      onlyin_b[key] = b[key];
+    }
+    b = undefined;
+    return {
+      onlyin_a: onlyin_a,
+      onlyin_b: onlyin_b,
+    }
+  };
+
+  Object.freeze(me);
+  return me;
+});
\ No newline at end of file
diff --git a/meta/lib/liblang.1.12.js b/meta/lib/liblang.1.12.js
new file mode 100644
index 0000000..7c3e658
--- /dev/null
+++ b/meta/lib/liblang.1.12.js
@@ -0,0 +1,205 @@
+"use strict";
+(function(constants){
+  var me = {};
+
+  /**
+   * Loads the raw data of the lang file.
+   * @returns {object}
+   */
+  me.load_raw = function(file_path, remove_comments) {
+    const lang_code = fs.basename(file_path).replace(/\..*$/,"").trim().toLowerCase();
+    var lines = fs.readfile(file_path).trim().split("\n");
+    var was_eol_escape = false;
+    for(var i in lines) {
+      if(was_eol_escape) {
+        var k=0;
+        for(k=i-1; k>=0; --k) {
+          if(lines[k] != null) {
+            lines[k] += "\n" + lines[i];
+            break;
+          }
+        }
+        was_eol_escape = lines[i].match(/[^\\][\\]$/) != null;
+        lines[i] = null;
+      } else {
+        lines[i] = lines[i].trim();
+        was_eol_escape = lines[i].match(/[^\\][\\]$/) != null;
+      }
+    }
+    lines = lines.filter(function(l){return (l!==null)});
+    if(!!remove_comments) lines = lines.filter(function(l){return (l.trim().search(/^#/)!=0)});
+    return { code:lang_code, data:lines };
+  }
+
+  /**
+   * Loads a language into a unified object format
+   */
+  me.load = function(file_path) {
+    const modid = constants.mod_registry_name();
+    const data = {
+      creative_tab: "",
+      config_title: "",
+      blocks: {},
+      items: {},
+      other: {},
+      lang: {},
+      invalid: {}
+    };
+    var lines = me.load_raw(file_path, true).data.map(function(line){return line.replace(/[\s]*[\\][\r]?[\n][\s]*/mig, " ").trim()});
+    for(var i in lines) {
+      if(!lines[i].length) continue;
+      const kv = lines[i].split("=", 2);
+      if(kv.length!=2) throw new Error("Invalid line in '"+file_path+"': '"+lines[i]+"'");
+      const key = kv[0].trim();
+      const text = kv[1].trim();
+      if(key.length == 0) {
+        throw new Error("Empty key in '"+file_path+"' line '" + lines[i] + "'");
+      } else if(key.search("tile."+modid+".")==0) {
+        key = key.replace("tile."+modid+".", "");
+        key = key.split(".", 2);
+        const block = key[0];
+        const prop = key[1];
+        if(data.blocks[block]===undefined) data.blocks[block] = {};
+        data.blocks[block][prop] = text;
+      } else if(key.search("item."+modid+".")==0) {
+        key = key.replace("item."+modid+".", "");
+        key = key.split(".", 2);
+        const item = key[0];
+        const prop = key[1];
+        if(data.items[item]===undefined) data.blocks[item] = {};
+        data.blocks[item][prop] = text;
+      } else if(key.search(modid + ".config.title")==0) {
+        data.config_title = text;
+      } else if(key.search("itemGroup.tab" + modid)==0) {
+        data.creative_tab = text;
+      } else if(key.search(modid + ".")==0) {
+        data.other[key] = text;
+      } else {
+        data.invalid[key] = text;
+      }
+    }
+    const lang_code = fs.basename(file_path).replace(/[\.].*$/, "").trim().toLowerCase();
+    if(constants.languages[lang_code] === undefined) throw new Error("No language header constants defined for '" + lang_code + "'");
+    data.lang = constants.languages[lang_code];
+    return data;
+  }
+
+  /**
+   * Saves a language in the version specific MC format from
+   * a unified object format.
+   */
+  me.save = function(file_path, lang_data) {
+    throw new Error("lang.save() not implemented yet for 1.12 lang files.");
+  }
+
+  /**
+   * Adds missing entries to the language file, master is en_us.
+   * Applies to the CWD and 1.12.2 lang files.
+   * @returns {void}
+   */
+  me.sync_languages = function(reflang_code) {
+    if(reflang_code===undefined) reflang_code = "en_us";
+    reflang_code = reflang_code.trim().toLowerCase();
+    function load() {
+      var lang_data = {};
+      fs.find("./src/main/resources/assets/"+ constants.mod_registry_name() +"/lang", '*.lang', function(f){
+        const r = me.load_raw(f);
+        lang_data[r.code] = r.data;
+        return false;
+      });
+      return lang_data;
+    }
+    function reference_content(lang_data, reflang_code) {
+      var lang_lines = [];
+      for(var i in lang_data[reflang_code]) {
+        var txt = lang_data[reflang_code][i].trim();
+        if((txt.search(/^#/)>=0) || (txt.search("=")<0)) { lang_lines.push(txt); continue; }; // comment "#" or empty line in the ref lang file
+        var kv = txt.split("=", 2);
+        var key = kv[0].trim();
+        var val = kv[1].trim();
+        var o = {key:key, tr:{}};
+        o.tr[reflang_code] = val;
+        lang_lines.push(o);
+      }
+      delete lang_data[reflang_code];
+      return lang_lines;
+    }
+    function add_language(lang_lines, lang_name, lang_data) {
+      const find_line = function(lines, key) {
+        for(var i in lines) {
+          if((typeof(lines[i]) !== "object")) continue;
+          if(lines[i].key.toLowerCase()==key.toLowerCase()) return i;
+        }
+        return -1;
+      };
+      for(var i in lang_data) {
+        var txt = lang_data[i].trim();
+        if(txt.search(/^#/)>=0) continue;
+        if(txt.search("=")<0) continue;
+        var kv = txt.split("=", 2);
+        var key = kv[0].trim();
+        var val = kv[1].trim();
+        var line_i = find_line(lang_lines, key);
+        if(line_i >= 0) {
+          lang_data[i] = undefined;
+          lang_lines[line_i].tr[lang_name] = val;
+        }
+      }
+      return lang_data;
+    }
+
+    function complete_lang_lines(lang_lines, lang_names, reflang_code) {
+      var lang_outputs = {};
+      for(var i in lang_names) lang_outputs[lang_names[i]] = [];
+      for(var i_line in lang_lines) {
+        var entry = lang_lines[i_line];
+        if(typeof(entry) !== "object") {
+          for(var i in lang_names) lang_outputs[lang_names[i]].push(entry);
+        } else {
+          for(var i in lang_names) {
+            var name = lang_names[i];
+            if(entry.tr[name] !== undefined) {
+              lang_outputs[name].push(entry.key + "=" + entry.tr[name]);
+            } else {
+              var added = entry.key + "=" + entry.tr[reflang_code];
+              if((entry.key.search(/\.tip$/)>0) || (entry.key.search(/\.help$/)>0)) added = "#" + added;
+              lang_outputs[name].push(added);
+              if(added.search(/^#/)<0) print("[warn] Lang: Added default language for missing entry in " + name + ": '" + added + "'");
+            }
+          }
+        }
+      }
+      return lang_outputs;
+    }
+
+    var lang_data = load();
+    var lang_names = Object.keys(lang_data);
+    var lang_lines = reference_content(lang_data, reflang_code);
+    for(var lang_name in lang_data) {
+      lang_data[lang_name] = add_language(lang_lines, lang_name, lang_data[lang_name]);
+      lang_data[lang_name] = lang_data[lang_name].filter(function(l){ return !!l; });
+      if(lang_data[lang_name].length == 0) delete lang_data[lang_name];
+    }
+    var output_data = complete_lang_lines(lang_lines, lang_names, reflang_code);
+    for(var i in output_data) output_data[i] = output_data[i].join("\n") + "\n\n";
+
+    // Remaining lines in lang files (not in the reference lang file)
+    for(var lang_name in lang_data) {
+      for(var i in lang_data[lang_name]) {
+        if(lang_data[lang_name][i].search(/^#/)<0) {
+          var added = "# " + lang_data[lang_name][i].replace(/^[#\s]+/,"");
+          output_data[lang_name] += added + "\n";
+          print("[warn] Lang: Commented out unknown key in " + lang_name + ": '" + added + "'");
+        }
+      }
+    }
+    for(var name in output_data) output_data[name] = output_data[name].trim() + "\n";
+
+    for(var name in output_data) {
+      fs.writefile("./src/main/resources/assets/engineersdecor/lang/" + name + ".lang", output_data[name]);
+    }
+  };
+
+  Object.freeze(me);
+  return me;
+});
\ No newline at end of file
diff --git a/meta/lib/liblang.1.13.js b/meta/lib/liblang.1.13.js
new file mode 100644
index 0000000..0804d52
--- /dev/null
+++ b/meta/lib/liblang.1.13.js
@@ -0,0 +1,122 @@
+"use strict";
+(function(constants){
+  var me = {};
+
+  /**
+   * Loads the raw data of the lang file.
+   * @returns {object}
+   */
+  me.load_raw = function(file_path) {
+    const lang_code = fs.basename(file_path).replace(/\..*$/,"").trim().toLowerCase();
+    const data = JSON.parse(fs.readfile(file_path).trim());
+    return { code:lang_code, data:data };
+  }
+
+  /**
+   * Loads
+   */
+  me.load = function(file_path) {
+    const modid = constants.mod_registry_name();
+    const data = {
+      creative_tab: "",
+      config_title: "",
+      blocks: {},
+      items: {},
+      other: {},
+      lang: {},
+      invalid: {}
+    };
+    var lines = me.load_raw(file_path).data;
+    for(var objkey in lines) {
+      const key = objkey.trim();
+      const text = lines[objkey].trim();
+      if(key.length == 0) {
+        throw new Error("Empty key in '"+file_path+"' line '" + lines[i] + "'");
+      } else if(key.search("block."+modid+".")==0) {
+        key = key.replace("block."+modid+".", "");
+        key = key.split(".", 2);
+        const block = key[0];
+        const prop = ((key.length<2) || (key[1]=="")) ? "name" : key[1];
+        if(data.blocks[block]===undefined) data.blocks[block] = {};
+        data.blocks[block][prop] = text;
+      } else if(key.search("item."+modid+".")==0) {
+        key = key.replace("item."+modid+".", "");
+        key = key.split(".", 2);
+        const item = key[0];
+        const prop = ((key.length<2) || (key[1]=="")) ? "name" : key[1];
+        if(data.items[item]===undefined) data.blocks[item] = {};
+        data.blocks[item][prop] = text;
+      } else if(key.search(modid + ".config.title")==0) {
+        data.config_title = text;
+      } else if(key.search("itemGroup.tab" + modid)==0) {
+        data.creative_tab = text;
+      } else if(key.search(modid + ".")==0) {
+        data.other[key] = text;
+      } else if(key.search("language")==0) {
+        key = key.replace("language", "");
+        key = key.split(".", 2);
+        const prop = ((key.length<2) || (key[1]=="")) ? "name" : key[1];
+        data.lang[prop] = text;
+      } else {
+        data.invalid[key] = text;
+      }
+    }
+    return data;
+  }
+
+  /**
+   * Saves a language in the version specific MC format from
+   * a unified object format.
+   */
+  me.save = function(file_path, data) {
+    if(Object.keys(data.invalid).length > 0) throw new Error("Given language data have entries in the marked-invalid data, fix this first.");
+    const modid = constants.mod_registry_name();
+    var out = {};
+    out["language"] = data.lang.name;
+    out["language.code"] = data.lang.code;
+    out["language.region"] = data.lang.region;
+    out["itemGroup.tab" + modid] = data.creative_tab;
+    out[modid+".config.title"] = data.config_title;
+    for(var it in data.other) {
+      out[it] = data.other[it];
+    }
+    for(var blkname in data.blocks) {
+      var blk = data.blocks[blkname];
+      for(var key in blk) {
+        if(key=="name") {
+          out["block."+modid+"."+blkname] = blk[key];
+        } else {
+          out["block."+modid+"."+blkname+"."+key] = blk[key];
+        }
+      }
+    }
+    for(var itemname in data.items) {
+      var item = data.items[itemname];
+      for(var key in item) {
+        if(key=="name") {
+          out["item."+modid+"."+itemname] = item[key];
+        } else {
+          out["item."+modid+"."+itemname+"."+key] = item[key];
+        }
+      }
+    }
+    var txt = JSON.stringify(out,null,1);
+    var file_lang_code = fs.basename(file_path).replace(/\.json/,"");
+    const filename = fs.basename(file_path);
+    if(filename.toLowerCase() != filename) throw new Error("Language files must be completely lowercase.");
+    if(file_lang_code != data.lang.code) throw new Error("File name to save does not contain the language code of the given data.");
+    if(filename.search("\.json$") <= 0) throw new Error("File name to save must be a json file (lowercase).");
+    if(!fs.isdir(fs.dirname(file_path))) throw new Error("File to save: Parent directory does not exist.");
+    fs.writefile(file_path, txt);
+  }
+
+  /**
+   * Adds missing entries to the language file, master is en_us.
+   * Applies to the CWD and 1.12.2 lang files.
+   * @returns {void}
+   */
+  me.sync_languages = function(reflang_code) {};
+
+  Object.freeze(me);
+  return me;
+});
\ No newline at end of file
diff --git a/meta/lib/libtask.js b/meta/lib/libtask.js
new file mode 100644
index 0000000..ee7c87d
--- /dev/null
+++ b/meta/lib/libtask.js
@@ -0,0 +1,383 @@
+#!/usr/bin/djs
+// Note for reviewers/clones: This file is a auxiliary script for my setup. It's not needed to build the mod.
+"use strict";
+
+(function(constants){
+  const me = {'tasks':{}, 'parsing':{},'sanatizing':{}};
+
+  /**
+   * Returns the version history as full text from a given file path.
+   * @returns {string}
+   */
+  me.parsing.readme_history_section = function (file_path) {
+    var readme = fs.readfile(file_path);
+    if(!readme) throw new Error("Failed to load readme.md");
+    readme = readme.split(/[\r]?[\n]/);
+    while((readme.length > 0) && readme[0].search(/^## Version history/i)<0) readme.shift();
+    while((readme.length > 0) && readme[0].trim()=="") readme.shift();
+    // version history section
+    if(!readme.length) throw new Error("Version history section not found in readme");
+    readme.shift();
+    var end_of_history = readme.length;
+    for(var i=0; i= 0) { end_of_history=i; break; }
+    if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker.");
+    // remove empty lines, splitters
+    while(readme.length >= end_of_history) readme.pop();
+    while((readme.length >0) && (readme[readme.length-1].replace(/[\s-]/g,"")=="")) readme.pop();
+    const min_indent = readme
+      .map(function(s){return s.search(/[^\s]/)})
+      .filter(function(e){return e>=0})
+      .reduce(function(acc,e){return (e 1) {
+      for(var i in readme) { readme[i] = readme[i].substr(min_indent-2); }
+    }
+    return readme.join("\n");
+  }
+
+  /**
+   * Returns the version history as array of version-text pairs from a given file path.
+   * @returns {array}
+   */
+  me.parsing.readme_changelog = function(file_path) {
+    var readme = me.parsing.readme_history_section(file_path).split(/[\r]?[\n]/);
+    var versions = [];
+    var ver="", txt=[];
+    const addversion = function(){
+      if((ver.length == 0) && (txt.length == 0)) return;
+      if((ver.length > 0) != (txt.length > 0)) throw new Error("Version entry with empty corresponding text.");
+      for(var i in txt) txt[i] = txt[i].trim();
+      for(var i=txt.length-1; i>0; --i) {
+        if((txt[i].length == 0) || (txt[i][0] == '[')) continue;
+        txt[i-1] += " " + txt[i];
+        txt[i] = "";
+      }
+      txt = txt.filter(function(v){return v.length>0;});
+      for(var i in txt) txt[i] = txt[i].replace(/[\s]+/, " ");
+      versions.push({ver:ver,txt:txt});
+    };
+    for(var il in readme) {
+      var line = readme[il];
+      if(line.replace(/[\s-]+/, "").length == 0) {
+        continue; // separator line
+      } if(line.search(/^[\s]*[~-][\s]*v[\d]+[\.][\d]+[\.][\d]/) == 0) {
+        addversion();
+        var is_preversion = (line.search(/^[\s]*[~]/) == 0);
+        ver = line.replace(/^[\s]*[~-][\s]*/,"").replace(/[\s].*$/,"").toLowerCase();
+        txt = [line.replace(ver, " ".repeat(ver.length)).replace(/^[\s]*[~-]/, function(m){ return " ".repeat(m.length); })];
+        if(is_preversion) ver = "~" + ver;
+      } else {
+        txt.push(line);
+      }
+    }
+    addversion();
+    return versions;
+  };
+
+  /**
+   * Returns the versions known from the readme
+   * @returns {array}
+   */
+  me.parsing.readme_versions = function(file_path, no_pre_versions) {
+    var o = me.parsing.readme_changelog(file_path);
+    var versions = [];
+    for(var i in o) versions.push(o[i].ver);
+    if(!no_pre_versions) return versions;
+    versions = versions.filter(function(v){ return v[0]!="~"; });
+    return versions;
+  }
+
+  /**
+   * Returns the gradle.properties settings as key-value plain object.
+   * @returns {object}
+   */
+  me.parsing.gradle_properties = function(file_path) {
+    var lines = fs.readfile(file_path).split(/[\r]?[\n]/);
+    var properties = {};
+    for(var i in lines) {
+      var line = lines[i].trim();
+      if(line.search("#")==0) continue;
+      if(line.search("//")>=0) { line=line.substr(0, line.search("//")).trim(); }
+      if(line.search(/^[a-z][a-z0-9_\.]+[=]/i) < 0) continue;
+      line = line.split("=", 2);
+      properties[line[0].trim()] = line[1].trim();
+    }
+    return properties;
+  }
+
+  /**
+   * Changes one tab to two spaces in files with the given extension
+   * recursively found in the current working directory.
+   * @returns {void}
+   */
+  me.sanatizing.tabs_to_spaces = function(extensions) {
+    var file_list = (function() {
+      var ls = [];
+      const ext = extensions;
+      for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i]));
+      for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/");
+      ls.sort();
+      ls.push("readme.md");
+      return ls;
+    })();
+    for(var file_i in file_list) {
+      var file = file_list[file_i];
+      var txt = fs.readfile(file);
+      if(txt===undefined) throw new Error("Failed to read '" + file + "'");
+      const txt_length = txt.length;
+      txt = txt.replace(/[\t]/g,"  ");
+      const n = txt.length - txt_length;
+      if(n > 0) {
+        print("File '" + file + "': Changed " + n + " tabs to 2 spaces." );
+        fs.writefile(file, txt);
+      }
+    }
+  };
+
+  /**
+   * Removes space characters at the end of lines in files with the given
+   * extension recursively found in the current working directory.
+   * @returns {void}
+   */
+  me.sanatizing.remove_trailing_whitespaces = function(extensions) {
+    var file_list = (function() {
+      var ls = [];
+      const ext = extensions;
+      for(var i in ext) ls = ls.concat(fs.find("./src", '*.'+ext[i]));
+      for(var i in ls) ls[i] = ls[i].replace(/\\/g,"/");
+      ls.sort();
+      ls.push("readme.md");
+      return ls;
+    })();
+    for(var file_i in file_list) {
+      var file = file_list[file_i];
+      var txt = fs.readfile(file);
+      if(txt===undefined) throw new Error("Failed to read '" + file + "'");
+      const txt_length = txt.length;
+      txt = txt.replace(/[\r\t ]+[\n]/g,"\n");
+      const n = txt_length - txt.length;
+      if(n > 0) {
+        print("File '" + file + "': Fixed " + n + " lines with trailing whitespaces." );
+        fs.writefile(file, txt);
+      }
+    }
+  };
+
+  /**
+   * Checks the versions specified in the gradle.properties against
+   * the last readme.md changelog version. Applies to the CWD.
+   * @returns {object}
+   */
+  me.tasks.version_check = function(allow_preversions) {
+    var fails = [];
+    const properties = me.parsing.gradle_properties("gradle.properties");
+    const version_minecraft = properties[constants.gradle_property_version_minecraft()];
+    const version_forge = properties[constants.gradle_property_version_forge()];
+    const version_mod = properties[constants.gradle_property_modversion()];
+    const combined_version = version_minecraft + "-" + version_mod;
+    const readme_versions = me.parsing.readme_versions("readme.md").map(function(v){return v.replace(/^[v]/i, "").trim()});
+    const readme_preversion_found = (readme_versions.filter(function(v){return v==("~v"+version_mod)}).length == 1);
+    var readme_version_found = readme_versions.filter(function(v){return v==version_mod}).length == 1;
+    if(allow_preversions && readme_preversion_found) readme_version_found = true;
+    if(!readme_version_found) fails.push("Version 'v" + version_mod + "' not found in the readme changelog.");
+    return {
+      fails: fails,
+      version_mod: version_mod,
+      combined_version: combined_version,
+      version_forge: version_forge,
+      preversion_found: readme_preversion_found
+    }
+  };
+
+  /**
+   * Distribution JAR pre-checks.
+   * @returns {array}
+   */
+  me.tasks.dist_check = function() {
+    const uncommitted_changes = sys.shell("git status -s").trim();
+    const gittags = sys.shell('git log -1 --format="%D"')
+                    .replace(/[\s]/g,"").split(",")
+                    .filter(function(s){ return s.indexOf("tag:")==0;})
+                    .map(function(s){ return s.replace(/^tag:/,"");});
+    const modversion = fs.readfile("gradle.properties", function(line){
+      if(line.trim().indexOf(constants.gradle_property_modversion())!=0) return false;
+      return line.replace(/^.*?=/,"").trim()
+    }).trim();
+    const git_remote = sys.shell("git remote -v").trim();
+    const git_branch = sys.shell("git rev-parse --abbrev-ref HEAD").trim();
+    const git_diff = sys.shell("git diff .").trim();
+    var fails = [];
+    if(modversion=="") fails.push("Could not determine '"+ constants.gradle_property_modversion() +"' from gradle properties.");
+    if(!gittags.length) fails.push("Version not tagged.");
+    if(!gittags.filter(function(s){return s.indexOf(modversion.replace(/[-]/g,""))>=0}).length) fails.push("No tag version not found matching the gradle properties version.");
+    if(git_remote.replace(/[\s]/g,"").indexOf(constants.reference_repository() + "(push)") < 0) fails.push("Not the reference repository.");
+    if((git_branch != "develop") && (git_branch != "master")) {
+      fails.push("No valid branch for dist. (branch:'"+git_branch+"')");
+    } else if((git_branch == "develop") && (modversion.replace(/[^ab]/g,"")=="")) {
+      fails.push("Cannot make release dist on develop branch.");
+    } else if((git_branch == "master") && (modversion.replace(/[^ab]/g,"")!="")) {
+      fails.push("Cannot make beta dist on master branch.");
+    }
+    if(git_diff !== "") fails.push("Not everything committed to the GIT repository.");
+    // if((!fs.isfile("signing.jks")) || (!fs.isfile("signing.properties"))) fails.push("Jar signing files missing.");
+    return fails;
+  };
+
+  /**
+   * Returns a version check object for the given MC version.
+   */
+  me.tasks.changelog_data = function(mc_version) {
+    if(mc_version===undefined) throw new Error("No MC version given for generating an update JSON.");
+    mc_version = (""+mc_version).trim();
+    function read_history() {
+      var readme = fs.readfile(fs.cwd() + "/readme.md");
+      if(!readme) throw new Error("Failed to load readme.md");
+      readme = readme.split(/[\r]?[\n]/);
+      while((readme.length > 0) && readme[0].search(/^## Version history/i)<0) readme.shift();
+      // version history section
+      if(!readme.length) throw new Error("Version history section not found in readme");
+      readme.shift();
+      var end_of_history = readme.length;
+      for(var i=0; i= 0) { end_of_history=i; break; }
+      if(end_of_history >= readme.length) throw new Error("Could not find the end-of-history header marker.");
+      // remove empty lines, splitters
+      while(readme.length >= end_of_history) readme.pop();
+      for(var i in readme) readme[i] = readme[i].replace(/[\s]+$/g,"").replace(/[\t]/g,"  ");
+      readme = readme.filter(function(a){return a.replace(/[\s-]+/g,"")!="";});
+      // condense multilines to single line entries for each fix or feature. ([A] ... [M] ...)
+      for(var i=readme.length-1; i>0; --i) {
+        var line = readme[i].replace(/^\s+/,"");
+        if(line.search(/^[\[\-]/) < 0) {
+          readme[i-1] += " " + line;
+          readme[i] = "";
+        }
+      }
+      readme = readme.filter(function(a){return a!="";});
+      // Condense log entries sepatated with newlines to one line for each version
+      for(var i=readme.length-1; i>0; --i) {
+        var line = readme[i].replace(/^\s+/,"");
+        if(line.search(/^[-~]/) < 0) {
+          readme[i-1] += "\n" + line;
+          readme[i] = "";
+        }
+      }
+      readme = readme.filter(function(a){return a!="";});
+      // Separate versions.
+      var history = {};
+      for(var i in readme) {
+        var line = readme[i].replace(/^[\sv-]+/g,"").trim();
+        var ver = line.substr(0, line.search(" ")).trim().toLowerCase();
+        var txt = line.substr(line.search(" ")).trim();
+        if(ver.search("~")===0) continue;
+        if(history[ver] !== undefined) throw new Error("Double definition of version '" + ver + "' in the readme version history.");
+        history[ver] = txt;
+      }
+      return history;
+    }
+    var history = read_history();
+    var latest_release = "";
+    var latest_beta = "";
+    for(var ver in history) { latest_beta=ver; break; }
+    for(var ver in history) if(ver.search(/(rc|b|a)/) < 0) { latest_release=ver; break; }
+    var update_json = {}
+    update_json["homepage"] = constants.project_download_inet_page();
+    update_json[mc_version] = history;
+    update_json["promos"] = {};
+    update_json["promos"][""+mc_version+"-recommended"] = latest_release;
+    update_json["promos"][""+mc_version+"-latest"] = latest_beta;
+    return update_json;
+  };
+
+  // Standard tasks
+  var stdtasks = {};
+
+  stdtasks["dist-check"] = function() {
+    var fails = me.tasks.dist_check();
+    if(fails.length == 0) return;
+    for(var i in fails) fails[i] = "  - " + fails[i];
+    alert("Dist check failed");
+    alert(fails.join("\n")+"\n");
+    exit(1);
+  };
+  stdtasks["version-check"] = function(args) {
+    var r = me.tasks.version_check(!args.join().search("--no-preversions")>=0);
+    if(r.fails.length == 0) return;
+    for(var i in r.fails) r.fails[i] = "  - " + r.fails[i];
+    alert("Version data:");
+    alert(" - version_mod       : '" + r.version_mod + "'");
+    alert(" - combined_version  : '" + r.combined_version + "'");
+    alert(" - version_forge     : '" + r.version_forge + "'");
+    if(!!r.preversion_found) alert(" - PREVERSION FOUND  : '~" + r.version_mod + "'");
+    exit(1);
+  };
+  stdtasks["version-html"] = function() {
+    if(!fs.isdir("dist")) throw new Error("'dist' directory does not exist.");
+    const hist = me.parsing.readme_history_section("readme.md");
+    const html = "
\n" + (hist.replace(/&/g, "&").replace(/>/g, ">").replace(/";
+    fs.writefile("dist/revision-history.html", html);
+  };
+  stdtasks["tabs-to-spaces"] = function() {
+    me.sanatizing.tabs_to_spaces(['java','lang']);
+  };
+  stdtasks["trailing-whitespaces"] = function() {
+    me.sanatizing.remove_trailing_whitespaces(['java','json','lang']);
+  };
+  stdtasks["sanatize"] = function() {
+    stdtasks["trailing-whitespaces"]();
+    stdtasks["tabs-to-spaces"]();
+  }
+  stdtasks["dist"] = function() {
+    stdtasks["version-html"]();
+  };
+  stdtasks["update-json"] = function() {
+    const version_minecraft = me.parsing.gradle_properties("gradle.properties").version_minecraft;
+    const json = me.tasks.changelog_data(version_minecraft);
+    fs.mkdir("./meta");
+    fs.writefile("./meta/update.json", JSON.stringify(json, null, 2));
+  };
+
+  stdtasks["dump-languages"] = function() {
+    const lang_version = (me.parsing.gradle_properties("gradle.properties").version_minecraft.search("1.12.")==0) ? "1.12" : "1.13";
+    const lang_extension = (lang_version == "1.12") ? ("lang") : ("json");
+    const liblang = include("../meta/lib/liblang."+lang_version+".js")(constants);
+    var lang_files = {};
+    fs.find("./src/main/resources/assets/"+ constants.mod_registry_name() +"/lang", '*.'+lang_extension, function(f){
+      const code = fs.basename(f).replace(/[\.].*$/,"").trim();
+      const data = liblang.load(f);
+      lang_files[code] = data;
+      return false;
+    });
+    print(JSON.stringify(lang_files,null,1));
+  };
+
+
+  /**
+   * Task main
+   */
+  me.run = function(tasks, args, no_std_tasks, rel_root_path) {
+    if(rel_root_path===undefined) rel_root_path = "..";
+    if(!fs.chdir(fs.dirname(fs.realpath(sys.script)))) throw new Error("Failed to switch to mod source directory.");
+    if(!fs.isdir(rel_root_path+"/.git")) throw new Error("Missing git repository in parent directory of mod source.");
+    if(!no_std_tasks) {
+      for(var key in stdtasks) {
+        if(tasks[key]===undefined) tasks[key] = stdtasks[key];
+      }
+    }
+    const task_name = args[0];
+    var task_args = args.slice(1).map(function(v){return(v===undefined)?(""):(""+v).trim()}).filter(function(v){return(v.length>0)});
+    if(task_name===undefined) {
+      alert("No task specified.");
+      exit(1);
+    } else if((tasks[task_name])===undefined) {
+      alert("No task '" + task_name + "' defined.");
+      exit(1);
+    } else {
+      tasks[task_name](task_args);
+    }
+  };
+
+  // Module include return value
+  Object.freeze(me.parsing);
+  Object.freeze(me.tasks);
+  Object.freeze(me);
+  return me;
+});
diff --git a/meta/update.json b/meta/update.json
index 9b4248b..16d3de6 100644
--- a/meta/update.json
+++ b/meta/update.json
@@ -1,6 +1,10 @@
 {
   "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
   "1.12.2": {
+    "1.0.9": "[R] Release based on v1.0.9-b3. Release-to-release changes: * Slabs for clinker, concrete, slag bricks. * Slab slices for sheet metals, treated wood, and concretes. * Language updates. * Block hardness adaptions. * 1st/3rd person item model fixes. * Furnace initialisation issue fixed.",
+    "1.0.9-b3": "[A] Added missing recipes for slabs.\n[A] Added slab slices for IE sheet metals, treated wood, and concretes (stackable \"quater-slabs\").\n[M] Updated 1st/3rd person item model rotations/translations.\n[M] Hardness of valves and furni slightly increased.",
+    "1.0.9-b2": "[A] Added slabs for Clinker Brick, Slag Brick, Rebar Concrete, and Stained Clinker. Texture variations like the base blocks. Allow fast pick-up (see tooltip help or config).\n[F] Fixed lab/electrical furnace initialisation issue (first item inserted was smelted directly).",
+    "1.0.9-b1": "[U] Lang file ru_ru updated (PR#31, yaroslav4167).\n[M] Block hardness adaptions (issue #32).",
     "1.0.8": "[R] Release based on v1.0.8-b2. Release-to-release changes: * Added factory area sign. * Added stained clinker. * Config opt-out fixes, detailed feature selection possible now. * Recipe adaptions and fixes. * Lang files updated.\n[A] Added stained clinker brick block/stairs. Can be mixed with \"normal\" clinkers.\n[A] Added opt-out option for CTRL-SHIFT tooltips.\n[M] Recipe condition requirements updated, recipes categorized.",
     "1.0.8-b2": "[F] Config opt-out fixed (thx IronPiston for the report #30).\n[A] Added opt-out config for detailed including/excluding of features (using registry name wildcard matching).",
     "1.0.8-b1": "[A] Added \"Factory area\" sign.\n[M] Electrical furnace recipe changed (hoppers to conveyors).\n[A] Opt-out config options added.\n[F] Lang file fixes for en_us (Angela, PR#29).",
@@ -43,6 +47,8 @@
     "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table."
   },
   "1.13.2": {
+    "1.0.7-b5": "[A] Added translation zh_cn (PR#33, XuyuEre)\n[M] Updated textures.\n[M] Updated 1st/3rd person item model rotations/translations.",
+    "1.0.7-b4": "[A] Added stained clinker brick block/stairs.",
     "1.0.7-b3": "[V] Version assignment: All features of v1.0.7-b3-1.12.2 that can be ported to 1.13.2 implemented/prepared, therefore version re-assigned.\n[A] Added \"Factory Area\" sign.\n[M] Sign background colors adapted.\n[M] EN lang file updated (PR#28, Voxelo).",
     "1.0.4-b6": "[A] Added Small Electrical Furnace.\n[A] Added Small Waste Incinerator.\n[A] Experimental: Added fluid check valve.\n[A] Experimental: Added fluid redstone controlled valve.\n[A] Experimental: Added fluid redstone analog valve.\n[A] Experimental: Added passive fluid accumulator.",
     "1.0.4-b5": "[A] Added Factory Dropper.\n[A] Added \"Caution Defense System Ahead\" sign.",
@@ -55,10 +61,24 @@
     "1.0.0-a2": "[A] Added panzer glass.",
     "1.0.0-a1": "[A] Initial port to 1.13.2 with Forge beta."
   },
+  "1.14.3": {
+    "1.0.9-b4": "[E] Experimental: Config skel ported (!not all options have effect yet).\n[E] Experimental: JEI integration for opt-outs and crafting table ported (also addresses issue #38).",
+    "1.0.9-b3": "[F] Additional item drop fixes when blocks are destroyed (issue #39).",
+    "1.0.9-b2": "[U] Updated to Forge 1.14.3-27.0.25/20190621-1.14.2.\n[F] Fixed recipe collision of Metal Rung Ladder (issue #37, thx ProsperCraft for reporting).\n[F] Fixed opening crafting table, furni, dropper server crash issue #35 (thx ProsperCraft also here).\n[F] Fixed missing pole/support item drops (issue #36, ProsperCraft).",
+    "1.0.9-b1": "[U] Updated to MC1.14.3, Forge 1.14.3-27.0.17/20190621-1.14.2.\n[A] Added Small Mineral Smelter.",
+    "1.0.8-b3": "[A] Ported slabs and slab slices from 1.12.2.\n[A] IE independent (\"standalone\") recipes ported.",
+    "1.0.8-b2": "[U] Updated to Forge BETA 1.14.2-26.0.63/20190621-1.14.2, code adapted to new mappings.\n[M] Updated 1st/3rd person item model rotations/translations.",
+    "1.0.8-b1": "[V] Feature set of 1.12 ported.\n[A] CTRL-SHIFT tooltips ported.\n[A] Ported stained clinker block/stairs.\n[M] Updated textures.\n[I] Issue: Scoped recipe constants still not working.",
+    "1.0.7-b5": "[U] Updated to Forge BETA 1.14.2-26.0.35/20190608-1.14.2.\n[A] Factory dropper functionality ported.\n[A] Small lab furnace functionality ported.\n[A] Small electrical lab furnace functionality ported.\n[A] Small waste incinerator functionality ported.\n[A] Fluid valves, Passive Fluid Accumulator ported.\n[I] Issue: Scoped recipe constants still not working.",
+    "1.0.7-b4": "[U] Updated to Forge BETA 1.14.2-26.0.32/20190608-1.14.2.\n[A] Sitting on the stool ported.\n[A] Ladder climbing speed boost ported.\n[A] Crafting table functionality ported.\n[I] Issue: Scoped recipe constants not working yet with the current Forge version (or somehow changed).",
+    "1.0.7-b3": "[A] Initial 1.14.2 port of decorative blocks."
+  },
   "promos": {
-    "1.12.2-recommended": "1.0.8",
-    "1.12.2-latest": "1.0.8",
+    "1.12.2-recommended": "1.0.9",
+    "1.12.2-latest": "1.0.9",
     "1.13.2-recommended": "",
-    "1.13.2-latest": "1.0.7-b3"
+    "1.13.2-latest": "1.0.7-b5",
+    "1.14.3-recommended": "",
+    "1.14.3-latest": "1.0.9-b4"
   }
 }
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 7ac5ed3..67e048a 100644
--- a/readme.md
+++ b/readme.md
@@ -38,15 +38,21 @@ looking manufacturing contraptions. Current feature set:
   sides (e.g. with filtered hopper or whatever). Fits ideally into a conveyor belt
   line/lane. Consumption and efficiency tunable via config.
 
-- Rebar (steel) reinforced concrete: Expensive but creeper-proof. Crafted 3x3 from
-  four concrete blocks and five steel rods. Texture design oriented at the IE concrete,
-  slightly darker, eight (position dependent) random texture variations with rust
-  traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete *tiles*,
-  you can craft rebar concrete tiles with corresponding stairs. Reverse recipes
-  available for all blocks crafted from rebar concrete.
+- *Factory dropper*: Dropper with GUI configurable drop force, direction, stack size,
+  trigger cool-down delay, and trigger logic. Three trigger slots ("filter slots") can
+  be used as internal trigger. They emit an internal signal if their item is found in
+  in the dropper inventory (also at least the stack size of a trigger slot). Internal
+  triggers can be easily combined with the external redstone signal trigger using
+  logical *AND* or *OR* gates. If internal triggers match, the dropper will spit out
+  exactly the stacks in these slots. That allows to drop e.g. always nine lapis,
+  redstone, nuggets, etc on a conveyor to feed a compression metal press - instantly
+  and automatically after nine of these items have been inserted into the dropper.
 
-- Concrete wall: Solid concrete wall (not the vanilla wall design), crafted 3x3
-  from six IE concrete blocks (normal wall recipe).
+- *Small waste incinerator*: Buffered and delayed item disposal device. 16 fifo
+  slots are filled when new items are pushed in from any side. A GUI allows to
+  take out accidentally trashed items or put in items to get rid of. When the fifo
+  is full, the oldest stack will be disposed. The processing speed can be increased
+  by connecting electrical RF/FE power.
 
 - *Clinker bricks*: Slightly darker and more colorful version of the vanilla brick
   block. Eight position dependent texture variations are implemented to make the
@@ -61,6 +67,16 @@ looking manufacturing contraptions. Current feature set:
   explosion resistance than bricks. Also available as stairs and wall, also with
   reverse recipes.
 
+- Rebar (steel) reinforced concrete: Expensive but creeper-proof. Crafted 3x3 from
+  four concrete blocks and five steel rods. Texture design oriented at the IE concrete,
+  slightly darker, eight (position dependent) random texture variations with rust
+  traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete *tiles*,
+  you can craft rebar concrete tiles with corresponding stairs. Reverse recipes
+  available for all blocks crafted from rebar concrete.
+
+- Concrete wall: Solid concrete wall (not the vanilla wall design), crafted 3x3
+  from six IE concrete blocks (normal wall recipe).
+
 - *Treated wood ladder*: Crafted 3x3 with the known ladder pattern, items are
   treated wood sticks. Climbing is faster if looking up/down and not sneaking.
 
@@ -117,22 +133,10 @@ looking manufacturing contraptions. Current feature set:
 
 - *Industrial signs*: "Danger", "electrical hazard", etc.
 
-- *Small waste incinerator*: Buffered and delayed item disposal device. 16 fifo
-  slots are filled when new items are pushed in from any side. A GUI allows to
-  take out accidentally trashed items or put in items to get rid of. When the fifo
-  is full, the oldest stack will be disposed. The processing speed can be increased
-  by connecting electrical RF/FE power.
-
-- *Factory dropper*: Dropper with GUI configurable drop force, direction, stack size,
-  trigger cool-down delay, and trigger logic. Three trigger slots ("filter slots") can
-  be used as internal trigger. They emit an internal signal if their item is found in
-  in the dropper inventory (also at least the stack size of a trigger slot). Internal
-  triggers can be easily combined with the external redstone signal trigger using
-  logical *AND* or *OR* gates. If internal triggers match, the dropper will spit out
-  exactly the stacks in these slots. That allows to drop e.g. always nine lapis,
-  redstone, nuggets, etc on a conveyor to feed a compression metal press - instantly
-  and automatically after nine of these items have been inserted into the dropper.
-
+- *Slab slices*: Decorative stackable thin slabs made of of IE metal sheets,
+  concretes, treated wood. Useful e.g. for roofs or ramps. Left-clicking with
+  the same slab type in your hand while looking up/down removes slices again.
+  Crafted 3x3 from four slabs.
 
 More to come slowly but steadily.
 
@@ -145,6 +149,10 @@ More to come slowly but steadily.
   - Bug reports: Yes, please let me know. Drop a mail or better open an issue
     for the repository.
 
+  - Translations: Please translate the 1.12 lang files if possible (because the
+    1.13+ JSON language files are automatically generated from these `.lang`
+    files - saves me a bit of work).
+
   - Pull requests: Happily accepted. Please make sure that use the ***develop
     branch*** for pull requests. The master branch is for release versions only.
     I might merge the pull request locally if I'm ahead of the github repository,
@@ -154,7 +162,7 @@ More to come slowly but steadily.
     blocks under development to be registered as well.
 
 ----
-## Revision history
+## Version history
 
 Mod versions are tracked in the readme files for individual Minecraft versions, and
 of course in the commits of this repository. Beta and release versions that are
@@ -166,6 +174,8 @@ commits.
 
   - [1.13](1.13/readme.md)
 
+  - [1.14](1.14/readme.md)
+
 ### Community references
 
 Mods covering similar features, or may fit well together with IE and the decorations of this mod:
diff --git a/tasks.js b/tasks.js
index 37a0ebc..73783ea 100644
--- a/tasks.js
+++ b/tasks.js
@@ -1,26 +1,32 @@
 #!/usr/bin/djs
 "use strict";
 // Note for reviewers/clones: This file is a auxiliary script for my setup. It's not needed to build the mod.
-const config_main_repo = fs.realpath("../engineersdecor-github");
-if(!fs.chdir(fs.dirname(fs.realpath(sys.script)))) throw new Error("Failed to switch to mod repository base directory.");
-if(!fs.isdir(".git")) throw new Error("Missing git repository in mod repository base directory.");
+const constants = include("meta/lib/constants.js")();
+const libtask = include("meta/lib/libtask.js")(constants);
+const libassets = include("meta/lib/libassets.js")(constants);
+const modid = constants.mod_registry_name();
+const with_113 = false;
 var tasks = {};
 
 tasks["update-json"] = function() {
   const root_dir = fs.realpath(fs.dirname(sys.script));
   var update_jsons = {
     "1.12.2": JSON.parse(fs.readfile(root_dir + "/1.12/meta/update.json")),
-    "1.13.2": JSON.parse(fs.readfile(root_dir + "/1.13/meta/update.json"))
+    "1.13.2": JSON.parse(fs.readfile(root_dir + "/1.13/meta/update.json")),
+    "1.14.3": JSON.parse(fs.readfile(root_dir + "/1.14/meta/update.json"))
   };
   var update_json = {
     homepage: "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
     "1.12.2": update_jsons["1.12.2"]["1.12.2"],
     "1.13.2": update_jsons["1.13.2"]["1.13.2"],
+    "1.14.3": update_jsons["1.14.3"]["1.14.3"],
     promos: {
       "1.12.2-recommended": update_jsons["1.12.2"]["promos"]["1.12.2-recommended"],
       "1.12.2-latest": update_jsons["1.12.2"]["promos"]["1.12.2-latest"],
       "1.13.2-recommended": update_jsons["1.13.2"]["promos"]["1.13.2-recommended"],
       "1.13.2-latest": update_jsons["1.13.2"]["promos"]["1.13.2-latest"],
+      "1.14.3-recommended": update_jsons["1.14.3"]["promos"]["1.14.3-recommended"],
+      "1.14.3-latest": update_jsons["1.14.3"]["promos"]["1.14.3-latest"]
     }
   }
   fs.mkdir(root_dir + "/meta");
@@ -33,7 +39,7 @@ tasks["sync-main-repository"] = function() {
   if(sys.shell("git remote -v") != "") throw new Error("Dev repository has a remote set.");
   if(main_repo_local == "") throw new Error("Main repository (real) path not found.");
   const test_repo_local = fs.cwd();
-  const main_repo_local = fs.realpath(config_main_repo);
+  const main_repo_local = fs.realpath("../engineersdecor-github");
   if(main_repo_local == fs.realpath(test_repo_local)) throw new Error("This is already the main repository");
   const cd_dev = function(subdir) {
     if((!fs.chdir(test_repo_local)) || (!fs.isdir(".git"))) throw new Error("Failed to switch to mod source directory.");
@@ -47,28 +53,109 @@ tasks["sync-main-repository"] = function() {
   cd_main();
   sys.shell("rm -rf documentation meta");
   sys.shell("rm -f .gitignore credits.md license Makefile readme.md tasks.js");
-  cd_main("1.12"); sys.shell("rm -rf meta src gradle");
-  //cd_main("1.13"); sys.shell("rm -rf meta src gradle");
+  cd_main("1.12"); sys.shell("rm -rf meta gradle src");
+  cd_main("1.13"); sys.shell("rm -rf meta gradle");
+  cd_main("1.14"); sys.shell("rm -rf meta gradle src");
   cd_dev();
   sys.shell("cp -f .gitignore credits.md license Makefile readme.md tasks.js \"" + main_repo_local + "/\"")
   sys.shell("cp -r documentation meta \"" + main_repo_local + "/\"")
-  cd_dev("1.12");
-  sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.12/\"")
-  sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.12/\"")
-  //@todo uncomment after alpha code cleanup.
-  cd_dev("1.13");
-  sys.shell("cp -f .gitignore readme.md tasks.js \"" + main_repo_local + "/1.13/\"")
-  //sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.13/\"")
-  //sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.13/\"")
+  {
+    cd_dev("1.12");
+    sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.12/\"")
+    sys.shell("cp -r gradle meta src \"" + main_repo_local + "/1.12/\"")
+  }
+  {
+    cd_dev("1.13");
+    sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js \"" + main_repo_local + "/1.13/\"")
+    sys.shell("cp -r gradle meta \"" + main_repo_local + "/1.13/\"")
+  }
+  {
+    cd_dev("1.14");
+    sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js \"" + main_repo_local + "/1.14/\"")
+    sys.shell("cp -r gradle meta \"" + main_repo_local + "/1.14/\"")
+  }
   cd_main();
   print("Main repository changes:");
   print(sys.shell("git status -s"))
 };
 
-const task_name = sys.args[0];
-if((task_name===undefined) || (tasks[task_name])===undefined) {
-  alert("No task ", task_name);
-  exit(1);
-} else {
-  tasks[task_name]();
+tasks["compare-textures"] = function(args) {
+  if(args.length==0) args.push("");
+  // const verbose = (args.find("-v")) || (args.find("--verbose"));   //// NO ARRAY.FIND???? --> fix in JS engine
+  const verbose = (args[0]=="-v") || (args[0]=="-verbose");   //// NO ARRAY.FIND???? --> fix in JS engine
+  function compare(va, vb) {
+    const cmp = libassets.compare_textures(
+      va+"/src/main/resources/assets",
+      vb+"/src/main/resources/assets"
+    );
+    const n_diff = Object.keys(cmp.differ).length;
+    const n_match = Object.keys(cmp.match).length;
+    const n_onlya = Object.keys(cmp.onlyin_a).length;
+    const n_onlyb = Object.keys(cmp.onlyin_b).length;
+    if(!verbose) {
+      if((n_diff==0) && (n_onlya==0) && (n_onlyb==0)) return true;
+      print("[warn] Textures of " + va + "<->" + vb + " differ: " + n_match + " matching, " + n_diff +
+                    " different, " + n_onlya + " only in " + va + ", " + n_onlyb + " only in " + vb +
+                    ". (--verbose for details)");
+      return false;
+    } else {
+      if((n_diff==0) && (n_onlya==0) && (n_onlyb==0)) {
+        print("[pass] Textures of " + va + "<->" + vb + " all match.");
+        return true;
+      }
+      for(var key in cmp.differ) {
+        print("[warn] Texture of " + va + "<->" + vb + " differs: '" + key + "'.");
+      }
+      for(var key in cmp.onlyin_a) {
+        print("[warn] Texture only in " + va + ": '" + key + "'.");
+      }
+      for(var key in cmp.onlyin_b) {
+        print("[warn] Texture only in " + vb + ": '" + key + "'.");
+      }
+      return false;
+    }
+  }
+  var ok = true;
+  if(with_113 && !compare("1.12", "1.13")) ok = false;
+  if(!compare("1.12", "1.14")) ok = false;
+  return ok;
+};
+
+tasks["migrate-textures"] = function(args) {
+  if(args.length==0) args.push("");
+  const verbose = (args[0]=="-v") || (args[0]=="-verbose");
+  throw new Error("Migration is WIP");
 }
+
+tasks["compare-blockstates"] = function(args) {
+  if(args.length==0) args.push("");
+  const verbose = (args[0]=="-v") || (args[0]=="-verbose");
+  const compare = function(va, vb) {
+    const cmp = libassets.compare_blockstates(va+"/src/main/resources/assets/"+modid, vb+"/src/main/resources/assets/"+modid);
+    const n_onlya = Object.keys(cmp.onlyin_a).length;
+    const n_onlyb = Object.keys(cmp.onlyin_b).length;
+    if(!verbose) {
+      if((n_onlya==0) && (n_onlyb==0)) return true;
+      print("[warn] Block states of " + va + "<->" + vb + " differ: " + n_onlya + " only in " + va + ", " + n_onlyb + " only in " + vb + ". (--verbose for details)");
+      return false;
+    } else {
+      if((n_onlya==0) && (n_onlyb==0)) {
+        print("[pass] Block states of " + va + "<->" + vb + " all match.");
+        return true;
+      }
+      for(var key in cmp.onlyin_a) {
+        print("[warn] Block states only in " + va + ", not " + vb + ": '" + key + "'.");
+      }
+      for(var key in cmp.onlyin_b) {
+        print("[warn] Block states only in " + vb + ", not " + va + ": '" + key + "'.");
+      }
+      return false;
+    }
+  }
+  var ok = true;
+  if(with_113 && !compare("1.12", "1.13")) ok = false;
+  if(!compare("1.12", "1.14")) ok = false;
+  return ok;
+};
+
+libtask.run(tasks, sys.args, true, ".");