Custom Images on Maps | (Ep. 7) Advanced 1.16.x Spigot Coding

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 62

  • @Insprill
    @Insprill 4 года назад +16

    At 5:37 you do "view.getRenderers().clear()", however, the getRenderers method only returns a copy of the renderers. So calling the clear method doesn't actually remove them. To remove them you need to do
    for (MapRenderer renderer : view.getRenderers())
    view.removeRenderer(renderer);

    • @CodedRed
      @CodedRed  4 года назад +1

      This is true ^ Please go ahead and change the code to the for loop. It looks like they changed the getRenderer() method.

    • @Qwetzxl
      @Qwetzxl 3 года назад +1

      @@CodedRed lmfao this is gonna be confuing implememnting the fix. Without vid lmfao anyways great vid m8 love ur channel its so helpful

    • @Qwetzxl
      @Qwetzxl 3 года назад +1

      @@CodedRed also is there any built in librarries, for me to select a part of the image so i can display an image over multiple maps?

  • @ModernAdventurer
    @ModernAdventurer 4 года назад +3

    Interesting, I might watch this later today. Your videos are awesome mate, keep it up! Your the one who got me started with spigot plugin development just over a year ago now and I’m so happy with where that’s lead. Thank you so much for what you do!

    • @CodedRed
      @CodedRed  4 года назад

      That's awesome! So happy to hear this, thank you!

  • @pingouyno
    @pingouyno 3 года назад +1

    I usually never comment on youtube, but thank you so much for these in-depth step-by-step explanations. I was in so much trouble and couldn't find anything online to fix my problems, but your video taught me exactly how everything works. Good job

  • @ConfusionX6000
    @ConfusionX6000 4 года назад +4

    Can't believe I'm this early. I love this series so much. It helps me a lot.

  • @ShhFah
    @ShhFah 3 года назад +1

    I been watching your videos none stop. Keep it up my guy

  • @ronking159
    @ronking159 2 года назад +1

    This is epic!
    You deserve more for this

  • @thestorm1581
    @thestorm1581 4 года назад +1

    Long time no see. Nice to see you back!

  • @karimkiller3312
    @karimkiller3312 4 года назад +1

    I love your vids man I’m a fan and I freaking thank you for these awesome vids❤️

  • @uwukai
    @uwukai 4 года назад +2

    Oh damn, this will be useful for making a plugin such as bingo.Thanks!

    • @pingouyno
      @pingouyno 3 года назад

      Hey I saw the source code of your Bingo plugin while working on mapviews. Nice work!

  • @mitmetalschlafen
    @mitmetalschlafen 4 года назад +2

    You could just use the PersistentDataContainer of the ItemStack.
    You could get all TileEntities in the ChunkLoadEvent then check if they are of type ItemFrame
    then get the ItemStack content, check the PDC and initialize it accordingly (if not initialized already).

    • @CodedRed
      @CodedRed  4 года назад

      Yes you definitely could. Soon I will post a video on persistent data containers, didn’t want to throw 2 things in one video.

  • @Dr.BananaCraft
    @Dr.BananaCraft 3 года назад +1

    very interesting great and helpfull video! :D thank you so much :D

  • @dhssjssjj1766
    @dhssjssjj1766 4 года назад +1

    Thanks buddy, keep up with your work.

  • @splerix
    @splerix 4 года назад +1

    Thanks all your episodes are very helpful

  • @RenDoggg
    @RenDoggg 4 года назад

    Great vid. Would it be possible to maybe do another episode on maps or do you have any links to some good resources on developing maps. I started doing some work to extend its functionality like keeping the images after the server restarts and having bigger images being split up into several maps. I quickly became stuck and didn't know what to do next. All depends on what people wanna see, this is just my input
    . Thanks in advance.

  • @decentbruhh
    @decentbruhh 4 года назад +1

    THE LEGEND IS BACK

  • @vladdomnescu
    @vladdomnescu 4 года назад +1

    Welcome back Legend

  • @Qwetzxl
    @Qwetzxl 3 года назад +1

    Love the vids m8 its amazing

  • @CladCobra
    @CladCobra 4 года назад +5

    HE FINALLY UPLOADED LMAOOOO

  • @crimson9926
    @crimson9926 4 года назад

    Oh you uploaded, nice!

  • @QuberCubes
    @QuberCubes 4 года назад +1

    Can't wait to see new uploads also crafting woth customitem stacks tutorial please

    • @CodedRed
      @CodedRed  4 года назад +1

      Could you give me an example of what you're looking for :3

    • @QuberCubes
      @QuberCubes 4 года назад

      @@CodedRed like how to create a special sword by using like a stick named Super stick or something like that

    • @spacepowerofficial1187
      @spacepowerofficial1187 4 года назад

      @@CodedRed can you also do a video on how to save blocks / structures to files and how to load them back in?

    • @dlfdragon973
      @dlfdragon973 3 года назад

      @@QuberCubes I had to do this, basically, make the recipe have the normal version of the items like the "superstick" would just be a normal stick and then u can listen for the crafting Item event, and then when it happens to make sure that the items in the crafting table items have that customDisplayName of "superstick" or item meta and if they don't cancel the event but if they do let it happen

    • @QuberCubes
      @QuberCubes 3 года назад

      @@dlfdragon973 yes but how would I make the item appear in the item display area?

  • @itz_potato7794
    @itz_potato7794 4 года назад

    Hello CodedRed, Ever since I watch your video, I can't stop watching them. I've got a suggestion. Could you make a tutorial on how to make ranks?

  • @Kidthegoat123
    @Kidthegoat123 4 года назад +2

    Woah!

  • @splerix
    @splerix 4 года назад

    Hello love all your tutorials but what version of Java should I code the plugins in and what do you recommend for normal Java applications. Thanks

  • @RisaKoto148
    @RisaKoto148 2 года назад

    but what is with an 3x3 Card? or something special

  • @ashesha391
    @ashesha391 3 года назад

    How to make big pictures?

  • @ImTheLion
    @ImTheLion 4 года назад

    Nice video, but is there a way to do it on larger maps apart from making images with a part of the map and putting that together?

    • @CodedRed
      @CodedRed  4 года назад

      Yes there is! Maybe I’ll make the next video about it :)

  • @jackeyboy6508
    @jackeyboy6508 4 года назад

    I got a question about scoreboards if anyone can help. Is there a way to edit a line of what’s already on a scoreboard, or do you have to remake the whole scoreboard every time you want to change something about it (e.g timer or team a player is on).

    • @CodedRed
      @CodedRed  4 года назад

      You can update the title of the scoreboard every x ticks, however if you want to change the score text you would need to resend the whole scoreboard to the player. If you are using it for a timer I typically just update the title

    • @jackeyboy6508
      @jackeyboy6508 4 года назад

      @@CodedRed thanks!

  • @jw-lr5xr
    @jw-lr5xr 4 года назад

    instantly tried it out, works for me. i wonder if you can update the image on the map, cause then it would be possible to play a really slow video on your map. or is this to laggy to play?

    • @CodedRed
      @CodedRed  4 года назад

      The render() method runs every single tick. You could try and update the image. Just keep in mind updating images every tick will cause a lil lag.

    • @jw-lr5xr
      @jw-lr5xr 4 года назад

      @@CodedRed i am currently trying to make 2 different map metas, and then in a for loop, i change the meta from an map to an other map meta, and then 10 seconds later, i change to an other meta again to create like an gif.
      Edit: it doesnt work, the first meta change works, but then the thread stops responding and i get an huuuuge spigot error

    • @CodedRed
      @CodedRed  4 года назад

      ​@@jw-lr5xr You wouldn't have to change the MapMeta? Unless I am thinking about this wrong, all you would need to do is change what image it is drawing on the canvas.
      `canvas.drawImage(0, 0, image);`
      I would go about this by splitting the gif into multiple images. Save those images in a Map/list then every 10ticks (1/2 a second) draw the new image on the canvas. You would need to change the `if(done)` to a counter of some sort. Since the render() method runs every tick, have an int++ every tick then on every 10th tick run the method otherwise return;. Hope that all makes sense, just woke up haha.
      Keep in mind, maybe every 1/2 second is too fast or too slow. You would have to play around with it :)

    • @jw-lr5xr
      @jw-lr5xr 4 года назад +1

      @@CodedRed ok, i definetly try this. I just wasnt sure if the image on the map gets updated if i change the way it was created. Thanks for responding

  • @imbuzz2109
    @imbuzz2109 4 года назад

    Hi, Anyone knows what is the method more commonly called "update" for Entity NMS in spigot 1.16.4? Because I'm not finding it anywhere.

  • @zonmods3627
    @zonmods3627 3 года назад

    Hello, working this on 1.8 ? or not

  • @DiDiR6
    @DiDiR6 4 года назад

    I have an another version more complete which permit to use click event on map and custom images which change when a changement is detected on a web page like youtube channel. Moreover images are rescale in a specific size according by the number of itemframe.

    • @CodedRed
      @CodedRed  4 года назад

      Good work! I also have a version where you can put the dimensions you want to use for the image, lets say 2x2 which would then split your image 4 ways onto 4 different maps. I was gonna make an addition to this video about it. However, your version changes when an image if a web page changes? That is very awesome!

    • @DiDiR6
      @DiDiR6 4 года назад

      @@CodedRed what do u mean by version ?

  • @cripehd7667
    @cripehd7667 4 года назад

    Very good! Thanks!!
    Can you show how to give "custom players" an AI? ^^

  • @pastafied
    @pastafied 4 года назад

    If it isn't too difficult, I would love to see a tutorial on how to add multiple worlds.
    edit: i figured out how to do it by looking at multiverse core code

  • @QuberCubes
    @QuberCubes 4 года назад +1

    First pog lol

    • @CodedRed
      @CodedRed  4 года назад

      o.O That was fast

    • @QuberCubes
      @QuberCubes 4 года назад +1

      @@CodedRed 8 seconds lol