-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MyPlot and Pistons... #24
Comments
This plugin doesnt provide fixes with any other plugins, yet if you look into some piston code you may see theres a code line to set blocks unmovable by pistons. You can make your own fork of this plugin and implement it easily. |
I know, but there was a fix for FactionsPE to in another point! |
That fix did not work. |
Ok |
But I hope tedo will fix it. |
Think it would be easier if Jason blocks this in myplot. |
You need a Redstone-MyPlot interaction plugin. I might make one when this plugin is released on Poggit. |
Ok |
Jason Reads Everything 😂 Step by Step my Friend 😉 |
No, I asked him in his discord xD |
Releas the plugin so that jason makes a interacct pl xD |
Put this on your server as a php file in the plugins folder. Be warned though, it depends on <?php
declare(strict_types=1);
/**
* @name RedstoneMyPlotHelper
* @main jasonwynn10\RedstoneMyPlotHelper\Main
* @version 0.1.0
* @api 3.0.0
* @description A plugin script which Helps interaction between pistons and plot borders
* @author jasonwynn10
* @depend RedstoneCircuit
*/
namespace jasonwynn10\RedstoneMyPlotHelper {
use MyPlot\MyPlot;
use pocketmine\block\Block;
use pocketmine\event\Listener;
use pocketmine\level\Position;
use pocketmine\plugin\PluginBase;
use pocketmine\tile\Tile;
use redstone\blockEntities\BlockEntityPistonArm;
class Main extends PluginBase implements Listener {
public function onEnable() {
$myPlot = $this->getServer()->getPluginManager()->getPlugin("MyPlot");
if(!$myPlot instanceof MyPlot)
return;
$redstone = $this->getServer()->getPluginManager()->getPlugin("RedstoneCircuit");
if(!$redstone instanceof \redstone\Main)
return;
if ($redstone->getCustomConfig()->isEnablePiston()) {
Tile::registerTile(HelperPistonArm::class, ["PistonArm", "minecraft:piston_arm"]);
}
}
}
class HelperPistonArm extends BlockEntityPistonArm {
public function onUpdate() : bool {
$piston = $this->getBlock();
/** @var Block[] $blocks */
$blocks = $this->recalculatePushBlocks();
if (count($blocks) == 0) {
$this->extend = false;
return true;
}
$face = $piston->getFace();
foreach($blocks as $block) {
$pos = Position::fromObject($block->asVector3()->getSide($face), $block->level);
if(MyPlot::getInstance()->isPositionBorderingPlot($pos))
return false;
}
return parent::onUpdate();
}
}
} |
Thanks Jason, I'm really surprised now. I will try it. And hope the description is fun 😅
|
It won't work until RedstoneCircuit makes a certain method public. |
I said that in my message |
I don't think he read it |
day 3 of trying to find Jason's Discord tag to friend him without asking |
jasonwynn10#4331 |
Do you can add "p set flag redstone true" |
Oh no, I have noticed that pistons can edit the plot borders and the road if you use the plugin "MyPlot". It would be wonderfull if you can fix this because I think that many other people with a citybuild server would love pistons!
The text was updated successfully, but these errors were encountered: