Jump to content

OmniSapien

Members
  • Posts

    27
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

OmniSapien's Achievements

Tree Puncher

Tree Puncher (2/8)

7

Reputation

  1. Just wondering, does anyone know how viewports work in OpenGL? If so, please post whatever information you can about them. I understand the concept well but I don't completely understand the implication methods. Are they part of the matrix? Are they independent? Do all things instantly get place into the viewport or do only render calls made after the viewport declaration get placed in the viewport? I've tested with them a little bit and all sorts of visual errors are being thrown my way so I don't think I'll be learning much about the semantics that way anytime soon. Any help is greatly appreciated! Thank you all in advance!
  2. Look at the code for the Brewing Stand's TileEntity-specific renderer, that's where you'll find what you need.
  3. Thanks for the concern Mazetar And yes I did figure out what my issue was - the ModelBoxes were being loaded after the first render call had been made to the ModelRenderer therefore the OpenGL Display List's were being compiled before the Model was properly created. The fix isn't easy, seeing as the compile variable and the method for compiling models are both private in ModelRenderer, but I've made a workaround
  4. I need help rendering a model without a TileEntity, Entity, or anything else. Does anyone know if there is a class with a method somewhere in the Minecraft code that renders ONLY a given model with a texture without requiring anything along the lines of an Entity? If not, can someone point me in the direction of how to accomplish this? Any help at all would be greatly appreciated. Thank you in advance!!!
  5. For your GUI issues: http://www.minecraftforge.net/wiki/Containers_and_GUIs - that's a tutorial on that kind of stuff. For your custom model for blocks, just use the bindTileEntitySpecialRenderer(Class <? extends TileEntity>, TileEntitySpecialRenderer) method in client registry. If you need any specification, feel free to ask Also, you can look at the code for the EE3 Calcinator by Pahimar in github for custom block models. A lot of the minecraft code I've learned from the open source mod, EE3, so it's a good piece of code to look at in general.
  6. Simply have a TickHandler check the player inventory at the hotbar's slot id's and if one of them is your item, apply the desired effect.
  7. Can anyone explain to me how session.lock works and how to avoid getting it to throw an Exception? I've been having a lot of issues lately because I am saving data into a custom file in the current world's save file. If a stack trace is needed, it is below: [iNFO] [sTDERR] net.minecraft.world.MinecraftException: The save is being accessed from another location, aborting [iNFO] [sTDERR] at net.minecraft.world.storage.SaveHandler.checkSessionLock(SaveHandler.java:104) [iNFO] [sTDERR] at net.minecraft.world.World.checkSessionLock(World.java:4001) [iNFO] [sTDERR] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:120) [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:232) [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.unload100OldestChunks(ChunkProviderServer.java:328) [iNFO] [sTDERR] at net.minecraft.world.WorldServer.tick(WorldServer.java:166) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:668) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598) [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:123) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497) [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
  8. I've created a system that creates an NBTTagCompound and saves it in a file in the current save file. Every time a player logs in, it reads from the NBTTagCompound in the file. Every time a player logs out, it writes the NBTTagCompound to the file. If there is no file when it attempts to read the file, it runs the writing method to create a new file with a blank NBTTagCompound. However, while this system works quite well for me, the chunk data will not save due to a session lock error. The error is below. net.minecraft.world.MinecraftException: The save is being accessed from another location, aborting [iNFO] [sTDERR] at net.minecraft.world.storage.SaveHandler.checkSessionLock(SaveHandler.java:104) [iNFO] [sTDERR] at net.minecraft.world.World.checkSessionLock(World.java:4001) [iNFO] [sTDERR] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:120) [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:232) [iNFO] [sTDERR] at net.minecraft.world.gen.ChunkProviderServer.unload100OldestChunks(ChunkProviderServer.java:328) [iNFO] [sTDERR] at net.minecraft.world.WorldServer.tick(WorldServer.java:166) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:668) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598) [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:123) [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497) [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) Does anyone know how to fix this? I've only found one thing relating to this, which is a tutorial by Mithion about saving NBT to files, but it dates back to 1.2.5 and his methods are not working. Thank you in advance for any response!
  9. Haha I had the exact same problem just this morning I figured it out though, so don't worry. Explanation via words: First, you're going to need to get the server instance from ModLoader ( ModLoader.getMinecraftServerInstance() ). Then, you're going to need to get the folder name of the server instance ( .getFolderName() ). Store that for later. Next, get the ISaveFormat from the server instance ( .getActiveAnvilConverter() ). After that, obtain the SaveHandler from the ISaveFormat and give it the folder name we stored earlier as well as a boolean as to whether or not to mkdirs for the player folder (I just use false) ( .getSaveLoader(folderName, false) ). Then, just get the saveDirectory from the SaveHandler ( .getSaveDirectory() ). Explanation via code: MinecraftServer mcServerInstance = ModLoader.getMinecraftServerInstance(); String folderName = mcServerInstance.getFolderName(); ISaveFormat saveFormat = mcServerInstance.getActiveAnvilConverter(); SaveHandler saveHandler = (SaveHandler)saveFormat.getSaveLoader(folderName, false); // You will have to typecast here File saveDir = saveHandler.getSaveDirectory(); Hope this helps! Ask any questions if you have them and I'll try to answer them.
  10. Thank you so much! I've been searching for it for quite a while
  11. I basically need to know when a player logs off of a world or when a server shuts down (singleplayer) and was wondering how to go about this. If you are wondering why I need to know when a player logs off or when a server shuts down, it's because I need to be able to save some NBT data when either of these events occur. Thank you for any help!
  12. I'm not sure about the on the fly part, but you can make an armor invisible, just change the texture file to all alpha.
  13. Here's a tutorial I used to learn world gen - I haven't used these skills in a while though, so the tutorial might be outdated - http://wuppy29.blogspot.com/2012/08/forge-modding-132.html Just click on ore generation. If your going to want a similar system to pumpkins, you will probably want to select a random x and z coordinate pair then add some small random values to them each time you place a new block. That way you will have a sort of group of your block spawned. To assure that they lie on top of Grass, use a loop to start the random block's Y position at 0 and progressively increment it until the block at that position is Grass. Then, place your block at a Y position 1 greater than that.
  14. Thank you for the very quick reply! Btw, I thought your username looked familiar, I'm quite a fan of your CameraCraft mod - Especially the ability to colorshift your pictures. Anyway, I've tried using the method in Entity getEntityData(), but the data I insert into the NBTTagCompound is carried over across saves. It still appears to be Player specific, which is what I want, but it is not World specific, such as inventories and experience. Do you by chance know the reason for this? Thank you in advance!
  15. Thank you for your reply! Do you know of any example code I can look at that demonstrates this accurately? I tried a bunch of different styles of writing and reading in the CompressedStreamTools and all result in the same phenomenon. If it helps you to know what I am attempting to achieve, I am trying to add an attribute to each Player that is Player and World specific - similar to inventories, experience levels, etc. However, I am still glad to learn anything I can about this topic in general, so any information would be greatly appreciated! Thank you once again for your reply!
×
×
  • Create New...

Important Information

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