mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Spinning is hard sometimes
- Bump flywheel build - Fix drills not spinning when breaking blocks - Fix bogey shafts not being correctly rotated - Use chunk cardinal lighting on contraption models
This commit is contained in:
parent
f81eae550b
commit
b7c62fa6cb
4 changed files with 19 additions and 10 deletions
|
@ -20,7 +20,7 @@ use_parchment = true
|
|||
# dependency versions
|
||||
registrate_version = MC1.20-1.3.3
|
||||
flywheel_minecraft_version = 1.20.1
|
||||
flywheel_version = 1.0.0-beta-4
|
||||
flywheel_version = 1.0.0-beta-196
|
||||
jei_minecraft_version = 1.20.1
|
||||
jei_version = 15.19.0.85
|
||||
curios_minecraft_version = 1.20.1
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.simibubi.create.content.contraptions.behaviour.MovementContext;
|
|||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedBlockAndTintGetter;
|
||||
import com.simibubi.create.foundation.virtualWorld.VirtualRenderWorld;
|
||||
|
||||
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
|
||||
import dev.engine_room.flywheel.api.model.Model;
|
||||
import dev.engine_room.flywheel.api.task.Plan;
|
||||
import dev.engine_room.flywheel.api.visual.BlockEntityVisual;
|
||||
|
@ -28,6 +29,8 @@ import dev.engine_room.flywheel.api.visualization.VisualizationContext;
|
|||
import dev.engine_room.flywheel.api.visualization.VisualizerRegistry;
|
||||
import dev.engine_room.flywheel.lib.instance.InstanceTypes;
|
||||
import dev.engine_room.flywheel.lib.instance.TransformedInstance;
|
||||
import dev.engine_room.flywheel.lib.material.SimpleMaterial;
|
||||
import dev.engine_room.flywheel.lib.model.ModelUtil;
|
||||
import dev.engine_room.flywheel.lib.model.baked.ForgeMultiBlockModelBuilder;
|
||||
import dev.engine_room.flywheel.lib.task.ForEachPlan;
|
||||
import dev.engine_room.flywheel.lib.task.NestedPlan;
|
||||
|
@ -93,6 +96,8 @@ public class ContraptionVisual<E extends AbstractContraptionEntity> extends Abst
|
|||
|
||||
model = new ForgeMultiBlockModelBuilder(modelWorld, blocks.positions())
|
||||
.modelDataLookup(pos -> contraption.modelData.getOrDefault(pos, ModelData.EMPTY))
|
||||
.materialFunc((renderType, aBoolean) -> SimpleMaterial.builderOf(ModelUtil.getMaterial(renderType, aBoolean))
|
||||
.cardinalLightingMode(CardinalLightingMode.CHUNK))
|
||||
.build();
|
||||
|
||||
var instancer = embedding.instancerProvider()
|
||||
|
|
|
@ -41,7 +41,7 @@ public class DrillActorVisual extends ActorVisual {
|
|||
public void tick() {
|
||||
previousRotation = rotation;
|
||||
|
||||
if (context.contraption.stalled || context.disabled
|
||||
if (context.disabled
|
||||
|| VecHelper.isVecPointingTowards(context.relativeMotion, facing.getOpposite()))
|
||||
return;
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
var shaftInstancer = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.SHAFT));
|
||||
|
||||
shaft1 = shaftInstancer.createInstance().rotateToFace(Direction.SOUTH);
|
||||
shaft2 = shaftInstancer.createInstance().rotateToFace(Direction.SOUTH);
|
||||
shaft1 = shaftInstancer.createInstance();
|
||||
shaft2 = shaftInstancer.createInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,13 +33,15 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
shaft1.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, 0)
|
||||
.center()
|
||||
.rotateZDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.SOUTH)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
shaft2.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, -1)
|
||||
.center()
|
||||
.rotateZDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.SOUTH)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
}
|
||||
|
@ -145,8 +147,8 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
super(ctx, partialTick, inContraption);
|
||||
var secondaryShaftInstancer = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.SHAFT));
|
||||
secondaryShaft1 = secondaryShaftInstancer.createInstance().rotateToFace(Direction.EAST);
|
||||
secondaryShaft2 = secondaryShaftInstancer.createInstance().rotateToFace(Direction.EAST);
|
||||
secondaryShaft1 = secondaryShaftInstancer.createInstance();
|
||||
secondaryShaft2 = secondaryShaftInstancer.createInstance();
|
||||
drive = ctx.instancerProvider()
|
||||
.instancer(InstanceTypes.TRANSFORMED, Models.partial(AllPartialModels.BOGEY_DRIVE))
|
||||
.createInstance();
|
||||
|
@ -167,13 +169,15 @@ public class StandardBogeyVisual implements BogeyVisual {
|
|||
secondaryShaft1.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, .5f)
|
||||
.center()
|
||||
.rotateXDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.EAST)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
secondaryShaft2.setTransform(poseStack)
|
||||
.translate(-.5f, .25f, -1.5f)
|
||||
.center()
|
||||
.rotateXDegrees(wheelAngle)
|
||||
.rotateTo(Direction.UP, Direction.EAST)
|
||||
.rotateYDegrees(wheelAngle)
|
||||
.uncenter()
|
||||
.setChanged();
|
||||
drive.setTransform(poseStack)
|
||||
|
|
Loading…
Add table
Reference in a new issue