diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 3ba6dbdbe..f2e6c1647 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -6,7 +6,6 @@ import java.util.Map; import com.jozufozu.flywheel.core.PartialModel; import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour; -import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Lang; @@ -137,10 +136,17 @@ public class AllBlockPartials { SIGNAL_RED = block("track_signal/red_tube"), SIGNAL_YELLOW_CUBE = block("track_signal/yellow_cube"), SIGNAL_YELLOW_GLOW = block("track_signal/yellow_glow"), SIGNAL_YELLOW = block("track_signal/yellow_tube"), + BLAZE_GOGGLES = block("blaze_burner/goggles"), + BLAZE_IDLE = block("blaze_burner/blaze/idle"), BLAZE_ACTIVE = block("blaze_burner/blaze/active"), + BLAZE_SUPER = block("blaze_burner/blaze/super"), BLAZE_BURNER_FLAME = block("blaze_burner/flame"), + BLAZE_BURNER_RODS = block("blaze_burner/rods_small"), BLAZE_BURNER_RODS_2 = block("blaze_burner/rods_large"), + BLAZE_BURNER_SUPER_RODS = block("blaze_burner/superheated_rods_small"), + BLAZE_BURNER_SUPER_RODS_2 = block("blaze_burner/superheated_rods_large"), + WHISTLE_MOUTH_LARGE = block("steam_whistle/large_mouth"), WHISTLE_MOUTH_MEDIUM = block("steam_whistle/medium_mouth"), WHISTLE_MOUTH_SMALL = block("steam_whistle/small_mouth"), - + CRAFTING_BLUEPRINT_1x1 = entity("crafting_blueprint_small"), CRAFTING_BLUEPRINT_2x2 = entity("crafting_blueprint_medium"), CRAFTING_BLUEPRINT_3x3 = entity("crafting_blueprint_large"), @@ -155,8 +161,6 @@ public class AllBlockPartials { public static final Map> PIPE_ATTACHMENTS = new EnumMap<>(FluidTransportBehaviour.AttachmentTypes.class); - public static final Map BLAZES = - new EnumMap<>(BlazeBurnerBlock.HeatLevel.class); public static final Map METAL_GIRDER_BRACKETS = new EnumMap<>(Direction.class); public static final Map TOOLBOX_LIDS = new EnumMap<>(DyeColor.class); @@ -171,11 +175,6 @@ public class AllBlockPartials { } PIPE_ATTACHMENTS.put(type, map); } - for (BlazeBurnerBlock.HeatLevel heat : BlazeBurnerBlock.HeatLevel.values()) { - if (heat == BlazeBurnerBlock.HeatLevel.NONE) - continue; - BLAZES.put(heat, block("blaze_burner/blaze/" + heat.getSerializedName())); - } for (DyeColor color : DyeColor.values()) TOOLBOX_LIDS.put(color, block("toolbox/lid/" + Lang.asId(color.name()))); for (Direction d : Iterate.horizontalDirections) diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 14d006c72..7a9a910b9 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -104,6 +104,7 @@ import com.simibubi.create.content.contraptions.processing.BasinMovementBehaviou import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlockItem; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerInteractionBehaviour; +import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerMovementBehaviour; import com.simibubi.create.content.contraptions.processing.burner.LitBlazeBurnerBlock; import com.simibubi.create.content.contraptions.relays.advanced.GantryShaftBlock; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; @@ -632,6 +633,7 @@ public class AllBlocks { .tag(AllBlockTags.FAN_TRANSPARENT.tag, AllBlockTags.FAN_HEATERS.tag) .loot((lt, block) -> lt.add(block, BlazeBurnerBlock.buildLootTable())) .blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p))) + .onRegister(addMovementBehaviour(new BlazeBurnerMovementBehaviour())) .onRegister(addInteractionBehaviour(new BlazeBurnerInteractionBehaviour())) .item(BlazeBurnerBlockItem::withBlaze) .model(AssetLookup.customBlockItemModel("blaze_burner", "block_with_blaze")) diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index f61c0764c..750dc55d5 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -205,8 +205,7 @@ public class AllShapes { SPEED_CONTROLLER = shape(0, 0, 0, 16, 4, 16).add(1, 1, 1, 15, 13, 15) .add(0, 8, 0, 16, 14, 16) .build(), - HEATER_BLOCK_SHAPE = shape(2, 0, 2, 14, 14, 14).add(0, 0, 0, 16, 4, 16) - .build(), + HEATER_BLOCK_SHAPE = shape(1, 0, 1, 15, 14, 15).build(), HEATER_BLOCK_SPECIAL_COLLISION_SHAPE = shape(0, 0, 0, 16, 4, 16).build(), CRUSHING_WHEEL_COLLISION_SHAPE = cuboid(0, 0, 0, 16, 16, 16), SEAT = cuboid(0, 0, 0, 16, 8, 16), SEAT_COLLISION = cuboid(0, 0, 0, 16, 6, 16), diff --git a/src/main/java/com/simibubi/create/AllSpriteShifts.java b/src/main/java/com/simibubi/create/AllSpriteShifts.java index 071e09d87..7ef3b44ae 100644 --- a/src/main/java/com/simibubi/create/AllSpriteShifts.java +++ b/src/main/java/com/simibubi/create/AllSpriteShifts.java @@ -25,6 +25,11 @@ public class AllSpriteShifts { public static final Map DYED_BELTS = new IdentityHashMap<>(), DYED_OFFSET_BELTS = new IdentityHashMap<>(), DYED_DIAGONAL_BELTS = new IdentityHashMap<>(); + public static final SpriteShiftEntry BURNER_FLAME = + SpriteShifter.get("block/blaze_burner_flame", "block/blaze_burner_flame_scroll"), + SUPER_BURNER_FLAME = + SpriteShifter.get("block/blaze_burner_flame", "block/blaze_burner_flame_superheated_scroll"); + public static final CTSpriteShiftEntry FRAMED_GLASS = getCT(OMNIDIRECTIONAL, "palettes/framed_glass", "palettes/framed_glass"), HORIZONTAL_FRAMED_GLASS = @@ -51,8 +56,7 @@ public class AllSpriteShifts { CHASSIS_STICKY = omni("linear_chassis_end_sticky"); public static final CTSpriteShiftEntry BRASS_TUNNEL_TOP = vertical("brass_tunnel_top"), - FLUID_TANK = getCT(CTType.RECTANGLE, "fluid_tank"), - FLUID_TANK_TOP = getCT(CTType.RECTANGLE, "fluid_tank_top"), + FLUID_TANK = getCT(CTType.RECTANGLE, "fluid_tank"), FLUID_TANK_TOP = getCT(CTType.RECTANGLE, "fluid_tank_top"), CREATIVE_FLUID_TANK = getCT(CTType.CROSS, "creative_fluid_tank"); public static final Couple VAULT_TOP = vault("top"), VAULT_FRONT = vault("front"), diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java index 6ed5c54d5..3f76002bf 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java @@ -2,13 +2,22 @@ package com.simibubi.create.compat.jei.category.animations; import com.jozufozu.flywheel.core.PartialModel; import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Vector3f; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel; +import com.simibubi.create.foundation.block.render.SpriteShiftEntry; +import com.simibubi.create.foundation.render.CachedBufferer; import com.simibubi.create.foundation.utility.AnimationTickHolder; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; import net.minecraft.util.Mth; +import net.minecraft.world.level.block.Blocks; public class AnimatedBlazeBurner extends AnimatedKinetics { @@ -26,19 +35,61 @@ public class AnimatedBlazeBurner extends AnimatedKinetics { matrixStack.mulPose(Vector3f.YP.rotationDegrees(22.5f)); int scale = 23; - blockElement(AllBlocks.BLAZE_BURNER.getDefaultState()) - .atLocal(0, 1.65, 0) + float offset = (Mth.sin(AnimationTickHolder.getRenderTime() / 16f) + 0.5f) / 16f; + + blockElement(AllBlocks.BLAZE_BURNER.getDefaultState()).atLocal(0, 1.65, 0) .scale(scale) .render(matrixStack); - float offset = (Mth.sin(AnimationTickHolder.getRenderTime() / 16f) + 0.5f) / 16f; - PartialModel blaze = AllBlockPartials.BLAZES.get(heatLevel); - blockElement(blaze) - .atLocal(1, 1.65 + offset, 1) + PartialModel blaze = + heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_SUPER : AllBlockPartials.BLAZE_ACTIVE; + PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS_2 + : AllBlockPartials.BLAZE_BURNER_RODS_2; + + blockElement(blaze).atLocal(1, 1.8, 1) + .rotate(0, 180, 0) + .scale(scale) + .render(matrixStack); + blockElement(rods2).atLocal(1, 1.7 + offset, 1) .rotate(0, 180, 0) .scale(scale) .render(matrixStack); + matrixStack.scale(scale, -scale, scale); + matrixStack.translate(0, -1.8, 0); + + SpriteShiftEntry spriteShift = + heatLevel == HeatLevel.SEETHING ? AllSpriteShifts.SUPER_BURNER_FLAME : AllSpriteShifts.BURNER_FLAME; + + float spriteWidth = spriteShift.getTarget() + .getU1() + - spriteShift.getTarget() + .getU0(); + + float spriteHeight = spriteShift.getTarget() + .getV1() + - spriteShift.getTarget() + .getV0(); + + float time = AnimationTickHolder.getRenderTime(Minecraft.getInstance().level); + float speed = 1 / 32f + 1 / 64f * heatLevel.ordinal(); + + double vScroll = speed * time; + vScroll = vScroll - Math.floor(vScroll); + vScroll = vScroll * spriteHeight / 2; + + double uScroll = speed * time / 2; + uScroll = uScroll - Math.floor(uScroll); + uScroll = uScroll * spriteWidth / 2; + + Minecraft mc = Minecraft.getInstance(); + MultiBufferSource.BufferSource buffer = mc.renderBuffers() + .bufferSource(); + VertexConsumer vb = buffer.getBuffer(RenderType.cutoutMipped()); + CachedBufferer.partial(AllBlockPartials.BLAZE_BURNER_FLAME, Blocks.AIR.defaultBlockState()) + .shiftUVScrolling(spriteShift, (float) uScroll, (float) vScroll) + .light(LightTexture.FULL_BRIGHT) + .renderInto(matrixStack, vb); matrixStack.popPose(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlock.java index 333458216..073850685 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerBlock.java @@ -35,6 +35,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -57,7 +58,7 @@ import net.minecraftforge.common.util.FakePlayer; @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -public class BlazeBurnerBlock extends Block implements ITE, IWrenchable { +public class BlazeBurnerBlock extends HorizontalDirectionalBlock implements ITE, IWrenchable { public static final EnumProperty HEAT_LEVEL = EnumProperty.create("blaze", HeatLevel.class); @@ -69,7 +70,7 @@ public class BlazeBurnerBlock extends Block implements ITE builder) { super.createBlockStateDefinition(builder); - builder.add(HEAT_LEVEL); + builder.add(HEAT_LEVEL, FACING); } @Override @@ -111,8 +112,27 @@ public class BlazeBurnerBlock extends Block implements ITE { + if (bbte.goggles) + return InteractionResult.PASS; + bbte.goggles = true; + bbte.notifyUpdate(); + return InteractionResult.SUCCESS; + }); + + if (heldItem.isEmpty() && heat != HeatLevel.NONE) + return onTileEntityUse(world, pos, bbte -> { + if (!bbte.goggles) + return InteractionResult.PASS; + bbte.goggles = false; + bbte.notifyUpdate(); + return InteractionResult.SUCCESS; + }); + + if (heat == HeatLevel.NONE) { if (heldItem.getItem() instanceof FlintAndSteelItem) { world.playSound(player, pos, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, world.random.nextFloat() * 0.4F + 0.8F); @@ -180,7 +200,9 @@ public class BlazeBurnerBlock extends Block implements ITE { - public BlazeBurnerRenderer(BlockEntityRendererProvider.Context context) { - } + public BlazeBurnerRenderer(BlockEntityRendererProvider.Context context) {} @Override protected void renderSafe(BlazeBurnerTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer, @@ -29,14 +39,112 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer type, BlockPos pos, BlockState state) { super(type, pos, state); activeFuel = FuelType.NONE; remainingBurnTime = 0; + headAnimation = LerpedFloat.linear(); headAngle = LerpedFloat.angular(); isCreative = false; + goggles = false; + + headAngle.startWithValue((AngleHelper.horizontalAngle(state.getOptionalValue(BlazeBurnerBlock.FACING) + .orElse(Direction.SOUTH)) + 180) % 360); } public FuelType getActiveFuel() { @@ -74,7 +71,7 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { super.tick(); if (level.isClientSide) { - tickRotation(); + tickAnimation(); spawnParticles(getHeatLevelFromBlock(), 1); return; } @@ -99,26 +96,38 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { updateBlockState(); } - private void tickRotation() { - float target = 0; - LocalPlayer player = Minecraft.getInstance().player; - if (player != null) { - double x; - double z; - if (isVirtual()) { - x = -4; - z = -10; - } else { - x = player.getX(); - z = player.getZ(); + @OnlyIn(Dist.CLIENT) + private void tickAnimation() { + boolean active = getHeatLevelFromBlock().isAtLeast(HeatLevel.FADING); + + if (!active) { + float target = 0; + LocalPlayer player = Minecraft.getInstance().player; + if (player != null) { + double x; + double z; + if (isVirtual()) { + x = -4; + z = -10; + } else { + x = player.getX(); + z = player.getZ(); + } + double dx = x - (getBlockPos().getX() + 0.5); + double dz = z - (getBlockPos().getZ() + 0.5); + target = AngleHelper.deg(-Mth.atan2(dz, dx)) - 90; } - double dx = x - (getBlockPos().getX() + 0.5); - double dz = z - (getBlockPos().getZ() + 0.5); - target = AngleHelper.deg(-Mth.atan2(dz, dx)) - 90; + target = headAngle.getValue() + AngleHelper.getShortestAngleDiff(headAngle.getValue(), target); + headAngle.chase(target, .25f, Chaser.exp(5)); + headAngle.tickChaser(); + } else { + headAngle.chase((AngleHelper.horizontalAngle(getBlockState().getOptionalValue(BlazeBurnerBlock.FACING) + .orElse(Direction.SOUTH)) + 180) % 360, .125f, Chaser.EXP); + headAngle.tickChaser(); } - target = headAngle.getValue() + AngleHelper.getShortestAngleDiff(headAngle.getValue(), target); - headAngle.chase(target, .25f, Chaser.exp(5)); - headAngle.tickChaser(); + + headAnimation.chase(active ? 1 : 0, .25f, Chaser.exp(.25f)); + headAnimation.tickChaser(); } @Override @@ -129,9 +138,10 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { if (!isCreative) { compound.putInt("fuelLevel", activeFuel.ordinal()); compound.putInt("burnTimeRemaining", remainingBurnTime); - } else { + } else compound.putBoolean("isCreative", true); - } + if (goggles) + compound.putBoolean("Goggles", true); super.write(compound, clientPacket); } @@ -140,6 +150,7 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { activeFuel = FuelType.values()[compound.getInt("fuelLevel")]; remainingBurnTime = compound.getInt("burnTimeRemaining"); isCreative = compound.getBoolean("isCreative"); + goggles = compound.contains("Goggles"); super.read(compound, clientPacket); } @@ -203,34 +214,37 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { remainingBurnTime = newBurnTime; if (level.isClientSide) { - HeatLevel level = getHeatLevelFromFuelType(activeFuel); - for (int i = 0; i < 20; i++) - spawnParticles(level, 1 + (.25 * (i / 4))); - } else { - playSound(); - updateBlockState(); + spawnParticleBurst(activeFuel == FuelType.SPECIAL); + return true; } + HeatLevel prev = getHeatLevelFromBlock(); + playSound(); + updateBlockState(); + + if (prev != getHeatLevelFromBlock()) + level.playSound(null, worldPosition, SoundEvents.BLAZE_AMBIENT, SoundSource.BLOCKS, + .125f + level.random.nextFloat() * .125f, 1.15f - level.random.nextFloat() * .25f); + return true; } protected void applyCreativeFuel() { - boolean wasCreative = isCreative; - activeFuel = FuelType.NONE; remainingBurnTime = 0; isCreative = true; + HeatLevel next = getHeatLevelFromBlock().nextActiveLevel(); + if (level.isClientSide) { - for (int i = 0; i < 30; i++) { - double burstMult = 1 + (.25 * (i / 4)); - spawnParticle(CREATIVE_PARTICLE_COLORS, 0.04F, 35, false, 0.03 * burstMult, 0.15 * burstMult); - } - } else { - playSound(); - if (wasCreative) - setBlockHeat(getHeatLevelFromBlock().nextActiveLevel()); + spawnParticleBurst(next.isAtLeast(HeatLevel.SEETHING)); + return; } + + playSound(); + if (next == HeatLevel.FADING) + next = next.nextActiveLevel(); + setBlockHeat(next); } public boolean isCreativeFuel(ItemStack stack) { @@ -266,50 +280,49 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { return; Random r = level.getRandom(); - switch (heatLevel) { - case SMOULDERING: - if (r.nextDouble() > 0.25) - return; - spawnParticle(heatLevel, 0.03F, 15, false, 0.015 * burstMult, 0.1 * burstMult); - break; - case FADING: - if (r.nextDouble() > 0.5) - return; - spawnParticle(heatLevel, 0.035F, 18, false, 0.03 * burstMult, 0.15 * burstMult); - break; - case KINDLED: - spawnParticle(heatLevel, 0.04F, 35, true, 0.05 * burstMult, 0.2 * burstMult); - break; - case SEETHING: - for (int i = 0; i < 2; i++) { - if (r.nextDouble() > 0.6) - return; - spawnParticle(heatLevel, 0.045F, 35, true, 0.06 * burstMult, 0.22 * burstMult); - } - break; - default: - break; - } - } - protected void spawnParticle(Color color, float scale, int avgAge, boolean hot, double speed, double spread) { - Random random = level.getRandom(); - level.addAlwaysVisibleParticle( - new CubeParticleData(color.getRedAsFloat(), color.getGreenAsFloat(), color.getBlueAsFloat(), scale, avgAge, hot), - (double) worldPosition.getX() + 0.5D + (random.nextDouble() * 2.0 - 1D) * spread, - (double) worldPosition.getY() + 0.6D + (random.nextDouble() / 4.0), - (double) worldPosition.getZ() + 0.5D + (random.nextDouble() * 2.0 - 1D) * spread, 0.0D, speed, 0.0D); - } + Vec3 c = VecHelper.getCenterOf(worldPosition); + Vec3 v = c.add(VecHelper.offsetRandomly(Vec3.ZERO, r, .125f) + .multiply(1, 0, 1)); - protected void spawnParticle(Color[] colors, float scale, int avgAge, boolean hot, double speed, double spread) { - if (colors.length == 0) + if (r.nextInt(3) == 0) + level.addParticle(ParticleTypes.LARGE_SMOKE, v.x, v.y, v.z, 0, 0, 0); + if (r.nextInt(2) != 0) return; - spawnParticle(colors[(int) (Math.random() * colors.length)], scale, avgAge, hot, speed, spread); + boolean empty = level.getBlockState(worldPosition.above()) + .getCollisionShape(level, worldPosition.above()) + .isEmpty(); + + double yMotion = empty ? .0625f : r.nextDouble() * .0125f; + Vec3 v2 = c.add(VecHelper.offsetRandomly(Vec3.ZERO, r, .5f) + .multiply(1, .25f, 1) + .normalize() + .scale((empty ? .25f : .5) + r.nextDouble() * .125f)) + .add(0, .5, 0); + + if (heatLevel.isAtLeast(HeatLevel.SEETHING)) { + level.addParticle(ParticleTypes.SOUL_FIRE_FLAME, v2.x, v2.y, v2.z, 0, yMotion, 0); + } else if (heatLevel.isAtLeast(HeatLevel.FADING)) { + level.addParticle(ParticleTypes.FLAME, v2.x, v2.y, v2.z, 0, yMotion, 0); + } + return; } - protected void spawnParticle(HeatLevel heatLevel, float scale, int avgAge, boolean hot, double speed, double spread) { - spawnParticle(PARTICLE_COLORS[heatLevel.ordinal()], scale, avgAge, hot, speed, spread); + public void spawnParticleBurst(boolean soulFlame) { + Vec3 c = VecHelper.getCenterOf(worldPosition); + Random r = level.random; + for (int i = 0; i < 20; i++) { + Vec3 offset = VecHelper.offsetRandomly(Vec3.ZERO, r, .5f) + .multiply(1, .25f, 1) + .normalize(); + Vec3 v = c.add(offset.scale(.5 + r.nextDouble() * .125f)) + .add(0, .125, 0); + Vec3 m = offset.scale(1 / 32f); + + level.addParticle(soulFlame ? ParticleTypes.SOUL_FIRE_FLAME : ParticleTypes.FLAME, v.x, v.y, v.z, m.x, m.y, + m.z); + } } public enum FuelType { diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java index b025763ee..2b61e850a 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/TrackGraphSync.java @@ -130,7 +130,7 @@ public class TrackGraphSync { Couple key = Couple.create(node.getNetId(), node2.getNetId()); currentPacket.addedEdges.add(Pair.of(key, edge.getTurn())); currentPacket.syncEdgeData(node, node2, edge); - }); + });//FIXME these edges will have missing nodes if (sent++ < 1000) continue; diff --git a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java index f01e7e400..22016bb5e 100644 --- a/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/trains/entity/CarriageContraptionEntity.java @@ -567,7 +567,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity { carriage.train.targetSpeed = topSpeed * targetSpeed; if (slow) carriage.train.targetSpeed /= 6; - + boolean counteringAcceleration = Math.abs(Math.signum(targetSpeed) - Math.signum(carriage.train.speed)) > 1.5f; carriage.train.manualTick = true; carriage.train.approachTargetSpeed(counteringAcceleration ? 2 : 1); diff --git a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java index f2b27a76a..d748cc258 100644 --- a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java +++ b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java @@ -153,6 +153,7 @@ public class BuilderTransformers { public static NonNullUnaryOperator> casing( Supplier ct) { return b -> b.initialProperties(SharedProperties::stone) + .properties(p -> p.sound(SoundType.WOOD)) .transform(axeOrPickaxe()) .blockstate((c, p) -> p.simpleBlock(c.get())) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(ct.get()))) diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java index 19966d5dd..76bb4cd4f 100644 --- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java @@ -85,19 +85,24 @@ public class SuperByteBuffer implements Transform, TStack, TStack, TStack, TStack, TStack { float targetU = u - entry.getOriginal() .getU0() + entry.getTarget() - .getU0(); + .getU0() + + scrollU; float targetV = v - entry.getOriginal() .getV0() + entry.getTarget() .getV0() @@ -412,8 +424,9 @@ public class SuperByteBuffer implements Transform, TStack, TStack