bug you a pardon?

- Arm Interaction point safety checks
- Trains no longer briefly derail when moving through portals
- Players are now less likely to get stuck in the original dimension when traversing train portals
- Trains no longer track coupling stress between carriages that are currently in different dimensions
- Fixed quark closing double doors when opened (+temporary workaround for 1.18)
- Boilers made of creative fluid tanks now provide a max level water supply
- Crafter ponder scene no longer uses an outdated recipe
- Reduced steam release effect of bogeys that haven't travelled far since the last stop
This commit is contained in:
simibubi 2022-07-11 19:28:25 +02:00
parent f03bf9839c
commit 3153ad2100
17 changed files with 137 additions and 60 deletions

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false org.gradle.daemon = false
# mod version info # mod version info
mod_version = 0.5.0 mod_version = 0.5.0a
minecraft_version = 1.18.2 minecraft_version = 1.18.2
forge_version = 40.1.60 forge_version = 40.1.60

View file

@ -5744,3 +5744,4 @@ e16d74571ae10007f06f3b86ddf05d3ca9b73559 data/minecraft/tags/items/doors.json
bc0917bead5b198feeeaa5c5b92dddae48bbb6f5 data/minecraft/tags/items/stairs.json bc0917bead5b198feeeaa5c5b92dddae48bbb6f5 data/minecraft/tags/items/stairs.json
d622e97373b1e96632ffb0a312ef04696da0ed4d data/minecraft/tags/items/trapdoors.json d622e97373b1e96632ffb0a312ef04696da0ed4d data/minecraft/tags/items/trapdoors.json
0ec220675cbf8a6eeb47d42b7409395a0cb6ae6e data/minecraft/tags/items/walls.json 0ec220675cbf8a6eeb47d42b7409395a0cb6ae6e data/minecraft/tags/items/walls.json
e16d74571ae10007f06f3b86ddf05d3ca9b73559 data/quark/tags/blocks/non_double_door.json

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"create:train_door",
"create:framed_glass_door"
]
}

View file

@ -89,7 +89,7 @@ public class AllTags {
public enum NameSpace { public enum NameSpace {
MOD(Create.ID, false, true), FORGE("forge"), TIC("tconstruct") MOD(Create.ID, false, true), FORGE("forge"), TIC("tconstruct"), QUARK("quark")
; ;
@ -131,6 +131,7 @@ public class AllTags {
WG_STONE(FORGE), WG_STONE(FORGE),
SLIMY_LOGS(TIC), SLIMY_LOGS(TIC),
NON_DOUBLE_DOOR(NameSpace.QUARK),
; ;

View file

@ -13,6 +13,7 @@ import com.simibubi.create.compat.curios.Curios;
import com.simibubi.create.content.CreateItemGroup; import com.simibubi.create.content.CreateItemGroup;
import com.simibubi.create.content.contraptions.TorquePropagator; import com.simibubi.create.content.contraptions.TorquePropagator;
import com.simibubi.create.content.contraptions.fluids.tank.BoilerHeaters; import com.simibubi.create.content.contraptions.fluids.tank.BoilerHeaters;
import com.simibubi.create.content.curiosities.deco.SlidingDoorBlock;
import com.simibubi.create.content.curiosities.weapons.BuiltinPotatoProjectileTypes; import com.simibubi.create.content.curiosities.weapons.BuiltinPotatoProjectileTypes;
import com.simibubi.create.content.logistics.RedstoneLinkNetworkHandler; import com.simibubi.create.content.logistics.RedstoneLinkNetworkHandler;
import com.simibubi.create.content.logistics.block.display.AllDisplayBehaviours; import com.simibubi.create.content.logistics.block.display.AllDisplayBehaviours;
@ -124,6 +125,8 @@ public class Create {
modEventBus.addGenericListener(SoundEvent.class, AllSoundEvents::register); modEventBus.addGenericListener(SoundEvent.class, AllSoundEvents::register);
modEventBus.addGenericListener(DataSerializerEntry.class, AllEntityDataSerializers::register); modEventBus.addGenericListener(DataSerializerEntry.class, AllEntityDataSerializers::register);
forgeEventBus.addListener(EventPriority.HIGH, SlidingDoorBlock::stopItQuark);
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.onCtorClient(modEventBus, forgeEventBus)); DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.onCtorClient(modEventBus, forgeEventBus));
Mods.CURIOS.executeIfInstalled(() -> Curios::init); Mods.CURIOS.executeIfInstalled(() -> Curios::init);

View file

@ -58,6 +58,7 @@ import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.TamableAnimal; import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.decoration.ArmorStand; import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.entity.decoration.HangingEntity; import net.minecraft.world.entity.decoration.HangingEntity;
@ -115,6 +116,17 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
contraption.onEntityCreated(this); contraption.onEntityCreated(this);
} }
@Override
public void move(MoverType pType, Vec3 pPos) {
if (pType == MoverType.SHULKER)
return;
if (pType == MoverType.SHULKER_BOX)
return;
if (pType == MoverType.PISTON)
return;
super.move(pType, pPos);
}
public boolean supportsTerrainCollision() { public boolean supportsTerrainCollision() {
return contraption instanceof TranslatingContraption; return contraption instanceof TranslatingContraption;
} }

View file

@ -97,6 +97,9 @@ public class BoilerData {
waterSupply = Math.max(i, waterSupply); waterSupply = Math.max(i, waterSupply);
} }
if (controller instanceof CreativeFluidTankTileEntity)
waterSupply = waterSupplyPerLevel * 20;
if (getActualHeat(controller.getTotalTankSize()) == 18) if (getActualHeat(controller.getTotalTankSize()) == 18)
controller.award(AllAdvancements.STEAM_ENGINE_MAXED); controller.award(AllAdvancements.STEAM_ENGINE_MAXED);

