Jump to content

314owen

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by 314owen

  1. HauntedHouse Gen: http://pastebin.com/Nc1p1Psx WorldGenerator: http://pastebin.com/4Y9xayG9 Block: http://pastebin.com/tZQzj0ak Tile Entity: http://pastebin.com/rG96ZiWH
  2. I'm Just Using Basic setBlock Code Under My Generate Method: First I tried this: world.setBlock(i + 2, j + 6, k + 3, MyMod.MyBlock); Then I tried this: TileEntityMyBlock block = new TileEntityMyBlock(); world.setTileEntity(i + 2, j + 6, k + 3, block); Then I tried both. Here is my block class: public class BlockMyBlock extends Block{ protected BlockMyBlock(Material p_i45394_1_) { super(p_i45394_1_); } public TileEntity createTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityMyBlock(); } public boolean hasTileEntity(int metadata) { return true; } }
  3. I am trying to put my modded block into my structure. When I remove the tile entity code from the block, It places fine, but I need to have it have the tile entity code. How do I fix this? I have tried using .setBlock and .setTileEntity
  4. I did start using that, But the problem is, I also have to update all of the .setBlockAndMetadata things with .setBlock and add ,2 at the end. There is no way to do that with search and replace. Is there no tool that is updated to 1.7?
  5. How can I efficiently update the code with over 6000 blocks? I would have to update every block. How far are you into updating the tool?
  6. How would I make random generated structures? I have tried a program called "SchematicToJava Converter" but the program is too old and all of the code generated is outdated. What should I use to transfer my dungeon schematic into java worldgen code.
  7. Okay, I updated the code, It still does not work. Block: package net.endernoobs.rpgmod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.world.World; public class BlockGrimReaper extends Block{ protected BlockGrimReaper(Material p_i45394_1_) { super(p_i45394_1_); } public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityGrimReaper(); } public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return null; } @Override public boolean hasTileEntity(int metadata) { return true; } } Tile Entity: package net.endernoobs.rpgmod; import net.minecraft.tileentity.TileEntity; public class TileEntityGrimReaper extends TileEntity { private int activatingRangeFromPlayer = 16; public boolean isActivated() { System.out.println("Active"); return this.worldObj.getClosestPlayer((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D, (double) this.activatingRangeFromPlayer) != null; } @Override public void updateEntity() { System.out.println("Is it active?"); if (this.isActivated()) { EntityGrimReaper boss = new EntityGrimReaper(worldObj); this.worldObj.spawnEntityInWorld(boss); this.worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); } } }
  8. I want to exactly like I say: Spawn a Mob when the player is near this block. Block: package net.endernoobs.rpgmod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.world.World; public class BlockGrimReaper extends Block{ protected BlockGrimReaper(Material p_i45394_1_) { super(p_i45394_1_); } public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityGrimReaper(); } public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return null; } } Tile Entity: package net.endernoobs.rpgmod; import net.minecraft.tileentity.TileEntity; public class TileEntityGrimReaper extends TileEntity { private int activatingRangeFromPlayer = 16; public boolean isActivated() { return this.worldObj.getClosestPlayer((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D, (double) this.activatingRangeFromPlayer) != null; } public void updateEntity() { if (this.isActivated()) { EntityGrimReaper boss = new EntityGrimReaper(worldObj); this.worldObj.spawnEntityInWorld(boss); this.worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); } } }
  9. I tried doing what you said, but for some reason, the tile entity is not detecting players. Here is the code for the tile entity: package net.endernoobs.rpgmod; import net.minecraft.tileentity.TileEntity; public class TileEntityGrimReaper extends TileEntity { private int activatingRangeFromPlayer = 16; public boolean isActivated() { return this.worldObj.getClosestPlayer((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D, (double) this.activatingRangeFromPlayer) != null; } public void updateEntity() { if (this.isActivated()) { EntityGrimReaper boss = new EntityGrimReaper(worldObj); this.worldObj.spawnEntityInWorld(boss); this.worldObj.setBlockToAir(this.xCoord, this.yCoord, this.zCoord); } } }
  10. Thanks, I think that might work.
  11. It really wouldn't matter, I would just need a way for it to be there when the player is in the dungeon. Not sure how other mods do it.
  12. I am Making this mod in 1.7.2
  13. How Do I Make A Boss Spawn at the End of a Dungeon. I'm using a program called SchematicToJavaConverter_1.7. Do Schematics record mobs?
  14. It works in dev environment, I don't think its a code problem. It might be a path problem
  15. I have missing textures when I build my 1.7.2 forge mod. Does anyone have any idea why? Here is a download link to the mod: http://www.mediafire.com/download/62zoyc2ljhpc1mi/modid-1.0.jar.
  16. When I do: world.setBlock((int) player.posX, (int) player.posY - 1, (int) player.posZ, 0); It doesn't set the block under you to air, its sets one over to air, what causes this? Is it the changing from double to int? If so, how would I get player coords correctly.
  17. Any Ideas On How to Fix This?
  18. Thank You SO Much, only one more problem, the gui works fine, it doesn't crash, but I can't but items in the DNAExtractor
  19. Ok, I have fixed that and a few more problems have popped up, when does this not happen, you fix one problem, tons more come. After doing the GUI Handler, now It opens the gui, but it is missing its texture (the directory looks correct) and when you try to move items they go back to there slots, if I shift click, it crashes.
  20. Please Help! This is my code: Block: GUI: Tile Entity: Container:
  21. Hello, I'm currently making a mod and have just watched around 7 hours of tutorials on how to make a GUI, I finally tested it and now it crashes every time I right click on the custom furnace. Anyone have any ideas how to fix this? When I right click, Minecraft doesn't respond and the server gets overloaded.
×
×
  • Create New...

Important Information

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