Tunes and Tuning

- Fixed factory gauge place and break sounds not always playing
- Factory gauges can now be clicked like links to copy the logistics frequency
- Factory gauges now show an outline when the held item is on the same network
- Update changelog
This commit is contained in:
simibubi 2025-02-07 13:02:02 +01:00
parent 8003bfac36
commit 728efc0a84
9 changed files with 94 additions and 18 deletions

View file

@ -46,6 +46,7 @@ _Now using Flywheel 1.0_
- All links now use a new ingredient item, the transmitter
- New advancement chain for high logistics components
- New ponder scenes and category for high logistics components
- Tracks and Trains now have special integration with FTBChunks and Journeymap
- Depots can now be used as storage blocks on contraptions
- Brass tunnels now try to distribute an item more quickly when it first arrives
- Brass tunnels now always prefer filtered sides over non-filtered sides
@ -55,6 +56,7 @@ _Now using Flywheel 1.0_
- In common cobblegen scenarios, stationary drills now skip breaking blocks and just insert the result items into open
inventories directly below
- Held clipboards can now copy entries from other in-world clipboards
- Filters, Clipboards and Schedules can now be copyied in the crafting table
- Metal ladders no longer require a wall if another ladder block is above them
- Bells assembled to elevator contraptions now activate when arriving at a floor
- Sliding doors placed in front of contraption-mounted sliding doors now open and close automatically
@ -68,6 +70,13 @@ _Now using Flywheel 1.0_
- Wood cutting recipes in mechanical saws
- Added pressing recipes for coarse dirt and rooted dirt which both produce dirt paths (#7186)
- Updated JEI integration and added potion fluids to the JEI sidebar (#6934)
- Chain Drives can now be crafted from zinc nuggets
- Redstone lamps can now be picked up with the wrench
- New compatibility recipes for Immersive Engineering
- Added missing deploying recipes for copper oxidisation
- Framed and tiled glass panes can now be obtained via stonecutting
- Schematicannon on 'replace blocks with empty' now send block updates at the edges after printing
- The player hitbox used in contraption collision is now slightly shorter
#### Bug Fixes
@ -98,7 +107,6 @@ _Now using Flywheel 1.0_
- Fixed mechanical arm interactions with jukeboxes (#5902)
- Fixed toolboxes not giving a comparator output signal (#6973)
- Fixed copper slabs and stairs being missing from the respective tags (#3080)
- Fix incorrect copycat panel culling when framed glass is used and sodium is installed (Fabricators-of-Create#1540)
- Fixed Fix waterlogged bracketed kinetics dropping the bracket (Fabricators-of-Create#1552)
- Switched away from using streams in ContraptionCollider fixing a rare crash (#5043)
- Fixed pumps not placing fluids into flowing fluids of the same type (#5884)
@ -116,6 +124,10 @@ _Now using Flywheel 1.0_
- Fixed inability to mill cactus when Quark is installed (#7215)
- Fixed rare spout crash and offset rendering (#7025)
- Fixed deploying food resulting in missing particles and not returning the correct items (#7288)
- Fixed trains not properly pathfinding to stations with an opposing signal just behind the destination
- Fixed stations voiding schedules when disassembling the train
- Fixed lighting on signal block indicators
- Fixed vaults and tanks rotated in place not updating their multiblock correctly
#### API Changes

View file

@ -1,4 +1,4 @@
// 1.20.1 2025-02-07T11:08:37.2051351 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
// 1.20.1 2025-02-07T13:00:03.1304237 Registrate Provider for create [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
60bbdf92d2ac9824ea6144955c74043a6005f79d assets/create/blockstates/acacia_window.json
6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json
c3ae87b62e81d8e9476eccd793bb1548d74c66a1 assets/create/blockstates/adjustable_chain_gearshift.json
@ -642,8 +642,8 @@ b0d8f08968763a5f74e5cd5644377a76a9f39753 assets/create/blockstates/yellow_toolbo
fe8c497aacc641c2f01cec90bba9f19e59cc2ed2 assets/create/blockstates/yellow_valve_handle.json
e819e93fdcbe9fd9c050a052d2718ff3b3539365 assets/create/blockstates/zinc_block.json
64121dcb216381c83b4fe28aa361ea07c24c9ad0 assets/create/blockstates/zinc_ore.json
9f35559111bddd06b79d4039fa2651087d656405 assets/create/lang/en_ud.json
39193b3c803b9e09f14b63d8ad6c00b700505d6e assets/create/lang/en_us.json
cae329ccc1187f88b752581c198792b925b44d4a assets/create/lang/en_ud.json
4943bb06d6be669ac498b1be5902794098aa1c0c assets/create/lang/en_us.json
a97e1060e00ae701a02e39cd4ef8054cf345fac4 assets/create/models/block/acacia_window.json
103e032c0b1a0a6a27c67da8c91179a564bd281c assets/create/models/block/acacia_window_pane_noside.json
fb00b627abda76ad4fea867ca57dbfadd24fffa3 assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -1529,7 +1529,7 @@
"create.logistically_linked.protected": "pǝʇɔǝʇoɹԀ sı ʞɹoʍʇǝN sɔıʇsıboꞀ",
"create.logistically_linked.tooltip": "pǝɹnbıɟuoɔ ʎɔuǝnbǝɹℲ",
"create.logistically_linked.tooltip_clear": "ʇǝsǝɹ oʇ pıɹb buıʇɟɐɹɔ uı ǝɔɐןԀ",
"create.logistically_linked.tuned": uıן sıɥʇ oʇ pǝun⟘",
"create.logistically_linked.tuned": ɹoʍʇǝu sıɥʇ oʇ pǝun⟘",
"create.logistics.crafter.click_to_merge": "sǝıɹoʇuǝʌuI ǝbɹǝɯ oʇ ʞɔıןƆ",
"create.logistics.crafter.click_to_separate": "sǝıɹoʇuǝʌuI ǝʇɐɹɐdǝs oʇ ʞɔıןƆ",
"create.logistics.crafter.connected": "sɹǝʇɟɐɹƆ pǝʇɔǝuuoƆ",

View file

@ -1529,7 +1529,7 @@
"create.logistically_linked.protected": "Logistics Network is Protected",
"create.logistically_linked.tooltip": "Frequency configured",
"create.logistically_linked.tooltip_clear": "Place in crafting grid to reset",
"create.logistically_linked.tuned": "Tuned to this link",
"create.logistically_linked.tuned": "Tuned to this network",
"create.logistics.crafter.click_to_merge": "Click to merge Inventories",
"create.logistics.crafter.click_to_separate": "Click to separate Inventories",
"create.logistics.crafter.connected": "Connected Crafters",

View file

@ -31,6 +31,8 @@ import com.simibubi.create.content.logistics.packager.InventorySummary;
import com.simibubi.create.content.logistics.packager.PackagerBlockEntity;
import com.simibubi.create.content.logistics.packager.PackagingRequest;
import com.simibubi.create.content.logistics.packagerLink.LogisticallyLinkedBehaviour.RequestType;
import com.simibubi.create.content.logistics.packagerLink.LogisticallyLinkedBlockItem;
import com.simibubi.create.content.logistics.packagerLink.LogisticallyLinkedClientHandler;
import com.simibubi.create.content.logistics.packagerLink.LogisticsManager;
import com.simibubi.create.content.logistics.packagerLink.RequestPromise;
import com.simibubi.create.content.logistics.packagerLink.RequestPromiseQueue;
@ -277,6 +279,8 @@ public class FactoryPanelBehaviour extends FilteringBehaviour {
tickStorageMonitor();
bulb.updateChaseTarget(redstonePowered || satisfied ? 1 : 0);
bulb.tickChaser();
if (active)
tickOutline();
return;
}
@ -345,7 +349,7 @@ public class FactoryPanelBehaviour extends FilteringBehaviour {
&& promisedSatisfied == shouldPromiseSatisfy && waitingForNetwork == shouldWait)
return;
if (!satisfied && shouldSatisfy) {
if (!satisfied && shouldSatisfy && demand > 0) {
AllSoundEvents.CONFIRM.playOnServer(getWorld(), getPos(), 0.075f, 1f);
AllSoundEvents.CONFIRM_2.playOnServer(getWorld(), getPos(), 0.125f, 0.575f);
}
@ -577,6 +581,13 @@ public class FactoryPanelBehaviour extends FilteringBehaviour {
return;
}
ItemStack heldItem = player.getItemInHand(hand);
if (heldItem.getItem() instanceof LogisticallyLinkedBlockItem) {
if (!player.level().isClientSide)
LogisticallyLinkedBlockItem.assignFrequency(heldItem, player, network);
return;
}
if (player.level().isClientSide)
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> displayScreen(player));
}
@ -993,4 +1004,8 @@ public class FactoryPanelBehaviour extends FilteringBehaviour {
return false;
}
private void tickOutline() {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> LogisticallyLinkedClientHandler.tickPanel(this));
}
}

View file

@ -15,15 +15,17 @@ import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import net.createmod.catnip.nbt.NBTHelper;
import net.createmod.catnip.math.VecHelper;
import net.createmod.catnip.nbt.NBTHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
@ -134,6 +136,13 @@ public class FactoryPanelBlockEntity extends SmartBlockEntity {
behaviour.setNetwork(frequency);
redraw = true;
lastShape = null;
if (activePanels() > 1) {
SoundType soundType = getBlockState().getSoundType();
level.playSound(null, worldPosition, soundType.getPlaceSound(), SoundSource.BLOCKS,
(soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F);
}
return true;
}
return false;
@ -145,6 +154,13 @@ public class FactoryPanelBlockEntity extends SmartBlockEntity {
behaviour.disable();
redraw = true;
lastShape = null;
if (activePanels() > 0) {
SoundType soundType = getBlockState().getSoundType();
level.playSound(null, worldPosition, soundType.getBreakSound(), SoundSource.BLOCKS,
(soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F);
}
return true;
}
return false;

View file

@ -89,13 +89,7 @@ public class LogisticallyLinkedBlockItem extends BlockItem {
if (!link.mayInteractMessage(player))
return InteractionResult.SUCCESS;
CompoundTag stackTag = stack.getOrCreateTag();
CompoundTag teTag = new CompoundTag();
teTag.putUUID("Freq", link.freqId);
stackTag.put(BLOCK_ENTITY_TAG, teTag);
player.displayClientMessage(CreateLang.translateDirect("logistically_linked.tuned"), true);
stack.setTag(stackTag);
assignFrequency(stack, player, link.freqId);
return InteractionResult.SUCCESS;
}
@ -108,4 +102,14 @@ public class LogisticallyLinkedBlockItem extends BlockItem {
return useOn;
}
public static void assignFrequency(ItemStack stack, Player player, UUID frequency) {
CompoundTag stackTag = stack.getOrCreateTag();
CompoundTag teTag = new CompoundTag();
teTag.putUUID("Freq", frequency);
stackTag.put(BLOCK_ENTITY_TAG, teTag);
player.displayClientMessage(CreateLang.translateDirect("logistically_linked.tuned"), true);
stack.setTag(stackTag);
}
}

View file

@ -4,6 +4,8 @@ import java.util.UUID;
import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.content.logistics.factoryBoard.FactoryPanelBehaviour;
import com.simibubi.create.content.logistics.factoryBoard.FactoryPanelConnectionHandler;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import net.createmod.catnip.animation.AnimationTickHolder;
@ -18,7 +20,11 @@ import net.minecraft.world.phys.shapes.VoxelShape;
public class LogisticallyLinkedClientHandler {
private static UUID previouslyHeldFrequency;
public static void tick() {
previouslyHeldFrequency = null;
LocalPlayer player = Minecraft.getInstance().player;
if (player == null)
return;
@ -33,6 +39,8 @@ public class LogisticallyLinkedClientHandler {
return;
UUID uuid = tag.getUUID("Freq");
previouslyHeldFrequency = uuid;
for (LogisticallyLinkedBehaviour behaviour : LogisticallyLinkedBehaviour.getAllPresent(uuid, false, true)) {
SmartBlockEntity be = behaviour.blockEntity;
VoxelShape shape = be.getBlockState()
@ -46,7 +54,8 @@ public class LogisticallyLinkedClientHandler {
.size(); i++) {
AABB aabb = shape.toAabbs()
.get(i);
Outliner.getInstance().showAABB(Pair.of(behaviour, i), aabb.inflate(-1 / 128f)
Outliner.getInstance()
.showAABB(Pair.of(behaviour, i), aabb.inflate(-1 / 128f)
.move(be.getBlockPos()), 2)
.lineWidth(1 / 32f)
.disableLineNormals()
@ -56,4 +65,24 @@ public class LogisticallyLinkedClientHandler {
}
}
public static void tickPanel(FactoryPanelBehaviour fpb) {
if (previouslyHeldFrequency == null)
return;
if (!previouslyHeldFrequency.equals(fpb.network))
return;
LocalPlayer player = Minecraft.getInstance().player;
if (player == null)
return;
if (!player.blockPosition()
.closerThan(fpb.getPos(), 64))
return;
Outliner.getInstance()
.showAABB(fpb, FactoryPanelConnectionHandler.getBB(fpb.blockEntity.getBlockState(), fpb.getPanelPosition())
.inflate(-1.5 / 128f))
.lineWidth(1 / 32f)
.disableLineNormals()
.colored(AnimationTickHolder.getTicks() % 16 < 8 ? 0x708DAD : 0x90ADCD);
}
}

View file

@ -1044,7 +1044,7 @@
"create.display_link.display_on": "Write data to:",
"create.display_link.display_on_multiline": "Start writing at:",
"create.logistically_linked.tuned": "Tuned to this link",
"create.logistically_linked.tuned": "Tuned to this network",
"create.logistically_linked.new_network_started": "New link network started",
"create.logistically_linked.connected": "Connected to existing network successfully",
"create.logistically_linked.tooltip": "Frequency configured",