| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds several new ways that the plantlike drawtype mesh can be changed.
This requires paramtype2 = "meshoptions" to be set in the node
definition. The drawtype for these nodes should be "plantlike".
These modifications are all done using param2. This field is now
a complex bitfield that allows some or more of the combinations to
be chosen, and the mesh draw code will choose the options based as
neeeded for each plantlike node.
bit layout:
bits 0, 1 and 2 (values 0x1 through 0x7) are for choosing the plant
mesh shape:
0 - ordinary plantlike plant ("x" shaped)
1 - ordinary plant, but rotated 45 degrees ("+" shaped)
2 - a plant with 3 faces ("*" shaped)
3 - a plant with 4 faces ("#" shaped)
4 - a plant with 4 faces ("#" shaped, leaning outwards)
5 through 7 are unused and reserved for future mesh shapes.
bit 3 (0x8) causes the plant to be randomly offset in the x,z
plane. The plant should fall within the 1x1x1 nodebox if regularly
sized.
bit 4 (0x10) causes the plant mesh to grow by sqrt(2), and will cause
the plant mesh to fill out 1x1x1, and appear slightly larger. Texture
makers will want to make their plant texture 23x16 pixels to have the
best visual fit in 1x1x1 size.
bit 5 (0x20) causes each face of the plant to have a slight negative
Y offset in position, descending up to 0.125 downwards into the node
below. Because this is per face, this causes the plant model to be
less symmetric.
bit 6 (0x40) through bit 7 (0x80) are unused and reserved for
future use.
!(https://youtu.be/qWuI664krsI)
|
|
|
| |
Texture packs have no way to know what nodes are available, so this shouldn't be a error message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Copy-paste error: properly test for back-connection.
In the case of two different connected nodebox types, we want to
assure that if A connects to B, that B also connects to A. This test
was accidentally not implemented correctly.
2. Clear the connects_to_ids before deserializing.
With each new connected node, the deserialization code added more
and more targets to the map, since the map wasn't cleared in between
deserialization steps. This caused e.g. wall blocks to connect to
things in the fence connects_to map.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NDT_CONNECTED attempts to connect to any side of nodes that it can
connect to, which is troublesome for FACEDIR type nodes that generally
may only have one usable face, and can be rotated.
We introduce a node parameter `connect_sides` that is valid for
any node type. If specified, it lists faces of the node (in "top",
"bottom", "front", "left", "back", "right", form, as array) that
connecting nodeboxes can connect to. "front" corresponds to the south
facing side of a node with facedir = 0.
If the node is rotatable using *simple* FACEDIR, then the attached
face is properly rotated before checking. This allows e.g. a chest
to be attached to only from the rear side.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new nodebox type "connected", and allow these nodes to
have optional nodeboxes that connect it to other connecting nodeboxes.
This is all done at scenedraw time in the client. The client will
inspect the surrounding nodes and if they are to be connected to,
it will draw the appropriate connecting nodeboxes to make those
connections.
In the node_box definition, we have to specify separate nodeboxes for
each valid connection. This allows us to make nodes that connect only
horizontally (the common case) by providing optional nodeboxes for +x,
-x, +z, -z directions. Or this allows us to make wires that can connect
up and down, by providing nodeboxes that connect it up and down (+y,
-y) as well.
The optional nodeboxes can be arrays. They are named "connect_top,
"connect_bottom", "connect_front", "connect_left", "connect_back" and
"connect_right". Here, "front" means the south facing side of the node
that has facedir = 0.
Additionally, a "fixed" nodebox list present will always be drawn,
so one can make a central post, for instance. This "fixed" nodebox
can be omitted, or it can be an array of nodeboxes.
Collision boxes are also updated in exactly the same fashion, which
allows you to walk over the upper extremities of the individual
node boxes, or stand really close to them. You can also walk up
node noxes that are small in height, all as expected, and unlike the
NDT_FENCELIKE nodes.
I've posted a screenshot demonstrating the flexibility at
http://i.imgur.com/zaJq8jo.png
In the screenshot, all connecting nodes are of this new subtype.
Transparent textures render incorrectly, Which I don't think is
related to this text, as other nodeboxes also have issues with this.
A protocol bump is performed in order to be able to send older clients
a nodeblock that is usable for them. In order to avoid abuse of users
we send older clients a "full-size" node, so that it's impossible for
them to try and walk through a fence or wall that's created in this
fashion. This was tested with a pre-bump client connected against a
server running the new protocol.
These nodes connect to other nodes, and you can select which ones
those are by specifying node names (or group names) in the
connects_to string array:
connects_to = { "group:fence", "default:wood" }
By default, nodes do not connect to anything, allowing you to create
nodes that always have to be paired in order to connect. lua_api.txt
is updated to reflect the extension to the node_box API.
Example lua code needed to generate these nodes can be found here:
https://gist.github.com/sofar/b381c8c192c8e53e6062
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new contentfeatures version (8). When clients
connect using v27 protocol version, they can assume that
the tiledef.backface_culling is trustable, but if clients
connect to servers providing contentfeatures version 7,
then the v27 clients know that backface culling settings
provided by the server in tiledefs are bogus for mesh,
plantlike, firelike or liquid drawtype nodes.
thanks to hmmmm, est31, nerzhul.
Tested on new client - new server, new client - old server
old client - new server.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Outdated servers are always sending tiledefs with culling
enabled no matter what, as the value was previously entirely
ignored.
To compensate, we must (1) detect that we're running against
an old server with a new client, and (2) disable culling for
mesh, plantlike, firelike and liquid draw types no matter what
the server is telling us.
In order to achieve this, we need to bump the protocol version
since we cannot rely on the tiledef version, and test for it
being older. I've bumped the protocol version, although that
should have likely happened in the actual change that introduced
the new backface_culling PR #3578. Fortunately that's only 2
commits back at this point.
We also explicitly test for the drawtype to assure we are not
changing the culling value for other nodes, where it should
remain enabled.
This was tested against various pub servers, including 0.4.13 and
0.4.12.
Fixes #3598
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backface culling is enabled by default for all tiles, as this
is how the lua parser initializes each tiledef. We revert to
always using the value from the tiledef since it is always
read and serialized.
Mods that wish to enable culling for e.g. mesh nodes, now can
specify the following to enable backface culling:
tiles = {{ name = "tex.png", backface_culling = true }},
Note the double '{' and use of 'name' key here! In the same
fashion, backface_culling can be disabled for any node now.
I've tested this against the new door models and this properly
allows me to disable culling per node. I've also tested this
against my crops mod which uses mesh nodes where culling needs
to be disabled, and tested also with plantlike drawtype nodes
where we want this to continue to be disabled.
No default setting has changed. The defaults are just migrated
from nodedef.cpp to c_content.cpp.
|
|
|
|
|
| |
Add new node property 'floodable', default false
Define "air" as floodable = true in C++ and lua
|
|
|
|
| |
Remove DTIME macro and its uses, too
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This simplifies NodeResolver logic and makes some interfaces cleaner.
|
|
|
|
|
|
| |
- Add ability to explicitly reset NodeResolve state (useful for unittesting)
- Remove non-essential NodeResolve methods modifying state from INodeDefManager
- Add const qualifier to NodeDefManager and ContentFeatures serialize
|
|
|
|
|
|
| |
Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
|
|
|
|
|
|
|
|
|
| |
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager. In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution. So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move debug streams to log.cpp|h
Move GUI-related globals to clientlauncher
Move g_settings and g_settings_path to settings.cpp|h
Move g_menuclouds to clouds.cpp|h
Move g_profiler to profiler.cpp|h
|
|
|
|
| |
JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements.
|
|
|
|
|
|
|
| |
std::vector on Environment.cpp"
This reverts parts of commit 9749d9fee6db99da1ab861dc04ec63ef973db3e0, which breaks node resolver
list clearing
|
|
|
|
| |
The bar is only drawn when the user will notice a change, which prevents time overheads that this commit would cause, resulting from useless draws.
|
|
|
|
| |
NDEBUG is defined), replace those usages with persistent alternatives
|
|
|
|
|
|
|
| |
std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap
* Remove disabled code in ClientMap::renderMap, disabled since a long time
|
|
|
|
| |
tile.hpp to src/client/
|
| |
|
|
|
|
| |
Also add NodeResolver callbacks on the client
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
CNodeDefManager::get()
VoxelManipulator::addArea()
|
| |
|
| |
|