Jump to content

Bugzoo

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by Bugzoo

  1. I have a model. When I right click on the model, I want the model to change. I have tried using booleans before if(renderChangedModel == true){ //Render Code } But using that code makes it impossible for block NBT to work. What is the best way to do this?
  2. I can't find any tutorials for reading/writing block NBT. If I give the block an item, the block changes model, so I want a tutorial which shows me how to make the change to the block I right clicked on and not every one of them
  3. Oh, thanks, got it working
  4. Ok, i wrote out some code using that method and stuff you told me. I might be doing this completely wrong, but my game is crashing public static ArrayList<Block> BuildingBlocks; CreativeTabs.tabBlock.displayAllReleventItems(BuildingBlocks); for(num = 0; num<BuildingBlocks.size(); num++){ this.drawItemStack(new ItemStack(BuildingBlocks.get(num)), width / 2 - num * 20 + 100, height / 2 - heightNum, ""); }
  5. you use the onBlockActivated method, like this @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ if(player.getHeldItem() != null && player.getHeldItem().getItem() == YOURITEMHERE){ //Do SOMETHING Here }
  6. I have a few blocks in a GUI. I render the blocks on the screen from a for loop. I add to the xCoords everytime the for loop runs so the blocks wont overlap. Though with this code, the blocks keep adding on the xCoords which makes them fly out of the screen. The xCoord variable is not static by the way. Here is my code for(num = 0; num<BuildingBlocks.length; num++){ this.drawItemStack(new ItemStack(BuildingBlocks[num]), width / 2 - xCoords, height / 2 - 55, ""); xCoords += 1; }
  7. What list do I have to pass in?
  8. I want to list every single block in the Building Blocks creative tab, in one array. I don't want to type them all out one by one, how would I do it? (if it is possible)
  9. Oh, didn't know that, thanks
  10. Thanks, works now. One last question though. How do I get a world, because I need to check if world.isRemote
  11. Yea, I tried that, though it doesn't seem to have the .addChatMessage in it for some reason
  12. *facepalm* Im not stupid. There is no EntityPlayer in my event...
  13. Found that out a few minutes ago, but thanks anyway. How do I send a chat message to the owner?
  14. Sorry if this is a (very) derpy question, but how do I get the EntityPlayer from an event. I have tried casting it as EntityPlayer, though no luck @SubscribeEvent public void onEntityLivingDeath(LivingDeathEvent event) { if (event.entityLiving instanceof EntityWolf && ((EntityWolf)event.entityLiving).isTamed()) { ((EntityPlayer) event.entityLiving).addChatComponentMessage(new ChatComponentText("Your Wolf Has Sadly Died")); } } But it just crashes.
  15. They are words of wisdom. Words I will remember for my whole life. It says that you can be more than one thing... idk
  16. "Your mod is a resource pack." - diesieben07 2014
  17. I basically just want to replace the normal minecraft main menu sound track with my own. I know you can do it in a resource pack, but I need to do it through my mod. How do I do it?
  18. Sometimes when I run the game, the item renders here [/img] Then next time I run it (no code is changed) it renders here [/img]
  19. It doesn't have its own class, but I think this is the code you want public static ItemStack stackMix = new ItemStack(CookeryMod.Mix, 1, 0); public static EntityItem entMix = new EntityItem(Minecraft.getMinecraft().theWorld, 0D , 0D , 0D, stackMix);
  20. I have this code which renders an item on a block int randomX = (int) (rand.nextInt((int) ((.6 - 0.2) + 1)) + 0.1); GL11.glPushMatrix(); RenderItem.renderInFrame = true; GL11.glTranslatef((float) ((float)x + .5), (float) ((float)y + .1), (float) ((float)z + 0.1)); GL11.glRotatef((float) 90, 180, 0, 1); GL11.glScaled(1.5,1.5,1); RenderManager.instance.renderEntityWithPosYaw(entMix, 0.0D, 0.1D, 0.0D, 90.0F, 0.0F); RenderItem.renderInFrame = false; GL11.glPopMatrix(); This code is supposed to render the item in the centre of the block. Sometimes when I run the game, it does render in the centre, but sometimes it doesn't
  21. I have a block and an item renders on it. I need the item to get bigger, because it is too small. Here is my code GL11.glPushMatrix(); RenderItem.renderInFrame = true; GL11.glTranslatef((float) ((float)x + .5), (float) ((float)y + 0.1), (float) ((float)z + 0.2)); GL11.glRotatef((float) 90, 180, 0, 1); RenderManager.instance.renderEntityWithPosYaw(entMix, 0.0D, 0.1D, 0.0D, 90.0F, 0.0F); RenderItem.renderInFrame = false; GL11.glPopMatrix();
  22. I have a method which runs when I right click the block. The method sets it so whatever item you rightclick the block with, gets rendered on the block. But when I render the item on the block, it renders on all the other blocks aswell
  23. I want my GUI to have a transparent background. Not fully transparent, just like turning down the opacity.
×
×
  • Create New...

Important Information

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