Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Ender Furnace doesn't work

Comments in 'Plugin Development' started by Creeperface, Nov 17, 2015.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    I create more tiles in one furnace block, and save them into array and on touch i open tile's inventory to player, it works. But furnace doesn't begin smelt :/ but idk why. how to fix it?

    my code:
    PHP:
    public function createFurnace(Player $p){
            
    $id $this->plugin->getPlayerTeam($p)->getId();

            
    $nbt = new Compound("", [
                new 
    Enum("Items", []),
                new 
    String("id"Tile::FURNACE),
                new 
    Int("x"$this->plugin->data[$id."Furnace"]->x),
                new 
    Int("y"$this->plugin->data[$id."Furnace"]->y),
                new 
    Int("z"$this->plugin->data[$id."Furnace"]->z),
                new 
    String("CustomName""Ender Furnace")
            ]);
            
    $nbt->Items->setTagType(NBT::TAG_Compound);

            
    $chest Tile::createTile("Furnace"$this->plugin->level->getChunk($this->plugin->data[$id."Furnace"]->>> 4$this->plugin->data[$id."Furnace"]->>> 4), $nbt);

            
    $inv = new FurnaceInventory($chest);
            
    $this->plugin->getPlayerData($p)->setFurnace($inv);
        }
  2. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    This is really interesting!
    I'll check that out. I am pretty sure its because the tiles are linked to the block and only 1 tile can be at 1 position
  3. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Yes but only in client side that is why you can not add inventory of furnace if you have not furnace block but i have it, and i can open its inventory just smelting doesn't work and it is by server side
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Or should i save tile object instead of inventory?
  5. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Ah, thats why chest inventorys don't work neither on command.
  6. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Yes, try that
  7. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Ender chest works for me
    Ok
  8. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    And use floor, just in case:
    PHP:
                new Int("x"floor($this->plugin->data[$id."Furnace"]->x)),
                new 
    Int("y"floor($this->plugin->data[$id."Furnace"]->y)),
                new 
    Int("z"floor($this->plugin->data[$id."Furnace"]->z)),
  9. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    No i can't coordinates are saved in array and they are floored
  10. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Hmmm what happens if i have more tiles at the same coordinates and use getTile() ? xD
  11. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    xD no idea, just try to crash your server xD
  12. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    OMG it works now :D but in steadfast crafting doesn't work and idk why :/ and for annihilation i need crafting too more than ender furnace :D
  13. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Can you post the solution?
    thebigsmileXD likes this.
  14. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Same question, i'd like to see the solution
    Legoboy0215 likes this.
  15. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    i saved tile instead of inventory :D
  16. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    High 5! :D
  17. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    ? What do you mean saved tile instead of inventory?

Share This Page

Advertisement