Jump to content

Busti

Forge Modder
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Busti

  1. Minecraft.getMinecraft.thePlayer.getUniqueID or Minecraft.getMinecraft.thePlayer.getName if you want to work with a String
  2. And if you already did it you should probably delete it and re-unzip everything before you get any problems...
  3. The part "block" actually is just a block with a tileentity. This TileEntity contains an array in which the parts are stored. Certain parts like cables should occupy up specific spaces. 1-6 for each side. t.partMap() will return an instance of your part (wire) which you can access directly by type checking followed by type casting.
  4. Too bad. I know how to harvest the blocks with these effects independently. Thanks
  5. Hello, is there a way to break Blocks using enchantment effects e.g. Silk touch or fortune? Thanks, Busti
  6. int side = 0 t = getMultipartTile(world, pos) t.partMap(side) Put this in some sort of Library. You will need it quite a few times... def getMultipartTile(w:IBlockAccess, bc:BlockCoord):TileMultipart = getMultipartTile(w, bc.x, bc.y, bc.z) def getMultipartTile(w:IBlockAccess, x:Int, y:Int, z:Int) = w.getTileEntity(x, y, z) match { case t:TileMultipart => t case _ => null }
  7. Try to disable backface-culling...
  8. Both work but OreDictionary.WILDCARD_VALUE is probably a better Idea
  9. Would the bounding boxes of the placed block collide (occlude) with the ones of the new one?
  10. Aaaaand I can delete 2 new classes and 30 minutes of my precious Time [Audience Laughter]
  11. I appreciate your efforts but as you said I should do it myself (and I want to)
  12. If you want to use any damaged item in the recipe use: Short.MAX_VALUE as damage value in the ItemStack If you want to damage the item when crafting ask again and I will post an Item Class that does that.
  13. You don't have to do that. I decided to update my mod from scratch anyways since I decided to switch to scala completely. Thanks
  14. Have a look at the occlusion part in my Tutorial. And also what do you mean by intersecting? Are you trying to place a microblock that collides with your microblock or one that fills the remaining space e.g. a cover etc. http://www.minecraftforge.net/forum/index.php/topic,22503.0.html
  15. Thanks. Not exactly what I was expecting but I kinda knew that it would end like this. I just wanted to make it a one liner. It seems a bit overly complicated for just that purpose.
  16. Since this is just client sided I wouldn't need the packet. But I would like to avoid using a Tick handler...
  17. This will only be true if the player is actually sneaking. Not when just the key is pressed.
  18. Hello, I am trying to display information in the infobox of an Item when the sneak key is pressed. How would I go about this? Thanks - Busti P.S. I know how to display the information I just want to know if the sneak key is pressed...
  19. It will stay that way until an update occurs. This might be a newly placed light source which will actually update the whole lit space around it, but also a block which will only update the spaces around it. But it might cause a chain reaction which will update the whole area. The light Errors we can mostly see in newly spawned ravines work that way. In order to minimize the lag caused by this you should check if anything has changed before making the area dark again. (Try to minimize the call number of setLightFor() and you will be fine.) Also update the changed blocks light level with worldObj.checkLight(pos) * when the block was destroyed in order to get back to normal. * This is a 1.8 function the 1.7 one has a different name and uses coordinates. Just search for "light" in the world object
  20. Is there actually a function that gets called while an item is used to mine something? I misunderstood onItemUseTick() for such a method but as it turns out its for eating.
  21. I am creating one of those common mining tool that mines more than a single block and I want the other blocks to display cracks as well. I also would like to retrieve the Information once the block is mined as well since the onBlockDestroyed() method in ItemTool does not pass a the side of the mined block. I could of course raytrace the given players view but perhaps there are any easier solutions.
  22. Here is some code that should, when placed in the update function in a tileentity make the area around it pitch black. for (int x = xPos-5; x < xPos + 5; x++) { for (int y = xPos-5; y < yPos + 5; y++) { for (int z = xPos-5; z < zPos + 5; z++) { BlockPos pos = new BlockPos(xPos, yPos, zPos); worldObj.setLightFor(EnumSkyBlock.BLOCK, pos, LightLevel); worldObj.setLightFor(EnumSkyBlock.SKY, pos, LightLevel); } } } This should also make mobs spawn. Sorry if this throws any errors. I haven't tested this yet. Use the methods I described earlier to optimize it for performance and or change its shape. EDIT: You dont even need a tileentity. Just coordinates and a world Object
  23. I basically want to get the coordinates of the block and the side im looking at, while im mining / left-clicking it. I colored it in this screenshot:
  24. Hello, is it possible to have a custom tool "know" about the Block the player is currently Mining with it and from what direction he is doing it? I could calculate it with the onUsingTick() function but I was hoping that there would be a Method for it.
  25. Moving light sources are another deal, as minecraft takes a lot of time updating light. I have a throwable light source in my mod and actually did it without modifying Vanilla. (Not as smooth though)
×
×
  • Create New...

Important Information

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