Jump to content

daafganggdg

Members
  • Posts

    141
  • Joined

  • Last visited

Everything posted by daafganggdg

  1. Hey guys, Im trying to make an own mob and got stuck on getting it to move around and do stuff like other mobs I found the AI tasks, so im right on creating my own tasks extending EntityAIBase? (I'm making a flying mob so I dont want to use the normal tasks) Where am I going to handle the tasks, like starting and finishing them? Only found the method protected void updateAITasks(){} in EntityLiving but aint sure what to do there.. Thanks in advance
  2. So, that item is supposed to explode only? then why are you copying the bow code? I mean, copy paste ftw, but that's absolutly unnecessary
  3. minecraft always calls that kind of methods twice once with the client word once with the server world: public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer steve){ System.out.println(world.isRemote); return stack; } This would print out: true false I'm not too sure about the code tho (I'm somewhat new to coding) But what i think happens is u check for coor1 to be true and then call ur own method with the client world, then u set coor1 to false. When the method actually gets called with the server world coor1 is false and you ofc dont call the method, so, Maybe just put the whole code in onItemRightClick in a if(!world.isRemote)
  4. I think the KeyEvent class has all the ID's for Keyboard.isKeyDown(int)
  5. is public static void romper(World world,List<Integer> lis){ a minecraft method or do you call it yourself If you call it show the code you call it with. There are basically 2 worlds, the client world and the server world.
  6. from where are you destroying the block? you can detect the side with world.isRemote, returning true for client, false for server
  7. In the addInformation method use list.add(EnumChatFormatting.AQUA + "Awsome String");
  8. thats NOT how you use an array OP said on right click. Too the actual problem I guess the crate is a block? There's the method public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){} you want to override in your Crate class, There you can do your operations I personally would create an Item Array (a list is probably somewhat smarter) generate a random number spawn a EntityItem in the world with yourItemArray[yourRandomNumber] then say world.setBlockToAir(x, y, z); and there you go
  9. The method handling slot clicks is public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer player){} in the Container class but it's somewhat hard to read into it I guess..
  10. you can use itemstack.isItemEqual(Items.coal)
  11. alright I stick to my TESR for now thanks a lot anyway
  12. Uhhm Im not that sure anymore if I need that package thing, I tried it with checking for the same blocks to be around in my Renderer class, placed around 100 of my blocks into the world and i still have 60 fps (as always) and no spikes or anything, what do you think, is that a bad programming technique?
  13. And then I can read it out from the entity I get as a parameter in renderTileEntityAt?
  14. Sry but I don't really understand what that should do.. I came up with that code public Packet getDescriptionPacket() { NBTTagCompound nbt = new NBTTagCompound(); for(int i = 0; i < 8; i++) { nbt.setBoolean("connections" + i, connections[i]); } return new S35PacketUpdateTileEntity(var1, var2, var3, var4, nbt); } what are the other parameters for the S35PacketUpdateTileEntity? what do I have to do in the onDataPacket and how is that goin to help me getting the booleans in my Renderer class?
  15. Why not use the itemDamage for that? then you would also have somewhat of a visual effect for the cooldown (I think you can disable it if u dont want it)
  16. Im not [glow=black,2,300]really [/glow]looking for performance, I'm just scared of gettin lags So whats the best solution for me? How am I going to use the getDescriptionPacket and onDataPacket?
  17. When I do that package sending every time I render my block, isnt that going to slow down the performance? cause the block is actually going to connect visually to other blocks, just in more possible ways than I could use the metadata for, So would it be a better idea I just check for the blocks around in my render method?
  18. Ok lets start again at the beginning, I need to store 8 booleans custom for every block and need to be able to get them in my TileEntitySpecialRender class, how would I go on doing that?
  19. Well I dont know im just testing around, basically I want to render my block different depending on 8 booleans stored in the tileEntity, how else would I go on doing that? I'm kind of stuck..
  20. Hey guys, I have a block with a TileEntityXY and a TileEntitySpecialRenderer, when the block is added i get the TileEntity with world.getTileEntity and cast it to TileEntityXY then set a boolean of TileEntityXY to true, in the method public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float f) { of my TileEntitySpecialRenderer i cast the entity again to TileEntityXY and get the boolean. and boom its false? I don't get what I'm doin wrong.. Am I missunderstanding how casting variables work? (And no, i cant use the metadata)
  21. uhm now I got another problem, when i create a new world it takes around 50 times longer and theres a huge hole where i spawn where there are just no blocks at all, and it takes another 5 min to fill that gap, not too sure if thats caused by my epic generator tho.. But Thanks anyway
  22. Uhh and theres that method wich you should override: public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return p_149650_1_ == 7 ? this.func_149865_P() : this.func_149866_i(); }
×
×
  • Create New...

Important Information

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