Jump to content

Waabbuffet

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Waabbuffet

  1. Ok I give up...Been trying to get this to work for hours im not sure.
  2. Oh yea thanks...I changed it but it didnt work im not to sure thanks...Ill take a look at it
  3. I am having a hard time getting a box to render around a structure like http://imgur.com/1FIvlbA... Right now I am just trying to get something to show up on the screen here is what I have public void renderBox(){ GlStateManager.pushMatrix(); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer wr = tessellator.getWorldRenderer(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); wr.pos(d26, d18, d19).color(200, 0, 0, 100).endVertex(); tessellator.draw(); GlStateManager.popMatrix(); } I dont really understand using tessellator or Worldrenderer (as you can prob tell from my code ). I would appreciate if someone could explain why it isnt working/how to get it to work.
  4. For my mod im looking to add a gold coin that drops when you kill a mob...Everything is fine its just the gold coin has no texture... I dont really understand how to render something that doesnt use a model...Thanks!! extends Render { private float field_77002_a; private static final ResourceLocation experience = new ResourceLocation("kotrt:textures/items/goldCoin.png"); private static final String __OBFID = "CL_00000995"; public RenderGoldCurrencyOrb(float p_i1254_1_) { this.field_77002_a = p_i1254_1_; } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityGoldCurrencyOrb p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { GL11.glPushMatrix(); this.bindEntityTexture(p_76986_1_); GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); GL11.glEnable(GL12.GL_RESCALE_NORMAL); float f2 = this.field_77002_a; GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F); IIcon iicon = Items.fire_charge.getIconFromDamage(0); Tessellator tessellator = Tessellator.instance; float f3 = iicon.getMinU(); float f4 = iicon.getMaxU(); float f5 = iicon.getMinV(); float f6 = iicon.getMaxV(); float f7 = 1.0F; float f8 = 0.5F; float f9 = 0.25F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6); tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6); tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5); tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5); tessellator.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityGoldCurrencyOrb p_110775_1_) { return experience; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityGoldCurrencyOrb)p_110775_1_); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityGoldCurrencyOrb)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } thats my gold coin render...(I just took it from the render experience orb)
  5. yea you are right, dam you are good at this! ;D
  6. Alright thanks ill take a look, last thing . The entity doesnt seem to remember that i am the owner when i log out completely and come back, how do i fix this?
  7. OHH lol ok thanks for the quick reply. One more thing how do i make him hold a iron sword?
  8. I created this entity warrior that follows you and attacks whatever you attack. The only problem is when he attacks he goes super sonic, and runs circles around the target hes attacking. The code for the class is here. How do i fix this?
  9. how about minecraft heads, like wither, creeper, etc. and the powered rails
  10. i am sending a packet to the server, everything else works i can give lets say player.inventory.addItemStackToInventory(new ItemStack(Blocks.rail)); and it gives me a rail. but if i try player.inventory.addItemStackToInventory(new ItemStack(Items.lapis)); it doesnt exist, unless im doing this wrong
  11. Hey im making a mod that has a gui and when you click a button it gives the player that item. I am trying to give the player a piece of lapis, and a wither head. I tried using player.inventory.addItemStackToInventory(new ItemStack(Items....)); but there is no lapis or wither head. Ive also noticed there is no wood when using blocks. how do i give the player these items?
  12. I want to create a file that goes into the worlds save folder but i dont know how to get the world name.
  13. One more thing how would one go about rendering an icon on a GUI like when a dirt block is on the floor i want that same image and movement on the gui.
  14. I am trying to create a mod, that adds a shopkeeper. On the shopkeeper gui, i just want a button to give the player an item like dirt, when the player clicks it gives them dirt. Ive set up everything but i dont know how to give the player an item, is there like entity.player.giveItem? or something like that
×
×
  • Create New...

Important Information

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