diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 477f6d909..6835c75b0 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -583,7 +583,7 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json 4fd8347dfb20e6e5752b8b905850762a88c88c02 assets/create/lang/en_ud.json -2ffe0a94afbddd820110f78943dc5938edc9cb34 assets/create/lang/en_us.json +7b1b4e904fb4008cbe412a91f55e232ea51303b1 assets/create/lang/en_us.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 @@ -5430,7 +5430,7 @@ cf71d9ad48f109da3a8b22a8d2d1a68d4eac99c0 data/minecraft/tags/blocks/climbable.js 69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json b68d565b4befb7b1c542d69eaa81309cc5304327 data/minecraft/tags/blocks/mineable/axe.json -71b63805d1e152e6e0a99ec0cb535279643dc5ee data/minecraft/tags/blocks/mineable/pickaxe.json +ed5bf69c56339703aadb5e6a9cb40d5938dfb2f8 data/minecraft/tags/blocks/mineable/pickaxe.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/moss_replaceable.json e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 15c6c9b15..1dd5a5bbd 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -886,6 +886,9 @@ "itemGroup.create.base": "Create", "itemGroup.create.palettes": "Create's Building Blocks", + "block.create.mangrove_window": "Mangrove Window", + "block.create.mangrove_window_pane": "Mangrove Window Pane", + "death.attack.create.crush": "%1$s was processed by Crushing Wheels", "death.attack.create.crush.player": "%1$s was thrown into Crushing Wheels by %2$s", "death.attack.create.fan_fire": "%1$s got smoked by an Encased Fan", diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 88b9cd37c..a392d86b7 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -161,6 +161,9 @@ "create:andesite_ladder", "create:brass_ladder", "create:copper_ladder", + "create:andesite_bars", + "create:brass_bars", + "create:copper_bars", "create:andesite_scaffolding", "create:brass_scaffolding", "create:copper_scaffolding", diff --git a/src/main/java/com/simibubi/create/AllBogeyStyles.java b/src/main/java/com/simibubi/create/AllBogeyStyles.java index ae72c36b8..96b5c1568 100644 --- a/src/main/java/com/simibubi/create/AllBogeyStyles.java +++ b/src/main/java/com/simibubi/create/AllBogeyStyles.java @@ -55,7 +55,8 @@ public class AllBogeyStyles { public static void register() {} public static class BogeyStyleBuilder { - protected final Map> sizes = new HashMap<>(); + protected final Map> sizeRenderers = new HashMap<>(); + protected final Map sizes = new HashMap<>(); protected final ResourceLocation name; protected final ResourceLocation cycleGroup; @@ -94,8 +95,9 @@ public class AllBogeyStyles { public BogeyStyleBuilder size(BogeySizes.BogeySize size, Supplier> renderer, ResourceLocation location) { + this.sizes.put(size, location); DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { - this.sizes.put(size, () -> new BogeyStyle.SizeData(location, renderer.get(), renderer.get() + this.sizeRenderers.put(size, () -> new BogeyStyle.SizeRenderData(renderer.get(), renderer.get() .get())); }); return this; @@ -120,7 +122,7 @@ public class AllBogeyStyles { public BogeyStyle build() { BogeyStyle entry = new BogeyStyle(name, cycleGroup, displayName, soundType, contactParticle, smokeParticle, - defaultData, sizes, commonRenderer); + defaultData, sizes, sizeRenderers, commonRenderer); BOGEY_STYLES.put(name, entry); CYCLE_GROUPS.computeIfAbsent(cycleGroup, l -> new HashMap<>()) .put(name, entry); diff --git a/src/main/java/com/simibubi/create/content/contraptions/MountedStorage.java b/src/main/java/com/simibubi/create/content/contraptions/MountedStorage.java index 815d689b9..ad9b0c859 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/MountedStorage.java +++ b/src/main/java/com/simibubi/create/content/contraptions/MountedStorage.java @@ -72,6 +72,8 @@ public class MountedStorage { String blockId = blockState.getBlock() .getRegistryName() .getPath(); + if (blockId.contains("ender")) + return false; return blockId.endsWith("_chest") || blockId.endsWith("_barrel"); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/actors/roller/TrackPaverV2.java b/src/main/java/com/simibubi/create/content/contraptions/actors/roller/TrackPaverV2.java index 0782288bc..abcc6fae1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/actors/roller/TrackPaverV2.java +++ b/src/main/java/com/simibubi/create/content/contraptions/actors/roller/TrackPaverV2.java @@ -35,8 +35,9 @@ public class TrackPaverV2 { Vec3 direction = VecHelper.clampComponentWise(diff, 1); int extent = (int) Math.round((to - from) / direction.length()); double length = edge.getLength(); + BlockPos pos = new BlockPos(edge.getPosition(graph, Mth.clamp(from, 1 / 16f, length - 1 / 16f) / length) - .subtract(0, 0.5, 0)); + .subtract(0, diff.y != 0 ? 1 : 0.5, 0)); paveStraight(task, pos, direction, extent); } diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/DivingBootsItem.java b/src/main/java/com/simibubi/create/content/equipment/armor/DivingBootsItem.java index e067b3c24..3d62f6765 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/DivingBootsItem.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/DivingBootsItem.java @@ -5,6 +5,7 @@ import org.jetbrains.annotations.Nullable; import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.FluidTags; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; @@ -92,7 +93,8 @@ public class DivingBootsItem extends BaseArmorItem { if (!entity.isOnGround()) { if (entity.jumping && entity.getPersistentData() .contains("LavaGrounded")) { - vMultiplier = yMotion == 0 ? 0 : 1 / yMotion; + boolean eyeInFluid = entity.isEyeInFluid(FluidTags.LAVA); + vMultiplier = yMotion == 0 ? 0 : (eyeInFluid ? 1 : 0.5) / yMotion; } else if (yMotion > 0) vMultiplier = 1.3; diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/DivingHelmetItem.java b/src/main/java/com/simibubi/create/content/equipment/armor/DivingHelmetItem.java index ce0ae6e41..3f8f6e1c0 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/DivingHelmetItem.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/DivingHelmetItem.java @@ -67,7 +67,7 @@ public class DivingHelmetItem extends BaseArmorItem { entity.getPersistentData() .remove("VisualBacktankAir"); - boolean lavaDiving = entity.isEyeInFluid(FluidTags.LAVA); + boolean lavaDiving = entity.isInLava(); if (!isWornBy(entity, lavaDiving)) return; if (!entity.isEyeInFluid(FluidTags.WATER) && !lavaDiving) diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/RemainingAirOverlay.java b/src/main/java/com/simibubi/create/content/equipment/armor/RemainingAirOverlay.java index e3cacfc84..0afa84251 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/RemainingAirOverlay.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/RemainingAirOverlay.java @@ -33,7 +33,7 @@ public class RemainingAirOverlay implements IIngameOverlay { if (!player.getPersistentData() .contains("VisualBacktankAir")) return; - if (!player.isEyeInFluid(FluidTags.WATER) && !player.isEyeInFluid(FluidTags.LAVA)) + if (!player.isEyeInFluid(FluidTags.WATER) && !player.isInLava()) return; int timeLeft = player.getPersistentData() diff --git a/src/main/java/com/simibubi/create/content/kinetics/fan/AirCurrent.java b/src/main/java/com/simibubi/create/content/kinetics/fan/AirCurrent.java index 4a422d99c..672945f07 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/fan/AirCurrent.java +++ b/src/main/java/com/simibubi/create/content/kinetics/fan/AirCurrent.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; @@ -266,8 +267,12 @@ public class AirCurrent { .below(offset); TransportedItemStackHandlerBehaviour behaviour = BlockEntityBehaviour.get(world, pos, TransportedItemStackHandlerBehaviour.TYPE); + FanProcessing.Type typeAtHandler = type; + if (world.getFluidState(pos) + .is(Fluids.WATER)) + typeAtHandler = Type.SPLASHING; if (behaviour != null) - affectedItemHandlers.add(Pair.of(behaviour, type)); + affectedItemHandlers.add(Pair.of(behaviour, typeAtHandler)); if (direction.getAxis() .isVertical()) break; diff --git a/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java b/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java index 424e07f20..4bbca4a6f 100644 --- a/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java +++ b/src/main/java/com/simibubi/create/content/schematics/SchematicWorld.java @@ -124,7 +124,7 @@ public class SchematicWorld extends WrappedWorld implements ServerLevelAccessor BlockPos pos = globalPos.subtract(anchor); if (pos.getY() - bounds.minY() == -1 && !renderMode) - return Blocks.GRASS_BLOCK.defaultBlockState(); + return Blocks.DIRT.defaultBlockState(); if (getBounds().isInside(pos) && blocks.containsKey(pos)) return processBlockStateForPrinting(blocks.get(pos)); return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/com/simibubi/create/content/trains/bogey/BogeyStyle.java b/src/main/java/com/simibubi/create/content/trains/bogey/BogeyStyle.java index bf40b2b5f..c1b63f785 100644 --- a/src/main/java/com/simibubi/create/content/trains/bogey/BogeyStyle.java +++ b/src/main/java/com/simibubi/create/content/trains/bogey/BogeyStyle.java @@ -38,15 +38,20 @@ public class BogeyStyle { public final CompoundTag defaultData; private Optional> commonRendererFactory; + private Map sizes; @OnlyIn(Dist.CLIENT) - private Map sizes; + private Map sizeRenderers; @OnlyIn(Dist.CLIENT) private Optional commonRenderer; - public BogeyStyle(ResourceLocation name, ResourceLocation cycleGroup, Component displayName, ResourceLocation soundType, ParticleOptions contactParticle, ParticleOptions smokeParticle, - CompoundTag defaultData, Map> sizes, Optional> commonRenderer) { + public BogeyStyle(ResourceLocation name, ResourceLocation cycleGroup, Component displayName, + ResourceLocation soundType, ParticleOptions contactParticle, ParticleOptions smokeParticle, + CompoundTag defaultData, Map sizes, + Map> sizeRenderers, + Optional> commonRenderer) { + this.name = name; this.cycleGroup = cycleGroup; this.displayName = displayName; @@ -54,10 +59,11 @@ public class BogeyStyle { this.contactParticle = contactParticle; this.smokeParticle = smokeParticle; this.defaultData = defaultData; + this.sizes = sizes; DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { - this.sizes = new HashMap<>(); - sizes.forEach((k, v) -> this.sizes.put(k, v.get())); + this.sizeRenderers = new HashMap<>(); + sizeRenderers.forEach((k, v) -> this.sizeRenderers.put(k, v.get())); this.commonRendererFactory = commonRenderer; this.commonRenderer = commonRenderer.map(Supplier::get); @@ -72,12 +78,12 @@ public class BogeyStyle { return Stream.iterate(currentSize.increment(), BogeySizes.BogeySize::increment) .filter(sizes::containsKey) .findFirst() - .map(size -> ForgeRegistries.BLOCKS.getValue(sizes.get(size).block())) - .orElse(ForgeRegistries.BLOCKS.getValue(sizes.get(currentSize).block())); + .map(this::getBlockOfSize) + .orElse(getBlockOfSize(currentSize)); } public Block getBlockOfSize(BogeySizes.BogeySize size) { - return ForgeRegistries.BLOCKS.getValue(sizes.get(size).block()); + return ForgeRegistries.BLOCKS.getValue(sizes.get(size)); } public Set validSizes() { @@ -93,12 +99,12 @@ public class BogeyStyle { @OnlyIn(Dist.CLIENT) public BogeyRenderer createRendererInstance(BogeySizes.BogeySize size) { - return this.sizes.get(size).createRenderInstance(); + return this.sizeRenderers.get(size).createRenderInstance(); } @OnlyIn(Dist.CLIENT) public BogeyRenderer getInWorldRenderInstance(BogeySizes.BogeySize size) { - SizeData sizeData = this.sizes.get(size); + SizeRenderData sizeData = this.sizeRenderers.get(size); return sizeData != null ? sizeData.getInWorldInstance() : BackupBogeyRenderer.INSTANCE; } @@ -115,7 +121,7 @@ public class BogeyStyle { } @OnlyIn(Dist.CLIENT) - public record SizeData(ResourceLocation block, Supplier rendererFactory, BogeyRenderer instance) { + public record SizeRenderData(Supplier rendererFactory, BogeyRenderer instance) { public BogeyRenderer createRenderInstance() { return rendererFactory.get(); } diff --git a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java index 08ff69b61..01db2b804 100644 --- a/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/blockEntity/behaviour/filtering/FilteringBehaviour.java @@ -263,7 +263,7 @@ public class FilteringBehaviour extends BlockEntityBehaviour implements ValueSet public MutableComponent formatValue(ValueSettings value) { if (value.row() == 0 && value.value() == filter.getMaxStackSize()) - return Components.literal("Any"); + return Lang.translateDirect("logistics.filter.any_amount_short"); return Components.literal(((value.row() == 0) ? "\u2264" : "=") + Math.max(1, value.value())); } diff --git a/src/main/java/com/simibubi/create/foundation/data/MetalBarsGen.java b/src/main/java/com/simibubi/create/foundation/data/MetalBarsGen.java index e68c3654f..e5889287c 100644 --- a/src/main/java/com/simibubi/create/foundation/data/MetalBarsGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/MetalBarsGen.java @@ -130,6 +130,7 @@ public class MetalBarsGen { .color(color)) .tag(AllBlockTags.WRENCH_PICKUP.tag) .tag(AllBlockTags.FAN_TRANSPARENT.tag) + .transform(TagGen.pickaxeOnly()) .blockstate(barsBlockState(name, specialEdge)) .item() .model((c, p) -> { diff --git a/src/main/java/com/simibubi/create/foundation/gui/widget/ScrollInput.java b/src/main/java/com/simibubi/create/foundation/gui/widget/ScrollInput.java index cb8a3e42d..ab9641132 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/widget/ScrollInput.java +++ b/src/main/java/com/simibubi/create/foundation/gui/widget/ScrollInput.java @@ -25,6 +25,7 @@ public class ScrollInput extends AbstractSimiWidget { protected Component hint = null; protected Label displayLabel; protected boolean inverted; + protected boolean soundPlayed; protected Function formatter; protected int min, max; @@ -39,6 +40,7 @@ public class ScrollInput extends AbstractSimiWidget { shiftStep = 5; step = standardStep(); formatter = i -> Components.literal(String.valueOf(i)); + soundPlayed = false; } public Function standardStep() { @@ -94,6 +96,12 @@ public class ScrollInput extends AbstractSimiWidget { writeToLabel(); return this; } + + @Override + public void tick() { + super.tick(); + soundPlayed = false; + } public int getState() { return state; @@ -135,10 +143,12 @@ public class ScrollInput extends AbstractSimiWidget { clampState(); if (priorState != state) { - Minecraft.getInstance() - .getSoundManager() - .play(SimpleSoundInstance.forUI(AllSoundEvents.SCROLL_VALUE.getMainEvent(), - 1.5f + 0.1f * (state - min) / (max - min))); + if (!soundPlayed) + Minecraft.getInstance() + .getSoundManager() + .play(SimpleSoundInstance.forUI(AllSoundEvents.SCROLL_VALUE.getMainEvent(), + 1.5f + 0.1f * (state - min) / (max - min))); + soundPlayed = true; onChanged(); } diff --git a/src/main/resources/assets/create/lang/default/interface.json b/src/main/resources/assets/create/lang/default/interface.json index 8379e8257..7f88b4ecd 100644 --- a/src/main/resources/assets/create/lang/default/interface.json +++ b/src/main/resources/assets/create/lang/default/interface.json @@ -3,6 +3,9 @@ "itemGroup.create.base": "Create", "itemGroup.create.palettes": "Create's Building Blocks", + "block.create.mangrove_window": "Mangrove Window", + "block.create.mangrove_window_pane": "Mangrove Window Pane", + "death.attack.create.crush": "%1$s was processed by Crushing Wheels", "death.attack.create.crush.player": "%1$s was thrown into Crushing Wheels by %2$s", "death.attack.create.fan_fire": "%1$s got smoked by an Encased Fan",