block_state can accept string block name as well.
This commit is contained in:
1 parent
07dce7bc2e
commit
6206753198
2 files changed
+5
-2
No files matched your search
@@ -997,7 +997,7 @@ public class WorldAccess {
|
||||
// block_state(block, property)
|
||||
expression.addLazyFunction("block_state", -1, (c, t, lv) ->
|
||||
{
|
||||
BlockArgument locator = BlockArgument.findIn((CarpetContext) c, lv, 0);
|
||||
BlockArgument locator = BlockArgument.findIn((CarpetContext) c, lv, 0, true);
|
||||
BlockState state = locator.block.getBlockState();
|
||||
StateManager<Block, BlockState> states = state.getBlock().getStateManager();
|
||||
if (locator.offset == lv.size())
|
||||
|
||||
Reference in new issue
Block a user