Simplify ingredient handling and remove generated verification files

This commit is contained in:
2026-09-13 21:55:44 +03:00
parent fcd84c7024
commit ce5a37e139
31 changed files with 1596 additions and 914 deletions
@@ -3,19 +3,18 @@ package online.astradev.cauldron;
import com.mojang.math.Transformation;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Display;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.item.*;
import net.minecraft.world.level.storage.ValueOutput;
import org.joml.Quaternionf;
import org.joml.Vector3f;
final class SoupDisplay extends Display.ItemDisplay {
static final String TAG = "astracauldron:cauldron_visual";
SoupDisplay(ServerLevel level, BlockPos pos, ItemStack stack) {
super(EntityTypes.ITEM_DISPLAY, level);
setPos(pos.getX() + .5, pos.getY() + .5, pos.getZ() + .5);
@@ -27,12 +26,28 @@ final class SoupDisplay extends Display.ItemDisplay {
addTag(TAG);
setTransformationInterpolationDuration(2);
}
void ingredient(int slot, int water, int ticks, int elapsed, int duration) {
var frame = CauldronAnimation.frame(slot, water, ticks, elapsed, duration);
setTransformationInterpolationDelay(0);
setTransformation(new Transformation(new Vector3f((float)frame.x() - .5f, (float)frame.y() - .5f, (float)frame.z() - .5f),
new Quaternionf(), new Vector3f(.3f), new Quaternionf().rotationY(ticks * .035f + slot)));
setTransformation(
new Transformation(
new Vector3f(
(float) frame.x() - .5f,
(float) frame.y() - .5f,
(float) frame.z() - .5f),
new Quaternionf(),
new Vector3f(.3f),
new Quaternionf().rotationY(ticks * .035f + slot)));
}
@Override
public boolean shouldBeSaved() {
return false;
}
@Override
public boolean saveAsPassenger(ValueOutput output) {
return false;
}
@Override public boolean shouldBeSaved() { return false; }
@Override public boolean saveAsPassenger(ValueOutput output) { return false; }
}