Jump to content

Stjubit

Members
  • Posts

    63
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Austria

Stjubit's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. Oh okay, I thought of that, but I thought that it would be a bad solution. Thanks, Julian
  2. Hello, I have got 2 blocks which are accessing the same TileEntity. Now I want to have different TileEntitySpecialRenderers for this Block, but I can only register one TESR in the proxy like this: ClientRegistry.bindTileEntitySpecialRenderer(WirelessTypeTileEntity.class, new WirelessTypeRenderer()); How can I achieve this? ~Julian
  3. Hello, I have a Block which needs to call a method when it is destroyed. Is it better to use the onBlockDestroyedByExplosion() and the onBlockDestroyedByPlayer() in the Block class to do it, or should i register a BlockBreakEvent? I really need to call it EVERY TIME when the block is destroyed. Thanks, Julian
  4. That's why my Thread started with "Hello, I have a simple question:"
  5. Hello, I have a simple question: How can I identify a player (EntityPlayer) best? I mean, getting his name is very unsafe, I think. (offline mode) Is there another way to identify a player? Thanks, Julian
  6. Just change the x,y and z coordinates into the required position. So, for example, if you like to move the particles to the right, just increase/decrease the x/z coordinates in the spawnParticle(..) method: world.spawnParticle(spell.castState < 4 ? EnumParticleTypes.FLAME : EnumParticleTypes.LAVA, 3+spell.prevPosX + (spell.motionX * j) - world.rand.nextFloat() * 0.5F, spell.prevPosY + (spell.motionY * j) - world.rand.nextFloat() * 0.5F, spell.prevPosZ + (spell.motionZ * j) - world.rand.nextFloat() * 0.5F, 0, 0, 0);
  7. You will need to add the slots in your Container class in the constructor by calling this.addSlotToContainer(new Slot(...)); Here's an example of adding the player's inventory and hotbar to the Container: PS: You will also need to override the transferStackInSlot(...) method. It's called whenever a player is pressing SHIFT on an Item. PPS: Noone wants to see a Thread like yours. Please use the BB-Codes spoiler+code to make the Thread much easier to read.[/code]
  8. You just need to check if the text field is focused and if this is true, you have to check if the char is in the valid pools. If it's not focused, you have to call super.keyTyped(c, keyCode). Here's an example how I did it: (tfFrequency is a Number-only textfield. 48 - 57 are the numbers from 0-9 and 8 is Backspace/Delete and 43,45 are +/- I hope it helps, Julian
  9. It works! Thank you very much, diesieben07! Julian
  10. Nope, I'm doing that correctly. I debugged the mod and it sets the values correctly. I googled my new problem a little bit and it seems that it doesn't work because of an bug. So I've got a new idea: Making 2 ModelRenderers for every Layer like that: - Layer1ON - Layer1OFF - Layer2ON - ..... ...and setting different texture offsets in the constructor. Then in the render method I will just render the right on ON or OFF. I hope that works
  11. In the time I tried to do it like you described I found another way to do it, which may be a little bit easier, but I have a bit of a problem. I tried to change the texture offset based on the actual state, which should work fine, but it doesn't. The crazy thing about it is, that it changes the texture offset correctly to the coordinates I want to, but it won't be shown. Is there something like an update function or something like that? Here is my code:
  12. Oh, I think that I understand it. So, I'm binding the texture for Layer1, then I render Layer1, then I bind the texture for Layer2, render Layer2, .... Am I right?
  13. Thank you for your answer, but I can't figure out how to do this. This is my model-class: I want to give Layer1 - Layer4 custom textures. ...and this is my TileEntitySpecialRenderer-class: Do you mean that I have to call the render()-method for each ModelRenderer instead of the whole class? But If I do so, I can't use this.bindTexture(...), or am i missunderstanding something?
  14. Hello, In my model class (extends ModelBase), I have a few ModelRenderer objects (for every cube in the model). For now, I have the texture for all of them in one file. (Like the chest's normal.png). But the problem is, that I need to change the texture of 4 ModelRenderers by the current state of the Block. That means, that there are 16 different possibilities the texture can be. If I could seperate the textures of this 4 ModelRenderers, I would only need 3 textures for this block. (1 for the other ModelRenderer's and 2 for the states ON/OFF for the 4 ModelRenderers) Is there a way I could do this? I've looked into the TileEntitySpecialRenderer class, but the texture is bind with this.bindTexture(..) and I can't figure out how to seperate it. Thanks, Julian
×
×
  • Create New...

Important Information

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