From f116541e2dd9dec1a0b3f5c94e1639460937718f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= Date: Fri, 26 Apr 2024 21:48:22 +0700 Subject: [PATCH] World-aligned grass block top texture --- LEGAL.md | 6 +++++ mods/ITEMS/mcl_core/nodes_base.lua | 24 ++++++++++++++++++-- settingtypes.txt | 7 ++++++ textures/mcl_core_grass_block_top_sheet.png | Bin 0 -> 1389 bytes 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 textures/mcl_core_grass_block_top_sheet.png diff --git a/LEGAL.md b/LEGAL.md index a181da398..fdd519f23 100644 --- a/LEGAL.md +++ b/LEGAL.md @@ -46,6 +46,12 @@ Armor trim models were created by Aeonix_Aeon Source: License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) +The sheet texture for grass block top was made out of grass block top variations +from the PixelPerfection Legacy texture pack, which were made by +[Nova_Wostra](https://www.curseforge.com/members/nova_wostra) +Source: +License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/) + The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/) All other files, unless mentioned otherwise, fall under: diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index db2561082..8ef247e15 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -12,6 +12,18 @@ else ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false end +local world_aligned_grass = minetest.settings:get_bool("mcl_world_aligned_grass_texture", false) +local grass_block_top_texture +if world_aligned_grass then + grass_block_top_texture = { + name = "mcl_core_grass_block_top_sheet.png", + align_style = "world", + scale = 5 + } +else + grass_block_top_texture = "mcl_core_grass_block_top.png" +end + mcl_core.fortune_drop_ore = { discrete_uniform_distribution = true, min_count = 2, @@ -369,8 +381,16 @@ minetest.register_node("mcl_core:dirt_with_grass", { _doc_items_longdesc = S("A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt."), _doc_items_hidden = false, paramtype2 = "color", - tiles = {"mcl_core_grass_block_top.png", { name="default_dirt.png", color="white" }, { name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" }}, - overlay_tiles = {"mcl_core_grass_block_top.png", "blank.png", {name="mcl_core_grass_block_side_overlay.png", tileable_vertical=false}}, + tiles = { + grass_block_top_texture, + { name="default_dirt.png", color="white" }, + { name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" } + }, + overlay_tiles = { + "blank.png", + "blank.png", + {name="mcl_core_grass_block_side_overlay.png", tileable_vertical=false} + }, palette = "mcl_core_palette_grass.png", palette_index = 0, color = "#7CBD6B", diff --git a/settingtypes.txt b/settingtypes.txt index ac3399498..9f9fba99f 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -256,6 +256,13 @@ mcl_buckets_use_select_box (Buckets use select box) bool false # See also: https://github.com/minetest/minetest/issues/95 mcl_translucent_ice (Translucent ice) bool false +# Whether the top texture of grass blocks should be world-aligned. If enabled, +# grass top texture will be a sheet of 5x5 tiles with pre-defined "random" +# displacement and rotation, spanning across 5 blocks. +# +# This might put some load on the GPU by making it work with a bigger texture. +mcl_world_aligned_grass_texture (World-aligned grass texture) bool false + # Whether to generate fallen logs in some biomes. # They might not always look pretty and have strange overhangs. mcl_generate_fallen_logs (Generate fallen logs) bool false diff --git a/textures/mcl_core_grass_block_top_sheet.png b/textures/mcl_core_grass_block_top_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..6544c3c3b4a7e8b0aad7526ff62b2090f774ad87 GIT binary patch literal 1389 zcmV-z1(N!SP)c?00kLIL_t(YiA~nQk-|s}Mq#-<0r*J{pe1hrmPG*Lh5TdM z1BltH4nR>~{ja5nUEK--1H&#-o$_$N`Yx5R-(JZUZg~+~cqy1`phe%s=Gcn^=9+eu z=v)XYVGAO^cj0IF1(88YZ09zdp#`sB`3>m1u%{F1rRa%ejc`%N_t*Nn{M`jhodM+> z$&u=ZZ&(IpdZ_nZ)ctub`#mPdTtaY5&0t&D#w+Q&g!9r_EZc~6K>_TfVzIeAUf;Vo z+i%TfBZe0mRs^DT@k|8zE^=+_lW|&Z<4|=jw+!{%pV&$DUG`%C7b}S2>cns%904lT z`!4&56`f8AWgcvcPA4J=_e(waIt>u+5HEM47KEKpS4TzX(oV~{*>5D& zw{axEi$EZ@g)Q3Y8vf#Os{l1Z{r$s{AckYnP9?nZAt4rWfKsf<<2H|NgqOEdb&TVc**;(iv@HNTC2BHoyr}g=)B0#gL1+(FDJG-X{VQK5+F+QStT^I3Ung& zbqWcX6k+OG?K0n^SSbwW{Q(pumxrZCwo3@i^X!ICTDg``iw< z;gV=d?;jU+&yn5dc1V~%)Jl5)taQJ_s{7myp>kI*>HVuzzyH_gcGxbZ2r&HX@Z+zY zcE9EFFplBvu>G~u?ziZa(mDR#j~{>SwEHcH9_U=#Vf$;R-ET?MiFvfc_Sa6k-%<{C z5$*8n@8h)lE$X5ccsp!=?X>$X=)8cx_v6Q3JMDf8>d7{$9k#!A+Wi(BE{SZ1?XR7F z`>h_c;OnscwbSmmVAovKd@C+_R;