mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 03:13:43 +01:00
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
This commit is contained in:
parent
1432c46c47
commit
98a08d667e
10 changed files with 102 additions and 62 deletions
|
@ -456,11 +456,9 @@ public class CreateJEI implements IModPlugin {
|
|||
return addRecipeListConsumer(recipes -> {
|
||||
List<Recipe<?>> excludedRecipes = getTypedRecipes(recipeType.get());
|
||||
recipes.removeIf(recipe -> {
|
||||
for (Recipe<?> excludedRecipe : excludedRecipes) {
|
||||
if (doInputsMatch(recipe, excludedRecipe)) {
|
||||
for (Recipe<?> excludedRecipe : excludedRecipes)
|
||||
if (doInputsMatch(recipe, excludedRecipe) && doOutputsMatch(recipe, excludedRecipe))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
@ -570,4 +568,8 @@ public class CreateJEI implements IModPlugin {
|
|||
.test(matchingStacks[0]);
|
||||
}
|
||||
|
||||
public static boolean doOutputsMatch(Recipe<?> recipe1, Recipe<?> recipe2) {
|
||||
return ItemStack.isSame(recipe1.getResultItem(), recipe2.getResultItem());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ public class ContraptionControlsMovingInteraction extends MovingInteractionBehav
|
|||
if (!(ctx.temporaryData instanceof ElevatorFloorSelection efs))
|
||||
return false;
|
||||
if (efs.currentTargetY == contraption.clientYTarget)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
AllPackets.getChannel().sendToServer(new ElevatorTargetFloorPacket(contraptionEntity, efs.currentTargetY));
|
||||
if (contraption.presentBlockEntities.get(ctx.localPos)instanceof ContraptionControlsBlockEntity cte)
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
|
@ -31,7 +32,19 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
|
||||
public class ElevatorControlsHandler {
|
||||
|
||||
private static ControlsSlot slot = new ContraptionControlsBlockEntity.ControlsSlot();
|
||||
private static ControlsSlot slot = new ElevatorControlsSlot();
|
||||
|
||||
private static class ElevatorControlsSlot extends ContraptionControlsBlockEntity.ControlsSlot {
|
||||
|
||||
@Override
|
||||
public boolean testHit(BlockState state, Vec3 localHit) {
|
||||
Vec3 offset = getLocalOffset(state);
|
||||
if (offset == null)
|
||||
return false;
|
||||
return localHit.distanceTo(offset) < scale * .85;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static boolean onScroll(double delta) {
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
|
|||
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
@ -27,6 +28,11 @@ public class ControlsMovementBehaviour implements MovementBehaviour {
|
|||
LerpedFloat equipAnimation = LerpedFloat.linear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack canBeDisabledVia(MovementContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopMoving(MovementContext context) {
|
||||
context.contraption.entity.stopControlling(context.localPos);
|
||||
|
|
|
@ -40,6 +40,7 @@ import net.minecraft.world.entity.animal.horse.SkeletonHorse;
|
|||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.monster.EnderMan;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.AbstractCookingRecipe;
|
||||
import net.minecraft.world.item.crafting.BlastingRecipe;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
|
@ -170,20 +171,22 @@ public class InWorldProcessing {
|
|||
.getRecipeFor(RecipeType.SMOKING, RECIPE_WRAPPER, world);
|
||||
|
||||
if (type == Type.BLASTING) {
|
||||
if (!smokingRecipe.isPresent()) {
|
||||
RECIPE_WRAPPER.setItem(0, stack);
|
||||
Optional<? extends AbstractCookingRecipe> smeltingRecipe = world.getRecipeManager()
|
||||
.getRecipeFor(RecipeType.SMELTING, RECIPE_WRAPPER, world);
|
||||
if (!smeltingRecipe.isPresent()) {
|
||||
RECIPE_WRAPPER.setItem(0, stack);
|
||||
Optional<SmeltingRecipe> smeltingRecipe = world.getRecipeManager()
|
||||
.getRecipeFor(RecipeType.SMELTING, RECIPE_WRAPPER, world);
|
||||
|
||||
if (smeltingRecipe.isPresent())
|
||||
return applyRecipeOn(stack, smeltingRecipe.get());
|
||||
|
||||
RECIPE_WRAPPER.setItem(0, stack);
|
||||
Optional<BlastingRecipe> blastingRecipe = world.getRecipeManager()
|
||||
smeltingRecipe = world.getRecipeManager()
|
||||
.getRecipeFor(RecipeType.BLASTING, RECIPE_WRAPPER, world);
|
||||
}
|
||||
|
||||
if (blastingRecipe.isPresent())
|
||||
return applyRecipeOn(stack, blastingRecipe.get());
|
||||
if (smeltingRecipe.isPresent()) {
|
||||
if (!smokingRecipe.isPresent() || !ItemStack.isSame(smokingRecipe.get()
|
||||
.getResultItem(),
|
||||
smeltingRecipe.get()
|
||||
.getResultItem())) {
|
||||
return applyRecipeOn(stack, smeltingRecipe.get());
|
||||
}
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
|
|
|
@ -271,10 +271,6 @@ public class StationScreen extends AbstractStationScreen {
|
|||
for (int i = carriages.size() - 1; i > 0; i--) {
|
||||
RenderSystem.setShaderColor(1, 1, 1, Math.min(1f,
|
||||
Math.min((position + offset - 10) / 30f, (background.width - 40 - position - offset) / 30f)));
|
||||
// if (i == carriages.size() - 1 && train.doubleEnded) {
|
||||
// offset += icon.render(TrainIconType.FLIPPED_ENGINE, ms, x + offset, y + 20) + 1;
|
||||
// continue;
|
||||
// }
|
||||
Carriage carriage = carriages.get(blockEntity.trainBackwards ? carriages.size() - i - 1 : i);
|
||||
offset += icon.render(carriage.bogeySpacing, ms, x + offset, y + 20) + 1;
|
||||
}
|
||||
|
@ -287,8 +283,8 @@ public class StationScreen extends AbstractStationScreen {
|
|||
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
|
||||
UIRenderHelper.drawStretched(ms, x + 21, y + 43, 150, 46, -100, AllGuiTextures.STATION_TEXTBOX_MIDDLE);
|
||||
AllGuiTextures.STATION_TEXTBOX_TOP.render(ms, x + 21, y + 42);
|
||||
UIRenderHelper.drawStretched(ms, x + 21, y + 60, 150, 26, 0, AllGuiTextures.STATION_TEXTBOX_MIDDLE);
|
||||
AllGuiTextures.STATION_TEXTBOX_BOTTOM.render(ms, x + 21, y + 86);
|
||||
|
||||
ms.pushPose();
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"textures": {
|
||||
"stonecutter_saw": "minecraft:block/stonecutter_saw",
|
||||
"stonecutter_saw_reversed" : "create:block/saw_reversed"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Blade",
|
||||
"from": [ 1, 8, 11 ],
|
||||
"to": [ 15, 8.062, 18 ],
|
||||
"faces": {
|
||||
"up": { "texture": "#stonecutter_saw", "uv": [ 1, 9, 15, 16 ], "rotation": 180 },
|
||||
"down": { "texture": "#stonecutter_saw_reversed", "uv": [ 1, 9, 15, 16 ] }
|
||||
}
|
||||
}
|
||||
]
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"stonecutter_saw": "block/stonecutter_saw"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Blade",
|
||||
"from": [1, 8, 11],
|
||||
"to": [15, 8.062, 18],
|
||||
"faces": {
|
||||
"up": {"uv": [1, 9, 15, 16], "rotation": 180, "texture": "#stonecutter_saw"},
|
||||
"down": {"uv": [15, 9, 1, 16], "texture": "#stonecutter_saw"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,17 @@
|
|||
{
|
||||
"parent": "create:block/mechanical_saw/blade_horizontal_active",
|
||||
"textures": {
|
||||
"stonecutter_saw": "create:block/saw_reversed",
|
||||
"stonecutter_saw": "minecraft:block/stonecutter_saw"
|
||||
}
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"stonecutter_saw": "block/stonecutter_saw"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Blade",
|
||||
"from": [1, 8, 11],
|
||||
"to": [15, 8.062, 18],
|
||||
"faces": {
|
||||
"up": {"uv": [15, 9, 1, 16], "rotation": 180, "texture": "#stonecutter_saw"},
|
||||
"down": {"uv": [1, 9, 15, 16], "texture": "#stonecutter_saw"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"textures": {
|
||||
"stonecutter_saw": "minecraft:block/stonecutter_saw",
|
||||
"stonecutter_saw_reversed" : "create:block/saw_reversed"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Saw",
|
||||
"from": [ 0, 8, 11 ],
|
||||
"to": [ 16, 8, 19 ],
|
||||
"faces": {
|
||||
"up": { "texture": "#stonecutter_saw", "uv": [ 0, 8, 16, 16 ], "rotation": 180 },
|
||||
"down": { "texture": "#stonecutter_saw_reversed", "uv": [ 0, 8, 16, 16 ] }
|
||||
}
|
||||
}
|
||||
]
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"stonecutter_saw": "block/stonecutter_saw"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Saw",
|
||||
"from": [0, 8, 11],
|
||||
"to": [16, 8, 19],
|
||||
"faces": {
|
||||
"up": {"uv": [0, 8, 16, 16], "rotation": 180, "texture": "#stonecutter_saw"},
|
||||
"down": {"uv": [16, 8, 0, 16], "texture": "#stonecutter_saw"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,17 @@
|
|||
{
|
||||
"parent": "create:block/mechanical_saw/blade_vertical_active",
|
||||
"textures": {
|
||||
"stonecutter_saw": "create:block/saw_reversed",
|
||||
"stonecutter_saw_reversed": "minecraft:block/stonecutter_saw"
|
||||
}
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"stonecutter_saw": "block/stonecutter_saw"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "Saw",
|
||||
"from": [0, 8, 11],
|
||||
"to": [16, 8, 19],
|
||||
"faces": {
|
||||
"up": {"uv": [16, 8, 0, 16], "rotation": 180, "texture": "#stonecutter_saw"},
|
||||
"down": {"uv": [0, 8, 16, 16], "texture": "#stonecutter_saw"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue