I bug to differ

- Renamed Throttle schedule instruction to avoid confusion
- Fixed girders not paving straight tracks with the correct orientation
- Fixed steam engines not updating power output when their boiler is removed
- Fixed crash when assembling funnels onto a train
- Fixed crash caused by missing sounds when assembling a train
- Fixed train consuming fuel from every slot simultaneously
- Fixed spouts culling visible faces
- Fixed crash when listing empty inventory contents on something other than a display board
- Tracks can no longer bend when connecting two sloped tracks
- Fixed Schematicannon no longer supporting half of Create's blocks
- Fixed Station UI showing tooltip text of non-visible buttons
- Fixed track placement hint not updating when changing angle but targeting the same position
- Blaze burner contraption safety check
- Fixed Portable fluid interface not able to fill multiple tanks with identical liquids
- Players are no longer considered valid drivers to schedules
This commit is contained in:
simibubi 2022-07-10 18:22:47 +02:00
parent 560042d781
commit c20129ecc2
32 changed files with 172 additions and 120 deletions

View file

@ -559,22 +559,22 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
f85edc574ee6de0de7693ffb031266643db6724a assets/create/lang/en_ud.json
dff2b402dc2e38dde8785d6f4ee80000ac230141 assets/create/lang/en_us.json
f1002564e959d1dc5edf6a739782c319cffc437a assets/create/lang/unfinished/de_de.json
960b0699e1dbe96e459ad46cd43430e91f8a79e3 assets/create/lang/unfinished/es_cl.json
b844ff061fee1e6c412439665d493b5e1751a6c4 assets/create/lang/unfinished/es_es.json
5aac07ac13847fa3c9db4ffa5059a951bc2d0373 assets/create/lang/unfinished/fr_fr.json
e00aca2c6766f0c4dfe9ccc9632b9ff2afa962f1 assets/create/lang/unfinished/it_it.json
74f4404346a2fe74c560a2c094550011987f7b8d assets/create/lang/unfinished/ja_jp.json
9ed3abafcf8fe7727d1f4a41156aacd9804bca3b assets/create/lang/unfinished/ko_kr.json
01c228314baeae81e7d239dfe4cf63dfd82cbd4c assets/create/lang/unfinished/nl_nl.json
cd4582d9ff37368fa96383ab8c1d6f4fec97ab03 assets/create/lang/unfinished/pl_pl.json
3ed6a71519f09dd71040fe2ad1b42e7193f1712d assets/create/lang/unfinished/pt_br.json
1f2c4929bc86ee70779df04fa2ab2b45e38c010e assets/create/lang/unfinished/pt_pt.json
13de2129305b64e31de7c0fdef639c0331fb7483 assets/create/lang/unfinished/ro_ro.json
0a2629874641ed3602a0766b66df3a3e167df78b assets/create/lang/unfinished/ru_ru.json
f6010e62d1c5ca74c7d0f78450be30f665cbc826 assets/create/lang/unfinished/zh_cn.json
ba2edb3aff216e1a779d60f3a5d033f244d32c7c assets/create/lang/unfinished/zh_tw.json
7bf329d0e72e8262525335e8dc24b25d876abe16 assets/create/lang/en_us.json
cc4ad2cab36c5545e9033d877fff0dc72b55aad3 assets/create/lang/unfinished/de_de.json
c4e07a8e6bfa28cb280d95f8600f6873fafe078f assets/create/lang/unfinished/es_cl.json
c1a4222a108fb10f4900f4ea4ce5c762d04f4917 assets/create/lang/unfinished/es_es.json
6a1a568f4f84a80f4338a858a3147173604a4ea6 assets/create/lang/unfinished/fr_fr.json
b36117021a8b4c431351079cf22a16958cb6f5f9 assets/create/lang/unfinished/it_it.json
af401cde90e194ecb384f8091041fbb232e6672f assets/create/lang/unfinished/ja_jp.json
5d87b8a918076da4fbc74cbea3d96aff7549f3cf assets/create/lang/unfinished/ko_kr.json
fb68a89d423ef73d9204e6d75b7e2b3ae21daad7 assets/create/lang/unfinished/nl_nl.json
65d04135f46e435a7d20b58dc24fc374a091cd85 assets/create/lang/unfinished/pl_pl.json
9cc304bfe85f01592077a84135962d8478999384 assets/create/lang/unfinished/pt_br.json
1252dc9c586fd55e80cd838aeb60932fc29c4e92 assets/create/lang/unfinished/pt_pt.json
42d9d2510ee559254fe6683c7ac07c6a018820c0 assets/create/lang/unfinished/ro_ro.json
88ec38d3d79584e2f5d6b3134c1c68514c33d790 assets/create/lang/unfinished/ru_ru.json
e4da496b24c1fa434e9ed43dfa5c8945446dd5a2 assets/create/lang/unfinished/zh_cn.json
9756888c28dbc5358b4a80bdb7f85a9cafffa53e assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -1441,8 +1441,8 @@
"create.schedule.instruction.name_edit_box": "Schedule Title",
"create.schedule.instruction.name_edit_box_1": "Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "Defaults to next destination's name",
"create.schedule.instruction.throttle": "Change Throttle",
"create.schedule.instruction.throttle.summary": "Change Throttle to %1$s",
"create.schedule.instruction.throttle": "Limit Max Speed",
"create.schedule.instruction.throttle.summary": "Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "Throttle",
"create.schedule.instruction.throttle_edit_box_1": "Affects the top speed of the Train",
"create.schedule.condition_type": "Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -1442,8 +1442,8 @@
"create.schedule.instruction.name_edit_box": "UNLOCALIZED: Schedule Title",
"create.schedule.instruction.name_edit_box_1": "UNLOCALIZED: Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "UNLOCALIZED: Defaults to next destination's name",
"create.schedule.instruction.throttle": "UNLOCALIZED: Change Throttle",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Throttle to %1$s",
"create.schedule.instruction.throttle": "UNLOCALIZED: Limit Max Speed",
"create.schedule.instruction.throttle.summary": "UNLOCALIZED: Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "UNLOCALIZED: Throttle",
"create.schedule.instruction.throttle_edit_box_1": "UNLOCALIZED: Affects the top speed of the Train",
"create.schedule.condition_type": "UNLOCALIZED: Continue if/after:",

