Jump to content

TheDrunkMafia

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by TheDrunkMafia

  1. Hmmm, is there no way to use ray tracing of some sort to detect if the player is looking at the block above it?
  2. Hey, I came across a weird bug while making a block which is two blocks high, when you mouse over the main block the bounding box of the block is drawn two blocks high. However when you mouse of the area the block above the bounding box is no long drawn, however the collisions are correct. The player will collide with the bounding box, it just only draws when you hover over the original block. All I am currently doing is this: setBlockBounds(0F, 0F, 0F, 1F, 2F, 1F); I've never had to mess around with block bounds so I don't know what I need to do for the hit box to extend. Heres a picture of it (I can't seem to add it or format anything, so I've put the link in): https://dl.dropboxusercontent.com/u/101919880/Untitled.png Any help is much appreciated, thanks.
  3. lol. I wish, I'm not that good at coding yet. I'm still relatively new to modding, however I'm now starting to venture into the more complicated side of Minecraft and coding on the whole. You can't beat around the fire forever.
  4. Right, so I'm going to have to use CodeChickenCore Lib in order to use this: MovingObjectPosition hit = RayTracer.retraceBlock(world, player, x, y, z);
  5. Yeah. I noticed my derp. Looking at it now.
  6. Hmmm, ray tracing. Well I knew it was't going to be long before I had to learn about ray tracing, I'm currently on my tablet, I'll have a look at it tomorrow.
  7. Hey, So I am fiddling around with the block bounds and also collisions boxes, however is there anyway that you can add more that one hit boxes so that once they are right clicked, they are able to call their own version of onBlockActivated or something similar. An example of this would be the ender tanks and ender chests that are from the block ender storage. On the ender tank you have the colour codes that link tanks up and also the option to have the tank send or receive.
  8. Yh, Thats what I was going to do. However, the problem is: There are 48 aspects and only 16 metadata. So is there anyway to do what metadata does, but with a tileentity?
  9. Just had a thought. Is there anyway to store extra data with a block, that is not placed and not metadata?
  10. 49 different aspects, 200 aprox blocks in vanilla. So allot of blocks to do them manually. I need tileentities to manage the effects, but I need more than 16 metadata to handle what I need to achieve. Are there any other ways to do this? Also thaumcraft has nothing to do with the code, the only thing that thaumcraft has something to do with. Is the aspects and thats it. The mod could be made without thaumcraft at all.
  11. Today, I started developing my mod that I have always wanted to make. However, the problem that I foretold has came up. The mod is based around thaumcraft's aspects, allowing you to infuse different aspects into blocks which then inturn effect the nature the block. So lux in a block would cause it to emit light. Now the problem is obvious, how do I make all the blocks with all the possibilities, with out registering each and every block. I have no clue how to go about start this. So was wondering if anyone will be able to give their view on this and what could possibly fix this. It's been driving me insane not knowing what do. So any help will be hugely appreciated.
  12. Hey, I am making a small test mod, so I can get some hands on experience and I know you can do this, but I can't seem to remember how to check if the EntityPlayer has a certain item in it's hand. It's killing me. Anyway, heres the test code that I am using for now: @Override public int idDropped(int id, Random rand, int idDropped){ EntityPlayer player; if(player.somthing == SHTools.IronSledge.itemId){ return Blocks.dirt.blockId; }else{ return Blocks.cobblestone.blockId; } } The above code is something I just wrote to show what I mean. Any help will be hugely Appreciated.
  13. Figured it out, wrong command. For those who want to know how to do it. Just follow these steps: Step 1: Open up terminal and enter the following command "cd ~/path to forge api/ Step 2:Now type in "chmod +x install.sh" Step 3:Not initiate the install "bash install.sh" And it should now be running. If it does not work then close terminal and go back to step 1.
  14. Just tried that: sean@sean-Dell-DM061:~$ cd ~/Desktop/MCP/forge sean@sean-Dell-DM061:~/Desktop/MCP/forge$ sudo install.sh [sudo] password for sean: sudo: install.sh: command not found Is there a specific command for just running .sh files?
  15. Hey, So recently my hard drive broke and lost all my files, the up side to it was that I finally had a reason to install Linux without worrying about losing all my files, because well.... There already lost. Anyway, I got my workspace set up and all the API's downloaded (MCP and Forge), but I have absolutely no Idea how to initiate the install.sh. I've tried the following commands in terminal: dir/install.sh python: can't open file 'install.py': [Errno 2] No such file or directory sudo dir/install.sh python: can't open file 'install.py': [Errno 2] No such file or directory So yeah I'm pretty stumped. If anyone will be able to help or point me in the right direction, it would hugely appreciated. Thanks.
  16. private int blockposX = 0; private int blockposY = 0; private int blockposZ = 0; private Entity entities; private String texturePath; private AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(this.blockposX - 16, this.blockposY, this.blockposZ - 16, this.blockposX + 16, this.blockposY + 16, this.blockposZ + 16); public CreeperDetector(int par1, int par2, Material par3Material, String par4Str, String par5Str) { super(par1, par3Material); this.texturePath = par4Str; } public static void GetEntitys(){ List<EntityCreeper> entities = worldObj.getEntitiesWithinAABB(EntityCreeper.class, bb); while(entities != null){ if(((EntityCreeper) entities) instanceof EntityCreeper){ EntityCreeper ent = (EntityCreeper)entities; EntityWithinRadius(); } } } Basically when the block is finished the block will have two modes, defense which pushing the mob out of the radius and redstone which emits a redstone signal when a mob is in the radius.
  17. The only error that I have got to far is that "worldObj" does not exist. I'm using 1.5.1 Forge.
  18. Still a newb, although you do not need be insultive.
  19. Just duplicate the item and assign it to the other creative tab, thats the easiest solution there is.
  20. After trailing and erroring, then finally giving up on this. I have decided to see it though, the biggest problem I had with making this work was, making it to list all the mobs nearby. How would I go about making an iterator to do this?
  21. Just was wondering if anyone has found a mod which allows you to code realtime, in other words allows you to be able to update some code for your mod without having to close and re-open minecraft.
  22. The three errors are in the following classes: TextureFXManager.java private TextureHelper helper; TextureStitched.java public static void doTextureCopy(Texture atlas, Texture source, int targetX, int targetY) { TextureFXManager.instance().>>getHelper<<Error Here().doTextureCopy(atlas, source, targetX, targetY); } FMLRenderAccessLibrary.java >>import net.minecraftforge.event.entity.living.LivingPackSizeEvent;<<Not found and public static int getMaxSpawnPackSize(EntityLiving entity) { >>LivingPackSizeEvent<<Error maxCanSpawnEvent = new >>LivingPackSizeEvent<<Error(entity); MinecraftForge.EVENT_BUS.post(maxCanSpawnEvent); return maxCanSpawnEvent.getResult() == Result.ALLOW ? maxCanSpawnEvent.maxPackSize : entity.getMaxSpawnedInChunk(); } } The Error that comes up during decompile:
  23. Hey, Today I started to mess around with glass and came across a very strange glitch when you tint a transparent block, in this instance when you look though the block it only renders the chunk you are standing in. Producing a weird result: Also when you pause: Code public class OrangeTintedGlass extends BlockBreakable { public OrangeTintedGlass(int par1, Material par2Material, boolean par3) { super(par1, "glass", par2Material, par3); } public int quantityDropped(Random par1Random) { return 0; } @SideOnly(Side.CLIENT) public int getRenderBlockPass() { return 0; } public boolean isOpaqueCube() { return false; } public boolean connectedTextures() { return true; } public boolean renderAsNormalBlock() { return false; } protected boolean canSilkHarvest() { return true; } @SideOnly(Side.CLIENT) public void func_94332_a(IconRegister Par1Iconregister){ this.field_94336_cN = Par1Iconregister.func_94245_a("/Glass/Orange"); } } Any help would be extremely appreciated.
  24. So pretty much this: protected AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(1, 1, 1, 16, 16, 16);
  25. How do you set the bounding box correctly? [embed=425,349] public double expand(double par1, double par3, double par5)[/embed]
×
×
  • Create New...

Important Information

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