Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Flenix

Members
  • Content Count

    440
  • Joined

  • Last visited

Community Reputation

21 Excellent

About Flenix

  • Rank
    Diamond Finder

Converted

  • Gender
    Male
  • URL
    http://www.silvania.co.uk/
  • Location
    Northampton, UK
  • Personal Text
    Admin of Silvania, head at Silvania Studios

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I had a quick look through the events list and there's nothing specifically about creating chests, and the generation events don't seem to have any reference to them either - but the InitMapGenEvent does contain vague information about what structures are being generated. I'll have a proper look through the code tonight and see if that's do-able. Hopefully there will be some way to grab it via an event, that's a good idea - but if not does anyone else have any other ideas?
  2. I had a quick look through the events list and there's nothing specifically about creating chests, and the generation events don't seem to have any reference to them either - but the InitMapGenEvent does contain vague information about what structures are being generated. I'll have a proper look through the code tonight and see if that's do-able. Hopefully there will be some way to grab it via an event, that's a good idea - but if not does anyone else have any other ideas?
  3. Hey guys! I've got a slightly weird issue, so bear with me. I'll explain it as best I can. Basically, from what I understand the "normal" method of adding items to worldgen chests is using ChestGenHooks and WeightedRandomChestContent. From my understanding, that adds the item you provide to a list, which is then checked against when a chest is generated into the world, and it decides whether or not to generate your particular item based on the rarity value you provide. Now, in my mod, I'm wanting to add roughly ~150 items to these generated chests. There should be about a 1 in 2
  4. Hey guys! I've got a slightly weird issue, so bear with me. I'll explain it as best I can. Basically, from what I understand the "normal" method of adding items to worldgen chests is using ChestGenHooks and WeightedRandomChestContent. From my understanding, that adds the item you provide to a list, which is then checked against when a chest is generated into the world, and it decides whether or not to generate your particular item based on the rarity value you provide. Now, in my mod, I'm wanting to add roughly ~150 items to these generated chests. There should be about a 1 in 2
  5. Hello all. I'm trying to find a way to tell if the player broke a block client-side - any block at all. I've tried using BlockEvents.BreakEvent but that appears to be server-side only... (isRemote only returns false, never true) It's for rendering stuff, so I really don't want to send packets every time the player breaks a block... has anyone got any ideas?
  6. I'm toying with this too right now, and noticed this thread is actually relatively fresh so thought I'd reply. Worth noting I'm in 1.7.10, but Zethariel's method is exactly what you want. Using nothing but information from this page, I've gotten the original player entity hidden and a pritnln of test when my own render calls doRender. TL;DR this code produces this result (note the lack of player model, that's in 3rd person): @SubscribeEvent public void renderPlayer(RenderPlayerEvent.Pre event) { if (event.entityPlayer.getHeldItem() != null && event.entityPlayer
  7. I've figured out the CAUSE of the issue, but still need a solution. My rendered block is ever so slightly larger than a standard block - stretching 1/16th to 1/8th outside its ordinary bounds. Now, I CAN remodel it and fit it within the block, but doing so just makes it appear a little bit too small IMO, so I'd rather find a solution. Anyone got any ideas? (Photo examples) Bad one (Block Y is 0.8-1.3, giving an 0.5x0.5x0.5 block) Note how the texture is 8 wide as it should be, but is a full 16 high. Good one (Y is 0.5-1.0, same size block) Here the texture is
  8. Not sure about 1.8, but assume it hasn't changed too much, here's how I'm doing it in 1.7.10. My block renders a railing if there is no block on a side, so here it checks for a block, and creates a collision if there isn't one (so you can't just walk through the railing.) if (hitboxNorth) { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F); super.addCollisionBoxesToList(world, x, y, z, bb, list, entity); } if (hitboxSouth) { setBlockBounds(0.0F, 0.0F, 0.9375F, 1.0F, 1.0F, 1.0F); super.addCollisionBoxesToList(world, x, y, z, bb, list, entity); } if (hitboxEast) { se
  9. Hello all. I'm trying to make some new blocks, and I'm using the RenderBlocks renderStandardBlock method for doing so. However, it's treating textures oddly, and I can't figure out why. I've stripped my class right down to bare basics, trying to emulate this guide: http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html In that article, you can see the textures get truncated, so they render as if a full block, but only actually show the relevant part of it. In my case, this happens (as I want it to) on the top and bottom textures. However, the
  10. Still having problems here and it makes me feel sad inside
  11. ^What they said. For the generator, you need to use the TileEntity's onUpdate method. If there is fuel in the slot, then find the fuel's value (look in TileEntityFurnace for that), then remove the item and add that value to the TileEntity's saved value. You'll need to use NBT for that. It's likely you want to show that value in some sort of GUI too, so you'll need to sync it to the client. I won't provide the code, because obviously it's important to learn it, but the methods you'll need in your TileEntity for that are: void writeToNBT(NBTTagCompound nbt) - Writes the custom f
  12. The arguments for Slot are IInventory inventory, int slotId, int xPos and int yPos. So, it's the last two numbers that position your slots in relation to your GUI. Judging from the math you've used there, I'm guessing you just looked at an example which utilizes a for loop. For loops are great for adding multiple slots which are grouped together, so if you have two rows of 3 slots (?) you'd just use two for loops - One counts to two and adjusts the Y value, and the second counts to 3 adjusting the X. Of course, you still need to define the starting point, hence for example (44 + k *
  13. Is your GUI taking up the full size of the PNG file? The width/height you specify are purely the size of your ACTUAL GUI within the file. So, if you have a 256x256 file, but your drawn GUI is actually only 200x200, it's the 200x200 you need to specify.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.