View file

@ -73,13 +73,28 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl
super.tick();
FluidTankTileEntity tank = getTank();
PoweredShaftTileEntity shaft = getShaft();
if (tank == null || shaft == null)
if (tank == null || shaft == null) {
if (level.isClientSide())
return;
if (shaft == null)
return;
if (!shaft.getBlockPos()
.subtract(worldPosition)
.equals(shaft.enginePos))
return;
if (shaft.engineEfficiency == 0)
return;
Direction facing = SteamEngineBlock.getFacing(getBlockState());
if (level.isLoaded(worldPosition.relative(facing.getOpposite())))
shaft.update(worldPosition, 0, 0);
return;
}
boolean verticalTarget = false;
BlockState shaftState = shaft.getBlockState();
Axis targetAxis = Axis.X;
if (shaftState.getBlock() instanceof IRotate ir)
if (shaftState.getBlock()instanceof IRotate ir)
targetAxis = ir.getRotationAxis(shaftState);
verticalTarget = targetAxis == Axis.Y;
@ -92,6 +107,7 @@ public class SteamEngineTileEntity extends SmartTileEntity implements IHaveGoggl
float efficiency = Mth.clamp(tank.boiler.getEngineEfficiency(tank.getTotalTankSize()), 0, 1);
if (efficiency > 0)
award(AllAdvancements.STEAM_ENGINE);
int conveyedSpeedLevel =

View file

@ -83,7 +83,7 @@ public class BlazeBurnerMovementBehaviour implements MovementBehaviour {
}
Entity player = Minecraft.getInstance().cameraEntity;
if (player != null && !player.isInvisible()) {
if (player != null && !player.isInvisible() && context.position != null) {
Vec3 applyRotation = context.contraption.entity.reverseRotation(player.position()
.subtract(context.position), 1);
double dx = applyRotation.x;

View file

@ -37,6 +37,8 @@ public abstract class DisplaySource extends DisplayBehaviour {
}
List<MutableComponent> text = provideText(context, stats);
if (text.isEmpty())
text = EMPTY;
activeTarget.acceptText(line, text, context);
}
@ -73,6 +75,7 @@ public abstract class DisplaySource extends DisplayBehaviour {
}
@OnlyIn(Dist.CLIENT)
public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder, boolean isFirstLine) {}
public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder,
boolean isFirstLine) {}
}

