Breakfast debug

- Fixed tracks creating signal block intersections despite being in different dimensions
- Steam engine placement assist now shows a normal shaft
- Fixed Frogport sounds creating individual subtitle entries
- Frogports and Postboxes now highlight their target position when hovered with a wrench
This commit is contained in:
simibubi 2025-01-08 10:01:20 +01:00
parent 4bd47bea41
commit 24bd97cf2c
13 changed files with 65 additions and 67 deletions

View file

@ -1,4 +1,4 @@
// 1.20.1 2025-01-07T16:30:09.3458051 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-01-08T09:46:32.7401287 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
ae4560acf1dc152676a319589184d6722d2893e4 assets/create/lang/en_ud.json
b90c20d923ba094594f5062802eeb822f34691ef assets/create/lang/en_us.json
739f9cbd71716d56d1561002e8668261cddf5b0c assets/create/lang/en_ud.json
20c3b2a59090bf209090579c2f37db818a06a26b 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

@ -1,2 +1,2 @@
// 1.20.1 2025-01-07T12:22:29.7516833 Create's Custom Sounds
56957fbbc59f80d23bf39df63f1925112fbfef7d assets/create/sounds.json
// 1.20.1 2025-01-08T09:46:32.7381345 Create's Custom Sounds
0bca17432111ff732e5188cd3098201330e386bc assets/create/sounds.json

View file

@ -2749,10 +2749,7 @@
"create.subtitle.depot_plop": "spuɐן ɯǝʇI",
"create.subtitle.depot_slide": "sǝpıןs ɯǝʇI",
"create.subtitle.desk_bell": "sbuıp ןןǝq uoıʇdǝɔǝᴚ",
"create.subtitle.frogport_catch_1": "ǝbɐʞɔɐd sǝɥɔʇɐɔ ʇɹodboɹℲ",
"create.subtitle.frogport_catch_2": "ǝbɐʞɔɐd sǝɥɔʇɐɔ ʇɹodboɹℲ",
"create.subtitle.frogport_catch_3": "ǝbɐʞɔɐd sǝɥɔʇɐɔ ʇɹodboɹℲ",
"create.subtitle.frogport_catch_4": "ǝbɐʞɔɐd sǝɥɔʇɐɔ ʇɹodboɹℲ",
"create.subtitle.frogport_catch": "ǝbɐʞɔɐd sǝɥɔʇɐɔ ʇɹodboɹℲ",
"create.subtitle.frogport_close": "sʇnɥs ʇɹodboɹℲ",
"create.subtitle.frogport_deposit": "ǝbɐʞɔɐd sǝɔɐןd ʇɹodboɹℲ",
"create.subtitle.frogport_open": "suǝdo ʇɹodboɹℲ",

View file

@ -2749,10 +2749,7 @@
"create.subtitle.depot_plop": "Item lands",
"create.subtitle.depot_slide": "Item slides",
"create.subtitle.desk_bell": "Reception bell dings",
"create.subtitle.frogport_catch_1": "Frogport catches package",
"create.subtitle.frogport_catch_2": "Frogport catches package",
"create.subtitle.frogport_catch_3": "Frogport catches package",
"create.subtitle.frogport_catch_4": "Frogport catches package",
"create.subtitle.frogport_catch": "Frogport catches package",
"create.subtitle.frogport_close": "Frogport shuts",
"create.subtitle.frogport_deposit": "Frogport places package",
"create.subtitle.frogport_open": "Frogport opens",

View file

@ -235,41 +235,26 @@
],
"subtitle": "create.subtitle.desk_bell"
},
"frogport_catch_1": {
"frogport_catch": {
"sounds": [
{
"type": "file",
"name": "create:frogport_catch"
},
{
"type": "file",
"name": "create:frogport_catch_1"
}
],
"subtitle": "create.subtitle.frogport_catch_1"
},
"frogport_catch_2": {
"sounds": [
},
{
"type": "file",
"name": "create:frogport_catch_2"
}
],
"subtitle": "create.subtitle.frogport_catch_2"
},
"frogport_catch_3": {
"sounds": [
},
{
"type": "file",
"name": "create:frogport_catch_3"
}
],
"subtitle": "create.subtitle.frogport_catch_3"
},
"frogport_catch_4": {
"sounds": [
{
"type": "file",
"name": "create:frogport_catch_4"
}
],
"subtitle": "create.subtitle.frogport_catch_4"
"subtitle": "create.subtitle.frogport_catch"
},
"frogport_close": {
"sounds": [

View file

@ -151,19 +151,10 @@ public class AllSoundEvents {
.category(SoundSource.BLOCKS)
.build(),
FROGPORT_CATCH_1 = create("frogport_catch_1").subtitle("Frogport catches package")
.category(SoundSource.BLOCKS)
.build(),
FROGPORT_CATCH_2 = create("frogport_catch_2").subtitle("Frogport catches package")
.category(SoundSource.BLOCKS)
.build(),
FROGPORT_CATCH_3 = create("frogport_catch_3").subtitle("Frogport catches package")
.category(SoundSource.BLOCKS)
.build(),
FROGPORT_CATCH_4 = create("frogport_catch_4").subtitle("Frogport catches package")
FROGPORT_CATCH = create("frogport_catch").subtitle("Frogport catches package")
.addVariant("frogport_catch_1")
.addVariant("frogport_catch_2")
.addVariant("frogport_catch_3")
.category(SoundSource.BLOCKS)
.build(),

View file

@ -128,7 +128,8 @@ public class ShaftBlock extends AbstractSimpleShaftBlock implements EncasableBlo
PlacementOffset offset = super.getOffset(player, world, state, pos, ray);
if (offset.isSuccessful())
offset.withTransform(offset.getTransform()
.andThen(s -> ShaftBlock.pickCorrectShaftType(s, world, offset.getBlockPos())));
.andThen(s -> world.isClientSide() ? s
: ShaftBlock.pickCorrectShaftType(s, world, offset.getBlockPos())));
return offset;
}

View file

@ -201,7 +201,9 @@ public class SteamEngineBlock extends FaceAttachedHorizontalDirectionalBlock
Axis axis = shaft.getValue(ShaftBlock.AXIS);
return PlacementOffset.success(shaftPos,
s -> BlockHelper.copyProperties(s, AllBlocks.POWERED_SHAFT.getDefaultState())
s -> BlockHelper
.copyProperties(s,
(world.isClientSide ? AllBlocks.SHAFT : AllBlocks.POWERED_SHAFT).getDefaultState())
.setValue(PoweredShaftBlock.AXIS, axis));
}
}

