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


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About _bau5

  • Rank
    Tree Puncher


  • Gender
  • Personal Text
    I am new!

Recent Profile Visitors

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

  1. public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack) { super.onBlockPlacedBy(world, x, y, z, living, stack); byte dir = 0; int plyrFacing = MathHelper.floor_double(((living.rotationYaw * 4F) / 360F) + 0.5D) & 3; if (plyrFacing == 0) dir = 2; if (plyrFacing == 1) dir = 5; if (plyrFacing == 2) dir = 3; if (plyrFacing == 3) dir = 4; TileEntity tpb = world.getBlockTileEntity(x, y, z); if (tpb != null && tpb instanceof TE
  2. I'm not sure about #3, but here are my thoughts on the other two. 1. I'm fairly certain that is a server-client issue, as in the client says you have a different amount of items than the server says you have. It's some sort of de-sync issue that could be attributed to a lot of different things. Just go into the debugging tool and work your way through it as it's running on the client, then the server, and see where they start to disagree. 2. Override the transferStackInSlot method and make sure it will only try to transfer 15, or however many makes 15, at a time to a single slot and
  3. Think about it- during the preInitialization phase of Minecraft, do you think a player exists? Nope. Not until a world is loading. You'll need to use an event handler and run this code when a new world is loading and the player has been created.
  4. So the way recipes work, as I understand it, is that when you place the components in the grid, it's checked against the CraftingManager looking for matches in item types and layouts. I'm implementing a method of crafting that doesn't hinge on the 3x3, or any layout, crafting grid at all, just the raw components themselves. For vanilla recipes it works just fine, all IRecipes in the game (Shaped/Shapeless/Ore etc) have an array of all the item types and respective alternatives (such as for the ore dictionary recipes) so I can just go through and translate them all based on the case. However
  5. I'm trying to develop with NEI installed into the eclipse environment, but am not successfully getting it working. I've followed his instructions on the MCForum topic, added the _at.cfg's to the right places and all. But I am still getting this error: I googled it, others have had this problem, but no solution was ever posted. Any help would be great.
  6. My problem is: I'm trying to render some ItemStacks on the in game gui when looking at one of my entities. Now it works, but it seems that it isn't rendering the texture, as the pale-blue backdrop can be seen through where the render is supposed to be. Above you can see, circled in red, the problem. The stone on the left is rendered using the exact same call, but from the GuiIngame class, while the block on the right, that isn't being rendered correctly, is being called from outside the GuiIngame class. I am terrible, terrible at the OpenGL stuff, and am verging on scrapping this idea
  7. Thanks but I figured it out. Was having problems with the Forum so it took me awhile to edit the post.
  8. Multiple derps fixed. ------------------- I've got a Block that has a rendered block/item above it if there is a valid recipe in the crafting grid. But other players can't see the render until they open the bench themselves. Also, when the world loads, you can't see the render until you open the bench, regardless if there's a valid recipe in it. I figure this has something to do with packets, and have been working on trying to do this myself, but to no avail; I just can't seem to get any of it to work. The render class for the tile entity cannot see what's in the TileEntity's class.
  9. This can be sort of confusing...It's basically spread between three different classes. First, the Block: This part is fairly straight forward except that you want to be a subclass of BlockContainer. Example: https://github.com/bau5/ProjectBench/blob/master/bau5/mods/projectbench/common/ProjectBenchBlock.java Secondly, the TileEntity: The TileEntity holds all the information about the ItemStacks, what index they are within the inventory, all the logic about decreasing, increasing, and moving stacks, and the NBTTags that save what is held in the inventory. Example: https://github.com
  10. I have a block that has a custom render for something above it. Single player it all works fine, but in smp i'm having some issues. In smp, only one player can see the render and for the anyone else they won't see the render until they open the GUI that is attached to the block's tile entity. The render is based off of a value in the tile entity. I'm assuming that this has something to do with client-server-client communication, but I'm not sure to deal with it. I read up on making a packet handler, but didn't quite understand how to implement it in my case.
  11. I got it....I finally got it. For some reason var6 and var7 were both zero, there must have been something weird going on with the get block light value method. I debugged the code for the enderman, figured out what were the appropriate values and hardcoded it in. Success.
  12. use this: int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, tpb.yCoord, tpb.zCoord) / 15F * 240F); instead of this: int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, tpb.yCoord, tpb.zCoord) / 15F); Still no change...So frustrating. Code now looks like this: glColor4f(1.0F, 1.0F, 1.0F, 1.0F); glPushMatrix(); glEnable(32826 /*rescale*/); glTranslatef((float)x,(float)y,(float)z); glTranslatef(0.5F, 1.2F, 0.5F); glScalef(0.3F, 0.3F, 0.3F); bindTextureByName("/terrain.png"); int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, t
  13. int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, tpb.yCoord, tpb.zCoord) / 15F); int var6 = var5 % 65536; int var7 = var5 / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var6 / 1.0F, var7 / 1.0F); This is the closest I could come. Didn't change a thing. Here's the code on https://github.com/bau5/ProjectBench/blob/master/bau5/mods/projectbench/client/TEProjectBenchRenderer.java
  14. Thanks for the suggestion, but it didn't do anything. It's weird, it's like OpenGL isn't responding to any of the functions I throw in for lighting. I don't get it.
  15. Awesome, I'll try that when I can. Thanks for the suggestion
  • Create New...

Important Information

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