Jump to content

Koopamillion

Forge Modder
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Koopamillion

  1. Is there a way to replace an Item in your inventory with another Item when you pick it up? E.g: pick up a nether star - replaces it with a diamond
  2. For flips sake, is there anyway to get the blockmeta data of the block im about to destroy? If not then thanks for trying to help.
  3. Ok, Ill add EntityPlayer player to it so I can do: double x2 = player.getLookVec().xCoord; double y2 = player.getLookVec().yCoord; double z2 = player.getLookVec().zCoord; Ill get the metedata by: meta = world.getBlockMetadata((int) x2, (int)y2, (int)z2); P.S I don't understand overriding...
  4. How do I fully use this... I've done: public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_, World world, int x, int y, int z, int meta) { this.getDrops(world, x, y, z, world.getBlockMetadata(x, y, z), 1); return (p_149650_1_ & != 0 ? null : (blockMaterial == Material.iron ? Mitems.uninsulatedCopperCable : Items.wooden_door); } But It dosen't work, Is it that I haven't told it where to drop, have I not overrided it or something else?
  5. I mean they will like glitch cause they are long... Pieces of code...
  6. My block cable has two meta datas: 0 = Insulated, 1 = Uninsulated, At the moment, my item drop method is this: return (p_149650_1_ & 8..) != 0 ? null : (this.blockMaterial == Material.iron ? Mitems.uninsulatedCopperCable : Mitems.iCopperCable); THE ".." Are to stop the emoji from appearing! However, at the moment i've told it to set this.blockMaterial to: public TileEntity createTileEntity(World world, int meta){ switch(meta){ case 0: this.blockMaterial = Material.cloth; <--- return new TileEntityCable(); case 1: this.blockMaterial = Material.iron; <-- return new TileEntityUninsulatedCable(); } return null; } Which seems fine, until you place more than one cable, it then makes all cables drop the type of cable that was last placed... Is there anyway of detecting what metadata the block you just mined had, so I can set the material based on the metadata? Thanks!
  7. I'll try, but I have quite a few Renders that are gonna bug out hard...
  8. I'm using the setBlock method, anyway, I want it to place a block with specific meta data; e.g: MBlocks.CABLE <--- Has 2 metadatas, 0/1. Anyway, heres the method(s): Block block; block = MBlocks.CABLE; <--- HAS TWO METADATAS! (How do I place it with metadata 1?) placeBlock(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, i1, block); private void placeBlock(World p_150924_0_, int p_150924_1_, int p_150924_2_, int p_150924_3_, int p_150924_4_, Block p_150924_5_){ p_150924_0_.setBlock(p_150924_1_, p_150924_2_, p_150924_3_, p_150924_5_, p_150924_4_, 2); }
  9. How do I update 1.7.10 to 1.8... Im a bit of a dumbtard....
  10. IDK if i can share links, but type this in on youtube and press the first one/one with pink blocks in thumbnail! --->Minecraft Modding S2E5 Custom Structure Part 1
  11. @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { if (type != ItemRenderType.INVENTORY) { return true; } else { return false; *true } } I'm new to coding so sorry if i'm wrong but... Your telling it to only render if the render type is the player's inventory, not anywhere else? Switch this* to true I think.
  12. Now it won't spawn the tileentity...
  13. I dont know how to update to 1.8 :'(
  14. I've probably done something stupid, but the tileentity energystorage block wont place a tileentity, or the tileentity dosent even exist :L All help will be very appreciated! Thanks! EDIT - I had meta cases messed up; The case 0 should have been the tier 1 and visaversa :Crash Report Random Classes:
  15. Ok, but I don't understand about which methods, because the new TileEntity method errors when I @Override it. Thanks though. P.S The errors seem to say about the drawBackGroundGuiLayer bugging out, or is that because of I can't override the new TileEntity?
  16. Please can anyone help me, when I right click my generator tileentity, it crashes, I have a gui, container and tileentity so I'm not sure why. Crash log: Gui Handler: Gui Coal Generator: Container Energy Generator: Block Coal Generator: TileEntity Coal Gen
  17. It cant find the gradle start main class :'( I don't mind reseting gradle if required, however i dont want to lose all my work... Please help! If i do have to restart gradle, what commands do I need to run? Thanks!!!! [21:43:08] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [21:43:08] [main/ERROR]: Unable to launch java.lang.ClassNotFoundException: cpw.mods.fml.common.launcher.FMLTweaker at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_73] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_73] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[?:1.8.0_73] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_73] at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_73] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_73] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_73] at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_73] at net.minecraft.launchwrapper.Launch.launch(Launch.java:98) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?]
×
×
  • Create New...

Important Information

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