Allow markers to be used as light sources (#9733)

* Allow markers to be used as light sources

* Better light source markers

* Move PointMarker drawLight to LightMarker

* Add a rule for unit lights

* Optimize marker rendering

* Update core/assets/bundles/bundle.properties

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
Redstonneur1256
2025-02-09 18:10:45 +01:00
committed by GitHub
parent 3378475f6a
commit 8626082068
12 changed files with 196 additions and 68 deletions

View File

@@ -302,6 +302,11 @@ public class MapObjectivesDialog extends BaseDialog{
}).growX().fillY();
});
setInterpreter(IndexBool.class, int.class, (cont, name, type, field, remover, indexer, get, set) -> {
getInterpreter(Boolean.class).build(cont, name, type, field, remover, indexer, () -> get.get() != -1, v -> set.get(v ? +1 : -1));
});
// Special data structure interpreters.
// Instantiate default `Seq`s with a reflectively allocated array.
setProvider(Seq.class, (type, cons) -> cons.get(new Seq<>(type.element.raw)));