mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-09 20:05:01 +01:00
Implemented renderer instance creator
This commit is contained in:
parent
43523302c2
commit
a55ba4267a
3 changed files with 9 additions and 2 deletions
|
@ -163,6 +163,8 @@ public abstract class BogeyRenderer {
|
||||||
return state.toString();
|
return state.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract BogeyRenderer newInstance();
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
interface Renderer {
|
interface Renderer {
|
||||||
void render(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light, VertexConsumer vb);
|
void render(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light, VertexConsumer vb);
|
||||||
|
|
|
@ -123,4 +123,9 @@ public class StandardBogeyRenderer extends BogeyRenderer {
|
||||||
if (!inContraption)
|
if (!inContraption)
|
||||||
ms.popPose();
|
ms.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BogeyRenderer newInstance() {
|
||||||
|
return new StandardBogeyRenderer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ import net.minecraft.world.phys.Vec3;
|
||||||
public class StandardBogeyBlock extends AbstractBogeyBlock implements ITE<StandardBogeyTileEntity>, ProperWaterloggedBlock, ISpecialBlockItemRequirement {
|
public class StandardBogeyBlock extends AbstractBogeyBlock implements ITE<StandardBogeyTileEntity>, ProperWaterloggedBlock, ISpecialBlockItemRequirement {
|
||||||
private final BogeyRenderer.BogeySize size;
|
private final BogeyRenderer.BogeySize size;
|
||||||
|
|
||||||
public StandardBogeyBlock(Properties p_i48440_1_, BogeyRenderer.BogeySize large) {
|
public StandardBogeyBlock(Properties props, BogeyRenderer.BogeySize large) {
|
||||||
super(p_i48440_1_);
|
super(props);
|
||||||
this.size = large;
|
this.size = large;
|
||||||
registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false));
|
registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue