Jump to content

MistPhizzle

Members
  • Posts

    24
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    EtriaCraft Community Co-Owner

MistPhizzle's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, I was looking for a list of sounds and could not find one. I need a list of the strings IE "random.fizz". Anyone know where I could find one in the classes, or an online list?
  2. So, working with particles. (Not having much luck). How would I go about spawning the smoke particle in a moving sphere around a player. I'm an absolute noob when it comes to particles and can't find a tutorial for what I'm looking for.
  3. Hello, so I have this structure. On this structure are two chests at two different locations. I can get the coordinates of where the chest spawns, but I need to add items to these chests as they spawn empty. How do I go about adding items to chests assuming I know the coordinates of them?
  4. That works, but now they are spawning a little too often for my taste ( every few blocks or so). How could I limit the amount per chunk? Code now looks like: private void generateSurface(World world, Random random, int i, int j) { int firstBlockXCoord = i + random.nextInt(16); // int firstBlockYCoord = random.nextInt(256); int firstBlockZCoord = j + random.nextInt(16); new AirTempleStructure().generate(world, random, firstBlockXCoord, world.getTopSolidOrLiquidBlock(firstBlockXCoord, firstBlockZCoord) - 1, firstBlockZCoord); }
  5. The Structure Itself: http://pastie.org/8306221 The Generation Class: http://pastie.org/8306224 Yes, the generator is registered. The blocks generate and all, my problem here is with the Y value. I have been testing generation in a super flat world (as it is pure grass / dirt) and find that the blocks are generating anywhere between levels 1-4, whereas I would like them to be above ground at all times. How do I get this to happen? I assume some changes need to be done with the Y value, I've tinkered with it here and there, and am still not getting the product I'd like. Thanks in advance.
  6. I was using this schematic converter: http://www.minecraftforum.net/user/1460699-mithion/ That one was made for v1.3.2 and does not support any 1.6.2 blocks. Does anyone know of a newer one that works?
  7. Thanks, +1! Once I figured out packets it was pretty straight forward.
  8. Alright, so I'm working on my mod and trying to launch a player in a certain direction. That works. However, I am only doing it when a player clicks and if they have an ability "selected". This simply checks if an ability is bound to their current slot. It is a bit complex, but I'll supply the necessary code. My problem: I want to check if the player has an Ability Bound. If they do, it runs a certain block of code. Here is the code that I want to run: @ForgeSubscribe public void onUpdate(LivingUpdateEvent e) { if (e.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) e.entity; if (BendingPlayerTracker.benders.get(player.username) == Element.Chi) { if (BendingMethods.knowsMove(player, Ability.HighJump) && BendingMethods.isAbilitySelected(player, Ability.HighJump)) { if (player.swingProgress == 0.8333333F) { while (BendingMethods.isAbilitySelected(player, Ability.HighJump)) { double motionX = 1.0 * (double) (-MathHelper.sin(player.rotationYaw/ 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI)); double motionZ = 1.0 * (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI)); double motionY = 1.0 * (double) (-MathHelper.sin((player.rotationPitch)/ 180.0F * (float) Math.PI) ); player.motionX = motionX; player.motionZ = motionZ; player.motionY = motionY; } } } } } } Everything in that chunk works except for BendingMethods.isAbilitySelected. It returns true 50% of the time, and false the other 50%. I added debug messages to get this. The Abilities and the slots they are on are stored server side. Here is the code for that: public static boolean isAbilitySelected(EntityPlayer player, Ability ability) { NBTTagCompound nbt = player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG); int slot = player.inventory.currentItem + 1; if (nbt.getString("BendingSlot" + slot) != null && nbt.getString("BendingSlot" + slot).equals(ability.toString())) { return true; } return false; } The ability selected returns true if it is run on server side I believe. When I run a command, it returns true, etc. Anyway, I think the reason it is returning true 50% of the time is because it checks if it is client side and server side (with server side returning true and client side false). Now, the player motion is client side. How do I get these to work nicely together. I can assure you that the slot is bound correctly, as I've used it plenty of times before. My problem only comes up when I'm trying to use the player.motion methods. Huge thanks in advance.
  9. I was looking at the player.worldObj.spawnParticle, and that seemed to do the trick. I'm more interested in knowing how to make particle effects last for some period of time (repeating (I assume with a for loop) and how to make them swirl around the player. (Possibly using a radius)
  10. I am looking to play a particle effect around the player. How would I go about doing this. I would need a way to customize the type of particle (I am not looking into adding any new particles), the radius around the player it goes, and how long it goes. I was unable to find a tutorial on this stuff. Thanks in advance for any help.
  11. Hello all, so I am trying to get the hot bar slot selected by a player. I noticed there was an NBT Tag for this, but it is always returning 0. Note: I am trying to get the slot number of the slot that the user currently has their hotbar on. Not the item in the slot. (Should return a number 0- My code: Thanks in advance.
  12. Hello, how would I go about checking the block a player lands on when a player takes fall damage. I have the code for the event: @ForgeSubscribe public void onHurtEvent(LivingHurtEvent e) { if (e.entity instanceof EntityPlayer) { DamageSource source = e.source; EntityPlayer player = (EntityPlayer) e.entity; if (!player.worldObj.isRemote) { if (source == DamageSource.fall) { // Unsure of what to do here to check the block the player landed on. The idea is, if a player lands on a certain block, I want the damage to be set to 0. I know how to set the damage and all of that fun stuff.
  13. Using PersistedNBTTag, now it isn't returning anything on my hasElement Method. Updated Code:
×
×
  • Create New...

Important Information

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