mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-05 03:02:37 +01:00
Added Common Renderer To Remove Function
This commit is contained in:
parent
411ec36f57
commit
2b76e8d7b3
2 changed files with 29 additions and 1 deletions
|
@ -0,0 +1,27 @@
|
|||
package com.simibubi.create.content.logistics.trains.entity;
|
||||
|
||||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.content.logistics.trains.BogeyRenderer;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
public class BackupBogeyRenderer extends BogeyRenderer.CommonRenderer {
|
||||
public static BackupBogeyRenderer INSTANCE = new BackupBogeyRenderer();
|
||||
|
||||
@Override
|
||||
public void render(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light, VertexConsumer vb) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseContraptionModelData(MaterialManager materialManager) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonRenderer createNewInstance() {
|
||||
return new BackupBogeyRenderer();
|
||||
}
|
||||
}
|
|
@ -69,7 +69,8 @@ public class BogeyStyle {
|
|||
}
|
||||
|
||||
public BogeyRenderer getInWorldRenderInstance(BogeySizes.BogeySize size) {
|
||||
return this.sizes.get(size).renderer();
|
||||
SizeData sizeData = this.sizes.get(size);
|
||||
return sizeData != null ? sizeData.renderer() : BackupBogeyRenderer.INSTANCE;
|
||||
}
|
||||
|
||||
public Optional<CommonRenderer> getInWorldCommonRenderInstance() {
|
||||
|
|
Loading…
Reference in a new issue