View file

@ -46,7 +46,9 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.templates.FluidTank;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
public class CarriageContraption extends Contraption {
@ -69,6 +71,9 @@ public class CarriageContraption extends Contraption {
// render
public int portalCutoffMin;
public int portalCutoffMax;
static final IItemHandlerModifiable fallbackItems = new ItemStackHandler();
static final IFluidHandler fallbackFluids = new FluidTank(0);
public CarriageContraption() {
conductorSeats = new HashMap<>();
@ -326,12 +331,12 @@ public class CarriageContraption extends Contraption {
@Override
public IItemHandlerModifiable getSharedInventory() {
return storageProxy.getItems();
return storageProxy == null ? fallbackItems : storageProxy.getItems();
}
@Override
public IFluidHandler getSharedFluidTanks() {
return storageProxy.getFluids();
return storageProxy == null ? fallbackFluids : storageProxy.getFluids();
}
public void handleContraptionFluidPacket(BlockPos localPos, FluidStack containedFluid) {

View file

@ -496,6 +496,8 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
sides.setSecond(cc.blazeBurnerConductors.getSecond());
for (Entity entity : getPassengers()) {
if (entity instanceof Player)
continue;
BlockPos seatOf = cc.getSeatOf(entity.getUUID());
if (seatOf == null)
continue;

View file

@ -252,10 +252,20 @@ public class CarriageSounds {
public void setVolume(float volume) {
this.volume = volume;
}
@Override
public float getVolume() {
return volume;
}
public void setPitch(float pitch) {
this.pitch = pitch;
}
@Override
public float getPitch() {
return pitch;
}
public void setLocation(Vec3 location) {
x = location.x;

View file

@ -1061,6 +1061,7 @@ public class Train {
ItemStack containerItem = stack.getContainerItem();
if (!containerItem.isEmpty())
ItemHandlerHelper.insertItemStacked(fuelItems, containerItem, false);
return;
}
}
}

View file

@ -203,6 +203,8 @@ public class TravellingPoint {
public double travel(TrackGraph graph, double distance, ITrackSelector trackSelector,
IEdgePointListener signalListener, ITurnListener turnListener, IPortalListener portalListener) {
blocked = false;
if (edge == null)
return 0;
double edgeLength = edge.getLength();
if (Mth.equal(distance, 0))
return 0;

View file

@ -43,8 +43,10 @@ public class TrackPaver {
for (Direction d : Iterate.horizontalDirections)
if (Vec3.atLowerCornerOf(d.getNormal())
.equals(direction))
defaultBlockState =
defaultBlockState.setValue(d.getAxis() == Axis.X ? GirderBlock.X : GirderBlock.Z, true);
defaultBlockState = defaultBlockState.setValue(GirderBlock.TOP, false)
.setValue(GirderBlock.BOTTOM, false)
.setValue(GirderBlock.AXIS, d.getAxis())
.setValue(d.getAxis() == Axis.X ? GirderBlock.X : GirderBlock.Z, true);
Set<BlockPos> toPlaceOn = new HashSet<>();
Vec3 start = VecHelper.getCenterOf(startPos);

View file

@ -279,6 +279,10 @@ public class TrackPlacement {
if (skipCurve && !Mth.equal(ascend, 0)) {
int hDistance = info.end1Extent;
if (axis1.y == 0 || !Mth.equal(absAscend + 1, dist / axis1.length())) {
if (axis1.y != 0 && axis1.y == -axis2.y)
return info.withMessage("ascending_s_curve");
info.end1Extent = 0;
double minHDistance = Math.max(absAscend < 4 ? absAscend * 4 : absAscend * 3, 6) / axis1.length();
if (hDistance < minHDistance)
@ -558,6 +562,7 @@ public class TrackPlacement {
static int lastLineCount = 0;
static BlockPos hintPos;
static int hintAngle;
static Couple<List<BlockPos>> hints;
@OnlyIn(Dist.CLIENT)
@ -612,8 +617,12 @@ public class TrackPlacement {
true);
if (bhr.getDirection() == Direction.UP) {
if (!pos.equals(hintPos)) {
Vec3 lookVec = player.getLookAngle();
int lookAngle = (int) (22.5 + AngleHelper.deg(Mth.atan2(lookVec.z, lookVec.x)) % 360) / 8;
if (!pos.equals(hintPos) || lookAngle != hintAngle) {
hints = Couple.create(ArrayList::new);
hintAngle = lookAngle;
hintPos = pos;
for (int xOffset = -2; xOffset <= 2; xOffset++) {

View file

@ -86,7 +86,9 @@ public class CombinedTankWrapper implements IFluidHandler {
resource.shrink(filledIntoCurrent);
filled += filledIntoCurrent;
if (resource.isEmpty() || fittingHandlerFound || enforceVariety && filledIntoCurrent != 0)
if (resource.isEmpty())
break Outer;
if (fittingHandlerFound && (enforceVariety || filledIntoCurrent != 0))
break Outer;
}
}

View file

@ -138,7 +138,8 @@ public abstract class AbstractSimiScreen extends Screen {
protected void renderWindowForeground(PoseStack ms, int mouseX, int mouseY, float partialTicks) {
for (Widget widget : renderables) {
if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused()) {
if (widget instanceof AbstractSimiWidget simiWidget && simiWidget.isHoveredOrFocused()
&& simiWidget.visible) {
List<Component> tooltip = simiWidget.getToolTip();
if (tooltip.isEmpty())
continue;

View file

@ -7,7 +7,6 @@ import java.util.Map;
import java.util.function.Consumer;
import com.simibubi.create.api.event.TileEntityBehaviourEvent;
import com.simibubi.create.content.schematics.ISpecialBlockEntityItemRequirement;
import com.simibubi.create.content.schematics.ItemRequirement;
import com.simibubi.create.foundation.advancement.AdvancementBehaviour;
import com.simibubi.create.foundation.advancement.CreateAdvancement;
@ -26,7 +25,7 @@ import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.items.CapabilityItemHandler;
public abstract class SmartTileEntity extends CachedRenderBBTileEntity implements IPartialSafeNBT, IInteractionChecker, ISpecialBlockEntityItemRequirement {
public abstract class SmartTileEntity extends CachedRenderBBTileEntity implements IPartialSafeNBT, IInteractionChecker {
private final Map<BehaviourType<?>, TileEntityBehaviour> behaviours = new HashMap<>();
private boolean initialized = false;

View file

@ -606,8 +606,8 @@
"create.schedule.instruction.name_edit_box": "Schedule Title",
"create.schedule.instruction.name_edit_box_1": "Affects text shown on displays",
"create.schedule.instruction.name_edit_box_2": "Defaults to next destination's name",
"create.schedule.instruction.throttle": "Change Throttle",
"create.schedule.instruction.throttle.summary": "Change Throttle to %1$s",
"create.schedule.instruction.throttle": "Limit Max Speed",
"create.schedule.instruction.throttle.summary": "Change Max Speed to %1$s",
"create.schedule.instruction.throttle_edit_box": "Throttle",
"create.schedule.instruction.throttle_edit_box_1": "Affects the top speed of the Train",

View file

@ -12,10 +12,10 @@
"to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]},
"faces": {
"north": {"uv": [1, 0, 7, 1], "texture": "#0", "cullface": "north"},
"east": {"uv": [1, 0, 7, 1], "texture": "#0", "cullface": "east"},
"south": {"uv": [1, 0, 7, 1], "texture": "#0", "cullface": "south"},
"west": {"uv": [1, 0, 7, 1], "texture": "#0", "cullface": "west"},
"north": {"uv": [1, 0, 7, 1], "texture": "#0"},
"east": {"uv": [1, 0, 7, 1], "texture": "#0"},
"south": {"uv": [1, 0, 7, 1], "texture": "#0"},
"west": {"uv": [1, 0, 7, 1], "texture": "#0"},
"up": {"uv": [1, 9, 7, 15], "texture": "#0"}
}
},
@ -25,12 +25,12 @@
"to": [15, 14, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 6, -24]},
"faces": {
"north": {"uv": [0.5, 1, 7.5, 2], "texture": "#0", "cullface": "north"},
"east": {"uv": [0.5, 1, 7.5, 2], "texture": "#0", "cullface": "east"},
"south": {"uv": [0.5, 1, 7.5, 2], "texture": "#0", "cullface": "south"},
"west": {"uv": [0.5, 1, 7.5, 2], "texture": "#0", "cullface": "west"},
"north": {"uv": [0.5, 1, 7.5, 2], "texture": "#0"},
"east": {"uv": [0.5, 1, 7.5, 2], "texture": "#0"},
"south": {"uv": [0.5, 1, 7.5, 2], "texture": "#0"},
"west": {"uv": [0.5, 1, 7.5, 2], "texture": "#0"},
"up": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"},
"down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0", "cullface": "down"}
"down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}
}
},
{
@ -39,11 +39,11 @@
"to": [14, 2, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -23]},
"faces": {
"north": {"uv": [1, 7, 7, 8], "texture": "#0", "cullface": "north"},
"east": {"uv": [1, 7, 7, 8], "texture": "#0", "cullface": "east"},
"south": {"uv": [1, 7, 7, 8], "texture": "#0", "cullface": "south"},
"west": {"uv": [1, 7, 7, 8], "texture": "#0", "cullface": "west"},
"down": {"uv": [9, 9, 15, 15], "texture": "#0", "cullface": "down"}
"north": {"uv": [1, 7, 7, 8], "texture": "#0"},
"east": {"uv": [1, 7, 7, 8], "texture": "#0"},
"south": {"uv": [1, 7, 7, 8], "texture": "#0"},
"west": {"uv": [1, 7, 7, 8], "texture": "#0"},
"down": {"uv": [9, 9, 15, 15], "texture": "#0"}
}
},
{
@ -52,12 +52,12 @@
"to": [15, 4, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [7, -4, -24]},
"faces": {
"north": {"uv": [0.5, 6, 7.5, 7], "texture": "#0", "cullface": "north"},
"east": {"uv": [1, 6, 7.5, 7], "texture": "#0", "cullface": "east"},
"south": {"uv": [0.5, 6, 7.5, 7], "texture": "#0", "cullface": "south"},
"west": {"uv": [0.5, 6, 7.5, 7], "texture": "#0", "cullface": "west"},
"north": {"uv": [0.5, 6, 7.5, 7], "texture": "#0"},
"east": {"uv": [1, 6, 7.5, 7], "texture": "#0"},
"south": {"uv": [0.5, 6, 7.5, 7], "texture": "#0"},
"west": {"uv": [0.5, 6, 7.5, 7], "texture": "#0"},
"up": {"uv": [8.5, 8.5, 15.5, 15.5], "texture": "#0"},
"down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0", "cullface": "down"}
"down": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}
}
},
{
@ -66,9 +66,9 @@
"to": [2, 12, 10],
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#0"},
"east": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"east": {"uv": [9, 0, 11, 4], "texture": "#0"},
"south": {"uv": [0, 0, 0, 0], "texture": "#0"},
"west": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"west": {"uv": [9, 0, 11, 4], "texture": "#0"},
"up": {"uv": [0, 0, 0, 0], "texture": "#0"},
"down": {"uv": [0, 0, 0, 0], "texture": "#0"}
}
@ -78,10 +78,10 @@
"from": [6, 4, 2],
"to": [10, 12, 2],
"faces": {
"north": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"east": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"south": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"west": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"north": {"uv": [9, 0, 11, 4], "texture": "#0"},
"east": {"uv": [0, 0, 0, 0], "texture": "#0"},
"south": {"uv": [9, 0, 11, 4], "texture": "#0"},
"west": {"uv": [0, 0, 0, 0], "texture": "#0"},
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#0"}
}
@ -91,10 +91,10 @@
"from": [14, 4, 6],
"to": [14, 12, 10],
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"east": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"south": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"west": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"north": {"uv": [0, 0, 0, 0], "texture": "#0"},
"east": {"uv": [9, 0, 11, 4], "texture": "#0"},
"south": {"uv": [0, 0, 0, 0], "texture": "#0"},
"west": {"uv": [9, 0, 11, 4], "texture": "#0"},
"up": {"uv": [0, 0, 0, 0], "rotation": 180, "texture": "#0"},
"down": {"uv": [0, 0, 0, 0], "rotation": 180, "texture": "#0"}
}
@ -104,10 +104,10 @@
"from": [6, 4, 14],
"to": [10, 12, 14],
"faces": {
"north": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"east": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"south": {"uv": [9, 0, 11, 4], "texture": "#0", "cullface": "west"},
"west": {"uv": [0, 0, 0, 0], "texture": "#0", "cullface": "west"},
"north": {"uv": [9, 0, 11, 4], "texture": "#0"},
"east": {"uv": [0, 0, 0, 0], "texture": "#0"},
"south": {"uv": [9, 0, 11, 4], "texture": "#0"},
"west": {"uv": [0, 0, 0, 0], "texture": "#0"},
"up": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#0"},
"down": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#0"}
}
@ -117,9 +117,9 @@
"from": [1, 4, 1],
"to": [2, 12, 6],
"faces": {
"east": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"south": {"uv": [7, 4.5, 7.5, 5], "texture": "#0", "cullface": "west"},
"west": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"}
"east": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"south": {"uv": [7, 4.5, 7.5, 5], "texture": "#0"},
"west": {"uv": [0.5, 2, 3, 6], "texture": "#0"}
}
},
{
@ -127,9 +127,9 @@
"from": [10, 4, 1],
"to": [15, 12, 2],
"faces": {
"north": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"},
"south": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"west": {"uv": [7, 4.5, 7.5, 5], "texture": "#0", "cullface": "west"}
"north": {"uv": [0.5, 2, 3, 6], "texture": "#0"},
"south": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"west": {"uv": [7, 4.5, 7.5, 5], "texture": "#0"}
}
},
{
@ -137,9 +137,9 @@
"from": [14, 4, 10],
"to": [15, 12, 15],
"faces": {
"north": {"uv": [7, 4.5, 7.5, 5], "texture": "#0", "cullface": "west"},
"east": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"},
"west": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"}
"north": {"uv": [7, 4.5, 7.5, 5], "texture": "#0"},
"east": {"uv": [0.5, 2, 3, 6], "texture": "#0"},
"west": {"uv": [5, 2, 7.5, 6], "texture": "#0"}
}
},
{
@ -147,9 +147,9 @@
"from": [1, 4, 14],
"to": [6, 12, 15],
"faces": {
"north": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"east": {"uv": [7, 4.5, 7.5, 5], "texture": "#0", "cullface": "west"},
"south": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"}
"north": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"east": {"uv": [7, 4.5, 7.5, 5], "texture": "#0"},
"south": {"uv": [0.5, 2, 3, 6], "texture": "#0"}
}
},
{
@ -157,9 +157,9 @@
"from": [1, 4, 10],
"to": [2, 12, 15],
"faces": {
"north": {"uv": [7, 3.5, 7.5, 4], "texture": "#0", "cullface": "west"},
"east": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"},
"west": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"}
"north": {"uv": [7, 3.5, 7.5, 4], "texture": "#0"},
"east": {"uv": [0.5, 2, 3, 6], "texture": "#0"},
"west": {"uv": [5, 2, 7.5, 6], "texture": "#0"}
}
},
{
@ -167,9 +167,9 @@
"from": [1, 4, 1],
"to": [6, 12, 2],
"faces": {
"north": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"east": {"uv": [7, 3.5, 7.5, 4], "texture": "#0", "cullface": "west"},
"south": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"}
"north": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"east": {"uv": [7, 3.5, 7.5, 4], "texture": "#0"},
"south": {"uv": [0.5, 2, 3, 6], "texture": "#0"}
}
},
{
@ -177,9 +177,9 @@
"from": [14, 4, 1],
"to": [15, 12, 6],
"faces": {
"east": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"south": {"uv": [7, 3.5, 7.5, 4], "texture": "#0", "cullface": "west"},
"west": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"}
"east": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"south": {"uv": [7, 3.5, 7.5, 4], "texture": "#0"},
"west": {"uv": [0.5, 2, 3, 6], "texture": "#0"}
}
},
{
@ -187,9 +187,9 @@
"from": [10, 4, 14],
"to": [15, 12, 15],
"faces": {
"north": {"uv": [0.5, 2, 3, 6], "texture": "#0", "cullface": "west"},
"south": {"uv": [5, 2, 7.5, 6], "texture": "#0", "cullface": "west"},
"west": {"uv": [7, 3.5, 7.5, 4], "texture": "#0", "cullface": "west"}
"north": {"uv": [0.5, 2, 3, 6], "texture": "#0"},
"south": {"uv": [5, 2, 7.5, 6], "texture": "#0"},
"west": {"uv": [7, 3.5, 7.5, 4], "texture": "#0"}
}
}
]