BlockPos basin =util.grid.at(1,2,2);BlockPos pressPos =util.grid.at(1,4,2); //辊压机位置Vec3 basinSide =util.vector.blockSurface(basin,Direction.WEST); //工作盆侧面ItemStack copper =newItemStack(Items.COPPER_INGOT); //铜物品ItemStack copperBlock =newItemStack(Items.COPPER_BLOCK); //铜块物品scene.overlay.showText(60).pointAt(basinSide).placeNearTarget().attachKeyFrame().text("Pressing items held in a Basin will cause them to be Compacted");scene.idle(40);scene.overlay.showControls(newInputWindowElement(util.vector.topOf(basin),Pointing.DOWN).withItem(copper),30);scene.idle(30);Class<MechanicalPressBlockEntity> type =MechanicalPressBlockEntity.class;scene.world.modifyBlockEntity(pressPos, type, pte ->pte.getPressingBehaviour().start(Mode.BASIN)); //开始辊压scene.idle(30); //等待辊压动画(是的,只能这样等,没有别的方法!)scene.world.modifyBlockEntity(pressPos, type, pte ->pte.getPressingBehaviour().makeCompactingParticleEffect(util.vector.centerOf(basin), copper)); //生成辊压粒子效果scene.world.modifyBlockEntityNBT(util.select.position(basin),BasinBlockEntity.class, nbt -> {nbt.put("VisualizedItems",NBTHelper.writeCompoundList(ImmutableList.of(IntAttached.with(1, copperBlock)), ia ->ia.getValue().serializeNBT())); }); //给工作盆追加VisualizedItems nbt tag,从而产生物品输出动画scene.idle(4); //等待物品下落动画(是的,只能这样等,没有别的方法!)scene.world.createItemOnBelt(util.grid.at(1,1,1),Direction.UP, copperBlock);//在传送带上生成"落"在上面的工作盆输出物品scene.idle(30);