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


  • Posts

  • Joined

  • Last visited

Everything posted by starwarsmace

  1. public void subtractEnergy(int energy){ this.energyContained = this.energyContained + energy; } Its never helpful to add energy when you want to be removing it.
  2. To really understand what your code is doing, you should look at all the functions called. Then look at the source code for those functions, go back till you understand what all the functions that are called inside that function. Then do the same for all the other ones.
  3. I tried doing that, the problem is getting it perfectly aligned with the player. I have some really bad memories associated with aligning models with players... I was rendering a .obj model as a sword and it was hard. I had to change a number than restart minecraft. Till I found the perfect match. It was a painstaking process that took a long time. Then after I finished spending hours on trying to align it, I found out that in debugging mode, it will change it without you having to restart minecraft. So, just run it in debug mode and try looking for the perfect numbers.
  4. To be honest, I really dont see why you would store something in a scythe and what a pouch would have anything to do with it.
  5. I think what he means is that the scythe inventory is completely unrelated from the pouch inventory. But, when you press a certain key it switches the item that's stored in the scythe, and moves it over the to the end of the pouch. But that first item in the pouch is moved over to the scythe inventory. It then moves over all the original pouch items one slot, so the scythe item is at the end.
  6. Woah. Thats a whole lot of switching and moving... I think this is how I would do it: 1. Set the scythe to pouch and the pouch to the scythe. 2. Loop through the entire inventory of the pouch, and set the item to the slot before it by subtracting one from the slot number.
  7. Firstly, works wonders. Secondly, none of the sword crafting recipes work?
  8. Wow, I have to say you've got some of the best explanations. Very thorough, tells you where to look, and at the same time isn't spoonfeeding. Not sure you can get any better than that.
  9. okayyyy...But what excactly am i sending in that packet then? Do i send the whole tileentity? If yes, how? This will probably help. Also, as diesieben said, you can send whatever you need to know on the client side. So if you want the amount of energy in the gui(I think that's what you want) you send the amount in the packet to the client.
  10. Said webmaster(s) shouldn't. They are illegally redistributing other's work, and sometimes claiming credit for it. If one or more of your mods ends up on one of these sites, you should immediately have them take it down. And how? Websites like 9minecraft.com don't give a **** about you and definitely are not going to take down the mod. I mean you can try and file a complaint to google to take it down but...
  11. Hmmmm.... I just realized something that I should have realized a long time ago... I could just flip the block render wise on a 180 degree angle if its upside down. Isn't it something like... GL11.glPushMatrix(); GL11.glRotatef(0, 180, 0, 0); GL11.glPopMatrix();
  12. Ok... im stumped... I really don't know what the heck the code for rendering the lever in RenderBlocks means... I think I should start from scratch... How exactly do I make the renderer...?
  13. Oh... Is the button and lever some type of special render in the render type? That would explain it.... What handles rotated forms? Found this though... /** * The type of render function that is called for this block */ public int getRenderType() { return 12; } Wait in the render types, they have numbers, maybe I could copy/ modify one of the lever renderers or something. I'll see what I can come up with.
  14. I have been trying to make rails that you put on any side of the block and it will still work. So like upside down riding. Anyway, for the time being I'm just trying to be able to put the rail on any side of the block. Here is my code for it. package com.starwarsmace.sticky_rails.blocks; import static net.minecraftforge.common.util.ForgeDirection.EAST; import static net.minecraftforge.common.util.ForgeDirection.NORTH; import static net.minecraftforge.common.util.ForgeDirection.SOUTH; import static net.minecraftforge.common.util.ForgeDirection.WEST; import static net.minecraftforge.common.util.ForgeDirection.UP; import static net.minecraftforge.common.util.ForgeDirection.DOWN; import net.minecraft.block.BlockRail; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class StickyRail extends BlockRail{ public StickyRail(){ super(); } public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int orientation){ ForgeDirection dir = ForgeDirection.getOrientation(orientation); return (dir == DOWN && world.isSideSolid(x, y + 1, z, DOWN )) || (dir == UP && world.isSideSolid(x, y - 1, z, UP )) || (dir == NORTH && world.isSideSolid(x, y, z + 1, NORTH)) || (dir == SOUTH && world.isSideSolid(x, y, z - 1, SOUTH)) || (dir == WEST && world.isSideSolid(x + 1, y, z, WEST )) || (dir == EAST && world.isSideSolid(x - 1, y, z, EAST )); } public boolean canPlaceBlockAt(World world, int x, int y, int z){ return world.isSideSolid(x - 1, y, z, EAST ) || world.isSideSolid(x + 1, y, z, WEST ) || world.isSideSolid(x, y, z - 1, SOUTH) || world.isSideSolid(x, y, z + 1, NORTH) || world.isSideSolid(x, y - 1, z, UP ) || world.isSideSolid(x, y + 1, z, DOWN ); } } It behaves almost exactly like a regular rail. I can't place it anywhere special like underneath or on the sides. What else special do you have to do? In the lever class this is all that was needed to be put on any side of a block. I must be missing something...
  15. Don't register your eventhandler on both buses...
  16. Don't use drawTexturedModalRect use this: public static void drawTexturedQuadFit(double x, double y, double width, double height, double zLevel){ Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV(x + 0, y + height, zLevel, 0,1); tessellator.addVertexWithUV(x + width, y + height, zLevel, 1, 1); tessellator.addVertexWithUV(x + width, y + 0, zLevel, 1,0); tessellator.addVertexWithUV(x + 0, y + 0, zLevel, 0, 0); tessellator.draw(); } And call that whenever you need to instead of the drawTexturedModalRect I dont think it will help with your problem but ok.. Try putting the box at 0,0 and see if that works...
  17. Theres a thank you button if you want to... you know.... thank somebody
  18. Not the nicest... Not the best.... But it works And the player can't run it because its a server command... Edit: Another question: Would reflection really be better than this idea?
  19. Yes and as I had told you in the other thread to have that canUpdate boolean? In the onMessage of your packet have it set the canUpdate to true.
  20. I don't see anything wrong with it at first glance. Run it and tell us if anything goes wrong.
  21. Well yes... But instead of using reflection, I could call a server command that I made in forge on bukkit and then that calls whatever I need to call...
  22. Let me try asking other people to fix the short circuit in my machine... without showing the machine! Show the code!
  • Create New...

Important Information

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