Inactive [EDIT] Copycat v1.0 - Render images from a URL [1.4.6-R0.4]

Discussion in 'Inactive/Unsupported Plugins' started by Javanator, Apr 12, 2011.

  1. Offline

    Javanator

    Copycat - Image to Block Renderer [1.4.6-R0.4]


    Version 1.0
    Sorry for the inconvenience, but I have moved the home of the plugin to this location to here.


    Version: v1.0

    Description:
    Copycat allows players to render images from a URL into the Minecraft world. Just target a block and type a command. I don't do documentation very well, but /cc help should be enough for you to figure it out. Configuration is XML based and human friendly for manual editing.

    Features:
    • Player defined shortcuts
    • World restriction
    • Administrative enablement/disablement
    • Administrative size clamping (in XML based config)
    • Transparency support
    • Block Profile support
    • Horizontal or vertical image orientation
    Download Here

    Source Code (SVN):
    https://bukkit-modders.googlecode.com/svn

    Having Trouble?
    If you are having trouble getting the plugin to work, you need to post some descriptive information, such a stack trace, what you were doing, command used, etc. Otherwise, you are most likely going to be ignored.

    Changelog:

    Version 0.6
    • Updated to conform with 1.2.3 API
    • Added a couple new blocks
    • Please delete your pluginConfig.xml to get support for the latest blocks
    Version 0.5
    • Performance and memory improvements
    • fixed help
    Version 0.4
    • Finally got horizontal image orientations to work.
    • Added fully parameterized image draw (not documented in help)
    • Removed memory resident config (no more reload necessary after editing .xml)
    • Added the ability to change the trigger command
    Version 0.3
    • Added block profile support in pluginConfig.xml
    • Fixed transparency loss on image scaling for palette based images (png and gif)
    • Added image scaling capabilities /set dimensions <width> <height>
    • Increased default image size and improved reliability in large image handling
    • DELETE your old pluginConfig.xml so that it is regenerated with a new one to support the new features
    Version 0.2
    • Delete your old .jar. I am now using a new filename for releases. CopyCat.jar
    • Fixed server path with spaces bug
    • changed command trigger from /copycat to just /cc
    • provided more helpful help and better argument checking
    • Added operator undo /cc op undo <playername>
    • Added config reload /cc op reloadConfig
    Version 0.1
    • Initial Release
    Usage Info:

    Target a block, which will become the lower left corner of your image. Then type the magic words:
    /cc mario or /cc shortcut copy mario

    Horizontal/Flat image orientation is based on your look angle. Look down enough at your targeted block and the image will be rendered beneath your feet.

    I added support for fully parameterized drawing. Use it at your own risk. I've tested it, but am unsure how it would work if coordinates for unexplored map areas are used, etc. The format for this is:
    • /cc shortcut copy <shortcut> <X> <Y> <Z> <yaw> <pitch>
    • Yaw is a rotation angle 0 < 360 degrees. It will be snapped to the nearest 90 degree angle
    • Pitch is the up/down angle. Use a number > 45 degrees to orient the image flat
    You may also change the command trigger from /cc to something else. To do this follow the below:
    1. Extract the contents of the CopyCat.jar -- Its just a zip file! rename it to .zip
    2. Edit the plugin.yml file
    3. change cc to whatever you like.
    4. Repack the .zip and rename to .jar again with your edited .yml file.
    I've set a reasonable maxImageWidth and maxImageHeight in the default pluginConfig.xml. If you increase it, beware. This will make your server cry for mercy. For example, a 300x300 image means changing 90,000 blocks, which is a pretty heavy operation.


    2011-07-21_18.20.37.png
    2011-07-18_10.18.03.png
     

    Attached Files:

  2. Offline

    RazorFlint

    Wow, Really?
    Il try...

    Tutorial? Commands? Etc?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  3. Offline

    Plague

    The recommended CB version has to be in the title, you had it in the post.
     
  4. You should really post a picture and the in-game screenshot of the rendered picture :p
     
  5. Offline

    Javanator

    y
    You guys are just fast adopters. I'm editing damnit!
     
  6. Offline

    Darkchaos

  7. Offline

    Javanator

  8. Offline

    Darkchaos

    This Plugin Is Awesome!
     
  9. Offline

    TheRevTastic

    Is there a way to set a height and width?
     
  10. Offline

    Javanator

    Not yet, but definitely will add it in the future, along with horizontally oriented images.
     
  11. Offline

    kijex

    this plugin sounds epic! gonna install once I get home.
     
  12. Offline

    TheRevTastic

    alright thanks! Also for some reason when I resized the image in photoshop to make it smaller the height in game stayed the same but the width went up 10 blocks.
     
  13. Offline

    Javanator

    There's a hard coded value in the config xml to clamp it to 64x64. It is editable by hand with server restart, but this is mainly due to some behavior that other developers have also noticed in the developer forums. Occasionally when trying to obtain a block, the minecraft server will throw up, seemingly at random. This was more likely to occur on larger images, so I decided to clamp it to 64x64 and maintain aspect ratio to minimize occurence.
     
  14. Offline

    SAMDAN

    sweetness!!!
     
  15. Offline

    cheepz

    Can you post the xml files? I'm getting an error because I don't have these files, and they aren't being auto-generated.
     
  16. Offline

    Javanator

    That shouldn't happen. Can you post the stack trace from your server console? I just deleted my config dir and the xml was generated as expected. For me this is under D:\games\minecraft-server\plugins\CopyCat

    I dont know if this is your issue, but for me, I run windows 7 and could not get minecraft to behave in a Program Files type directory, even when trying to run as administrator.

    Here's my pluginSettings.xml (rename from .txt):

     

    Attached Files:

  17. Offline

    cheepz

    I'm sorry, I don't think I was looking through my folders carefully enough, anyways, I tried the command and I got this.

    build 670

    2011-04-12 23:23:31 [INFO] Loaded Config File: C:\Users\Cheepz\Desktop\New folder\plugins\CopyCat\pluginSettings.xml
    2011-04-12 23:23:31 [SEVERE] Error processing command
    javax.xml.bind.DataBindingException: javax.xml.bind.MarshalException
    - with linked exception:
    [java.io.FileNotFoundException: C:\Users\Cheepz\Desktop\New%20folder\plugins\CopyCat\pluginSettings.xml (The system cannot find the path specified)]
    at javax.xml.bind.JAXB._marshal(Unknown Source)
    at javax.xml.bind.JAXB.marshal(Unknown Source)
    at org.bukkitmodders.copycat.managers.ConfigurationManager.persist(ConfigurationManager.java:67)
    at org.bukkitmodders.copycat.managers.ConfigurationManager.getPlayerSettings(ConfigurationManager.java:60)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.doAdd(CopyCatPlayerListener.java:179)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.performCommand(CopyCatPlayerListener.java:76)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.access$000(CopyCatPlayerListener.java:31)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener$1.run(CopyCatPlayerListener.java:55)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [java.io.FileNotFoundException: C:\Users\Cheepz\Desktop\New%20folder\plugins\CopyCat\pluginSettings.xml (The system cannot find the path specified)]
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.createXmlOutput(Unknown Source)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
    ... 14 more
    Caused by: java.io.FileNotFoundException: C:\Users\Cheepz\Desktop\New%20folder\plugins\CopyCat\pluginSettings.xml (The system cannot find the path specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    ... 16 more
     
  18. Offline

    Malchus

    says invalid command, this is so tight though
     
  19. Offline

    Javanator

    the latest craftbukkit does this. I've noticed "unknown command" with other plugins as well since the latest craftbukkit update. It is not from this plugin. I know its ugly, but hopefully will be fixed or have a workaround soon.
     
  20. Offline

    Malchus

    keep getting this error


    22:27:48 [INFO] Malchus issued server command: copycat enable malchus
    22:27:48 [SEVERE] Error processing command
    javax.xml.bind.DataBindingException: javax.xml.bind.MarshalException
    - with linked exception:
    [java.io.FileNotFoundException: /Users/James/Desktop/untitled%20folder/James/Archive/Minecraft/Minecraft%20Server/Moonlight%20City/plugins/CopyCat/pluginSettings.xml (No such file or directory)]
    at javax.xml.bind.JAXB._marshal(JAXB.java:549)
    at javax.xml.bind.JAXB.marshal(JAXB.java:307)
    at org.bukkitmodders.copycat.managers.ConfigurationManager.persist(ConfigurationManager.java:67)
    at org.bukkitmodders.copycat.managers.PlayerSettingsManager.enable(PlayerSettingsManager.java:74)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.doEnable(CopyCatPlayerListener.java:155)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.performCommand(CopyCatPlayerListener.java:80)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.access$000(CopyCatPlayerListener.java:31)
    at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener$1.run(CopyCatPlayerListener.java:55)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [java.io.FileNotFoundException: /Users/James/Desktop/untitled%20folder/James/Archive/Minecraft/Minecraft%20Server/Moonlight%20City/plugins/CopyCat/pluginSettings.xml (No such file or directory)]
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImpl.java:222)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:243)
    at javax.xml.bind.JAXB._marshal(JAXB.java:547)
    ... 13 more
    Caused by: java.io.FileNotFoundException: /Users/James/Desktop/untitled%20folder/James/Archive/Minecraft/Minecraft%20Server/Moonlight%20City/plugins/CopyCat/pluginSettings.xml (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImpl.java:217)
    ... 15 more
     
  21. Offline

    Javanator

    It looks like it may be an issue with minecraft server installed in a dir with spaces in it (notice %20 in the path you posted). I'll make a note of it and fix in the next release.
     
  22. Offline

    hiphopgamer

    this is cool, wish it had size options, its ok tho :)
     
  23. Offline

    2Bucks

    does this work just for 8 bit stuff?
     
  24. Offline

    Javanator

    No, it has a built-in nearest color matcher. Right now it will first scale the image, match each pixel to the nearest wool color, and then draw. However, if the image is already 8 bit, it would most likely look a lot better once rendered. Also, the color matching is done on the default textures (since it is server-side). If a user has a client with custom textures, then the color matching on the blocks may not be perceived as being optimal. .
     
  25. Offline

    2Bucks

    I see
    What a brilliant mothereffin mod
     
  26. Offline

    Jaxter

    by the way, it seems to just post like, a few blocks over, maybe 10-15 blocks to the right but REALLY high in the air, any idea why it might do that? and I get Unknown console command regardless if it seems to take
     
  27. Offline

    EmVee

    Well, there goes any incentive build manually. Hehe!
     
  28. Offline

    Wolfy9247

    I don't believe this works on older versions of Bukkit such as 617:

    Code:
    23:29:20 [INFO] Wolfy9247 issued server command: copycat
    23:29:22 [SEVERE] Error processing command
    java.util.NoSuchElementException
    
            at java.util.StringTokenizer.nextToken(Unknown Source)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.performCommand(CopyCatPlayerListener.java:67)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.access$000(CopyCatPlayerListener.java:31)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener$1.run(CopyCatPlayerListener.java:55)
    
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    
            at java.util.concurrent.FutureTask.run(Unknown Source)
    
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    
            at java.lang.Thread.run(Unknown Source)
    
    23:29:22 [INFO] Wolfy9247 issued server command: copycat
    23:29:29 [INFO] Wolfy9247 issued server command: copcat add mario
    23:30:06 [INFO] Wolfy9247 issued server command: copycat add mario http://drainrescue.files.wordpress.com/2009/12/mario.jpg
    23:30:06 [INFO] Loaded Config File: C:\Users\xxx\AppData\Roaming\.minecraft\Bukkit\plugins\copycat\pluginSettings.xml
    23:30:31 [INFO] Wolfy9247 issued server command: copycat copy mario
    23:30:32 [SEVERE] Error processing command
    java.lang.IndexOutOfBoundsException: Index: 16, Size: 16
    
            at java.util.ArrayList.RangeCheck(Unknown Source)
    
            at java.util.ArrayList.get(Unknown Source)
    
            at net.minecraft.server.World.a(World.java:1330)
    
            at net.minecraft.server.World.a(World.java:1305)
    
            at net.minecraft.server.Chunk.a(Chunk.java:303)
    
            at net.minecraft.server.World.setTypeId(World.java:235)
    
            at net.minecraft.server.World.e(World.java:294)
    
            at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
    
            at org.bukkit.craftbukkit.block.CraftBlock.setType(CraftBlock.java:117)
    
            at org.bukkitmodders.copycat.util.MaterialTiles.setBlockMaterialToTile(MaterialTiles.java:78)
    
            at org.bukkitmodders.copycat.util.ImageCopier.draw(ImageCopier.java:78)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.doCopy(CopyCatPlayerListener.java:267)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.performCommand(CopyCatPlayerListener.java:70)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener.access$000(CopyCatPlayerListener.java:31)
    
            at org.bukkitmodders.copycat.listeners.CopyCatPlayerListener$1.run(CopyCatPlayerListener.java:55)
    
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    
            at java.util.concurrent.FutureTask.run(Unknown Source)
    
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    
            at java.lang.Thread.run(Unknown Source)
    
    It loaded a wall of white wool in game, but it didn't load the image... and the wall wasn't even as big as it's supposed to be to fit the image anyways. I'm sure the errors should explain it all though.
     
  29. Offline

    Nuinbot

    Question: Any way to make this print horizontally instead of vertically? I would love to have a picture laid out over a field, viewable from the server's map. Thanks!
     
  30. Offline

    MeinerHosen

    .....D=

    *stares in awe*

    This makes having a server look impressive easy.

    Thank you, sir:D
     

Share This Page