Skip to content

Commit 44bccd7

Browse files
Copilotrubensworks
andauthored
Document Undead Leaves particle tint color constant
Agent-Logs-Url: https://github.com/CyclopsMC/EvilCraft/sessions/0cdeefb6-bc60-4c58-bf4e-65d4ada5d15c Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
1 parent ef3fdd5 commit 44bccd7

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
package org.cyclops.evilcraft.block;
22

33
import net.minecraft.client.color.block.BlockTintSources;
4-
import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent;
54
import org.cyclops.cyclopscore.config.extendedconfig.BlockClientConfig;
65
import org.cyclops.cyclopscore.config.extendedconfig.BlockConfigCommon;
76
import org.cyclops.cyclopscore.init.IModBase;
87

9-
import java.util.List;
10-
118
/**
129
* @author rubensworks
1310
*/
1411
public class BlockUndeadLeavesConfigClient extends BlockClientConfig<IModBase> {
1512

13+
// Dominant Undead Leaves texture color (#2E0F0F = R46 G15 B15), encoded as ARGB 0xFF2E0F0F.
1614
private static final int UNDEAD_LEAVES_COLOR = -13758705;
1715

1816
public BlockUndeadLeavesConfigClient(BlockConfigCommon<IModBase> blockConfig) {
1917
super(blockConfig);
20-
blockConfig.getMod().getModEventBus().addListener(this::onRegisterColors);
2118
}
2219

23-
public void onRegisterColors(RegisterColorHandlersEvent.BlockTintSources event) {
24-
event.register(List.of(BlockTintSources.constant(UNDEAD_LEAVES_COLOR)), getBlockConfig().getInstance());
20+
@Override
21+
public net.minecraft.client.color.block.BlockTintSource getBlockColorHandler() {
22+
return BlockTintSources.constant(UNDEAD_LEAVES_COLOR);
2523
}
2624
}

0 commit comments

Comments
 (0)