
Instructions for how to make Emoji datapacks without having to use discord
Melechtna opened this issue · 25 comments
Discord bad, instructions missing, fix plz
Jokes aside, I would appreciate instructions for how to make the datapacks by hand, as I want nothing to do with discord.
After digging through your code, it seems you didn't add a method for local file loading. I have two ways to view this, either you didn't think about it, in which case please impliment it. You'd only really need to add something like
`
private final Path localFilePath;
public EmojiRecipe(ResourceLocation recipeName, String category, String name, Path localFilePath) {
this.recipeName = recipeName;
this.category = category;
this.name = name;
this.localFilePath = localFilePath;
}
`
Into the emoji.java
Or you somehow think Discord is secure, and no, it's not, not by a mile, and subjecting myself to either your server, another server, or self webhosting, is insanity when a single public class could resolve the whole issue.
Yep, I'm stealing all of your data and making profit out of it. It's hard to see what you are typing with all the sunlight I'm getting while I'm typing this from my yatch
The entire point of datapacks is that it is configurable without needing any extra assets. Your example would fail immediately because the others clients do not have dog image at all because they downloaded the mod but you made a datapack that points to a new image not in the mod. Each of those clients would then have to download a resourcepack WITH the images. And the mod would have to change to use resourcelocations instead of URLs to detect and load the images from the resourcepacks.
That’s the whole point of these datapacks. To simply the process, you would give it a URL to any image host you trust to deliver any image you want to the clients that connect to your server that has a datapack pointing to new images not in the mod itself. Heck, you can spin up your own small webserver or raspberry pi or whatever and put your images there to have clients download.
It’s just how the mod was designed to work. No one should ever use URIs for anything. If pulling images locally, then it would have to be a resourcelocation path. And now you have to distribute resourcepacks too
The entire point of datapacks is that it is configurable without needing any extra assets. Your example would fail immediately because the others clients do not have dog image at all because they downloaded the mod but you made a datapack that points to a new image not in the mod. Each of those clients would then have to download a resourcepack WITH the images. And the mod would have to change to use resourcelocations instead of URLs to detect and load the images from the resourcepacks.
That’s the whole point of these datapacks. To simply the process, you would give it a URL to any image host you trust to deliver any image you want to the clients that connect to your server that has a datapack pointing to new images not in the mod itself. Heck, you can spin up your own small webserver or raspberry pi or whatever and put your images there to have clients download.
It’s just how the mod was designed to work. No one should ever use URIs for anything. If pulling images locally, then it would have to be a resourcelocation path. And now you have to distribute resourcepacks too
That doesn't even make sense on the outset. I'm not saying the design doesn't work, I'm saying, this is a security nightmare, it uses more bandwidth from the outset because of the implimentation instead of just pulling files locally and translating a simple string. Given how the other guy is reacting, I can only assume that yes, this is designed to encourage datascraping for people that don't know any better, because it calls back to discord either way, meaning servers are having their IP's exposed to discord no matter what data pack you use and where you point them.
Please inform yourself of what a datapack is https://minecraft.fandom.com/wiki/Data_pack
I dont need to change anything in my code it already works
Have an example, any url should work
buuz135-test-emojiful-datapack.zip
Please inform yourself of what a datapack is https://minecraft.fandom.com/wiki/Data_pack I dont need to change anything in my code it already works
Have an example, any url should work buuz135-test-emojiful-datapack.zip
Please inform yourself on your own code? The datapack in question only contains a link directly to a discord image in the json file. The code itself only allows for http(s):// links to be used.
Yeah, that's how it works. Because datapacks are stored on the SERVER sending an url is much better than sending a full image to the client.
Yeah, that's how it works. Because datapacks are stored on the SERVER sending an url is much better than sending a full image to the client.
There's like, 50 different reasons that makes no sense. Starting with, emogg exists, and your cache sends a "full image" anyway.
There aren't any images sent from the client to the server, stop educating me on my software
There aren't any images sent from the client to the server, stop educating me on my software
Discord shill collecting user information for them, got it.
I don't know if your reading comprehension is low but in my first message I said "it can use any url". Stop baby raging and grow up
I don's know if your reading comprehension is low but in my first message I said "it can use any url". Stop baby raging and grow up
Might wanna check yours, because your code litterally denies file:// urls.
Yep, I'm stealing all of your data and making profit out of it. It's hard to see what you are typing with all the sunlight I'm getting while I'm typing this from my yatch
The only other interpretation, as this at least gives you the benefit of intent, is you're just incompetent and over engineered a solution that doesn't make sense in this context, and created a security issue by over complicating the method.
I don's know if your reading comprehension is low but in my first message I said "it can use any url". Stop baby raging and grow up
Might wanna check yours, because your code litterally denies file:// urls.
@Melechtna No, you’re supposed to put the image on any image host. Imgur, Dropbox, Google drive, whatever. Then take the URL of the image and put it into the datapack. Then when client connects, the server sends some of the datapack info over to client including the URL. The client then will pull that image from online on their own to display on screen.
I have no idea why you’re hyper fixated on local file paths or discord when neither is required here. Pretty sure a file:// is a URI. Not a URL. Just use Imgur or something.
Also think about it. If a URI was allowed and the server sends that URI to client, client will look on their own machine for the file and won’t find it because the URI was specific to your machine. Not other people’s. And sending the images from server to client takes up server bandwidth which is not good. And locally, people can have their modding instances in different folders than you too so absolute URIs would fail anyway.
I don's know if your reading comprehension is low but in my first message I said "it can use any url". Stop baby raging and grow up
Might wanna check yours, because your code litterally denies file:// urls.
@Melechtna No, you’re supposed to put the image on any image host. Imgur, Dropbox, Google drive, whatever. Then take the URL of the image and put it into the datapack. Then when client connects, the server sends some of the datapack info over to client including the URL. The client then will pull that image from online on their own to display on screen.
I have no idea why you’re hyper fixated on local file paths or discord when neither is required here. Pretty sure a file:// is a URI. Not a URL. Just use Imgur or something.
Also think about it. If a URI was allowed and the server sends that URI to client, client will look on their own machine for the file and won’t find it because the URI was specific to your machine. Not other people’s. And sending the images from server to client takes up server bandwidth which is not good. And locally, people can have their modding instances in different folders than you too so absolute URIs would fail anyway.
Yes, this totally isn't an IP Address exposing nightmare, even if I used another site or my own. As for your latter point, I reiterate, emogg exists, works just fine, barely hurts bandwidth, and even THEN your point is slightly invalid, because the client still has to fetch the image from a website. The theoretical machine you're targeting sounds like it's from the 1990s, which wouldn't even be able to run minecraft, let alone network with it.
The images in question are already so absurdly small, if anyones getting hyperfixated over a non-issue, it would be this methodology.
Not even sure what that's supposed to mean. It's really not that complicated. You connect to a server, we ALL have the same images because they're loaded in with the mod, the server has modded in emoji's, assuming you don't already have them, you download them once (caching), and then the mod just references the images already existing on the clients computer. No bandwidth concerns to be found.
Putting it another way, user does :pog:, clinet has a related image for :pog:, pog is loaded from the local file when the server translates that string. It's litterally equivalent to just sending a message, bandwidth is the same, no reaching out to external websites, easy to configure datapacks, jobs done, no security or bandwidth concerns.
Ignoring the back and forth above,
I want to point out the base mod has NO URLS and thus, has nothing to do with any security issue. You have to DELIBERATELY create a datapack using the discord URL to even have discord involved at all.
The trick in the discord server to auto make datapacks is purely for user convenience of just giving it an emoji and the bot spits out a newly made datapack. If you don’t trust it, don’t use it. No one is forcing you to use the discord bot to make the datapack. You can just make one yourself from scratch and use something other than discord.
That’s it. If you don’t trust Discord themselves giving you an image because you believe discord themselves steals ip address (buuz can’t even see your ip address as discord itself provides the images), then you’ll hate that by visiting this github website, you just gave Microsoft your ip address. And so forth as you browse the Internet.
The emoji datapacks are purely optional again. And can point to any service that you want if you don’t trust discord. You’re not forced to use discord so stop hyper fixating on it
False
Ignoring the back and forth above,
I want to point out the base mod has NO URLS and thus, has nothing to do with any security issue. You have to DELIBERATELY create a datapack using the discord URL to even have discord involved at all.
The trick in the discord server to auto make datapacks is purely for user convenience of just giving it an emoji and the bot spits out a newly made datapack. If you don’t trust it, don’t use it. No one is forcing you to use the discord bot to make the datapack. You can just make one yourself from scratch and use something other than discord.
That’s it. If you don’t trust Discord themselves giving you an image because you believe discord themselves steals ip address (buuz can’t even see your ip address as discord itself provides the images), then you’ll hate that by visiting this github website, you just gave Microsoft your ip address. And so forth as you browse the Internet.
The emoji datapacks are purely optional again. And can point to any service that you want if you don’t trust discord. You’re not forced to use discord so stop hyper fixating on it