Jump to content

nexusrightsi

Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by nexusrightsi

  1. setMotion doesn't seem to be a known method in the Entity class. Are you sure that the method exists in 1.7.10? so I'll just assume you meant setPosition instead?
  2. The reason that the south block only had "functionallity" is because it's the first side to experiment with, yes I know for a fact that all meta data's are correct as i've got a onactivation method printing out the blocks metadata. No, I didn't even see the setMotion method, I'll give it a try and see if it works. Thank you.
  3. Hey there, so i've been trying to create a block that acts as a conveyer belt though this should have been an easy task but for some reason when the Item's collide with the block they either do nothing when I mess about with their motion x/y/z it is when I call the moveEntity code that it actually starts moving around but in a teleporting way rather then a slow paced movement. here is my onEntityCollide from my block class: @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { if(!world.isRemote) { if(entity instanceof EntityItem) { int meta = world.getBlockMetadata(x, y, z); EntityItem eItem = (EntityItem) entity; double moveX = 0D; double moveY = 0D; double moveZ = 0D; switch(meta) { case 0: //SOUTH moveZ = 0.25D; break; case 1: //WEST break; case 2: //NORTH break; case 3: //EAST break; } eItem.moveEntity(moveX, moveY, moveZ); } } }
  4. Oh no, its not about adding them to the game. It is about actually playing one as background music in my dimension.
  5. Sounds are client side. When you call playSound on server, it just notifies clients. Also, this method is used to play positioned sound (not music).
  6. Still haven't solved the sound playing in the escape button menu.. this is literally all the code im using for it: if(ent.dimension == ARMain.dimensionId) { if(!ent.worldObj.isRemote) { ent.worldObj.playSound(ent.posX, ent.posY, ent.posZ, "annoyingrodents:icarusBackground", 1, 1, true); } }
  7. So, instead of using a tick event i used the onLivingUpdate event where it just checks if the player is in the dimension and if it is then it starts playing the music. this resulted in no errors although in game its acting kind of weird. Even though I have no code checking for if the player is in a gui the music only seems to play when its in the menu gui (escape button)
  8. Alright, thank you for the heads up and the quick reply. I'll see what I can cook up in my crazy meth lab.
  9. Hello, so i was about to add custom background music to my new dimension although I noticed that all the sound events where deprecated. is there one that is actually usable?
  10. No he is saying that you should remove this from the common proxy: public void registerRenders() { Items.registerRenders(); } and instead add it to the client proxy since rendering is only done through the client
  11. Ok. If it is fixed, add [sOLVED] to the title after mc version. Like that, everybody knows that this problem is solved . Done and done
  12. Thank you, that fixed it ^_^also, nah you only told me to do the blocks array before the actual chunk creation. but thanks a lot!
  13. you could always tessellate the new texture so you can scale it up and then render it like you would with an 3d item except that its 2D instead
  14. I seem to have a new problem now where it only places 1 block per chunk instead of running through my for loops for the entire x and z square coords. public Chunk provideChunk(int par1, int par2) { Block[] blocks = new Block[65536]; blocks[0] = BlockHandler.MossDirt; Chunk chunk = new Chunk(world, blocks, par1, par2); for(int x = 0; x < 15; x++) { for(int z = 0; z < 15; z++) { blocks[x<<11 | z<< 7 | 0] = BlockHandler.MossDirt; } } chunk.generateSkylightMap(); return chunk; }
  15. Never mind, i fixed the teleport problem with some help of an old forum thread.
  16. Yes, not 655536... But neither 16*16*128 (=32768) ... You want 16*16*256=65536... I figured ah well thanks anyways for the help, i just assume that I switch out the coords with the ints of my for loops so it runs through the entire chunk. Yup. But do you need to run through entire chunk? Or just through y=1? Don't do unnecessary operations. Null blocks in [] will be automatically read as air. Oh no, not at all. I'm just running through the x and z's of the chunk because the y is always constant. also while i was at it i tried testing out to see if i was able to enter the dimension. Although the teleporter tp'd me back onto the exact same spot i already was in the overworld... if(!world.isRemote) { FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().transferPlayerToDimension( (EntityPlayerMP) player, 0, new TeleportTo(MinecraftServer.getServer().worldServerForDimension(ARMain.dimensionId))); } was used to tp to my dimension. its called upon activating a block.
  17. Yes, not 655536... But neither 16*16*128 (=32768) ... You want 16*16*256=65536... I figured ah well thanks anyways for the help, i just assume that I switch out the coords with the ints of my for loops so it runs through the entire chunk.
  18. right got that, while i was at it i tried testing out to see if i was able to enter the dimension. Although the teleporter tp'd me back onto the exact same spot i already was in the overworld... if(!world.isRemote) { FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().transferPlayerToDimension( (EntityPlayerMP) player, 0, new TeleportTo(MinecraftServer.getServer().worldServerForDimension(ARMain.dimensionId))); } was used to tp to my dimension. its called upon activating a block.
  19. I honestly don't get it. the "below i told you how to convert x, y and inside chunk to position in blocks (x<<11 | z<< 7 | y)" confuses me of what to do. could you perhaps give me some pseudo-code example?
  20. I assume you meant something like this? public Chunk provideChunk(int par1, int par2) { Block[] blocks = new Block[655536]; Chunk chunk = new Chunk(world, blocks, par2, par2); for(int x = 0; x < 16; x++) { for(int z = 0; z < 16; z++) { blocks[0] = BlockHandler.MossDirt; } } return chunk; }
  21. Hey there, I'm working on a custom dimension but for my dimension i need a chunk provider that makes it so it only generates a custom block 1 layer above the void. Although I've tried reading into guides/tutrials about world generation i could not put my head around it. Would someone be able to help me out as I find the world generating code quite confusing?
  22. take my method for instance, i'm using a non living entity extension as well for this entity. public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { if(!this.worldObj.isRemote) { Entity entity = par1DamageSource.getEntity(); EntityPlayer player = (EntityPlayer) entity; if(player.inventory.getCurrentItem() == null) { this.addHit(1); this.worldObj.playSoundAtEntity(this, "mob.slime.big", 1.0F, 1.0F); if(this.getHits() >= 10 && !this.isReady) { this.isReady = true; } if(this.isReady && this.getHits() >= 10) { this.removeHealth(1); destroyDough(); } } } return false; }
  23. it doesn't print out because it is not getting damage from a specific dmg source. Your entity doesnt have health modifiers either. so 'if' it got hit it would vanish instantly.
  24. it did not spawn at all or did the rendering part just not work. anyways I advice you to copy over the spawnPrime method into your tileentity and instead of using arguements in the method just set the coords of where to spawn the entity to the coords of the tile entity. then in your block class call the method from the tile entity.
  25. no offense intended, but i think this is the easy way out since he didn't understand what the client proxy and renderer meant. updating to 1.8 seems to be the harder way out
×
×
  • Create New...

Important Information

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