Jump to content

Sirpwnsamin

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by Sirpwnsamin

  1. Hello! I am here once again with a (probably simple) question. I am wondering if it is possible to make a block at, for example, x=3, y=65, z=3, emit a redstone signal on all sides, even if it were a vanilla grass block. I am trying to have an entity power the block that is is standing on. If you know of a way to do this, please post below. Any help is appreciated. Sample code is SUPER appreciated.
  2. This is possible, although it will require some semi advanced coding/minecraft forge knowledge. First, create a nail projectile entity (Look in the snowball or arrow class for an example of this) Next I would have the gun create and "fire" the nail when the gun is right-clicked by the player. In this method you can also check if the player has ammo or if the gun is loaded and have it remove the fired ammo. After that back to the entity class in the collide method I would check to see if it collides with an EntityLiving or if you want just EntityPlayer, damage the entity a little bit, set their velocity in the direction the nail was flying until they run into a solid, and freeze the player there until the nail is despawned/removed. I hope this helped and good luck.
  3. From what I gathered in MoxEmerald's reply, you need to make a custom class, in the example he has it called CustomFX. This class will need to extend EntityFX. You can look at the BlockFire class for an example on how a particle is created. After that, you would put the Minecraft.getMinecraft().effectRenderer.addEffect(new CustomFX(args...)); in the onBlockActivated() method. You also shouldn't need to register particles, just make sure you are calling them on the client instead of the server. As for the textures, you can probably find in the BlockFire class.
  4. Hello, I have a Block that I want to read the current item in the players hand, but not place it down in the world. Is there a way to cancel this?
  5. Hello again Modders of Forge! I am trying to make a Block that will remove itself from the world after 5 seconds of being placed. I have tried to use Thread.sleep and wait() in the onBlockPlaced method to no avail. I also tried to use an IScheduledTickHandler. If you have any idea on how to do this please post below. If you need any code snippets I will gladly post if you ask.
  6. To fix the texture bug, instead of RegisterIcons (), add this.setTextureName("FirstMod:RedOre") under this.setResistance
  7. For my mod, I would like to have item1 + item2 = item3 in an Anvil, I searched online everywhere for an answer but only found a way to make an item repairable in an anvil. Any help is appreciated
  8. Hello, recently while programming my mod, I was trying to make a Block drop a specific Item when it's broken with a certain Item (As the title says) I read Mazetars tutorial on EventHandlers but I didn't really understand on how to use the HarvestCheck event other than setting it up with the specific parameters. For Example: public void HarvestCheck(EntityPlayer player, Block block, boolean success){ } Any help is greatly appreciated, I looked all over the place online and didn't find anything that helped.
  9. Hello, Sirpwnsamin here, with another noob question I have a clue on what all these functions do and what I can use them for in my mod, but whenever I try to use them, I get the same error. For example, when I try this; if (EntityPlayer.isSneaking()){ //do stuff } I get the error "Cannot make a static reference to the non-static method isSneaking() from type EntityPlayer" The only quick fix available is to make the method static, which edits a source file and also causes errors in the source file. If anyone could explain to me the correct way to call functions or methods from other source class files, or give me any help at all on this topic, I will be very great full.
  10. Hey, I am a fairly new Mod Maker (started a few weeks ago) and I was wondering if it were possible in Forge without editing any forge/vanilla files to check the current time and use it in an if statement. All help is greatly appreciated, and thanks in advance.
×
×
  • Create New...

Important Information

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