Search in sources :

Example 1 with BlockPosFace

use of com.lowdragmc.lowdraglib.utils.BlockPosFace in project Multiblocked by Low-Drag-MC.

the class IOPageWidget method setupSceneWidget.

@OnlyIn(Dist.CLIENT)
private void setupSceneWidget(SceneWidget sceneWidget) {
    sceneWidget.getRenderer().setAfterWorldRender(renderer -> {
        sceneWidget.renderBlockOverLay(renderer);
        RenderUtils.useLightMap(240, 240, () -> {
            RenderSystem.disableCull();
            int inner = 0;
            for (Map.Entry<MultiblockCapability<?>, Tuple<IO, Direction>> entry : capabilitySettings.entrySet()) {
                if (entry.getValue() != null) {
                    sceneWidget.drawFacingBorder(new MatrixStack(), new BlockPosFace(pos, entry.getValue().getB()), entry.getKey().color, inner);
                    inner++;
                }
            }
            RenderSystem.enableCull();
        });
    });
}
Also used : BlockPosFace(com.lowdragmc.lowdraglib.utils.BlockPosFace) MultiblockCapability(com.lowdragmc.multiblocked.api.capability.MultiblockCapability) MatrixStack(com.mojang.blaze3d.matrix.MatrixStack) HashMap(java.util.HashMap) Long2ObjectOpenHashMap(it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap) Map(java.util.Map) EnumMap(java.util.EnumMap) Tuple(net.minecraft.util.Tuple) OnlyIn(net.minecraftforge.api.distmarker.OnlyIn)

Aggregations

BlockPosFace (com.lowdragmc.lowdraglib.utils.BlockPosFace)1 MultiblockCapability (com.lowdragmc.multiblocked.api.capability.MultiblockCapability)1 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 Long2ObjectOpenHashMap (it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap)1 EnumMap (java.util.EnumMap)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Tuple (net.minecraft.util.Tuple)1 OnlyIn (net.minecraftforge.api.distmarker.OnlyIn)1