Make ice texture opaque by default

Because of glitchy translucency in Minetest
This commit is contained in:
Wuzzy 2019-12-19 17:42:19 +01:00
parent ab038ddd60
commit 87449b5719
4 changed files with 26 additions and 10 deletions

View file

@ -101,7 +101,7 @@ Flint is a raw material.=Feuerstein ist ein Rohstoff.
Flowing Lava=Fließende Lava Flowing Lava=Fließende Lava
Flowing Water=Fließendes Wasser Flowing Water=Fließendes Wasser
Frosted Ice=Brüchiges Eis Frosted Ice=Brüchiges Eis
Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.=Brüchiges Eis ist ein kurzlebiger durchscheinender Block. Er wird sich in einigen Sekunden zu einer Wasserquelle verwandeln. Frosted ice is a short-lived solid block. It melts into a water source within a few seconds.=Brüchiges Eis ist ein kurzlebiger durchscheinender Block. Er wird sich in einigen Sekunden zu einer Wasserquelle verwandeln.
Glass=Glas Glass=Glas
Gold Ingot=Goldbarren Gold Ingot=Goldbarren
Gold Nugget=Goldklumpen Gold Nugget=Goldklumpen
@ -117,7 +117,7 @@ Gravel=Kies
Green Stained Glass=Grünes Buntglas Green Stained Glass=Grünes Buntglas
Grey Stained Glass=Graues Buntglas Grey Stained Glass=Graues Buntglas
Ice=Eis Ice=Eis
Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.=Eis ist ein durchscheinender fester Block, der oft in kalten Gebieten gefunden werden kann. Er schmilzt in der Nähe von Block-Lichtquellen bei einer Helligkeit von 12 oder höher. Wenn es schmilzt oder abgebaut wird, und darunter ein anderer Block war, wird er sich in eine Wasserquelle verwandeln. Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.=Eis ist ein durchscheinender fester Block, der oft in kalten Gebieten gefunden werden kann. Er schmilzt in der Nähe von Block-Lichtquellen bei einer Helligkeit von 12 oder höher. Wenn es schmilzt oder abgebaut wird, und darunter ein anderer Block war, wird er sich in eine Wasserquelle verwandeln.
In the End dimension, starting a fire on this block will create an eternal fire.=In der Ende-Dimension wird Feuer auf diesem Block ewig brennen. In the End dimension, starting a fire on this block will create an eternal fire.=In der Ende-Dimension wird Feuer auf diesem Block ewig brennen.
Iron Ingot=Eisenbarren Iron Ingot=Eisenbarren
Iron Nugget=Eisenklumpen Iron Nugget=Eisenklumpen

View file

@ -101,7 +101,7 @@ Flint is a raw material.=
Flowing Lava= Flowing Lava=
Flowing Water= Flowing Water=
Frosted Ice= Frosted Ice=
Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.= Frosted ice is a short-lived solid block. It melts into a water source within a few seconds.=
Glass= Glass=
Gold Ingot= Gold Ingot=
Gold Nugget= Gold Nugget=
@ -117,7 +117,7 @@ Gravel=
Green Stained Glass= Green Stained Glass=
Grey Stained Glass= Grey Stained Glass=
Ice= Ice=
Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.= Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.=
In the End dimension, starting a fire on this block will create an eternal fire.= In the End dimension, starting a fire on this block will create an eternal fire.=
Iron Ingot= Iron Ingot=
Iron Nugget= Iron Nugget=

View file

@ -2,6 +2,14 @@ local S = minetest.get_translator("mcl_core")
-- Simple solid cubic nodes, most of them are the ground materials and simple building blocks -- Simple solid cubic nodes, most of them are the ground materials and simple building blocks
local translucent_ice = minetest.settings:get_bool("mcl_translucent_ice", false)
local ice_drawtype
if translucent_ice then
ice_drawtype = "glasslike"
else
ice_drawtype = "normal"
end
minetest.register_node("mcl_core:stone", { minetest.register_node("mcl_core:stone", {
description = S("Stone"), description = S("Stone"),
_doc_items_longdesc = S("One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava."), _doc_items_longdesc = S("One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava."),
@ -752,12 +760,12 @@ minetest.register_node("mcl_core:obsidian", {
minetest.register_node("mcl_core:ice", { minetest.register_node("mcl_core:ice", {
description = S("Ice"), description = S("Ice"),
_doc_items_longdesc = S("Ice is a translucent solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."), _doc_items_longdesc = S("Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."),
drawtype = "glasslike", drawtype = ice_drawtype,
tiles = {"default_ice.png"}, tiles = {"default_ice.png"},
is_ground_content = true, is_ground_content = true,
paramtype = "light", paramtype = "light",
use_texture_alpha = true, use_texture_alpha = translucent_ice,
stack_max = 64, stack_max = 64,
groups = {handy=1,pickaxey=1, slippery=3, building_block=1}, groups = {handy=1,pickaxey=1, slippery=3, building_block=1},
drop = "", drop = "",
@ -811,17 +819,17 @@ for i=0,3 do
local use_doc = i == 0 local use_doc = i == 0
local longdesc local longdesc
if use_doc then if use_doc then
longdesc = S("Frosted ice is a short-lived solid translucent block. It melts into a water source within a few seconds.") longdesc = S("Frosted ice is a short-lived solid block. It melts into a water source within a few seconds.")
end end
minetest.register_node("mcl_core:frosted_ice_"..i, { minetest.register_node("mcl_core:frosted_ice_"..i, {
description = S("Frosted Ice"), description = S("Frosted Ice"),
_doc_items_create_entry = use_doc, _doc_items_create_entry = use_doc,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
drawtype = "glasslike", drawtype = ice_drawtype,
tiles = {"mcl_core_frosted_ice_"..i..".png"}, tiles = {"mcl_core_frosted_ice_"..i..".png"},
is_ground_content = false, is_ground_content = false,
paramtype = "light", paramtype = "light",
use_texture_alpha = true, use_texture_alpha = translucent_ice,
stack_max = 64, stack_max = 64,
groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1}, groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1},
drop = "", drop = "",

View file

@ -83,6 +83,14 @@ mobs_disable_blood (Disable mob damage particles) bool false
flame_sound (Flame sound) bool true flame_sound (Flame sound) bool true
[Experimental] [Experimental]
# Whether ice is translucent. If disabled, ice is fully opaque.
#
# Note: As of Minetest version 5.1.0, translucent ice above oceans
# will look weird, there's a lot of flashing/blinking going on
# due to bugs in Minetest's implementation of translucency.
# See also: https://github.com/minetest/minetest/issues/95
mcl_translucent_ice (Translucent ice) bool false
# Whether to generate fallen logs in some biomes. # Whether to generate fallen logs in some biomes.
# They might not always look pretty and have strange overhangs. # They might not always look pretty and have strange overhangs.
mcl_generate_fallen_logs (Generate fallen logs) bool false mcl_generate_fallen_logs (Generate fallen logs) bool false