com.parzivail.p3d.P3dBlockRendererRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pswg Show documentation
Show all versions of pswg Show documentation
Explore the galaxy with Galaxies: Parzi's Star Wars Mod!
package com.parzivail.p3d;
import java.util.HashMap;
import net.minecraft.class_2248;
public class P3dBlockRendererRegistry
{
private static final IP3dBlockRenderer defaultRenderer = (matrices, quadEmitter, target, randomSupplier, renderContext, model, baseSprite, additionalSprites) -> {
model.renderBlock(matrices, quadEmitter, target, null, (target1, objectName) -> baseSprite, randomSupplier, renderContext);
};
private static final HashMap blockTransformers = new HashMap<>();
public static void register(class_2248 block, IP3dBlockRenderer transformer)
{
blockTransformers.put(block, transformer);
}
public static IP3dBlockRenderer get(class_2248 block)
{
return blockTransformers.getOrDefault(block, defaultRenderer);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy