mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-04 09:24:59 +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();
|
||||
}
|
||||
|
||||
public abstract BogeyRenderer newInstance();
|
||||
|
||||
@FunctionalInterface
|
||||
interface Renderer {
|
||||
void render(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light, VertexConsumer vb);
|
||||
|
|
|
@ -123,4 +123,9 @@ public class StandardBogeyRenderer extends BogeyRenderer {
|
|||
if (!inContraption)
|
||||
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 {
|
||||
private final BogeyRenderer.BogeySize size;
|
||||
|
||||
public StandardBogeyBlock(Properties p_i48440_1_, BogeyRenderer.BogeySize large) {
|
||||
super(p_i48440_1_);
|
||||
public StandardBogeyBlock(Properties props, BogeyRenderer.BogeySize large) {
|
||||
super(props);
|
||||
this.size = large;
|
||||
registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue