Skip to content

Commit 98a08d6

Browse files
committed
Playtest IV
- Fixed lava fans voiding items that have smoking & smelting recipes with different outputs - Fixed Mechanical Saws not rendering as animated when using rubidium (?) - Right clicking elevator controls now always prevents block placement actions - Increased size of the scroll bounding box on elevator controls - Fixed a ui element of the Station Screen rendering behind the background - Fixed train controls not rendering handles when loading in with activated contraption controls
1 parent 1432c46 commit 98a08d6

File tree

10 files changed

+102
-62
lines changed

10 files changed

+102
-62
lines changed

src/main/java/com/simibubi/create/compat/jei/CreateJEI.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,9 @@ public CategoryBuilder<T> removeRecipes(Supplier<RecipeType<? extends T>> recipe
456456
return addRecipeListConsumer(recipes -> {
457457
List<Recipe<?>> excludedRecipes = getTypedRecipes(recipeType.get());
458458
recipes.removeIf(recipe -> {
459-
for (Recipe<?> excludedRecipe : excludedRecipes) {
460-
if (doInputsMatch(recipe, excludedRecipe)) {
459+
for (Recipe<?> excludedRecipe : excludedRecipes)
460+
if (doInputsMatch(recipe, excludedRecipe) && doOutputsMatch(recipe, excludedRecipe))
461461
return true;
462-
}
463-
}
464462
return false;
465463
});
466464
});
@@ -570,4 +568,8 @@ public static boolean doInputsMatch(Recipe<?> recipe1, Recipe<?> recipe2) {
570568
.test(matchingStacks[0]);
571569
}
572570

571+
public static boolean doOutputsMatch(Recipe<?> recipe1, Recipe<?> recipe2) {
572+
return ItemStack.isSame(recipe1.getResultItem(), recipe2.getResultItem());
573+
}
574+
573575
}

src/main/java/com/simibubi/create/content/contraptions/components/actors/controls/ContraptionControlsMovingInteraction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private boolean elevatorInteraction(BlockPos localPos, AbstractContraptionEntity
116116
if (!(ctx.temporaryData instanceof ElevatorFloorSelection efs))
117117
return false;
118118
if (efs.currentTargetY == contraption.clientYTarget)
119-
return false;
119+
return true;
120120

121121
AllPackets.getChannel().sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY));
122122
if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)

src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/elevator/ElevatorControlsHandler.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import net.minecraft.client.player.LocalPlayer;
2323
import net.minecraft.core.BlockPos;
2424
import net.minecraft.util.Mth;
25+
import net.minecraft.world.level.block.state.BlockState;
2526
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
2627
import net.minecraft.world.phys.AABB;
2728
import net.minecraft.world.phys.BlockHitResult;
@@ -31,7 +32,19 @@
3132

