Skip to content
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

Working on 3.5.7 #52

Open
savardmax opened this issue Jan 24, 2019 · 1 comment
Open

Working on 3.5.7 #52

savardmax opened this issue Jan 24, 2019 · 1 comment

Comments

@savardmax
Copy link

savardmax commented Jan 24, 2019

I managed to get the plugin to world by making the following changes mostly due to the biome class move. I hope others can enjoy this pluging.

/src/Ad5001/BetterGen/Main.php +use pocketmine\level\generator\GeneratorManager;
  •           Generator::addGenerator(BetterNormal::class, "betternormal");
    
  •           GeneratorManager::addGenerator(BetterNormal::class, "betternormal");
    
  •                                           $generator = Generator::getGenerator("betternormal");
    
  •                                           $generator = GeneratorManager::getGenerator("betternormal");
    

/src/Ad5001/BetterGen/biome/BetterDesert.php

-use pocketmine\level\generator\biome\Biome;
-use pocketmine\level\generator\normal\biome\SandyBiome;
+use pocketmine\level\biome\Biome;
+use pocketmine\level\biome\SandyBiome;

/src/Ad5001/BetterGen/biome/BetterForest.php
-use pocketmine\level\generator\biome\Biome;
-use pocketmine\level\generator\normal\biome\ForestBiome;
+use pocketmine\level\biome\Biome;
+use pocketmine\level\biome\ForestBiome;

/src/Ad5001/BetterGen/biome/BetterIcePlains.php
-use pocketmine\level\generator\biome\Biome;
-use pocketmine\level\generator\normal\biome\SnowyBiome;
+use pocketmine\level\biome\Biome;
+use pocketmine\level\biome\SnowyBiome;

/src/Ad5001/BetterGen/biome/BetterMesa.php
-use pocketmine\level\generator\normal\biome\SandyBiome;
+use pocketmine\level\biome\SandyBiome;

/src/Ad5001/BetterGen/biome/BetterMesaPlains.php
-use pocketmine\level\generator\normal\biome\SandyBiome;
+use pocketmine\level\biome\SandyBiome;

/src/Ad5001/BetterGen/biome/BetterRiver.php
-use pocketmine\level\generator\biome\Biome;
+use pocketmine\level\biome\Biome;

/src/Ad5001/BetterGen/populator/DeadbushPopulator.php
-use pocketmine\level\generator\biome\Biome;
+use pocketmine\level\biome\Biome;

/src/Ad5001/BetterGen/generator/BetterNormal.php
-use pocketmine\level\generator\biome\Biome;
+use pocketmine\level\biome\Biome;

  •   public function init(ChunkManager $level, Random $random) {
    
  •   public function init(ChunkManager $level, Random $random) :void{
    
  •   public function generateChunk($chunkX, $chunkZ) {
    
  •   public function generateChunk(int $chunkX, int $chunkZ) :void {
    
  •           $noise = Generator::getFastNoise3D($this->noiseBase, 16, 128, 16, 4, 8, 4, $chunkX * 16, 0, $chunkZ * 16);
    
  •           $noise = $this->noiseBase->getFastNoise3D(16, 128, 16, 4, 8, 4, $chunkX * 16, 0, $chunkZ * 16);
    
  •   public function populateChunk($chunkX, $chunkZ) {
    
  •   public function populateChunk(int $chunkX, int $chunkZ) :void {
    

** This is a change I am not sure if it's ok, knda patchwork.

the error was : Fatal error: Class Ad5001\BetterGen\generator\BetterBiomeSelector contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (pocketmine\level\generator\biome\BiomeSelector::lookup) in /dwarf/minecraft-svr/bettergen/plugins/BetterGen/src/Ad5001/BetterGen/generator/BetterBiomeSelector.php on line 25

/src/Ad5001/BetterGen/generator/BetterBiomeSelector.php

    public function __construct(Random $random, callable $lookup, Biome $fallback) {
            parent::__construct($random, $lookup, $fallback);
            $this->fallback = $fallback;
  •           $this->lookup = $lookup;
    
  •           $this->lookup_p = $lookup
    
  • protected function lookup(float $temperature, float $rainfall) : int{

  •    return $lookup_p($temperature, $rainfall);
    
  • }

@Ad5001
Copy link
Owner

Ad5001 commented Jan 26, 2019

Hello @savardmax,
For theses kind of things, you are encouraged to fork the project, add your changes, and do a pull-request wih this blocking issue :).
Furthermore, the project on github is mostly a mirror. I'd recommand you making that pull request on https://git.ad5001.eu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants