Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi For background info: http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html Calling EntityClientMP.dropOneItem might do what you want. the boolean parameter is to drop one vs drop all (holding control) -TGG
  2. Ah. That error has nothing to do with the TESR at all. I have seen this problem before. When the player first spawns into the world, it looks for a place that is not occupied by any blocks. Each time it looks in a particular position, it creates an AABB, which takes a little bit of memory. If the position is full, it tries the next position, one higher, creates another AABB, and tries again. Eventually it reaches air, which should always be empty, and stop. In your case, you have incorrectly registered your block so that it has been assigned the ID zero, which is air. So every time the code tries to put the player into air, it thinks it is full because your block has overwritten the air Block. Eventually it creates so many AABB that the memory runs out. Long explanation, simple fix: give your Block a non-zero ID when you create it. If you're not sure what I mean, post the rest of the code where you are creating the instance of your Block. i.e. the public static BlockEleventhTardis blockEleventhTardis = new BlockEleventhTardis(id, material); -TGG
  3. Hi I have to admit I'm a bit confused now about how you're using this. I had assumed: (1) when you hit a mob with your item, it copies the "name" (or other unique identifier) of the mob into the item.\ (2) later, when you "use" the item, it spawns the mob again using the "name". If that's the case, I don't really understand why you couldn't use the "name" that you get from EntityList to create the mob again (using EntityList). Likewise, lookupModSpawn(mobEntity, someDummyBoolean) will give you an EntityRegistration for that entity, which should give you all the info you need to spawn it? Perhaps if you show us how you're trying to spawn your entity? -TGG
  4. Hi I think Draco is right, 100,000 particles is insane, vanilla uses 1 - 10. have you considered largesmoke instead of smoke? If it doesn't suit what you need, it's pretty easy to create your own EntityFX and render whatever you like. A bit of googling will hopefully find you a suitable smoke-rendering algorithm which you can use. -TGG
  5. Hi Did you try EntityList.getEntityString(mobentity)-? -TGG
  6. Hi Keen, sounds like you've nearly cracked it. At a guess - since your other Items work ok - your InnerPower_Essence_WispyEssence doesn't match the filename. Try renaming them both to something very simple, like setTextureName("innerpower:fred"); and fred.png If that doesn't fix the problem, post your code and the error log showing the "using missing texture" error message? -TGG
  7. Hi This is just a guess - perhaps your minecraft is running out of memory / becoming laggy for a different reason i.e. one of your statements is being run very often, is slow, or has a memory leak. For example, I notice your TESR does a few things in its constructor whereas the vanilla TESR don't public TESR(){ EleventhTardis = AdvancedModelLoader.loadModel("/assets/dwadventures/OBJ/Tardis/Model11thDoctorTardis.obj"); tardisTexture = new ResourceLocation("mobdrops:textures/tardisTexture.png"); } I don't expect that the TESR constructor would be called frequently, but if it is that might explain the symptoms. I'd suggest you comment out parts of the code one by one and see if you can find the part which is making it laggy. For example, if your code is still laggy after doing this - // EleventhTardis.renderAll(); then your model rendering is not the problem. Apart from that I'm out of ideas, sorry! -TGG
  8. Hi This link might help. http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html See the Block Rendering sections and especially http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-standard-blocks-cubes.html and http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html -TGG
  9. Hi sorry dude I am way out of my depth with that one. I'd suggest making a really simple model (say - a cube) and exporting it in a range of different sizes to see what's about right. What crash message do you get? Might be nothing to do with your model at all -TGG
  10. Hi This thread is a bit similar to what you're trying to do. http://www.minecraftforge.net/forum/index.php/topic,14923.msg75964.html#msg75964 I think the proposed answer was to check the enchantments every tick and remove any which were incompatible. -TGG
  11. ha yeah you're going to kick yourself :-) model is null because you've given your RenderKeeper constructor the wrong name... -TGG
  12. WorldEvent.Load and .UnLoad might be useful to you, the player can't join or leave a server without these events being fired. Alternatively IConnectionHandler; NetworkRegistry.instance().registerConnectionHandler -TGG
  13. Hi I think the problem is that your TileEntity is never being created. In order for your TileEntity to be created, it needs to be created by your Block. I forget exactly how it looks, but based on BlockSign you need public class BlockMyBlock extends Block implements ITileEntityProvider or alternatively public class BlockMyBlock extends BlockContainer and you need to override createNewTileEntity Do you want your TileEntity to do the rendering, or your Block, or both? -TGG
  14. Hi To be honest, I don't think it's a failing of the Object inheritance model, it's a feature. OO is all about encapsulation and preventing you from having to know the details of how an object is written, and allowing you to make changes to objects without breaking all your existing code. Inheritance is intended for the situation when your derived class can always be substituted for the base class(es), and it should not be possible to violate this by ignoring what the super class says. The problem in the case of the Zombie is that the vanilla code has been designed with the two incompatible assumptions that all zombies burn in sunlight, and that only zombies can call to each other for aid. That's not a failing of the inheritance model, that's a design decision. I do agree that there's a tendency for folks to use inheritance when they should use something else such as interfaces or composition. -TGG
  15. Hi The information about what the player is currently looking at is stored in Minecraft.objectMouseOver. See Minecraft.clickMouse(). It is updated in EntityRenderer.getMouseOver. You have the right idea, actually the vanilla code does pretty much exactly that. -TGG
  16. Hi I am told by experts that there is no way in Java to call super.super.method. Which means that if you want to call EntityMob.method directly, you're out of luck. You will either need to copy the code from EntityMob.method into your own Entity (which might not work if it accesses any private variables or methods), or derive from EntityMob instead. (Copy the EntityZombie code into your own Entity). -TGG
  17. Hi In that case, try GL11.glTranslatef(dx, dy, dz) before and (-dx, -dy, -dz) after the glRotatef. dx, dy, dz is how much you need to move your centre of rotation by. This will change the centre point of rotation - i.e. you need to translate your model to the origin, rotate around the origin, then translate it back again. I have to admit I'm not 100% sure about the correct translation to do after the Rotatef. I think -dx,-dy,-dz is right, but you might need to play around to make sure. -TGG
  18. Hi I would suggest to use GL11.glRotatef(angle, rotationaxisx, rotationaxisy, rotationaxisz) immediately before you render the model. This rotates by the given angle around the rotationaxis you specify. Is that what you meant? -TGG
  19. Hi Hmmm ok In RenderGlobal.renderEntities, add the following line this.theWorld.theProfiler.endStartSection("entities"); for (i = 0; i < list.size(); ++i) { entity = (Entity)list.get(i); if (entity instanceof EntityLavaball) { System.out.println("rendering EntityLavaball"); // breakpoint here } when it breaks, see if you can trace through and see why it isn't getting to RenderManager.instance.renderEntity(entity, par3); -TGG
  20. Hi I'm not sure what you mean by that. do you mean that when you got to the line render = this.getEntityRenderObject(par1Entity); your par1Entity is the EntityLavaball, render was set to null? or do you mean that renderEntityWithPosYaw was never called for your EntityLavaball at all? -TGG
  21. Hi Your block and item have no texture name and you haven't registered the Icon properly. What is this part of your block intended to do? :-) @SideOnly(Side.CLIENT) public void registerIcon(IconRegister icon) { blockIcon = icon.registerIcon("basic:icon_blender"); } I think you have got the signature wrong, you can pick up this type of error by using @Override eg @SideOnly(Side.CLIENT) @Override public void registerIcon(IconRegister icon) { blockIcon = icon.registerIcon("basic:icon_blender"); } -TGG
  22. Hi The new Keybinding looks similar to the old one except for a new field in the constructor which appears to be a category description eg from GameSettings: new KeyBinding("key.hotbar.1", 2, "key.categories.inventory") new KeyBinding("key.sprint", 29, "key.categories.gameplay"); It looks like there is an intention to create a MouseInputEvent and KeyboardInputEvent but it looks like they're unfinished. For now, I would suggest you create the KeyBindings, register them with ClientRegistry.registerKeyBinding, then check your KeyBinding every tick to see if it's being pressed. Have a look in KeyBindings from 1.6.4. to figure out which 1.7.2. method is which, they're pretty similar. -TGG
  23. Hi I think the core of the problem here is that we're not really understanding what you want to do. i.e. you're making a block that is a gas, but then you mention something about the block moving upwards and stopping at layer 255? So my impression is that you want something like eg a toxic bog of eternal stench that belches out a block of gas occasionally which slowly rises its way up to layer 255 then stops and just sits there. Is that right? Perhaps if you provide a bit more explanation and background we can help you more... -TGG
  24. keen :-) I'd sure use it plenty.
  25. Hi I don't see an obvious problem but some thoughts... I've been told it's better to use EntityRegistry.registerModEntity instead of registerGlobalEntityID. (But I doubt this is causing your rendering problem) I'd suggest that you put a breakpoint into RenderManager.renderEntityWithPosYaw render = this.getEntityRenderObject(par1Entity); // breakpoint here if (render != null && this.renderEngine != null) { or alternatively if (par1Entity instanceof EntityLavaball) { System.out.println("rendering EntityLavaball"); // breakpoint here } render = this.getEntityRenderObject(par1Entity); if (render != null && this.renderEngine != null) { then trace into it to see why your desired renderer isn't being retrieved. Or alternatively, if it's being retrieved, why the render code isn't working. -TGG
×
×
  • Create New...

Important Information

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