3233
public class ElevatorControlsHandler {
3334

34-
private static ControlsSlot slot = new ContraptionControlsBlockEntity.ControlsSlot();
35+
private static ControlsSlot slot = new ElevatorControlsSlot();
36+
37+
private static class ElevatorControlsSlot extends ContraptionControlsBlockEntity.ControlsSlot {
38+
39+
@Override
40+
public boolean testHit(BlockState state, Vec3 localHit) {
41+
Vec3 offset = getLocalOffset(state);
42+
if (offset == null)
43+
return false;
44+
return localHit.distanceTo(offset) < scale * .85;
45+
}
46+
47+
}
3548

3649
@OnlyIn(Dist.CLIENT)
3750
public static boolean onScroll(double delta) {

src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/interaction/controls/ControlsMovementBehaviour.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import net.minecraft.client.renderer.MultiBufferSource;
1616
import net.minecraft.core.Direction;
17+
import net.minecraft.world.item.ItemStack;
1718
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
1819
import net.minecraftforge.api.distmarker.Dist;
1920
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -27,6 +28,11 @@ static class LeverAngles {
2728
LerpedFloat equipAnimation = LerpedFloat.linear();
2829
}
2930

31+
@Override
32+
public ItemStack canBeDisabledVia(MovementContext context) {
33+
return null;
34+
}
35+
3036
@Override
3137
public void stopMoving(MovementContext context) {
3238
context.contraption.entity.stopControlling(context.localPos);

src/main/java/com/simibubi/create/content/contraptions/processing/InWorldProcessing.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import net.minecraft.world.entity.item.ItemEntity;
4141
import net.minecraft.world.entity.monster.EnderMan;
4242
import net.minecraft.world.item.ItemStack;
43+
import net.minecraft.world.item.crafting.AbstractCookingRecipe;
4344
import net.minecraft.world.item.crafting.BlastingRecipe;
4445
import net.minecraft.world.item.crafting.Recipe;
4546
import net.minecraft.world.item.crafting.RecipeType;
@@ -170,20 +171,22 @@ private static List<ItemStack> process(ItemStack stack, Type type, Level world)
170171
.getRecipeFor(RecipeType.SMOKING, RECIPE_WRAPPER, world);
171172

172173
if (type == Type.BLASTING) {
173-
if (!smokingRecipe.isPresent()) {
174+
RECIPE_WRAPPER.setItem(0, stack);
175+
Optional<? extends AbstractCookingRecipe> smeltingRecipe = world.getRecipeManager()
176+
.getRecipeFor(RecipeType.SMELTING, RECIPE_WRAPPER, world);
177+
if (!smeltingRecipe.isPresent()) {
174178
RECIPE_WRAPPER.setItem(0, stack);
175-
Optional<SmeltingRecipe> smeltingRecipe = world.getRecipeManager()
176-
.getRecipeFor(RecipeType.SMELTING, RECIPE_WRAPPER, world);
177-
178-
if (smeltingRecipe.isPresent())
179-
return applyRecipeOn(stack, smeltingRecipe.get());
180-
181-
RECIPE_WRAPPER.setItem(0, stack);
182-
Optional<BlastingRecipe> blastingRecipe = world.getRecipeManager()
179+
smeltingRecipe = world.getRecipeManager()
183180
.getRecipeFor(RecipeType.BLASTING, RECIPE_WRAPPER, world);
181+
}
184182

185-
if (blastingRecipe.isPresent())
186-
return applyRecipeOn(stack, blastingRecipe.get());
183+
if (smeltingRecipe.isPresent()) {
184+
if (!smokingRecipe.isPresent() || !ItemStack.isSame(smokingRecipe.get()
185+
.getResultItem(),
186+
smeltingRecipe.get()
187+
.getResultItem())) {
188+
return applyRecipeOn(stack, smeltingRecipe.get());
189+
}
187190
}
188191

189192
return Collections.emptyList();

src/main/java/com/simibubi/create/content/logistics/trains/management/edgePoint/station/StationScreen.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,6 @@ protected void renderWindow(PoseStack ms, int mouseX, int mouseY, float partialT
271271
for (int i = carriages.size() - 1; i > 0; i--) {
272272
RenderSystem.setShaderColor(1, 1, 1, Math.min(1f,
273273
Math.min((position + offset - 10) / 30f, (background.width - 40 - position - offset) / 30f)));
274-
// if (i == carriages.size() - 1 && train.doubleEnded) {
275-
// offset += icon.render(TrainIconType.FLIPPED_ENGINE, ms, x + offset, y + 20) + 1;
276-
// continue;
277-
// }
278274
Carriage carriage = carriages.get(blockEntity.trainBackwards ? carriages.size() - i - 1 : i);
279275
offset += icon.render(carriage.bogeySpacing, ms, x + offset, y + 20) + 1;
280276
}
@@ -287,8 +283,8 @@ protected void renderWindow(PoseStack ms, int mouseX, int mouseY, float partialT
287283

288284
RenderSystem.setShaderColor(1, 1, 1, 1);
289285

290-
UIRenderHelper.drawStretched(ms, x + 21, y + 43, 150, 46, -100, AllGuiTextures.STATION_TEXTBOX_MIDDLE);
291286
AllGuiTextures.STATION_TEXTBOX_TOP.render(ms, x + 21, y + 42);
287+
UIRenderHelper.drawStretched(ms, x + 21, y + 60, 150, 26, 0, AllGuiTextures.STATION_TEXTBOX_MIDDLE);
292288
AllGuiTextures.STATION_TEXTBOX_BOTTOM.render(ms, x + 21, y + 86);
293289

294290
ms.pushPose();
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"textures": {
3-
"stonecutter_saw": "minecraft:block/stonecutter_saw",
4-
"stonecutter_saw_reversed" : "create:block/saw_reversed"
5-
},
6-
"elements": [
7-
{
8-
"name": "Blade",
9-
"from": [ 1, 8, 11 ],
10-
"to": [ 15, 8.062, 18 ],
11-
"faces": {
12-
"up": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ], "rotation": 180 },
13-
"down": { "texture": "#stonecutter_saw_reversed", "uv": [ 1, 9, 15, 16 ] }
14-
}
15-
}
16-
]
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"stonecutter_saw": "block/stonecutter_saw"
5+
},
6+
"elements": [
7+
{
8+
"name": "Blade",
9+
"from": [1, 8, 11],
10+
"to": [15, 8.062, 18],
11+
"faces": {
12+
"up": {"uv": [1, 9, 15, 16], "rotation": 180, "texture": "#stonecutter_saw"},
13+
"down": {"uv": [15, 9, 1, 16], "texture": "#stonecutter_saw"}
14+
}
15+
}
16+
]
1717
}
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
2-
"parent": "create:block/mechanical_saw/blade_horizontal_active",
3-
"textures": {
4-
"stonecutter_saw": "create:block/saw_reversed",
5-
"stonecutter_saw": "minecraft:block/stonecutter_saw"
6-
}
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"stonecutter_saw": "block/stonecutter_saw"
5+
},
6+
"elements": [
7+
{
8+
"name": "Blade",
9+
"from": [1, 8, 11],
10+
"to": [15, 8.062, 18],
11+
"faces": {
12+
"up": {"uv": [15, 9, 1, 16], "rotation": 180, "texture": "#stonecutter_saw"},
13+
"down": {"uv": [1, 9, 15, 16], "texture": "#stonecutter_saw"}
14+
}
15+
}
16+
]
717
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"textures": {
3-
"stonecutter_saw": "minecraft:block/stonecutter_saw",
4-
"stonecutter_saw_reversed" : "create:block/saw_reversed"
5-
},
6-
"elements": [
7-
{
8-
"name": "Saw",
9-
"from": [ 0, 8, 11 ],
10-
"to": [ 16, 8, 19 ],
11-
"faces": {
12-
"up": { "texture": "#stonecutter_saw", "uv": [ 0, 8, 16, 16 ], "rotation": 180 },
13-
"down": { "texture": "#stonecutter_saw_reversed", "uv": [ 0, 8, 16, 16 ] }
14-
}
15-
}
16-
]
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"stonecutter_saw": "block/stonecutter_saw"
5+
},
6+
"elements": [
7+
{
8+
"name": "Saw",
9+
"from": [0, 8, 11],
10+
"to": [16, 8, 19],
11+
"faces": {
12+
"up": {"uv": [0, 8, 16, 16], "rotation": 180, "texture": "#stonecutter_saw"},
13+
"down": {"uv": [16, 8, 0, 16], "texture": "#stonecutter_saw"}
14+
}
15+
}
16+
]
1717
}
Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
2-
"parent": "create:block/mechanical_saw/blade_vertical_active",
3-
"textures": {
4-
"stonecutter_saw": "create:block/saw_reversed",
5-
"stonecutter_saw_reversed": "minecraft:block/stonecutter_saw"
6-
}
2+
"credit": "Made with Blockbench",
3+
"textures": {
4+
"stonecutter_saw": "block/stonecutter_saw"
5+
},
6+
"elements": [
7+
{
8+
"name": "Saw",
9+
"from": [0, 8, 11],
10+
"to": [16, 8, 19],
11+
"faces": {
12+
"up": {"uv": [16, 8, 0, 16], "rotation": 180, "texture": "#stonecutter_saw"},
13+
"down": {"uv": [0, 8, 16, 16], "texture": "#stonecutter_saw"}
14+
}
15+
}
16+
]
717
}

0 commit comments

Comments
 (0)