PHP code example of aternos / plop
1. Go to this page and download the library: Download aternos/plop library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aternos / plop example snippets
$input = \Aternos\Plop\Input\StructureFile\StructureFile::loadFile("something.nbt");
$strategy = new \Aternos\Plop\Placement\SameMaterialPlacementStrategy(perTick: 3);
$animation = new \Aternos\Plop\Animation\FloatAnimation(animationDuration: 25, x: -10, y: 6, z: -10);
$plop = new \Aternos\Plop\Plop(
input: \Aternos\Plop\Input\StructureFile\StructureFile::loadFile("something.nbt"),
functionName: "plop:example",
placementStrategy: $strategy,
defaultAnimation: $animation
);
$plop->generate();
echo $plop->getOutput()->getAsString();