[Class] Render Custom Images in Minecraft! V1.2

Discussion in 'Resources' started by bigteddy98, Mar 8, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    bigteddy98

    The method returns a list of images, draw each of them on a frame and you are ready. Don't forget the order of the pictures, otherwise your picture won't be as it should be :).
     
  2. Offline

    Jnorr44

    you could use this to make custom blocks without NMS.
     
  3. Offline

    HeavyMine13

    bigteddy98 likes this.
  4. Offline

    bigteddy98

    that split method you are using is doing nothing in your code, it returns a list like this:
    Code:java
    1. List<Image> images = split((BufferedImage) image, 10, 10);

    Loop through every image, and paint them on a different map each time.

    Will be a pretty hard job to do I think, but it might be possible.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    Jnorr44

    not really, just use this to surround the visible surfaces with textures, then add your own custom behavior.
     
  6. Offline

    bigteddy98

    How do you want to cover the block's up/underside? Don't know if it's possible to spawn itemframes horizontal. Also, if a player builds a large building with these blocks, the server will start sending thousands of packets every second.
     
  7. Offline

    Jnorr44

    right, just saying its possible
     
    bigteddy98 likes this.
  8. Offline

    HeavyMine13

    for(int i; i==0; i++){
    wat now?
    }
     
  9. Offline

    Cirno

    It's possible; rather than using sendPacket or something, I cache the packet itself, and do a bit of dumb "algorithm" compression (to which I need to improve upon):
    https://github.com/CirnoTheGenius/I...uricraft/tenko/threading/CachingRunnable.java

    Sending with:
    https://github.com/CirnoTheGenius/I...icraft/tenko/threading/AnimationRunnable.java
     
    bigteddy98 likes this.
  10. Offline

    TigerHix

    Beautilful class. Thanks so much for sharing this. :)
     
  11. Offline

    Jamboozlez


    I wasn't sure if I should have made a separate thread for this, but I decided to post it here because it's to do with the code you posted and I figured you know the code best and would probably be able to help.

    OK, so I run this code: http://pastebin.com/ryFAQamj
    and I get the following error: http://pastebin.com/qbTN6jwN

    I attempted to modify my code/yours but I just ended up tripping over myself and make it worse, so I used the trusty CTRL+Z and came here.

    I hope you can help me! :)
    Thanks in advance.
     
  12. Offline

    Floplip

    Hi Bigteddy,
    This looks really awesome, but I don't understand how to use it. Is it a plugin? It would be very helpful if you would expain it a little bit more, because I would love to use it!
    Do the paintings stay only on the multiplayer world, or will the stay if I play it in singleplayer? Would be useful for publishing a map :)
    Thanks in advance!
     
  13. Offline

    bigteddy98

    Hi Floplip,

    this is a class you can use in your own plugins. I don't know how this works when moving to singleplayer, but I will give it a chance this afternoon,

    BigTeddy98,
    Sander.
     
  14. Offline

    Cirno

    I don't mean to hijack, but this is somewhat close to what he's talking about:
    https://github.com/CirnoTheGenius/I...c/net/yukkuricraft/tenko/nms/NMSImg2Disk.java

    It's old and outdated, but the "deobfuscated a()" bit should get you on the right track to screwing with NBT.
     
  15. Offline

    xTrollxDudex

  16. Offline

    OriKe

    Great job!
    But I wanted to know how to make a bigger image appear?
    The only size I did is 128 on 1 frame..
     
  17. Offline

    bigteddy98

    You can make multiple frames for a bigger image.
     
  18. Offline

    OriKe

    I used your code and put a 512x512 image on the item frame with the arrow but it didn't work...
    Code:
    Image image = artRenderer.getImageFromURL("http://www.icosky.com/icon/png/Emoticon/Black%20Power%20Emoticons/anger%20512x512.png");
    Location loc0 = new Location(getServer().getWorld("world"), -14, 67, 18);
    artRenderer.makeArt(loc0, image);
    [​IMG]
     
  19. Offline

    bigteddy98

    You will have to cut the big picture into multiple 128x128 pictures. This can be done by using the built-in system of a BufferedImage. After that you will have to draw them all seperately, maybe I should make an easier system for this but it works,

    BigTeddy98, Sander.
     
  20. Offline

    zDubsCrazy

    bigteddy98
    Not work to me :( Cause this error:
    PHP:
    [15:06:16 ERROR]: null
    org
    .bukkit.command.CommandExceptionUnhandled exception executing command 'gerarimg' in plugin
    TimelyCORE v1.0
            at org
    .bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:gi
    t
    -Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) ~[craftbukki
    t
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) ~[c
    raftbukkit
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:95
    2
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) [craftbuk
    kit
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukk
    it
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craf
    tbukkit
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit.
    jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git
    -Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [craftbukki
    t
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukki
    t
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukki
    t
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbuk
    kit
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            
    at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukki
    t
    .jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
    Caused byjava.lang.NullPointerException
            at com
    .zdubscrazy.timely.core.ArtRenderer.makeArt(ArtRenderer.java:68) ~[?:?]
            
    at com.zdubscrazy.timely.core.Core.onCommand(Core.java:94) ~[?:?]
            
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:gi
    t
    -Bukkit-1.7.2-R0.3-2-g85f5776-b3024jnks]
            ... 
    13 more
     
Thread Status:
Not open for further replies.

Share This Page