mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Interfaces and less log lines
- MateralManager, MaterialGroup, and InstanceMaterial are all interfaces - Separate (T)EI facing API from implementation - Comment out debug log in ModelPool
This commit is contained in:
parent
5cb2eef157
commit
6de4b92ad0
53 changed files with 68 additions and 73 deletions
|
@ -6,7 +6,7 @@ import net.minecraft.state.properties.BlockStateProperties;
|
|||
import net.minecraft.util.Direction;
|
||||
|
||||
public class BackHalfShaftInstance extends HalfShaftInstance {
|
||||
public BackHalfShaftInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public BackHalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package com.simibubi.create.content.contraptions.base;
|
||||
|
||||
import com.jozufozu.flywheel.backend.instancing.Instancer;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.simibubi.create.foundation.render.AllMaterialSpecs;
|
||||
|
||||
public class CutoutRotatingInstance extends SingleRotatingInstance {
|
||||
public CutoutRotatingInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public CutoutRotatingInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.state.properties.BlockStateProperties;
|
|||
import net.minecraft.util.Direction;
|
||||
|
||||
public class HalfShaftInstance extends SingleRotatingInstance {
|
||||
public HalfShaftInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public HalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.util.Direction;
|
|||
|
||||
public class HorizontalHalfShaftInstance extends HalfShaftInstance {
|
||||
|
||||
public HorizontalHalfShaftInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public HorizontalHalfShaftInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ public abstract class KineticTileInstance<T extends KineticTileEntity> extends T
|
|||
|
||||
protected final Direction.Axis axis;
|
||||
|
||||
public KineticTileInstance(MaterialManager<?> modelManager, T tile) {
|
||||
public KineticTileInstance(MaterialManager modelManager, T tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
axis = ((IRotate) blockState.getBlock()).getRotationAxis(blockState);
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.simibubi.create.foundation.render.AllMaterialSpecs;
|
|||
|
||||
public class ShaftlessCogInstance extends SingleRotatingInstance {
|
||||
|
||||
public ShaftlessCogInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public ShaftlessCogInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ public class SingleRotatingInstance extends KineticTileInstance<KineticTileEntit
|
|||
|
||||
protected final RotatingData rotatingModel;
|
||||
|
||||
public SingleRotatingInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public SingleRotatingInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
rotatingModel = setup(getModel().createInstance());
|
||||
|
|
|
@ -19,7 +19,7 @@ public class DrillActorInstance extends ActorInstance {
|
|||
ActorData drillHead;
|
||||
private final Direction facing;
|
||||
|
||||
public DrillActorInstance(MaterialManager<?> materialManager, PlacementSimulationWorld contraption, MovementContext context) {
|
||||
public DrillActorInstance(MaterialManager materialManager, PlacementSimulationWorld contraption, MovementContext context) {
|
||||
super(materialManager, contraption, context);
|
||||
|
||||
InstanceMaterial<ActorData> instanceMaterial = materialManager.defaultSolid()
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.Direction;
|
|||
|
||||
public class DrillInstance extends SingleRotatingInstance {
|
||||
|
||||
public DrillInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public DrillInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class DrillMovementBehaviour extends BlockBreakingMovementBehaviour {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public ActorInstance createInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public ActorInstance createInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
return new DrillActorInstance(materialManager, simulationWorld, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public class HarvesterActorInstance extends ActorInstance {
|
|||
private double rotation;
|
||||
private double previousRotation;
|
||||
|
||||
public HarvesterActorInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public HarvesterActorInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
super(materialManager, simulationWorld, context);
|
||||
|
||||
InstanceMaterial<ModelData> instanceMaterial = materialManager.defaultCutout()
|
||||
|
|
|
@ -49,7 +49,7 @@ public class HarvesterMovementBehaviour extends MovementBehaviour {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public ActorInstance createInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public ActorInstance createInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
return new HarvesterActorInstance(materialManager, simulationWorld, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.util.Direction;
|
|||
|
||||
public class MechanicalCrafterInstance extends SingleRotatingInstance {
|
||||
|
||||
public MechanicalCrafterInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public MechanicalCrafterInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class HandCrankInstance extends SingleRotatingInstance implements IDynami
|
|||
private ModelData crank;
|
||||
private Direction facing;
|
||||
|
||||
public HandCrankInstance(MaterialManager<?> modelManager, HandCrankTileEntity tile) {
|
||||
public HandCrankInstance(MaterialManager modelManager, HandCrankTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
this.tile = tile;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DeployerActorInstance extends ActorInstance {
|
|||
ModelData hand;
|
||||
RotatingData shaft;
|
||||
|
||||
public DeployerActorInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public DeployerActorInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
super(materialManager, simulationWorld, context);
|
||||
|
||||
InstanceMaterial<ModelData> mat = materialManager.defaultSolid()
|
||||
|
|
|
@ -36,7 +36,7 @@ public class DeployerInstance extends ShaftInstance implements IDynamicInstance,
|
|||
float progress;
|
||||
private boolean newHand = false;
|
||||
|
||||
public DeployerInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public DeployerInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
|
||||
this.tile = (DeployerTileEntity) super.tile;
|
||||
|
|
|
@ -268,7 +268,7 @@ public class DeployerMovementBehaviour extends MovementBehaviour {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public ActorInstance createInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public ActorInstance createInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
return new DeployerActorInstance(materialManager, simulationWorld, context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class FanInstance extends KineticTileInstance<EncasedFanTileEntity> {
|
|||
final Direction direction;
|
||||
private final Direction opposite;
|
||||
|
||||
public FanInstance(MaterialManager<?> modelManager, EncasedFanTileEntity tile) {
|
||||
public FanInstance(MaterialManager modelManager, EncasedFanTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
direction = blockState.getValue(FACING);
|
||||
|
|
|
@ -8,8 +8,8 @@ import java.util.List;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceData;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.instancing.Instancer;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.core.materials.ModelData;
|
||||
import com.jozufozu.flywheel.util.transform.MatrixTransformStack;
|
||||
|
@ -45,7 +45,7 @@ public class FlyWheelInstance extends KineticTileInstance<FlywheelTileEntity> im
|
|||
|
||||
protected float lastAngle = Float.NaN;
|
||||
|
||||
public FlyWheelInstance(MaterialManager<?> modelManager, FlywheelTileEntity tile) {
|
||||
public FlyWheelInstance(MaterialManager modelManager, FlywheelTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
facing = blockState.getValue(HORIZONTAL_FACING);
|
||||
|
|
|
@ -16,7 +16,7 @@ public class EngineInstance extends TileEntityInstance<EngineTileEntity> {
|
|||
|
||||
protected ModelData frame;
|
||||
|
||||
public EngineInstance(MaterialManager<?> modelManager, EngineTileEntity tile) {
|
||||
public EngineInstance(MaterialManager modelManager, EngineTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
Block block = blockState
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
|||
|
||||
public class MillStoneCogInstance extends SingleRotatingInstance {
|
||||
|
||||
public MillStoneCogInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public MillStoneCogInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ public class MixerInstance extends ShaftlessCogInstance implements IDynamicInsta
|
|||
private final OrientedData mixerPole;
|
||||
private final MechanicalMixerTileEntity mixer;
|
||||
|
||||
public MixerInstance(MaterialManager<?> dispatcher, MechanicalMixerTileEntity tile) {
|
||||
public MixerInstance(MaterialManager dispatcher, MechanicalMixerTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
this.mixer = tile;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public class PressInstance extends ShaftInstance implements IDynamicInstance {
|
|||
private final OrientedData pressHead;
|
||||
private final MechanicalPressTileEntity press;
|
||||
|
||||
public PressInstance(MaterialManager<?> dispatcher, MechanicalPressTileEntity tile) {
|
||||
public PressInstance(MaterialManager dispatcher, MechanicalPressTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
press = tile;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraft.util.Rotation;
|
|||
|
||||
public class SawInstance extends SingleRotatingInstance {
|
||||
|
||||
public SawInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public SawInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public abstract class MovementBehaviour {
|
|||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Nullable
|
||||
public ActorInstance createInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public ActorInstance createInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class BearingInstance<B extends KineticTileEntity & IBearingTileEntity> e
|
|||
final Vector3f rotationAxis;
|
||||
final Quaternion blockOrientation;
|
||||
|
||||
public BearingInstance(MaterialManager<?> modelManager, B tile) {
|
||||
public BearingInstance(MaterialManager modelManager, B tile) {
|
||||
super(modelManager, tile);
|
||||
this.bearing = tile;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class StabilizedBearingInstance extends ActorInstance {
|
|||
final Vector3f rotationAxis;
|
||||
final Quaternion blockOrientation;
|
||||
|
||||
public StabilizedBearingInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public StabilizedBearingInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
super(materialManager, simulationWorld, context);
|
||||
|
||||
BlockState blockState = context.state;
|
||||
|
|
|
@ -70,7 +70,7 @@ public class StabilizedBearingMovementBehaviour extends MovementBehaviour {
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public ActorInstance createInstance(MaterialManager<?> materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
public ActorInstance createInstance(MaterialManager materialManager, PlacementSimulationWorld simulationWorld, MovementContext context) {
|
||||
return new StabilizedBearingInstance(materialManager, simulationWorld, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class StickerInstance extends TileEntityInstance<StickerTileEntity> imple
|
|||
|
||||
private final ModelData head;
|
||||
|
||||
public StickerInstance(MaterialManager<?> modelManager, StickerTileEntity tile) {
|
||||
public StickerInstance(MaterialManager modelManager, StickerTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
head = getTransformMaterial().getModel(AllBlockPartials.STICKER_HEAD, blockState).createInstance();
|
||||
|
|
|
@ -29,7 +29,7 @@ public class GantryCarriageInstance extends ShaftInstance implements IDynamicIns
|
|||
|
||||
private float lastAngle = Float.NaN;
|
||||
|
||||
public GantryCarriageInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public GantryCarriageInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
|
||||
gantryCogs = getTransformMaterial()
|
||||
|
|
|
@ -7,13 +7,9 @@ import com.jozufozu.flywheel.backend.instancing.Instancer;
|
|||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.entity.EntityInstance;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialGroup;
|
||||
import com.jozufozu.flywheel.backend.model.BufferedModel;
|
||||
import com.jozufozu.flywheel.backend.model.ElementBuffer;
|
||||
import com.jozufozu.flywheel.backend.model.IndexedModel;
|
||||
import com.jozufozu.flywheel.backend.state.TextureRenderState;
|
||||
import com.jozufozu.flywheel.core.Formats;
|
||||
import com.jozufozu.flywheel.core.Materials;
|
||||
import com.jozufozu.flywheel.core.QuadConverter;
|
||||
import com.jozufozu.flywheel.core.instancing.ConditionalInstance;
|
||||
import com.jozufozu.flywheel.core.materials.OrientedData;
|
||||
import com.jozufozu.flywheel.core.model.IModel;
|
||||
|
@ -41,7 +37,7 @@ public class GlueInstance extends EntityInstance<SuperGlueEntity> implements ITi
|
|||
private final Quaternion rotation;
|
||||
protected ConditionalInstance<OrientedData> model;
|
||||
|
||||
public GlueInstance(MaterialManager<?> materialManager, SuperGlueEntity entity) {
|
||||
public GlueInstance(MaterialManager materialManager, SuperGlueEntity entity) {
|
||||
super(materialManager, entity);
|
||||
|
||||
Instancer<OrientedData> instancer = getInstancer(materialManager, entity);
|
||||
|
@ -55,8 +51,8 @@ public class GlueInstance extends EntityInstance<SuperGlueEntity> implements ITi
|
|||
.update();
|
||||
}
|
||||
|
||||
private Instancer<OrientedData> getInstancer(MaterialManager<?> materialManager, SuperGlueEntity entity) {
|
||||
MaterialGroup<?> group = USE_ATLAS ? materialManager.defaultCutout() : materialManager.cutout(TextureRenderState.get(TEXTURE));
|
||||
private Instancer<OrientedData> getInstancer(MaterialManager materialManager, SuperGlueEntity entity) {
|
||||
MaterialGroup group = USE_ATLAS ? materialManager.defaultCutout() : materialManager.cutout(TextureRenderState.get(TEXTURE));
|
||||
|
||||
return group.material(Materials.ORIENTED).model(entity.getType(), GlueModel::new);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID
|
|||
private byte[] sLight = new byte[1];
|
||||
private GridAlignedBB volume;
|
||||
|
||||
public AbstractPulleyInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public AbstractPulleyInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
|
||||
rotatingAbout = Direction.get(Direction.AxisDirection.POSITIVE, axis);
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
|||
public class HosePulleyInstance extends AbstractPulleyInstance {
|
||||
final HosePulleyTileEntity tile = (HosePulleyTileEntity) super.tile;
|
||||
|
||||
public HosePulleyInstance(MaterialManager<?> dispatcher, HosePulleyTileEntity tile) {
|
||||
public HosePulleyInstance(MaterialManager dispatcher, HosePulleyTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
beginFrame();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
|||
public class RopePulleyInstance extends AbstractPulleyInstance {
|
||||
final PulleyTileEntity tile = (PulleyTileEntity) super.tile;
|
||||
|
||||
public RopePulleyInstance(MaterialManager<?> dispatcher, PulleyTileEntity tile) {
|
||||
public RopePulleyInstance(MaterialManager dispatcher, PulleyTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
beginFrame();
|
||||
}
|
||||
|
|
|
@ -7,11 +7,11 @@ import com.simibubi.create.foundation.utility.worldWrappers.PlacementSimulationW
|
|||
import net.minecraft.world.LightType;
|
||||
|
||||
public abstract class ActorInstance {
|
||||
protected final MaterialManager<?> materialManager;
|
||||
protected final MaterialManager materialManager;
|
||||
protected final PlacementSimulationWorld simulationWorld;
|
||||
protected final MovementContext context;
|
||||
|
||||
public ActorInstance(MaterialManager<?> materialManager, PlacementSimulationWorld world, MovementContext context) {
|
||||
public ActorInstance(MaterialManager materialManager, PlacementSimulationWorld world, MovementContext context) {
|
||||
this.materialManager = materialManager;
|
||||
this.simulationWorld = world;
|
||||
this.context = context;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.simibubi.create.content.contraptions.components.structureMovement.render;
|
||||
|
||||
import com.jozufozu.flywheel.backend.material.MaterialGroup;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialGroupImpl;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
|
||||
import com.jozufozu.flywheel.backend.state.IRenderState;
|
||||
|
||||
public class ContraptionGroup<P extends ContraptionProgram> extends MaterialGroup<P> {
|
||||
public class ContraptionGroup<P extends ContraptionProgram> extends MaterialGroupImpl<P> {
|
||||
|
||||
private final RenderedContraption contraption;
|
||||
|
||||
public ContraptionGroup(RenderedContraption contraption, MaterialManager<P> owner, IRenderState state) {
|
||||
public ContraptionGroup(RenderedContraption contraption, MaterialManagerImpl<P> owner, IRenderState state) {
|
||||
super(owner, state);
|
||||
|
||||
this.contraption = contraption;
|
||||
|
@ -19,7 +19,7 @@ public class ContraptionGroup<P extends ContraptionProgram> extends MaterialGrou
|
|||
contraption.setup(program);
|
||||
}
|
||||
|
||||
public static <P extends ContraptionProgram> MaterialManager.GroupFactory<P> forContraption(RenderedContraption c) {
|
||||
public static <P extends ContraptionProgram> MaterialManagerImpl.GroupFactory<P> forContraption(RenderedContraption c) {
|
||||
return (materialManager, state) -> new ContraptionGroup<>(c, materialManager, state);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import javax.annotation.Nullable;
|
|||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
|
||||
import com.simibubi.create.AllMovementBehaviours;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour;
|
||||
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
|
||||
|
@ -23,7 +23,7 @@ public class ContraptionInstanceManager extends TileInstanceManager {
|
|||
|
||||
private final WeakReference<RenderedContraption> contraption;
|
||||
|
||||
ContraptionInstanceManager(RenderedContraption contraption, MaterialManager<?> materialManager) {
|
||||
ContraptionInstanceManager(RenderedContraption contraption, MaterialManagerImpl<?> materialManager) {
|
||||
super(materialManager);
|
||||
this.contraption = new WeakReference<>(contraption);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.function.Supplier;
|
|||
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
|
||||
import com.jozufozu.flywheel.backend.model.ArrayModelRenderer;
|
||||
import com.jozufozu.flywheel.backend.model.ModelRenderer;
|
||||
import com.jozufozu.flywheel.core.model.IModel;
|
||||
|
@ -36,7 +36,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
|||
|
||||
private final ContraptionLighter<?> lighter;
|
||||
|
||||
public final MaterialManager<ContraptionProgram> materialManager;
|
||||
public final MaterialManagerImpl<ContraptionProgram> materialManager;
|
||||
public final ContraptionInstanceManager kinetics;
|
||||
|
||||
private final Map<RenderType, ModelRenderer> renderLayers = new HashMap<>();
|
||||
|
@ -48,7 +48,7 @@ public class RenderedContraption extends ContraptionRenderInfo {
|
|||
public RenderedContraption(Contraption contraption, PlacementSimulationWorld renderWorld) {
|
||||
super(contraption, renderWorld);
|
||||
this.lighter = contraption.makeLighter();
|
||||
this.materialManager = MaterialManager.builder(CreateContexts.CWORLD)
|
||||
this.materialManager = MaterialManagerImpl.builder(CreateContexts.CWORLD)
|
||||
.setGroupFactory(ContraptionGroup.forContraption(this))
|
||||
.setIgnoreOriginCoordinate(true)
|
||||
.build();
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.Direction;
|
|||
|
||||
public class PumpCogInstance extends SingleRotatingInstance {
|
||||
|
||||
public PumpCogInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public PumpCogInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class FluidValveInstance extends ShaftInstance implements IDynamicInstanc
|
|||
protected final double yRot;
|
||||
protected final int pointerRotationOffset;
|
||||
|
||||
public FluidValveInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public FluidValveInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
|
||||
Direction facing = blockState.getValue(FluidValveBlock.FACING);
|
||||
|
|
|
@ -35,7 +35,7 @@ public class BeltInstance extends KineticTileInstance<BeltTileEntity> {
|
|||
protected ArrayList<BeltData> keys;
|
||||
protected RotatingData pulleyKey;
|
||||
|
||||
public BeltInstance(MaterialManager<?> materialManager, BeltTileEntity tile) {
|
||||
public BeltInstance(MaterialManager materialManager, BeltTileEntity tile) {
|
||||
super(materialManager, tile);
|
||||
|
||||
if (!AllBlocks.BELT.has(blockState))
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.block.BlockState;
|
|||
|
||||
public class ShaftInstance extends SingleRotatingInstance {
|
||||
|
||||
public ShaftInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public ShaftInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.relays.encased;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceData;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.instancing.Instancer;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.IRotate;
|
||||
|
@ -19,7 +19,7 @@ public class SplitShaftInstance extends KineticTileInstance<SplitShaftTileEntity
|
|||
|
||||
protected final ArrayList<RotatingData> keys;
|
||||
|
||||
public SplitShaftInstance(MaterialManager<?> modelManager, SplitShaftTileEntity tile) {
|
||||
public SplitShaftInstance(MaterialManager modelManager, SplitShaftTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
keys = new ArrayList<>(2);
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
|
|||
|
||||
protected MatrixStack ms;
|
||||
|
||||
protected GaugeInstance(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
protected GaugeInstance(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
|
||||
faces = new ArrayList<>(2);
|
||||
|
@ -145,7 +145,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
|
|||
}
|
||||
|
||||
public static class Speed extends GaugeInstance {
|
||||
public Speed(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public Speed(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
|
|||
}
|
||||
|
||||
public static class Stress extends GaugeInstance {
|
||||
public Stress(MaterialManager<?> dispatcher, KineticTileEntity tile) {
|
||||
public Stress(MaterialManager dispatcher, KineticTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.util.EnumMap;
|
|||
import java.util.Map;
|
||||
|
||||
import com.jozufozu.flywheel.backend.instancing.InstanceData;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.instancing.Instancer;
|
||||
import com.jozufozu.flywheel.backend.material.InstanceMaterial;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.simibubi.create.AllBlockPartials;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
|
||||
|
@ -22,7 +22,7 @@ public class GearboxInstance extends KineticTileInstance<GearboxTileEntity> {
|
|||
protected final EnumMap<Direction, RotatingData> keys;
|
||||
protected Direction sourceFacing;
|
||||
|
||||
public GearboxInstance(MaterialManager<?> modelManager, GearboxTileEntity tile) {
|
||||
public GearboxInstance(MaterialManager modelManager, GearboxTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
keys = new EnumMap<>(Direction.class);
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
|
|||
|
||||
public class CopperBacktankInstance extends SingleRotatingInstance {
|
||||
|
||||
public CopperBacktankInstance(MaterialManager<?> modelManager, KineticTileEntity tile) {
|
||||
public CopperBacktankInstance(MaterialManager modelManager, KineticTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ public class BeltTunnelInstance extends TileEntityInstance<BeltTunnelTileEntity>
|
|||
|
||||
private final Map<Direction, ArrayList<FlapData>> tunnelFlaps;
|
||||
|
||||
public BeltTunnelInstance(MaterialManager<?> modelManager, BeltTunnelTileEntity tile) {
|
||||
public BeltTunnelInstance(MaterialManager modelManager, BeltTunnelTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
tunnelFlaps = new EnumMap<>(Direction.class);
|
||||
|
|
|
@ -19,7 +19,7 @@ public class EjectorInstance extends ShaftInstance implements IDynamicInstance {
|
|||
|
||||
private float lastProgress = Float.NaN;
|
||||
|
||||
public EjectorInstance(MaterialManager<?> dispatcher, EjectorTileEntity tile) {
|
||||
public EjectorInstance(MaterialManager dispatcher, EjectorTileEntity tile) {
|
||||
super(dispatcher, tile);
|
||||
this.tile = tile;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ public class AdjustableRepeaterInstance extends TileEntityInstance<AdjustableRep
|
|||
|
||||
protected int previousState;
|
||||
|
||||
public AdjustableRepeaterInstance(MaterialManager<?> modelManager, AdjustableRepeaterTileEntity tile) {
|
||||
public AdjustableRepeaterInstance(MaterialManager modelManager, AdjustableRepeaterTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
indicator = modelManager.defaultSolid()
|
||||
|
|
|
@ -20,7 +20,7 @@ public class FunnelInstance extends TileEntityInstance<FunnelTileEntity> impleme
|
|||
|
||||
private final ArrayList<FlapData> flaps;
|
||||
|
||||
public FunnelInstance(MaterialManager<?> modelManager, FunnelTileEntity tile) {
|
||||
public FunnelInstance(MaterialManager modelManager, FunnelTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
flaps = new ArrayList<>(4);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ArmInstance extends SingleRotatingInstance implements IDynamicInsta
|
|||
private float upperArmAngle = Float.NaN;
|
||||
private float headAngle = Float.NaN;
|
||||
|
||||
public ArmInstance(MaterialManager<?> modelManager, ArmTileEntity tile) {
|
||||
public ArmInstance(MaterialManager modelManager, ArmTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
InstanceMaterial<ModelData> mat = getTransformMaterial();
|
||||
|
|
|
@ -23,7 +23,7 @@ public class AnalogLeverInstance extends TileEntityInstance<AnalogLeverTileEntit
|
|||
final float rX;
|
||||
final float rY;
|
||||
|
||||
public AnalogLeverInstance(MaterialManager<?> modelManager, AnalogLeverTileEntity tile) {
|
||||
public AnalogLeverInstance(MaterialManager modelManager, AnalogLeverTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
InstanceMaterial<ModelData> mat = getTransformMaterial();
|
||||
|
|
|
@ -17,7 +17,7 @@ public class SchematicannonInstance extends TileEntityInstance<SchematicannonTil
|
|||
private final ModelData connector;
|
||||
private final ModelData pipe;
|
||||
|
||||
public SchematicannonInstance(MaterialManager<?> modelManager, SchematicannonTileEntity tile) {
|
||||
public SchematicannonInstance(MaterialManager modelManager, SchematicannonTileEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
InstanceMaterial<ModelData> mat = getTransformMaterial();
|
||||
|
|
Loading…
Reference in a new issue