More like ne-oldforge

- Forge -> 47.1.3
- Restore neoforge compatibility #7049
- Add a deployer safety check #6244
- Fluid tank lighting safety checks #7073
- Fixed PSI not always connecting on assembly #6854
This commit is contained in:
simibubi 2024-10-23 21:29:12 +02:00
parent 51bb416b0e
commit ed875d47ac
12 changed files with 16 additions and 43 deletions

View File

@ -4,11 +4,13 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false
# mod version info
mod_version = 0.5.1.i
mod_version = 0.5.1.j
artifact_minecraft_version = 1.20.1
minecraft_version = 1.20.1
forge_version = 47.1.43
# 1.20.1: Latest neo is based on this version. Try not to bump
forge_version = 47.1.3
# build dependency versions
forgegradle_version = 6.0.6

View File

@ -60,7 +60,7 @@ public class Create {
public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.5.1i";
public static final String VERSION = "0.5.1j";
public static final Logger LOGGER = LogUtils.getLogger();

View File

@ -545,9 +545,12 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
relativeMotion = reverseRotation(relativeMotion, 1);
context.relativeMotion = relativeMotion;
return !BlockPos.containing(previousPosition).equals(gridPosition)
|| (context.relativeMotion.length() > 0 || context.contraption instanceof CarriageContraption)
&& context.firstMovement;
boolean ignoreMotionForFirstMovement =
context.contraption instanceof CarriageContraption || actor instanceof PortableStorageInterfaceMovement;
return !BlockPos.containing(previousPosition)
.equals(gridPosition)
|| (context.relativeMotion.length() > 0 || ignoreMotionForFirstMovement) && context.firstMovement;
}
public void move(double x, double y, double z) {

View File

@ -106,7 +106,7 @@ public class FluidTankBlock extends Block implements IWrenchable, IBE<FluidTankB
@Override
public int getLightEmission(BlockState state, BlockGetter world, BlockPos pos) {
FluidTankBlockEntity tankAt = ConnectivityHandler.partAt(getBlockEntityType(), world, pos);
if (tankAt == null)
if (tankAt == null || !tankAt.hasLevel())
return 0;
FluidTankBlockEntity controllerBE = tankAt.getControllerBE();
if (controllerBE == null || !controllerBE.window)

View File

@ -197,7 +197,7 @@ public class FluidTankBlockEntity extends SmartBlockEntity implements IHaveGoggl
@SuppressWarnings("unchecked")
@Override
public FluidTankBlockEntity getControllerBE() {
if (isController())
if (isController() || !hasLevel())
return this;
BlockEntity blockEntity = level.getBlockEntity(controller);
if (blockEntity instanceof FluidTankBlockEntity)

View File

@ -120,12 +120,6 @@ public class MechanicalCrafterBlockEntity extends KineticBlockEntity {
registerAwardables(behaviours, AllAdvancements.CRAFTER, AllAdvancements.CRAFTER_LAZY);
}
@Override
public void invalidateCaps() {
inserting.removeListener();
super.invalidateCaps();
}
@Override
public void onSpeedChanged(float previousSpeed) {
super.onSpeedChanged(previousSpeed);
@ -138,7 +132,6 @@ public class MechanicalCrafterBlockEntity extends KineticBlockEntity {
public void blockChanged() {
removeBehaviour(InvManipulationBehaviour.TYPE);
inserting.removeListener();
inserting = new InvManipulationBehaviour(this, this::getTargetFace);
attachBehaviourLate(inserting);
}

View File

@ -171,6 +171,8 @@ public class DeployerBlockEntity extends KineticBlockEntity {
}
if (level.isClientSide)
return;
if (player == null)
return;
ItemStack stack = player.getMainHandItem();
if (state == State.WAITING) {

View File

@ -273,12 +273,6 @@ public class FunnelBlockEntity extends SmartBlockEntity implements IHaveHovering
registerAwardables(behaviours, AllAdvancements.FUNNEL);
}
@Override
public void invalidateCaps() {
invManipulation.removeListener();
super.invalidateCaps();
}
private boolean supportsAmountOnFilter() {
BlockState blockState = getBlockState();
boolean beltFunnelsupportsAmount = false;

View File

@ -56,13 +56,6 @@ public class SmartObserverBlockEntity extends SmartBlockEntity {
behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
@Override
public void invalidateCaps() {
observedInventory.removeListener();
observedTank.removeListener();
super.invalidateCaps();
}
@Override
public void tick() {
super.tick();

View File

@ -233,13 +233,6 @@ public class ThresholdSwitchBlockEntity extends SmartBlockEntity {
behaviours.add(observedTank = new TankManipulationBehaviour(this, towardBlockFacing).bypassSidedness());
}
@Override
public void invalidateCaps() {
observedInventory.removeListener();
observedTank.removeListener();
super.invalidateCaps();
}
public float getLevelForDisplay() {
return currentLevel == -1 ? 0 : currentLevel;
}

View File

@ -7,7 +7,6 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
import com.simibubi.create.foundation.blockEntity.behaviour.filtering.FilteringBehaviour;
import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode;
import com.simibubi.create.foundation.utility.BlockFace;
import com.simibubi.create.foundation.utility.HashableNonNullConsumer;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
@ -80,10 +79,6 @@ public abstract class CapManipulationBehaviourBase<T, S extends CapManipulationB
targetCapability = LazyOptional.empty();
}
public void removeListener() {
targetCapability.removeListener(new HashableNonNullConsumer<>(this::onHandlerInvalidated, this));
}
@Override
public void lazyTick() {
super.lazyTick();
@ -132,8 +127,6 @@ public abstract class CapManipulationBehaviourBase<T, S extends CapManipulationB
Capability<T> capability = capability();
targetCapability =
bypassSided ? invBE.getCapability(capability) : invBE.getCapability(capability, targetBlockFace.getFace());
if (targetCapability.isPresent())
targetCapability.addListener(new HashableNonNullConsumer<>(this::onHandlerInvalidated, this));
}
@FunctionalInterface

View File

@ -19,7 +19,7 @@ Technology that empowers the player.'''
[[dependencies.create]]
modId="forge"
mandatory=true
versionRange="[47.1.43,)"
versionRange="[47.1.3,)"
ordering="NONE"
side="BOTH"