-
Posts
444 -
Joined
-
Last visited
Everything posted by brandon3055
-
It would hep if you showed all of your code but it should contain world coardinates. If i remember correctly you need to recreate your bounding box each time you use it you cant just store it as a constant variable.
-
How do you handle items with with lots of nbt?
brandon3055 replied to brandon3055's topic in Modder Support
That did it!!! Thanks. And i should be able to use a custom packet to synchronize the few tags i need for the item renderer. I will just have the client send a request to the server if the client side item dose not have a tag compound. -
How do you handle items with with lots of nbt?
brandon3055 replied to brandon3055's topic in Modder Support
The error seems to occur when spawning the item in the world. And based on the error log i believe the error is occuring when the server tries to send all that data to the client. But the client doesn't need to know about all of the stored items so would there be a way to limit what is sent to the client? -
How do you handle items with with lots of nbt?
brandon3055 replied to brandon3055's topic in Modder Support
Well thanks anyway. Will let you know if i figure it out. -
How do you handle items with with lots of nbt?
brandon3055 replied to brandon3055's topic in Modder Support
I think this is all the relavent code DraconiumChest extends BlockCustomDrop BlockCustomDrop extends BlockContainer TileDraconiumChest extends TileEntity implements IInventory, IEnergyHandler, ICustomItemData I think thats everything related to saving to the item. -
How to add the <<universal.jar>> to my project ?
brandon3055 replied to Hamster_Furtif's topic in Modder Support
Regarding you item problem. You are running your code client side. You need to run it server side if (!world.isRemote) -
How do you handle items with with lots of nbt?
brandon3055 replied to brandon3055's topic in Modder Support
Oh yes when i test things i test things to the limit. But i pushed the thermal expansion strong box even further and it did not have that problem. My forge version is 10.13.2.1286 Edit: To give you an idea of how much nbt data is being saved. 1 mystcraft page contains a single string tag 1 creative spawned notebook contains 216 pages multiply that by the 234 slots in my chest and you get a total of 50,544 string tags! Edit2: I just put 4x that into a strong box and aside from dropping the tps to 0 the instant i picked it up it works just fine. Then it crashed the game with a Ticking player exception. -
By that i mean a LOT of nbt data. I have a custom chest that stores its inventory when harvested. For the most part it works perfectly except when you load it up with items that have lots of nbt data (For testing i am using creative spawned mystcraft notebooks) it kicks you out of the game when you try to harvest it. This is the error log And when i try to log back in it kicks me again with the same error. I know there is a way around this because thermal expansion dose not have this problem with its strong boxes. But i cant figure it out... Dose anyone have any suggestions?
-
"You posted under my thread by the name of "Custom Model Resolution". In your description you are saying you are the Author of Draconic Evolution. The Block in your mod that is named "Particle Generator" has a model, which parts got a higher resolution than the standard Minecraft resolution. I am searching for an explanation how to do that." I have nothing against PM's but since you already have a thread for this you may aswell use it. That block uses a higher resolution texture but it involves more then just the texture. It is also different depending on what type of model you are using. For a tellelator model (which is what the particle generator is) you just draw a larger portion of the texture sheet. But im guessing you are probably using a techne model. If that is the case i am afraid i dont know how to change the resolution for that. If i had to guess i would say you could probably just make the model twice the size you want and then reduce its scale by 50% when you render it. That would give toy the equivalent of a 32x texture.
-
Anyone know what makes the dev server run so slow?
brandon3055 replied to brandon3055's topic in Modder Support
All mobs. Upon further investigation there seems to be some latency between the client and server because i am also noticing block breaking lag. Although i don't know how that is even possible when both the server and the client are running on the same machine... -
Anyone know what makes the dev server run so slow?
brandon3055 replied to brandon3055's topic in Modder Support
Ok so there is nothing wrong with the tps it was just out of ram. But the reason i thought that the tps was always low is because for some reason mobs are really laggy. Even when the tps is at 20. This is something i have noticed since i started modding but i only just got around to investigating it. Note to self: Next time i investigate lag. Make sure i don't have two other instances of minecraft running in the background including one very ram hungry mod pack... -
Just to clarify. You do NOT need a tile entity for an inventory you just need a class that implements IInventory. The tutorial linked by BinaryCPG explains how to create and use an IInventory class for items.
-
First off. Is this a known problem or is it just me? When i run the server in my workspace it is extremely laggy with an average tps of around 10. I am 99.99% sure this isnt a problem with my mod because it is currently being used in a lot of different mod packs including and official FTB pack and i haven't had a single report about lag. So dose anyone have any idea what could cause this?
-
Resolution refers to the texture. Do you mean the scale? (size of the object)
-
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Yea.... Ok int array it is! -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Well i dont care at all about schematics but i do care a little about the size of the file. 2 byte arrays would be half the size of an int array. But then again the schematics wont be that big anyway so in the long run it may not matter too much. And on second thought i dont need to learn byte manipulation to use two bytes i can probably just use a math function. Now i wish i paid more attention in maths class lol. Edit: I guess i did pay attention in math class!! int value; byte b1 = (byte)(value % 127); byte b2 = (byte)(value / 127); int result = (b2 * 127) + b1; -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Ok so im going to have to learn a bit about byte manipulation and do the same thing. -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
One more question. I noticed in the Schematic file format the blocks are saved in an int array. But it occurred to me that the max value of a byte is 127 or 256 if you take advantage of the full range. However with mods block id's go much higher then that. Im just wondering if anyone knows how things like world edit get around that? The only thing i can think of is to use an int array instead but im sure there is a better way because an int for each block would be very inefficient. Or is an int only as big as its value when saved to a file? Tested and now know that an int is infact bigger on disk then a byte even if it has the same value. Not that i think about it that was probably a stupid question. -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
A schematic file is just an .nbt with a different extension but with a known set of root-level keys. What i meant by that is i would have spent hours trying to make something that dose exactly what CompressedStreamTools dose. So after looking at both methods i think i will be going with CompressedStreamTools because it looks easier to deal with then Gson. -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Thankyou for all your help! If it wasn't for all your help i would have spent hours messing with input and out put streams and who knows what else... But as it turns out this is going to be the easiest part of the hole project! @Awesome_Spider I will keep those links and look at them later because im sure that will come in handy at some point. But i am in love with the idea of writing the structure to nbt because nbt is soo easy to use. So i think i will be going with CompressedStreamTools. Unless i take a look at what you posted and like it even more... Actually now that i think about it being able to write an object to a file would probably be easier... Will have to take a good look at both before i decide for sure. -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Thanks. I have just started researching file io. There are still some unknowns but from what iv got so far it looks simple enough. My biggest concern when learning to do something like this is that i will learn how to do it one way. And there will be another easier and more efficient way that i missed. Edit: You proved my point exactly! I was trying to figure out how to turn a structure into some sort of data format that i could read and write with FileInputStream and FileOutputStream. But with CompressedStreamTools it looks like i can just use an NBTCompound! -
Reading and writing of structures to a file.
brandon3055 replied to brandon3055's topic in Modder Support
Thanks that will be a massive help! Im also interested in information about actually writing that data to a file however im sure thats just simple java stuff that i can figure out myself. I can probably just modify it to use the name instead of the id. Would be a larger file but im not too concerned about that. Edit: or i could add a key that assigns the id of every type of block in the structure to the name of the block. -
Im about to start working on a project that involves taking an in game structure and writing it to a file (including tile nbt data). Then reading that file and turning it back into an in game structure in much the same way the world edit plugin works. Given enough tile i can figure it all out myself but i am very new to file io with java so i am just wondering if anyone can point me to some good tutorials dealing with stuff like this.
-
A while ago there was a bug in thermal expansion that affected item rendering and the result was something like this. That bug has since been fixed in TE but it seems i now have a similar problem myself. If i recall correctly it was something very simple like they forgot to enable a GL11 function or something along those lines but i cant remember what it was and no matter how hard i look i can find the post that mentions it. So dose anyone here know what causes this? Edit: 30 seconds after posting i thought of GL11.GL_ALPHA_TEST which seems to have fixed the problem. However somewhere along the line i seem to have broken my particles... Cant seem to win today lol. Edit2: And now thats fixed. Turns out i just left glDepthMask enabled in one of my other questions. Which actually brings be to another question... What are the default states for things like glDepthMask and GL11.GL_BLEND because i have looked at a lot of rendering code and some leave them enables and others leave them disabled.
-
Having a little trouble with my workspace...
brandon3055 replied to brandon3055's topic in Modder Support
Im not sure if im using the gradle import. I just clicked the "Unlinked Gradle Project" popup that has been harassing me whenever i open the workspace.