If you wanna be my lava

- Waterlogged belts and depots now wash contained items when targeted by a fan
- Fixed jump strength of lava diving suit in shallow lava
- Fixed crash when cycling bogey types on a server
- Fixed custom metal bars not able to be mined with a pickaxe
- Contraption mounted storage no longer interacts with modded ender chests (it didn't work correctly)
- Gui inputs no longer play more than one click when scrolled on very quickly
- Fixed Schematics loading with a snowy grass block when their lowest layer contained snow blocks
- Fixed Mechanical Rollers placing blocks into the train tracks when paving steep slopes
- Netherite backtank now depletes air in lava even when the players head is not fully submerged
- Fixed "Any" amount in filters' value settings screen not using a translatable lang entry
- Added dummy lang entries for mangrove windows for crowdin sync
This commit is contained in:
simibubi 2023-05-24 14:24:16 +02:00
parent 5eea1cac70
commit ecfd43938f
16 changed files with 65 additions and 27 deletions

View file

@ -583,7 +583,7 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
4fd8347dfb20e6e5752b8b905850762a88c88c02 assets/create/lang/en_ud.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 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.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 69f596fcb065e26b02ce246760432b5174191b76 data/minecraft/tags/blocks/impermeable.json
2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/lush_ground_replaceable.json
b68d565b4befb7b1c542d69eaa81309cc5304327 data/minecraft/tags/blocks/mineable/axe.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 2db7759fe036160c14c6ed19a68604ca16f4de60 data/minecraft/tags/blocks/moss_replaceable.json
e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json e157c1d3af30e409e34bbefbe15a037e6e1c8daa data/minecraft/tags/blocks/needs_iron_tool.json
a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json a08f67865337f62601c5e333b4011382d10020e4 data/minecraft/tags/blocks/needs_stone_tool.json

View file

@ -886,6 +886,9 @@
"itemGroup.create.base": "Create", "itemGroup.create.base": "Create",
"itemGroup.create.palettes": "Create's Building Blocks", "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": "%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.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", "death.attack.create.fan_fire": "%1$s got smoked by an Encased Fan",

View file

@ -161,6 +161,9 @@
"create:andesite_ladder", "create:andesite_ladder",
"create:brass_ladder", "create:brass_ladder",
"create:copper_ladder", "create:copper_ladder",
"create:andesite_bars",
"create:brass_bars",
"create:copper_bars",
"create:andesite_scaffolding", "create:andesite_scaffolding",
"create:brass_scaffolding", "create:brass_scaffolding",
"create:copper_scaffolding", "create:copper_scaffolding",

View file

@ -55,7 +55,8 @@ public class AllBogeyStyles {
public static void register() {} public static void register() {}
public static class BogeyStyleBuilder { public static class BogeyStyleBuilder {
protected final Map<BogeySizes.BogeySize, Supplier<BogeyStyle.SizeData>> sizes = new HashMap<>(); protected final Map<BogeySizes.BogeySize, Supplier<BogeyStyle.SizeRenderData>> sizeRenderers = new HashMap<>();
protected final Map<BogeySizes.BogeySize, ResourceLocation> sizes = new HashMap<>();
protected final ResourceLocation name; protected final ResourceLocation name;
protected final ResourceLocation cycleGroup; protected final ResourceLocation cycleGroup;
@ -94,8 +95,9 @@ public class AllBogeyStyles {
public BogeyStyleBuilder size(BogeySizes.BogeySize size, Supplier<Supplier<? extends BogeyRenderer>> renderer, public BogeyStyleBuilder size(BogeySizes.BogeySize size, Supplier<Supplier<? extends BogeyRenderer>> renderer,
ResourceLocation location) { ResourceLocation location) {
this.sizes.put(size, location);
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { 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())); .get()));
}); });
return this; return this;
@ -120,7 +122,7 @@ public class AllBogeyStyles {
public BogeyStyle build() { public BogeyStyle build() {
BogeyStyle entry = new BogeyStyle(name, cycleGroup, displayName, soundType, contactParticle, smokeParticle, BogeyStyle entry = new BogeyStyle(name, cycleGroup, displayName, soundType, contactParticle, smokeParticle,
defaultData, sizes, commonRenderer); defaultData, sizes, sizeRenderers, commonRenderer);
BOGEY_STYLES.put(name, entry); BOGEY_STYLES.put(name, entry);
CYCLE_GROUPS.computeIfAbsent(cycleGroup, l -> new HashMap<>()) CYCLE_GROUPS.computeIfAbsent(cycleGroup, l -> new HashMap<>())
.put(name, entry); .put(name, entry);

View file

@ -72,6 +72,8 @@ public class MountedStorage {
String blockId = blockState.getBlock() String blockId = blockState.getBlock()
.getRegistryName() .getRegistryName()
.getPath(); .getPath();
if (blockId.contains("ender"))
return false;
return blockId.endsWith("_chest") || blockId.endsWith("_barrel"); return blockId.endsWith("_chest") || blockId.endsWith("_barrel");
} }

View file

@ -35,8 +35,9 @@ public class TrackPaverV2 {
Vec3 direction = VecHelper.clampComponentWise(diff, 1); Vec3 direction = VecHelper.clampComponentWise(diff, 1);
int extent = (int) Math.round((to - from) / direction.length()); int extent = (int) Math.round((to - from) / direction.length());
double length = edge.getLength(); double length = edge.getLength();
BlockPos pos = new BlockPos(edge.getPosition(graph, Mth.clamp(from, 1 / 16f, length - 1 / 16f) / length) 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); paveStraight(task, pos, direction, extent);
} }

View file

@ -5,6 +5,7 @@ import org.jetbrains.annotations.Nullable;
import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.NBTHelper;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.FluidTags;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.LivingEntity;
@ -92,7 +93,8 @@ public class DivingBootsItem extends BaseArmorItem {
if (!entity.isOnGround()) { if (!entity.isOnGround()) {
if (entity.jumping && entity.getPersistentData() if (entity.jumping && entity.getPersistentData()
.contains("LavaGrounded")) { .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) } else if (yMotion > 0)
vMultiplier = 1.3; vMultiplier = 1.3;

View file

@ -67,7 +67,7 @@ public class DivingHelmetItem extends BaseArmorItem {
entity.getPersistentData() entity.getPersistentData()
.remove("VisualBacktankAir"); .remove("VisualBacktankAir");
boolean lavaDiving = entity.isEyeInFluid(FluidTags.LAVA); boolean lavaDiving = entity.isInLava();
if (!isWornBy(entity, lavaDiving)) if (!isWornBy(entity, lavaDiving))
return; return;
if (!entity.isEyeInFluid(FluidTags.WATER) && !lavaDiving) if (!entity.isEyeInFluid(FluidTags.WATER) && !lavaDiving)

View file

@ -33,7 +33,7 @@ public class RemainingAirOverlay implements IIngameOverlay {
if (!player.getPersistentData() if (!player.getPersistentData()
.contains("VisualBacktankAir")) .contains("VisualBacktankAir"))
return; return;
if (!player.isEyeInFluid(FluidTags.WATER) && !player.isEyeInFluid(FluidTags.LAVA)) if (!player.isEyeInFluid(FluidTags.WATER) && !player.isInLava())
return; return;
int timeLeft = player.getPersistentData() int timeLeft = player.getPersistentData()

View file

@ -29,6 +29,7 @@ import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState; 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.AABB;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
@ -266,8 +267,12 @@ public class AirCurrent {
.below(offset); .below(offset);
TransportedItemStackHandlerBehaviour behaviour = TransportedItemStackHandlerBehaviour behaviour =
BlockEntityBehaviour.get(world, pos, TransportedItemStackHandlerBehaviour.TYPE); BlockEntityBehaviour.get(world, pos, TransportedItemStackHandlerBehaviour.TYPE);
FanProcessing.Type typeAtHandler = type;
if (world.getFluidState(pos)
.is(Fluids.WATER))
typeAtHandler = Type.SPLASHING;
if (behaviour != null) if (behaviour != null)
affectedItemHandlers.add(Pair.of(behaviour, type)); affectedItemHandlers.add(Pair.of(behaviour, typeAtHandler));
if (direction.getAxis() if (direction.getAxis()
.isVertical()) .isVertical())
break; break;

View file

@ -124,7 +124,7 @@ public class SchematicWorld extends WrappedWorld implements ServerLevelAccessor
BlockPos pos = globalPos.subtract(anchor); BlockPos pos = globalPos.subtract(anchor);
if (pos.getY() - bounds.minY() == -1 && !renderMode) if (pos.getY() - bounds.minY() == -1 && !renderMode)
return Blocks.GRASS_BLOCK.defaultBlockState(); return Blocks.DIRT.defaultBlockState();
if (getBounds().isInside(pos) && blocks.containsKey(pos)) if (getBounds().isInside(pos) && blocks.containsKey(pos))
return processBlockStateForPrinting(blocks.get(pos)); return processBlockStateForPrinting(blocks.get(pos));
return Blocks.AIR.defaultBlockState(); return Blocks.AIR.defaultBlockState();

View file

@ -38,15 +38,20 @@ public class BogeyStyle {
public final CompoundTag defaultData; public final CompoundTag defaultData;
private Optional<Supplier<? extends CommonRenderer>> commonRendererFactory; private Optional<Supplier<? extends CommonRenderer>> commonRendererFactory;
private Map<BogeySizes.BogeySize, ResourceLocation> sizes;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
private Map<BogeySizes.BogeySize, SizeData> sizes; private Map<BogeySizes.BogeySize, SizeRenderData> sizeRenderers;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
private Optional<CommonRenderer> commonRenderer; private Optional<CommonRenderer> commonRenderer;
public BogeyStyle(ResourceLocation name, ResourceLocation cycleGroup, Component displayName, ResourceLocation soundType, ParticleOptions contactParticle, ParticleOptions smokeParticle, public BogeyStyle(ResourceLocation name, ResourceLocation cycleGroup, Component displayName,
CompoundTag defaultData, Map<BogeySizes.BogeySize, Supplier<SizeData>> sizes, Optional<Supplier<? extends CommonRenderer>> commonRenderer) { ResourceLocation soundType, ParticleOptions contactParticle, ParticleOptions smokeParticle,
CompoundTag defaultData, Map<BogeySizes.BogeySize, ResourceLocation> sizes,
Map<BogeySizes.BogeySize, Supplier<SizeRenderData>> sizeRenderers,
Optional<Supplier<? extends CommonRenderer>> commonRenderer) {
this.name = name; this.name = name;
this.cycleGroup = cycleGroup; this.cycleGroup = cycleGroup;
this.displayName = displayName; this.displayName = displayName;
@ -54,10 +59,11 @@ public class BogeyStyle {
this.contactParticle = contactParticle; this.contactParticle = contactParticle;
this.smokeParticle = smokeParticle; this.smokeParticle = smokeParticle;
this.defaultData = defaultData; this.defaultData = defaultData;
this.sizes = sizes;
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
this.sizes = new HashMap<>(); this.sizeRenderers = new HashMap<>();
sizes.forEach((k, v) -> this.sizes.put(k, v.get())); sizeRenderers.forEach((k, v) -> this.sizeRenderers.put(k, v.get()));
this.commonRendererFactory = commonRenderer; this.commonRendererFactory = commonRenderer;
this.commonRenderer = commonRenderer.map(Supplier::get); this.commonRenderer = commonRenderer.map(Supplier::get);
@ -72,12 +78,12 @@ public class BogeyStyle {
return Stream.iterate(currentSize.increment(), BogeySizes.BogeySize::increment) return Stream.iterate(currentSize.increment(), BogeySizes.BogeySize::increment)
.filter(sizes::containsKey) .filter(sizes::containsKey)
.findFirst() .findFirst()
.map(size -> ForgeRegistries.BLOCKS.getValue(sizes.get(size).block())) .map(this::getBlockOfSize)
.orElse(ForgeRegistries.BLOCKS.getValue(sizes.get(currentSize).block())); .orElse(getBlockOfSize(currentSize));
} }
public Block getBlockOfSize(BogeySizes.BogeySize size) { public Block getBlockOfSize(BogeySizes.BogeySize size) {
return ForgeRegistries.BLOCKS.getValue(sizes.get(size).block()); return ForgeRegistries.BLOCKS.getValue(sizes.get(size));
} }
public Set<BogeySizes.BogeySize> validSizes() { public Set<BogeySizes.BogeySize> validSizes() {
@ -93,12 +99,12 @@ public class BogeyStyle {
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public BogeyRenderer createRendererInstance(BogeySizes.BogeySize size) { public BogeyRenderer createRendererInstance(BogeySizes.BogeySize size) {
return this.sizes.get(size).createRenderInstance(); return this.sizeRenderers.get(size).createRenderInstance();
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public BogeyRenderer getInWorldRenderInstance(BogeySizes.BogeySize size) { 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; return sizeData != null ? sizeData.getInWorldInstance() : BackupBogeyRenderer.INSTANCE;
} }
@ -115,7 +121,7 @@ public class BogeyStyle {
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public record SizeData(ResourceLocation block, Supplier<? extends BogeyRenderer> rendererFactory, BogeyRenderer instance) { public record SizeRenderData(Supplier<? extends BogeyRenderer> rendererFactory, BogeyRenderer instance) {
public BogeyRenderer createRenderInstance() { public BogeyRenderer createRenderInstance() {
return rendererFactory.get(); return rendererFactory.get();
} }

View file

@ -263,7 +263,7 @@ public class FilteringBehaviour extends BlockEntityBehaviour implements ValueSet
public MutableComponent formatValue(ValueSettings value) { public MutableComponent formatValue(ValueSettings value) {
if (value.row() == 0 && value.value() == filter.getMaxStackSize()) 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())); return Components.literal(((value.row() == 0) ? "\u2264" : "=") + Math.max(1, value.value()));
} }

View file

@ -130,6 +130,7 @@ public class MetalBarsGen {
.color(color)) .color(color))
.tag(AllBlockTags.WRENCH_PICKUP.tag) .tag(AllBlockTags.WRENCH_PICKUP.tag)
.tag(AllBlockTags.FAN_TRANSPARENT.tag) .tag(AllBlockTags.FAN_TRANSPARENT.tag)
.transform(TagGen.pickaxeOnly())
.blockstate(barsBlockState(name, specialEdge)) .blockstate(barsBlockState(name, specialEdge))
.item() .item()
.model((c, p) -> { .model((c, p) -> {

View file

@ -25,6 +25,7 @@ public class ScrollInput extends AbstractSimiWidget {
protected Component hint = null; protected Component hint = null;
protected Label displayLabel; protected Label displayLabel;
protected boolean inverted; protected boolean inverted;
protected boolean soundPlayed;
protected Function<Integer, Component> formatter; protected Function<Integer, Component> formatter;
protected int min, max; protected int min, max;
@ -39,6 +40,7 @@ public class ScrollInput extends AbstractSimiWidget {
shiftStep = 5; shiftStep = 5;
step = standardStep(); step = standardStep();
formatter = i -> Components.literal(String.valueOf(i)); formatter = i -> Components.literal(String.valueOf(i));
soundPlayed = false;
} }
public Function<StepContext, Integer> standardStep() { public Function<StepContext, Integer> standardStep() {
@ -95,6 +97,12 @@ public class ScrollInput extends AbstractSimiWidget {
return this; return this;
} }
@Override
public void tick() {
super.tick();
soundPlayed = false;
}
public int getState() { public int getState() {
return state; return state;
} }
@ -135,10 +143,12 @@ public class ScrollInput extends AbstractSimiWidget {
clampState(); clampState();
if (priorState != state) { if (priorState != state) {
if (!soundPlayed)
Minecraft.getInstance() Minecraft.getInstance()
.getSoundManager() .getSoundManager()
.play(SimpleSoundInstance.forUI(AllSoundEvents.SCROLL_VALUE.getMainEvent(), .play(SimpleSoundInstance.forUI(AllSoundEvents.SCROLL_VALUE.getMainEvent(),
1.5f + 0.1f * (state - min) / (max - min))); 1.5f + 0.1f * (state - min) / (max - min)));
soundPlayed = true;
onChanged(); onChanged();
} }

View file

@ -3,6 +3,9 @@
"itemGroup.create.base": "Create", "itemGroup.create.base": "Create",
"itemGroup.create.palettes": "Create's Building Blocks", "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": "%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.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", "death.attack.create.fan_fire": "%1$s got smoked by an Encased Fan",