Skip to content

Commit

Permalink
Remove tint from otherworld leaves items
Browse files Browse the repository at this point in the history
Closes #85
  • Loading branch information
klikli-dev committed Jan 10, 2021
1 parent 520abec commit 12013ba
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@ public static void onRegisterBlockColors(ColorHandlerEvent.Block event) {
//Otherworld leaves have a colored texture, so return white tint;
//but while covered the oak leaves need their vanilla tint
event.getBlockColors()
.register((state, light, pos, tintIndex) -> state.get(
IOtherworldBlock.UNCOVERED) ? 0xFFFFFF :
(light != null && pos != null ? BiomeColors
.getFoliageColor(
light,
pos) : FoliageColors
.getDefault()),
.register((state, light, pos, tintIndex) ->
state.get(IOtherworldBlock.UNCOVERED) ?
0xFFFFFF : (light != null && pos != null ?
BiomeColors.getFoliageColor(light, pos) :
FoliageColors.getDefault()),
OccultismBlocks.OTHERWORLD_LEAVES_NATURAL.get());

Occultism.LOGGER.info("Block color registration complete.");
Expand All @@ -73,10 +71,8 @@ public static void onRegisterBlockColors(ColorHandlerEvent.Block event) {
@SubscribeEvent
public static void onRegisterItemColors(ColorHandlerEvent.Item event) {
BlockColors blockColors = event.getBlockColors();
event.getItemColors()
.register((stack, tintIndex) -> OtherworldLeavesNaturalBlock.COLOR,
OccultismBlocks.OTHERWORLD_LEAVES.get());

//Otherworld leaves have a colored texture, so return white tint;
//but while covered the oak leaves need their vanilla tint
event.getItemColors()
.register((stack, tintIndex) -> {
BlockState blockstate = ((BlockItem) stack.getItem()).getBlock().getDefaultState();
Expand Down

0 comments on commit 12013ba

Please sign in to comment.