Jump to content

voidzm

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by voidzm

  1. Well, after poking around in the server configuration, it appears that the default FML/MCP server.properties has the server configured as level-type=LARGEBIOMES. And after looking in the implementation of GameRegistry.addBiome, it appears that it only adds (or removes) biomes from WorldType.DEFAULT. I set the level-type to default, and it works perfectly now. I suppose I could make the biomes work on Large Biomes as well if I wanted to do it manually, but at least it works.
  2. You need to have a class that implements IGuiHandler, look it up to understand how to use it. Essentially you have a IGuiHandler that takes a ID specific for the GUI you want to open, and returns the GUI object on the client, and the container object on the server. You register this handler with your NetworkRegistry, and then you can open the GUI from your block by calling par5EntityPlayer.openGui(MyMod.instance, 0/*this is the gui-specific ID, pick whatever you want*/, par1World, par2, par3, par4);
  3. I'm in the middle of working on a biome for my mod, and I needed to test something using the full client/server setup (this is NOT the internal single player client and server, or the LAN server). I started the server using the Run>Server to select the server, then I started the client and connected. The content and functionality of the mod is all intact, but for whatever reason the changes I made to the biomes with GameRegistry.addBiome(); // for adding my custom biome and GameRegistry.removeBiome(); // for temporarily blocking the vanilla biomes don't reflect at all when I run the client/server. This DOES work perfectly when I use regular singleplayer, but the server seems to completely ignore the commands. Any world I generate with the server consists of solely the vanilla biome list. Is there some other command I have to issue to get the server to register these changes, or am I just missing something stupid?
  4. I've been having some trouble the last few days with a bizarre issue while generating new chunks. Within a few minutes of flying or walking in a particular direction, the game acts as if the server "hung up" on the client and isn't communicating at all. (This is on single-player.) The world stops generating, creating a black "wall" on the side of the world where lighting hasn't been calculated. Items don't drop, mob AI stops, block placing makes no sounds, and all other symptoms of what would be considered a read-time-out on MP occur. In some of these cases, the internal server reconnects after a few minutes and the world starts ticking again, but it usually stops again after only a few moments. I have been testing this in an area with custom generation, but I've verified (with debug messages) that the game is not hanging in my decoration function. So I don't think my decorators are causing this issue. Let me know if you know what is happening here or if you know how to fix it. I'm pretty confused... :-/
  5. I have a block that I am working on that uses an ISimpleBlockRenderingHandler for a custom appearance. There are no problems with the rendering itself, but whenever I try to break the block, the two different textures that are drawn in the block light up with the breaking texture for their counterparts in the default "terrain.png" texture sheet. This doesn't happen with regular blocks that don't use a custom renderer. To clarify that, if I have part of my block drawing the 32nd texture from my preloaded mod texture sheet, while I'm breaking it it shows a pale highlight of the Gold Ore texture, which occupies slot 32 on the default sheet. I'm looking for a way to either redirect the breaking overlay to my texture sheet or disable the breaking animation altogether. I poked around in the code a little and as far as I could tell the "terrain.png" link is hardcoded into the breaking render function, so I may only be able to disable it...
  6. Well, after much fruitless Googling, I found what my problem was. Apparently my "updateBoundingBox" method needed to be called the same thing that it is called in BlockFence and BlockWall, which is "setBoundingBoxBasedOnState". For some reason, Minecraft calls that particular function and then the "setBlockBounds" call applies only to the block in question. It doesn't look like the AABB function does much except for entity raytracing and pathfinding, so that had nothing to do with it. Hope someone else finds this useful!
  7. I'm trying to create a block that changes the way that it renders based on whether blocks of the same ID are directly next to it. I've implemented an ISimpleBlockRenderingHandler that takes care of the rendering itself, and that works perfectly, but I'm having trouble getting the bounding box of the blocks to appropriately update. My renderWorldBlock function calls back to the source block to update its bounds with this code: public void updateBoundingBox(IBlockAccess world, int x, int y, int z) { float lowX = 0.25F; float lowY = 0.25F; float lowZ = 0.25F; float highX = 0.75F; float highY = 0.75F; float highZ = 0.75F; if(world.getBlockId(x+1, y, z) == this.blockID) { highX = 1.0F; } if(world.getBlockId(x-1, y, z) == this.blockID) { lowX = 0.0F; } if(world.getBlockId(x, y+1, z) == this.blockID) { highY = 1.0F; } if(world.getBlockId(x, y-1, z) == this.blockID) { lowY = 0.0F; } if(world.getBlockId(x, y, z+1) == this.blockID) { highZ = 1.0F; } if(world.getBlockId(x, y, z-1) == this.blockID) { lowZ = 0.0F; } this.setBlockBounds(lowX, lowY, lowZ, highX, highY, highZ); } Each time I place a new instance of the block, every single instance of the block in the world changes its bounding box as well, as if this is modifying the global setting for the block. I've also tried implementing this function which I saw in BlockFence: public AxisAlignedBB getCollisionBoundingBoxFromPool(IBlockAccess par1World, int x, int y, int z) { float lowX = 0.25F; float lowY = 0.25F; float lowZ = 0.25F; float highX = 0.75F; float highY = 0.75F; float highZ = 0.75F; if(par1World.getBlockId(x+1, y, z) == this.blockID) { highX = 1.0F; } if(par1World.getBlockId(x-1, y, z) == this.blockID) { lowX = 0.0F; } if(par1World.getBlockId(x, y+1, z) == this.blockID) { highY = 1.0F; } if(par1World.getBlockId(x, y-1, z) == this.blockID) { lowY = 0.0F; } if(par1World.getBlockId(x, y, z+1) == this.blockID) { highZ = 1.0F; } if(par1World.getBlockId(x, y, z-1) == this.blockID) { lowZ = 0.0F; } return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)x + lowX), (double)((float)y + lowY), (double)((float)z + lowZ), (double)((float)x + highX), (double)((float)y + highY), (double)((float)z + highZ)); } This doesn't help at all. I'm rather confused with this, since I've basically copied what BlockFence does for its bounding, but for some reason it won't work on the per-block level.
×
×
  • Create New...

Important Information

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