Jump to content

[1.10.2][SOLVED BY MYSELF] Loading external resources (textures,sounds, etc)


lukas2005

Recommended Posts

Hello i am trying to load external classes into minecraft rutime. i have class in .minecraft/CustomExtClasses/myclass.(class/java i'm not sure what's correct) and i want to load it into minecraft

and if you want a whole idea for my mod then:

mod connects to a mysql database gets the list of items and the location in web of the "content pack" minecraft downloads it an loads it into runtime and registers evrything

i do not want to modify the vanilla code

Link to comment
Share on other sites

This is a terrible idea. Downloading code and running it is a security hole the size of texas.

yes i know that i'm not coding from today but people will do not have the acces to the server and my mod will be loading only specified classes and resources and also i will try to make security system to prevent people to modify the code

Link to comment
Share on other sites

There was an issue a few months ago with a specific mod, that did something like this. It would get a list of patreons on startup, from a database, and render the skins of them etc in a few machines.

Guess what happened when one day, the db was down.

Crashes, everywhere. Every damn server that had this mod (which was in a pack distributed by FTB, so not few cases, mind you). The dev's github had an explosion of angry server-owners and an even larger host of seriously annoyed players that morning.

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

There was an issue a few months ago with a specific mod, that did something like this. It would get a list of patreons on startup, from a database, and render the skins of them etc in a few machines.

Guess what happened when one day, the db was down.

Crashes, everywhere. Every damn server that had this mod (which was in a pack distributed by FTB, so not few cases, mind you). The dev's github had an explosion of angry server-owners and an even larger host of seriously annoyed players that morning.

i know that this can happen but i arelady found and fix for this database will be just to add/remove/update items and in case of db was down / user does not have the internet connection i will just load only items wich are arelady downloaded

EDIT :

i even tested this i shutdown a db for a sec and the only thing that happened is that items from db wasn't in the game but i will fix that

Link to comment
Share on other sites

If items/blocks are not registered, then all memory of them in a world will be erased whenever and wherever their chunks are loaded. Players who've worked hard for rare items/materials will be irate. Even worse, the block IDs in a world could be scrambled so that chaotic substitutions appear.

 

If you want some kind of automatic update, you need to design it so that absence of a DB connection leads to running with the last known good download.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

[glow=red,2,300][/glow]

If items/blocks are not registered, then all memory of them in a world will be erased whenever and wherever their chunks are loaded. Players who've worked hard for rare items/materials will be irate. Even worse, the block IDs in a world could be scrambled so that chaotic substitutions appear.

 

If you want some kind of automatic update, you need to design it so that absence of a DB connection leads to running with the last known good download.

There was an issue a few months ago with a specific mod, that did something like this. It would get a list of patreons on startup, from a database, and render the skins of them etc in a few machines.

Guess what happened when one day, the db was down.

Crashes, everywhere. Every damn server that had this mod (which was in a pack distributed by FTB, so not few cases, mind you). The dev's github had an explosion of angry server-owners and an even larger host of seriously annoyed players that morning.

i know that this can happen but i arelady found and fix for this database will be just to add/remove/update items and in case of db was down / user does not have the internet connection i will just load only items wich are arelady downloaded

EDIT :

i even tested this i shutdown a db for a sec and the only thing that happened is that items from db wasn't in the game but i will fix that

as i said when db will be down then my mod will load all last known items and do not try to connect and messup whole world and can we stop wondering WHAT IF and go back to main topic?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.