View file

@ -33,6 +33,8 @@ import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.eventbus.api.Event.Result;
public class SlidingDoorBlock extends DoorBlock implements IWrenchable, ITE<SlidingDoorTileEntity> { public class SlidingDoorBlock extends DoorBlock implements IWrenchable, ITE<SlidingDoorTileEntity> {
@ -50,6 +52,24 @@ public class SlidingDoorBlock extends DoorBlock implements IWrenchable, ITE<Slid
public static final BooleanProperty VISIBLE = BooleanProperty.create("visible"); public static final BooleanProperty VISIBLE = BooleanProperty.create("visible");
@Deprecated // Remove in 1.19 - Fixes incompatibility with Quarks double door module
public static void stopItQuark(PlayerInteractEvent.RightClickBlock event) {
Player player = event.getPlayer();
Level world = event.getWorld();
if (!world.isClientSide || player.isDiscrete() || event.isCanceled() || event.getResult() == Result.DENY
|| event.getUseBlock() == Result.DENY)
return;
BlockPos pos = event.getPos();
BlockState blockState = world.getBlockState(pos);
if (blockState.getBlock()instanceof SlidingDoorBlock sdb) {
event.setCanceled(true);
event.setCancellationResult(blockState.use(world, player, event.getHand(), event.getHitVec()));
}
}
public SlidingDoorBlock(Properties p_52737_) { public SlidingDoorBlock(Properties p_52737_) {
super(p_52737_); super(p_52737_);
} }

View file

@ -85,8 +85,7 @@ public class AllArmInteractionPointTypes {
return type; return type;
} }
public static void register() { public static void register() {}
}
// //
@ -229,7 +228,8 @@ public class AllArmInteractionPointTypes {
public boolean canCreatePoint(Level level, BlockPos pos, BlockState state) { public boolean canCreatePoint(Level level, BlockPos pos, BlockState state) {
return state.getBlock() instanceof AbstractFunnelBlock return state.getBlock() instanceof AbstractFunnelBlock
&& !(state.hasProperty(FunnelBlock.EXTRACTING) && state.getValue(FunnelBlock.EXTRACTING)) && !(state.hasProperty(FunnelBlock.EXTRACTING) && state.getValue(FunnelBlock.EXTRACTING))
&& !(state.hasProperty(BeltFunnelBlock.SHAPE) && state.getValue(BeltFunnelBlock.SHAPE) == Shape.PUSHING); && !(state.hasProperty(BeltFunnelBlock.SHAPE)
&& state.getValue(BeltFunnelBlock.SHAPE) == Shape.PUSHING);
} }
@Override @Override
@ -338,13 +338,13 @@ public class AllArmInteractionPointTypes {
// //
public static class DepositOnlyArmInteractionPoint extends ArmInteractionPoint { public static class DepositOnlyArmInteractionPoint extends ArmInteractionPoint {
public DepositOnlyArmInteractionPoint(ArmInteractionPointType type, Level level, BlockPos pos, BlockState state) { public DepositOnlyArmInteractionPoint(ArmInteractionPointType type, Level level, BlockPos pos,
BlockState state) {
super(type, level, pos, state); super(type, level, pos, state);
} }
@Override @Override
public void cycleMode() { public void cycleMode() {}
}
@Override @Override
public ItemStack extract(int slot, int amount, boolean simulate) { public ItemStack extract(int slot, int amount, boolean simulate) {
@ -364,7 +364,8 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 1, .5f); return Vec3.atLowerCornerOf(pos)
.add(.5f, 1, .5f);
} }
} }
@ -402,7 +403,8 @@ public class AllArmInteractionPointTypes {
@Override @Override
public ItemStack insert(ItemStack stack, boolean simulate) { public ItemStack insert(ItemStack stack, boolean simulate) {
ItemStack input = stack.copy(); ItemStack input = stack.copy();
InteractionResultHolder<ItemStack> res = BlazeBurnerBlock.tryInsert(cachedState, level, pos, input, false, false, simulate); InteractionResultHolder<ItemStack> res =
BlazeBurnerBlock.tryInsert(cachedState, level, pos, input, false, false, simulate);
ItemStack remainder = res.getObject(); ItemStack remainder = res.getObject();
if (input.isEmpty()) { if (input.isEmpty()) {
return remainder; return remainder;
@ -421,14 +423,15 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Direction getInteractionDirection() { protected Direction getInteractionDirection() {
return cachedState.getValue(MechanicalCrafterBlock.HORIZONTAL_FACING) return cachedState.getOptionalValue(MechanicalCrafterBlock.HORIZONTAL_FACING)
.orElse(Direction.SOUTH)
.getOpposite(); .getOpposite();
} }
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return super.getInteractionPositionVector() return super.getInteractionPositionVector().add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal())
.add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal()).scale(.5f)); .scale(.5f));
} }
@Override @Override
@ -460,14 +463,15 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Direction getInteractionDirection() { protected Direction getInteractionDirection() {
return cachedState.getValue(DeployerBlock.FACING) return cachedState.getOptionalValue(DeployerBlock.FACING)
.orElse(Direction.UP)
.getOpposite(); .getOpposite();
} }
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return super.getInteractionPositionVector() return super.getInteractionPositionVector().add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal())
.add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal()).scale(.65f)); .scale(.65f));
} }
@Override @Override
@ -486,7 +490,8 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 14 / 16f, .5f); return Vec3.atLowerCornerOf(pos)
.add(.5f, 14 / 16f, .5f);
} }
} }
@ -499,7 +504,8 @@ public class AllArmInteractionPointTypes {
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return VecHelper.getCenterOf(pos) return VecHelper.getCenterOf(pos)
.add(Vec3.atLowerCornerOf(FunnelBlock.getFunnelFacing(cachedState) .add(Vec3.atLowerCornerOf(FunnelBlock.getFunnelFacing(cachedState)
.getNormal()).scale(-.15f)); .getNormal())
.scale(-.15f));
} }
@Override @Override
@ -520,7 +526,8 @@ public class AllArmInteractionPointTypes {
public ItemStack insert(ItemStack stack, boolean simulate) { public ItemStack insert(ItemStack stack, boolean simulate) {
FilteringBehaviour filtering = TileEntityBehaviour.get(level, pos, FilteringBehaviour.TYPE); FilteringBehaviour filtering = TileEntityBehaviour.get(level, pos, FilteringBehaviour.TYPE);
InvManipulationBehaviour inserter = TileEntityBehaviour.get(level, pos, InvManipulationBehaviour.TYPE); InvManipulationBehaviour inserter = TileEntityBehaviour.get(level, pos, InvManipulationBehaviour.TYPE);
if (cachedState.getOptionalValue(BlockStateProperties.POWERED).orElse(false)) if (cachedState.getOptionalValue(BlockStateProperties.POWERED)
.orElse(false))
return stack; return stack;
if (inserter == null) if (inserter == null)
return stack; return stack;
@ -570,7 +577,8 @@ public class AllArmInteractionPointTypes {
return remainder; return remainder;
} }
ItemStack remainder = stack.copy(); ItemStack remainder = stack.copy();
campfireBE.placeFood(remainder, recipe.get().getCookingTime()); campfireBE.placeFood(remainder, recipe.get()
.getCookingTime());
return remainder; return remainder;
} }
} }
@ -582,7 +590,8 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 13 / 16f, .5f); return Vec3.atLowerCornerOf(pos)
.add(.5f, 13 / 16f, .5f);
} }
@Override @Override
@ -624,7 +633,8 @@ public class AllArmInteractionPointTypes {
Item item = stack.getItem(); Item item = stack.getItem();
if (!(item instanceof RecordItem)) if (!(item instanceof RecordItem))
return stack; return stack;
if (cachedState.getValue(JukeboxBlock.HAS_RECORD)) if (cachedState.getOptionalValue(JukeboxBlock.HAS_RECORD)
.orElse(true))
return stack; return stack;
BlockEntity blockEntity = level.getBlockEntity(pos); BlockEntity blockEntity = level.getBlockEntity(pos);
if (!(blockEntity instanceof JukeboxBlockEntity jukeboxBE)) if (!(blockEntity instanceof JukeboxBlockEntity jukeboxBE))
@ -644,7 +654,8 @@ public class AllArmInteractionPointTypes {
@Override @Override
public ItemStack extract(int slot, int amount, boolean simulate) { public ItemStack extract(int slot, int amount, boolean simulate) {
if (!cachedState.getValue(JukeboxBlock.HAS_RECORD)) if (!cachedState.getOptionalValue(JukeboxBlock.HAS_RECORD)
.orElse(false))
return ItemStack.EMPTY; return ItemStack.EMPTY;
BlockEntity blockEntity = level.getBlockEntity(pos); BlockEntity blockEntity = level.getBlockEntity(pos);
if (!(blockEntity instanceof JukeboxBlockEntity jukeboxBE)) if (!(blockEntity instanceof JukeboxBlockEntity jukeboxBE))
@ -668,14 +679,16 @@ public class AllArmInteractionPointTypes {
@Override @Override
protected Vec3 getInteractionPositionVector() { protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 1, .5f); return Vec3.atLowerCornerOf(pos)
.add(.5f, 1, .5f);
} }
@Override @Override
public ItemStack insert(ItemStack stack, boolean simulate) { public ItemStack insert(ItemStack stack, boolean simulate) {
if (!stack.is(Items.GLOWSTONE)) if (!stack.is(Items.GLOWSTONE))
return stack; return stack;
if (cachedState.getValue(RespawnAnchorBlock.CHARGE) == 4) if (cachedState.getOptionalValue(RespawnAnchorBlock.CHARGE)
.orElse(4) == 4)
return stack; return stack;
if (!simulate) if (!simulate)
RespawnAnchorBlock.charge(level, pos, cachedState); RespawnAnchorBlock.charge(level, pos, cachedState);

View file

@ -18,6 +18,7 @@ import javax.annotation.Nullable;
import org.apache.commons.lang3.mutable.MutableDouble; import org.apache.commons.lang3.mutable.MutableDouble;
import com.jozufozu.flywheel.repack.joml.Math;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.contraptions.components.structureMovement.train.TrainCargoManager; import com.simibubi.create.content.contraptions.components.structureMovement.train.TrainCargoManager;
import com.simibubi.create.content.logistics.trains.DimensionPalette; import com.simibubi.create.content.logistics.trains.DimensionPalette;
@ -734,9 +735,9 @@ public class Carriage {
if (sp.level.dimension() if (sp.level.dimension()
.equals(other.getKey())) .equals(other.getKey()))
continue; continue;
if (otherDce.pivot == null) Vec3 loc = otherDce.pivot == null ? otherDce.positionAnchor : otherDce.pivot.getLocation();
if (loc == null)
continue; continue;
Vec3 loc = otherDce.pivot.getLocation();
ServerLevel level = sLevel.getServer() ServerLevel level = sLevel.getServer()
.getLevel(other.getKey()); .getLevel(other.getKey());
sp.teleportTo(level, loc.x, loc.y, loc.z, sp.getYRot(), sp.getXRot()); sp.teleportTo(level, loc.x, loc.y, loc.z, sp.getYRot(), sp.getXRot());

View file

@ -683,9 +683,8 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
boolean stationMessage = false; boolean stationMessage = false;
private void displayApproachStationMessage(Player player, GlobalStation station) { private void displayApproachStationMessage(Player player, GlobalStation station) {
sendPrompt(player, sendPrompt(player, Lang.translateDirect("contraption.controls.approach_station",
Lang.translateDirect("contraption.controls.approach_station", new KeybindComponent("key.jump"), station.name), new KeybindComponent("key.jump"), station.name), false);
false);
stationMessage = true; stationMessage = true;
} }
@ -728,6 +727,8 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
this.carriageIndex = carriage.train.carriages.indexOf(carriage); this.carriageIndex = carriage.train.carriages.indexOf(carriage);
if (contraption instanceof CarriageContraption cc) if (contraption instanceof CarriageContraption cc)
cc.swapStorageAfterAssembly(this); cc.swapStorageAfterAssembly(this);
if (carriage.train.graph != null)
entityData.set(TRACK_GRAPH, Optional.of(carriage.train.graph.id));
DimensionalCarriageEntity dimensional = carriage.getDimensional(level); DimensionalCarriageEntity dimensional = carriage.getDimensional(level);
dimensional.pivot = null; dimensional.pivot = null;

View file

@ -53,7 +53,7 @@ public class CarriageParticles {
if (stopped) { if (stopped) {
if (!arrived) { if (!arrived) {
arrived = true; arrived = true;
depressurise = 20; depressurise = (int) (20 * entity.getCarriage().train.accumulatedSteamRelease / 10f);
} }
} else } else
depressurise = 0; depressurise = 0;

View file

@ -61,10 +61,19 @@ public class CarriageSounds {
.subtract(entity.getPrevPositionVec()); .subtract(entity.getPrevPositionVec());
Vec3 combinedMotion = contraptionMotion.subtract(camEntity.getDeltaMovement()); Vec3 combinedMotion = contraptionMotion.subtract(camEntity.getDeltaMovement());
Train train = entity.getCarriage().train;
if (arrived && contraptionMotion.length() > 0.01f) if (arrived && contraptionMotion.length() > 0.01f)
arrived = false; arrived = false;
if (arrived && entity.carriageIndex == 0)
train.accumulatedSteamRelease /= 2;
arrived |= entity.isStalled(); arrived |= entity.isStalled();
if (entity.carriageIndex == 0)
train.accumulatedSteamRelease = (float) Math
.min(train.accumulatedSteamRelease + Math.min(0.5f, Math.abs(contraptionMotion.length() / 10f)), 10);
Vec3 toBogey1 = leadingAnchor.subtract(cam); Vec3 toBogey1 = leadingAnchor.subtract(cam);
Vec3 toBogey2 = trailingAnchor.subtract(cam); Vec3 toBogey2 = trailingAnchor.subtract(cam);
double distance1 = toBogey1.length(); double distance1 = toBogey1.length();
@ -103,13 +112,14 @@ public class CarriageSounds {
AllSoundEvents.STEAM.playAt(entity.level, soundLocation, v * 1.5f, .8f, false); AllSoundEvents.STEAM.playAt(entity.level, soundLocation, v * 1.5f, .8f, false);
} }
if (!arrived && speedFactor.getValue() < .002f) { if (!arrived && speedFactor.getValue() < .002f && train.accumulatedSteamRelease > 1) {
arrived = true; arrived = true;
float releaseVolume = train.accumulatedSteamRelease / 10f;
entity.level.playLocalSound(soundLocation.x, soundLocation.y, soundLocation.z, SoundEvents.LAVA_EXTINGUISH, entity.level.playLocalSound(soundLocation.x, soundLocation.y, soundLocation.z, SoundEvents.LAVA_EXTINGUISH,
SoundSource.NEUTRAL, .25f, .78f, false); SoundSource.NEUTRAL, .25f * releaseVolume, .78f, false);
entity.level.playLocalSound(soundLocation.x, soundLocation.y, soundLocation.z, entity.level.playLocalSound(soundLocation.x, soundLocation.y, soundLocation.z,
SoundEvents.WOODEN_TRAPDOOR_CLOSE, SoundSource.NEUTRAL, .2f, 1.5f, false); SoundEvents.WOODEN_TRAPDOOR_CLOSE, SoundSource.NEUTRAL, .2f * releaseVolume, 1.5f, false);
AllSoundEvents.STEAM.playAt(entity.level, soundLocation, .75f, .5f, false); AllSoundEvents.STEAM.playAt(entity.level, soundLocation, .75f * releaseVolume, .5f, false);
} }
float pitchModifier = ((entity.getId() * 10) % 13) / 36f; float pitchModifier = ((entity.getId() * 10) % 13) / 36f;
@ -123,7 +133,6 @@ public class CarriageSounds {
volume = Math.min(volume, distanceFactor.getValue() / 1000); volume = Math.min(volume, distanceFactor.getValue() / 1000);
Train train = entity.getCarriage().train;
for (Carriage carriage : train.carriages) { for (Carriage carriage : train.carriages) {
DimensionalCarriageEntity mainDCE = carriage.getDimensionalIfPresent(entity.level.dimension()); DimensionalCarriageEntity mainDCE = carriage.getDimensionalIfPresent(entity.level.dimension());
if (mainDCE == null) if (mainDCE == null)

View file

@ -124,6 +124,8 @@ public class Train {
public Boolean lowHonk; public Boolean lowHonk;
public int honkPitch; public int honkPitch;
public float accumulatedSteamRelease;
int tickOffset; int tickOffset;
double[] stress; double[] stress;
@ -296,6 +298,8 @@ public class Train {
ResourceKey<Level> d = b ? d1 : d2; ResourceKey<Level> d = b ? d1 : d2;
if (!b && d1.equals(d2)) if (!b && d1.equals(d2))
continue; continue;
if (!d1.equals(d2))
continue;
DimensionalCarriageEntity dimensional = carriage.getDimensionalIfPresent(d); DimensionalCarriageEntity dimensional = carriage.getDimensionalIfPresent(d);
DimensionalCarriageEntity dimensional2 = previousCarriage.getDimensionalIfPresent(d); DimensionalCarriageEntity dimensional2 = previousCarriage.getDimensionalIfPresent(d);
@ -312,6 +316,7 @@ public class Train {
} }
} }
if (entries > 0) if (entries > 0)
actual = total / entries; actual = total / entries;
@ -367,6 +372,7 @@ public class Train {
toFollowBackward == null ? navigation::control : mp -> mp.follow(toFollowBackward); toFollowBackward == null ? navigation::control : mp -> mp.follow(toFollowBackward);
double totalStress = derailed ? 0 : leadingStress + trailingStress; double totalStress = derailed ? 0 : leadingStress + trailingStress;
boolean first = i == 0; boolean first = i == 0;
boolean last = i == carriageCount - 1; boolean last = i == carriageCount - 1;
int carriageType = first ? last ? Carriage.BOTH : Carriage.FIRST : last ? Carriage.LAST : Carriage.MIDDLE; int carriageType = first ? last ? Carriage.BOTH : Carriage.FIRST : last ? Carriage.LAST : Carriage.MIDDLE;

View file

@ -124,6 +124,7 @@ public class BuilderTransformers {
.onRegister(movementBehaviour(new SlidingDoorMovementBehaviour())) .onRegister(movementBehaviour(new SlidingDoorMovementBehaviour()))
.tag(BlockTags.DOORS) .tag(BlockTags.DOORS)
.tag(BlockTags.WOODEN_DOORS) // for villager AI .tag(BlockTags.WOODEN_DOORS) // for villager AI
.tag(AllBlockTags.NON_DOUBLE_DOOR.tag)
.loot((lr, block) -> lr.add(block, BlockLoot.createDoorTable(block))) .loot((lr, block) -> lr.add(block, BlockLoot.createDoorTable(block)))
.item() .item()
.tag(ItemTags.DOORS) .tag(ItemTags.DOORS)

View file

@ -3,7 +3,6 @@ package com.simibubi.create.foundation.ponder.content;
import java.util.Collection; import java.util.Collection;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock;
import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity;
@ -162,10 +161,11 @@ public class CrafterScenes {
.placeNearTarget(); .placeNearTarget();
scene.idle(60); scene.idle(60);
ItemStack alloy = AllItems.ANDESITE_ALLOY.asStack(); ItemStack redstoneDust = new ItemStack(Items.REDSTONE);
ItemStack log = new ItemStack(Items.OAK_LOG); ItemStack iron = new ItemStack(Items.IRON_INGOT);
ItemStack cobble = new ItemStack(Items.COBBLESTONE);
scene.world.setCraftingResult(util.grid.at(1, 1, 2), AllBlocks.ANDESITE_CASING.asStack(4)); scene.world.setCraftingResult(util.grid.at(1, 1, 2), new ItemStack(Items.PISTON));
scene.world.modifyTileEntity(util.grid.at(2, 3, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(2, 3, 2), type, mct -> mct.getInventory()
.insertItem(0, planks.copy(), false)); .insertItem(0, planks.copy(), false));
@ -174,22 +174,22 @@ public class CrafterScenes {
.insertItem(0, planks.copy(), false)); .insertItem(0, planks.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(3, 2, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(3, 2, 2), type, mct -> mct.getInventory()
.insertItem(0, alloy.copy(), false)); .insertItem(0, cobble.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(2, 2, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(2, 2, 2), type, mct -> mct.getInventory()
.insertItem(0, log.copy(), false)); .insertItem(0, iron.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(1, 2, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(1, 2, 2), type, mct -> mct.getInventory()
.insertItem(0, alloy.copy(), false)); .insertItem(0, cobble.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(1, 1, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(1, 1, 2), type, mct -> mct.getInventory()
.insertItem(0, planks.copy(), false)); .insertItem(0, cobble.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(2, 1, 2), type, mct -> mct.getInventory()
.insertItem(0, planks.copy(), false)); .insertItem(0, redstoneDust.copy(), false));
scene.idle(5); scene.idle(5);
scene.world.modifyTileEntity(util.grid.at(3, 1, 2), type, mct -> mct.getInventory() scene.world.modifyTileEntity(util.grid.at(3, 1, 2), type, mct -> mct.getInventory()
.insertItem(0, planks.copy(), false)); .insertItem(0, cobble.copy(), false));
scene.overlay.showText(80) scene.overlay.showText(80)
.attachKeyFrame() .attachKeyFrame()
@ -201,7 +201,6 @@ public class CrafterScenes {
scene.world.removeItemsFromBelt(depotPos); scene.world.removeItemsFromBelt(depotPos);
ItemStack stick = new ItemStack(Items.STICK); ItemStack stick = new ItemStack(Items.STICK);
ItemStack iron = new ItemStack(Items.IRON_INGOT);
scene.world.setCraftingResult(util.grid.at(1, 1, 2), new ItemStack(Items.IRON_PICKAXE)); scene.world.setCraftingResult(util.grid.at(1, 1, 2), new ItemStack(Items.IRON_PICKAXE));

View file

@ -5,7 +5,7 @@ license="MIT"
[[mods]] [[mods]]
modId="create" modId="create"
version="0.5.0" version="0.5.0a"
displayName="Create" displayName="Create"
#updateJSONURL="" #updateJSONURL=""
displayURL="https://www.curseforge.com/minecraft/mc-mods/create" displayURL="https://www.curseforge.com/minecraft/mc-mods/create"