Skip to content

Commit

Permalink
feat: add redstoneConductor, signalSource
Browse files Browse the repository at this point in the history
  • Loading branch information
mworzala committed Mar 15, 2024
1 parent 1fe4154 commit 3a68a27
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ private void writeState(Block block, BlockState blockState, JsonObject blockJson
appendState(blockJson, state, "interactionShape", blockState.getInteractionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO).toAabbs().toString(), String.class);
appendState(blockJson, state, "occlusionShape", blockState.getOcclusionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO).toAabbs().toString(), String.class);
appendState(blockJson, state, "visualShape", blockState.getVisualShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CollisionContext.empty()).toAabbs().toString(), String.class);

// Redstone bits
appendState(blockJson, state, "redstoneConductor", blockState.isRedstoneConductor(EmptyBlockGetter.INSTANCE, BlockPos.ZERO), boolean.class);
appendState(blockJson, state, "signalSource", blockState.isSignalSource(), false, boolean.class);
}

private <T> void appendState(JsonObject main, JsonObject state, String key, T value, T defaultValue, Class<T> valueType) {
Expand Down

0 comments on commit 3a68a27

Please sign in to comment.