And the hunt continues...

- Fixed kinetic stress loop caused by neighbouring belts
- Fixed kinetic stress loop caused by activating ejectors
- Fixed recipe book logspam regarding seq. assembly recipes
This commit is contained in:
simibubi 2021-07-06 21:26:40 +02:00
parent dcc0c27855
commit 0fb5556960
5 changed files with 19 additions and 4 deletions

View file

@ -78,6 +78,8 @@ public abstract class KineticBlock extends Block implements IRotate {
} }
protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) { protected boolean areStatesKineticallyEquivalent(BlockState oldState, BlockState newState) {
if (oldState.getBlock() != newState.getBlock())
return false;
return getRotationAxis(newState) == getRotationAxis(oldState); return getRotationAxis(newState) == getRotationAxis(oldState);
} }

View file

@ -209,6 +209,11 @@ public class SequencedAssemblyRecipe implements IRecipe<RecipeWrapper> {
return serializer; return serializer;
} }
@Override
public boolean isDynamic() {
return true;
}
@Override @Override
public IRecipeType<?> getType() { public IRecipeType<?> getType() {
return AllRecipeTypes.SEQUENCED_ASSEMBLY.getType(); return AllRecipeTypes.SEQUENCED_ASSEMBLY.getType();

View file

@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.processing;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View file

@ -138,9 +138,9 @@ public class BeltConnectorItem extends BlockItem {
part = BeltPart.PULLEY; part = BeltPart.PULLEY;
if (pulley && shaftState.get(AbstractShaftBlock.AXIS) == Axis.Y) if (pulley && shaftState.get(AbstractShaftBlock.AXIS) == Axis.Y)
slope = BeltSlope.SIDEWAYS; slope = BeltSlope.SIDEWAYS;
world.setBlockState(pos, beltBlock.with(BeltBlock.SLOPE, slope) KineticTileEntity.switchToBlockState(world, pos, beltBlock.with(BeltBlock.SLOPE, slope)
.with(BeltBlock.PART, part) .with(BeltBlock.PART, part)
.with(BeltBlock.HORIZONTAL_FACING, facing), 3); .with(BeltBlock.HORIZONTAL_FACING, facing));
} }
} }

View file

@ -19,6 +19,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.belt.DirectBeltInputB
import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueBehaviour;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.IntAttached; import com.simibubi.create.foundation.utility.IntAttached;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.MatrixStacker;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
@ -28,6 +29,7 @@ import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser; import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.ObserverBlock;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
@ -224,7 +226,14 @@ public class EjectorTileEntity extends KineticTileEntity {
} }
if (!world.isRemote) if (!world.isRemote)
world.markAndNotifyBlock(pos, world.getChunkAt(pos), getBlockState(), getBlockState(), 0, 512); for (Direction d : Iterate.directions) {
BlockState blockState = world.getBlockState(pos.offset(d));
if (!(blockState.getBlock() instanceof ObserverBlock))
continue;
if (blockState.get(ObserverBlock.FACING) != d.getOpposite())
continue;
blockState.updatePostPlacement(d.getOpposite(), blockState, world, pos.offset(d), pos);
}
if (depotBehaviour.heldItem != null) { if (depotBehaviour.heldItem != null) {
addToLaunchedItems(heldItemStack); addToLaunchedItems(heldItemStack);