mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +01:00
Reveal thy Settings
- The majority of scroll options no longer require a wrench - Filters now use the built-in 'sprite' model
This commit is contained in:
parent
0fefcd80e6
commit
e8fd97b36c
@ -55,7 +55,6 @@ public class SteamEngineBlockEntity extends SmartBlockEntity implements IHaveGog
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
movementDirection = new ScrollOptionBehaviour<>(RotationDirection.class,
|
||||
Lang.translateDirect("contraptions.windmill.rotation_direction"), this, new SteamEngineValueBox());
|
||||
movementDirection.requiresWrench();
|
||||
movementDirection.onlyActiveWhen(() -> {
|
||||
PoweredShaftBlockEntity shaft = getShaft();
|
||||
return shaft == null || !shaft.hasSource();
|
||||
|
@ -55,7 +55,6 @@ public class ClockworkBearingBlockEntity extends KineticBlockEntity
|
||||
super.addBehaviours(behaviours);
|
||||
operationMode = new ScrollOptionBehaviour<>(ClockHands.class,
|
||||
Lang.translateDirect("contraptions.clockwork.clock_hands"), this, getMovementModeSlot());
|
||||
operationMode.requiresWrench();
|
||||
behaviours.add(operationMode);
|
||||
registerAwardables(behaviours, AllAdvancements.CLOCKWORK_BEARING);
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ public class MechanicalBearingBlockEntity extends GeneratingKineticBlockEntity
|
||||
super.addBehaviours(behaviours);
|
||||
movementMode = new ScrollOptionBehaviour<>(RotationMode.class, Lang.translateDirect("contraptions.movement_mode"),
|
||||
this, getMovementModeSlot());
|
||||
movementMode.requiresWrench();
|
||||
behaviours.add(movementMode);
|
||||
registerAwardables(behaviours, AllAdvancements.CONTRAPTION_ACTORS);
|
||||
}
|
||||
|
@ -102,7 +102,6 @@ public class WindmillBearingBlockEntity extends MechanicalBearingBlockEntity {
|
||||
behaviours.remove(movementMode);
|
||||
movementDirection = new ScrollOptionBehaviour<>(RotationDirection.class,
|
||||
Lang.translateDirect("contraptions.windmill.rotation_direction"), this, getMovementModeSlot());
|
||||
movementDirection.requiresWrench();
|
||||
movementDirection.withCallback($ -> onDirectionChanged());
|
||||
behaviours.add(movementDirection);
|
||||
registerAwardables(behaviours, AllAdvancements.WINDMILL, AllAdvancements.WINDMILL_MAXED);
|
||||
|
@ -235,7 +235,6 @@ public class CartAssemblerBlockEntity extends SmartBlockEntity implements IDispl
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
movementMode = new ScrollOptionBehaviour<>(CartMovementMode.class,
|
||||
Lang.translateDirect("contraptions.cart_movement_mode"), this, getMovementModeSlot());
|
||||
movementMode.requiresWrench();
|
||||
behaviours.add(movementMode);
|
||||
registerAwardables(behaviours, AllAdvancements.CONTRAPTION_ACTORS);
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ public abstract class LinearActuatorBlockEntity extends KineticBlockEntity
|
||||
super.addBehaviours(behaviours);
|
||||
movementMode = new ScrollOptionBehaviour<>(MovementMode.class, Lang.translateDirect("contraptions.movement_mode"),
|
||||
this, getMovementModeSlot());
|
||||
movementMode.requiresWrench();
|
||||
movementMode.withCallback(t -> waitingForSpeedChange = false);
|
||||
behaviours.add(movementMode);
|
||||
registerAwardables(behaviours, AllAdvancements.CONTRAPTION_ACTORS);
|
||||
|
@ -100,7 +100,6 @@ public class BrassTunnelBlockEntity extends BeltTunnelBlockEntity implements IHa
|
||||
behaviours.add(selectionMode = new ScrollOptionBehaviour<>(SelectionMode.class,
|
||||
Lang.translateDirect("logistics.when_multiple_outputs_available"), this,
|
||||
new CenteredSideValueBoxTransform((state, d) -> d == Direction.UP)));
|
||||
selectionMode.requiresWrench();
|
||||
|
||||
// Propagate settings across connected tunnels
|
||||
selectionMode.withCallback(setting -> {
|
||||
|
@ -105,8 +105,7 @@ public class EjectorBlockEntity extends KineticBlockEntity {
|
||||
maxStackSize = new ScrollValueBehaviour(Lang.translateDirect("weighted_ejector.stack_size"), this, new EjectorSlot())
|
||||
.between(0, 64)
|
||||
.withFormatter(i -> i == 0 ? "*" : String.valueOf(i))
|
||||
.onlyActiveWhen(() -> state == State.CHARGED)
|
||||
.requiresWrench();
|
||||
.onlyActiveWhen(() -> state == State.CHARGED);
|
||||
behaviours.add(maxStackSize);
|
||||
|
||||
depotBehaviour.maxStackSize = () -> maxStackSize.getValue();
|
||||
|
@ -106,7 +106,6 @@ public class ArmBlockEntity extends KineticBlockEntity implements ITransformable
|
||||
|
||||
selectionMode = new ScrollOptionBehaviour<SelectionMode>(SelectionMode.class,
|
||||
Lang.translateDirect("logistics.when_multiple_outputs_available"), this, new SelectionModeValueBox());
|
||||
selectionMode.requiresWrench();
|
||||
behaviours.add(selectionMode);
|
||||
|
||||
registerAwardables(behaviours, AllAdvancements.ARM_BLAZE_BURNER, AllAdvancements.ARM_MANY_TARGETS,
|
||||
|
@ -30,7 +30,8 @@ public class ValueBoxRenderer {
|
||||
.getItemRenderer();
|
||||
BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0);
|
||||
boolean blockItem = modelWithOverrides.isGui3d() && !(modelWithOverrides instanceof ItemMultiLayerBakedModel);
|
||||
float scale = (!blockItem ? .5f : 1f) + 1 / 64f;
|
||||
boolean filterItem = filter.getItem() instanceof FilterItem;
|
||||
float scale = (!blockItem && !filterItem ? .5f : 1f) + 1 / 64f;
|
||||
float zOffset = (!blockItem ? -.15f : 0) + customZOffset(filter.getItem());
|
||||
ms.scale(scale, scale, scale);
|
||||
ms.translate(0, 0, zOffset);
|
||||
@ -80,7 +81,7 @@ public class ValueBoxRenderer {
|
||||
private static float customZOffset(Item item) {
|
||||
float nudge = -.1f;
|
||||
if (item instanceof FilterItem)
|
||||
return nudge;
|
||||
return -nudge / 2;
|
||||
if (item instanceof BlockItem) {
|
||||
Block block = ((BlockItem) item).getBlock();
|
||||
if (block instanceof AbstractSimpleShaftBlock)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"parent": "create:item/filter",
|
||||
"textures": {
|
||||
"0": "create:item/property_filter",
|
||||
"particle": "create:item/property_filter"
|
||||
"layer0": "create:item/brass_filter",
|
||||
"particle": "create:item/brass_filter"
|
||||
}
|
||||
}
|
@ -1,115 +1,36 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "block/block",
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"0": "create:item/filter",
|
||||
"particle": "create:item/filter"
|
||||
"particle": "create:item/andesite_filter",
|
||||
"layer0": "create:item/andesite_filter"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "siderim",
|
||||
"from": [5, -0.25, 6],
|
||||
"to": [6, 0.75, 10],
|
||||
"faces": {
|
||||
"north": {"uv": [15, 0, 16, 1], "texture": "#0"},
|
||||
"east": {"uv": [14, 7, 15, 3], "rotation": 270, "texture": "#0"},
|
||||
"south": {"uv": [15, 0, 16, 1], "texture": "#0"},
|
||||
"west": {"uv": [15, 8, 16, 4], "rotation": 270, "texture": "#0"},
|
||||
"up": {"uv": [15, 4, 16, 8], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [15, 4, 14, 8], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "siderim",
|
||||
"from": [10, -0.25, 6],
|
||||
"to": [11, 0.75, 10],
|
||||
"faces": {
|
||||
"north": {"uv": [15, 0, 16, 1], "texture": "#0"},
|
||||
"east": {"uv": [15, 8, 16, 4], "rotation": 270, "texture": "#0"},
|
||||
"south": {"uv": [15, 0, 16, 1], "texture": "#0"},
|
||||
"west": {"uv": [14, 7, 15, 3], "rotation": 270, "texture": "#0"},
|
||||
"up": {"uv": [15, 5, 16, 9], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [15, 4, 14, 8], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "net",
|
||||
"from": [6, 0.5, 6],
|
||||
"to": [10, 0.6, 10],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 4, 0.1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 4, 0.1], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 4, 0.1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 4, 0.1], "texture": "#0"},
|
||||
"up": {"uv": [2, 0, 6, 4], "texture": "#0"},
|
||||
"down": {"uv": [2.5, 0.5, 6.5, 4.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "toprim",
|
||||
"from": [5, -0.25, 5],
|
||||
"to": [11, 0.75, 6],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 9, 9, 10], "texture": "#0"},
|
||||
"east": {"uv": [12, 9, 13, 10], "texture": "#0"},
|
||||
"south": {"uv": [3, 9, 9, 10], "rotation": 180, "texture": "#0"},
|
||||
"west": {"uv": [12, 9, 13, 10], "texture": "#0"},
|
||||
"up": {"uv": [3, 9, 9, 10], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [3, 9, 9, 10], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "toprim",
|
||||
"from": [5, -0.25, 10],
|
||||
"to": [11, 0.75, 11],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 9, 9, 10], "texture": "#0"},
|
||||
"east": {"uv": [12, 9, 13, 10], "texture": "#0"},
|
||||
"south": {"uv": [5, 9, 11, 10], "rotation": 180, "texture": "#0"},
|
||||
"west": {"uv": [12, 9, 13, 10], "texture": "#0"},
|
||||
"up": {"uv": [5, 9, 11, 10], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [3, 9, 9, 10], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [75, -180, 0],
|
||||
"translation": [-2.75, 2, 4.75],
|
||||
"scale": [0.6, 0.6, 0.6]
|
||||
"translation": [0, 1.5, 1],
|
||||
"scale": [0.55, 0.55, 0.55]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [75, -180, 0],
|
||||
"translation": [-2.75, 2, 4.75],
|
||||
"scale": [0.6, 0.6, 0.6]
|
||||
"translation": [0, 1.5, 1],
|
||||
"scale": [0.55, 0.55, 0.55]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [75, -180, 0],
|
||||
"translation": [2.25, 1.5, 4.75],
|
||||
"scale": [1.35, 1.35, 1.35]
|
||||
"rotation": [0, -90, 25],
|
||||
"translation": [1.13, 3.2, 2.88],
|
||||
"scale": [0.68, 0.68, 0.68]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [75, -180, 0],
|
||||
"translation": [2.25, 1.5, 4.75],
|
||||
"scale": [1.35, 1.35, 1.35]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [0, 3, 0],
|
||||
"scale": [0.76, 0.76, 0.76]
|
||||
"rotation": [0, -90, 25],
|
||||
"translation": [1.13, 3.2, 2.88],
|
||||
"scale": [0.68, 0.68, 0.68]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [30, 225, 0],
|
||||
"translation": [0, 9.5, 0],
|
||||
"rotation": [30, 135, 0],
|
||||
"scale": [1.5, 1.5, 1.5]
|
||||
},
|
||||
"head": {
|
||||
"translation": [0, 18.25, 0],
|
||||
"scale": [1.43, 1.43, 1.43]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [90, 0, 179.5],
|
||||
"translation": [0, 0, -15],
|
||||
"scale": [2.04, 2.04, 2.04]
|
||||
"rotation": [0, 180, 0],
|
||||
"scale": [2, 2, 2]
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 221 B |
BIN
src/main/resources/assets/create/textures/item/brass_filter.png
Normal file
BIN
src/main/resources/assets/create/textures/item/brass_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 227 B |
Binary file not shown.
Before Width: | Height: | Size: 309 B |
Binary file not shown.
Before Width: | Height: | Size: 237 B |
Loading…
Reference in New Issue
Block a user