View file

@ -223,7 +223,7 @@ public abstract class PackagePortTarget {
@Override
public Vec3 getExactTargetLocation(PackagePortBlockEntity ppbe, LevelAccessor level, BlockPos portPos) {
return Vec3.atCenterOf(portPos);
return Vec3.atCenterOf(portPos.offset(relativePos));
}
@Override

View file

@ -73,19 +73,42 @@ public class PackagePortTargetSelectionHandler {
public static void tick() {
Minecraft mc = Minecraft.getInstance();
LocalPlayer player = mc.player;
if (activePackageTarget == null)
return;
boolean isPostbox = AllItemTags.POSTBOXES.matches(player.getMainHandItem());
if (!AllBlocks.PACKAGE_FROGPORT.isIn(player.getMainHandItem()) && !isPostbox)
return;
boolean isWrench = AllItemTags.WRENCH.matches(player.getMainHandItem());
if (!isWrench) {
if (activePackageTarget == null)
return;
if (!AllBlocks.PACKAGE_FROGPORT.isIn(player.getMainHandItem()) && !isPostbox)
return;
}
HitResult objectMouseOver = mc.hitResult;
if (!(objectMouseOver instanceof BlockHitResult))
if (!(objectMouseOver instanceof BlockHitResult blockRayTraceResult))
return;
Vec3 target = exactPositionOfTarget;
if (isWrench) {
if (blockRayTraceResult.getType() == Type.MISS)
return;
BlockPos pos = blockRayTraceResult.getBlockPos();
if (!(mc.level.getBlockEntity(pos) instanceof PackagePortBlockEntity ppbe))
return;
if (ppbe.target == null)
return;
Vec3 source = Vec3.atBottomCenterOf(pos);
Vec3 target = ppbe.target.getExactTargetLocation(ppbe, mc.level, pos);
if (target == Vec3.ZERO)
return;
Color color = new Color(0x9ede73);
animateConnection(mc, source, target, color);
CatnipClient.OUTLINER.chaseAABB("ChainPointSelected", new AABB(target, target))
.colored(color)
.lineWidth(1 / 5f)
.disableLineNormals();
return;
}
BlockHitResult blockRayTraceResult = (BlockHitResult) objectMouseOver;
Vec3 target = exactPositionOfTarget;
if (blockRayTraceResult.getType() == Type.MISS) {
CatnipClient.OUTLINER.chaseAABB("ChainPointSelected", new AABB(target, target))
.colored(0x9ede73)
@ -123,6 +146,11 @@ public class PackagePortTargetSelectionHandler {
.lineWidth(1 / 16f)
.disableLineNormals();
animateConnection(mc, source, target, color);
}
public static void animateConnection(Minecraft mc, Vec3 source, Vec3 target, Color color) {
DustParticleOptions data = new DustParticleOptions(color.asVectorF(), 1);
ClientLevel world = mc.level;
double totalFlyingTicks = 10;

View file

@ -1,9 +1,6 @@
package com.simibubi.create.content.logistics.packagePort.frogport;
import java.util.List;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.AllSoundEvents.SoundEntry;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
@ -12,9 +9,6 @@ import net.minecraft.world.phys.Vec3;
public class FrogportSounds {
private static final List<SoundEntry> CATCH_SOUNDS = List.of(AllSoundEvents.FROGPORT_CATCH_1,
AllSoundEvents.FROGPORT_CATCH_2, AllSoundEvents.FROGPORT_CATCH_3, AllSoundEvents.FROGPORT_CATCH_4);
public void open(Level level, BlockPos pos) {
AllSoundEvents.FROGPORT_OPEN.playAt(level, Vec3.atCenterOf(pos), 0.125f, 1, false);
}
@ -29,8 +23,7 @@ public class FrogportSounds {
public void catchPackage(Level level, BlockPos pos) {
if (!isPlayerNear(pos))
return;
CATCH_SOUNDS.get(level.random.nextInt(CATCH_SOUNDS.size()))
.playAt(level, Vec3.atCenterOf(pos), 1, 1, false);
AllSoundEvents.FROGPORT_CATCH.playAt(level, Vec3.atCenterOf(pos), 1, 1, false);
}
public void depositPackage(Level level, BlockPos pos) {

View file

@ -415,6 +415,10 @@ public class TrackGraph {
if (edge == otherEdge)
continue;
if (otherEdge.isInterDimensional() || edge.isInterDimensional())
continue;
if (node1.location.dimension != otherNode1.location.dimension)
continue;
if (!bezier && !otherEdge.isTurn())
continue;
if (otherEdge.isTurn() && otherEdge.turn.isPrimary())