mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-05 03:22:37 +01:00
Added Contraption Model Instance Initializer
This commit is contained in:
parent
6672c49649
commit
6d98a1f469
1 changed files with 17 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
package com.simibubi.create.content.logistics.trains;
|
||||
|
||||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.jozufozu.flywheel.core.Materials;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||
import com.jozufozu.flywheel.util.transform.Transform;
|
||||
|
@ -61,6 +63,21 @@ public abstract class BogeyRenderer {
|
|||
: CachedBufferer.partial(model, air);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public abstract void initialiseContraptionModelData(MaterialManager materialManager, BogeySize size);
|
||||
|
||||
public void createModelInstances(MaterialManager materialManager, PartialModel model, int count) {
|
||||
ModelData[] modelData = new ModelData[count];
|
||||
materialManager.defaultSolid().material(Materials.TRANSFORMED)
|
||||
.getModel(model).createInstances(modelData);
|
||||
contraptionModelData.put(model, modelData);
|
||||
}
|
||||
|
||||
public void createModelInstances(MaterialManager materialManager, PartialModel... models) {
|
||||
for (PartialModel model : models)
|
||||
createModelInstances(materialManager, model, 1);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void render(CompoundTag bogeyData, float wheelAngle, PoseStack ms, int light, @Nullable VertexConsumer vb,
|
||||
BogeySize size) {
|
||||
|
|
Loading…
Reference in a new issue