Skip to content

Commit

Permalink
fix: Fix item colors having zero alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 5, 2024
1 parent c4fd996 commit 513d1ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public static void initialize(BalmRenderers renderers) {
renderers.registerBlockEntityRenderer(ModBlockEntities.sharestone::get, SharestoneRenderer::new);
renderers.registerBlockEntityRenderer(ModBlockEntities.portstone::get, PortstoneRenderer::new);

renderers.registerBlockColorHandler((state, view, pos, tintIndex) -> Objects.requireNonNull(((SharestoneBlock) state.getBlock()).getColor()).getTextColor(), () -> ModBlocks.sharestones);
renderers.registerItemColorHandler((stack, tintIndex) -> Objects.requireNonNull(((SharestoneBlock) Block.byItem((stack.getItem()))).getColor()).getTextColor(), () -> ModBlocks.sharestones);
renderers.registerBlockColorHandler((state, view, pos, tintIndex) -> Objects.requireNonNull(((PortstoneBlock) state.getBlock()).getColor()).getTextColor(), () -> ModBlocks.portstones);
renderers.registerItemColorHandler((stack, tintIndex) -> Objects.requireNonNull(((PortstoneBlock) Block.byItem((stack.getItem()))).getColor()).getTextColor(), () -> ModBlocks.portstones);
renderers.registerBlockColorHandler((state, view, pos, tintIndex) -> Objects.requireNonNull(((SharestoneBlock) state.getBlock()).getColor()).getTextColor() | 0xFF000000, () -> ModBlocks.sharestones);
renderers.registerItemColorHandler((stack, tintIndex) -> Objects.requireNonNull(((SharestoneBlock) Block.byItem((stack.getItem()))).getColor()).getTextColor() | 0xFF000000, () -> ModBlocks.sharestones);
renderers.registerBlockColorHandler((state, view, pos, tintIndex) -> Objects.requireNonNull(((PortstoneBlock) state.getBlock()).getColor()).getTextColor() | 0xFF000000, () -> ModBlocks.portstones);
renderers.registerItemColorHandler((stack, tintIndex) -> Objects.requireNonNull(((PortstoneBlock) Block.byItem((stack.getItem()))).getColor()).getTextColor() | 0xFF000000, () -> ModBlocks.portstones);
}

}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pack_format_number = 18
java_version = 21

# Balm
balm_version = 10.1.0-SNAPSHOT
balm_version = 10.4.0-SNAPSHOT
balm_version_range = [10.0.0,)

# Forge
Expand Down

0 comments on commit 513d1ef

Please sign in to comment.