Jump to content

Naiten

Members
  • Posts

    325
  • Joined

  • Last visited

Everything posted by Naiten

  1. Those assigned values are exact size of my texture. And i made my texture from chest one, there's no problem with it's size. Anyway, if i remove those assignments, it works neither.
  2. So, i try to open a gui, here's what i get: My gui texture: My draw gui class: public class GuiTub extends GuiContainer{ public GuiTub(InventoryPlayer invPlayer, CherTub tub) { super(new ContainerTub(invPlayer, tub)); xSize = 176; ySize = 149; } @Override protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().func_110434_K().func_110577_a( new ResourceLocation("row:textures/gui/gui_tub.png")); int posx = (width - xSize) / 2; int posy = (height - ySize) / 2; drawTexturedModalRect(posx, posy, 0, 0, xSize, ySize); } }
  3. GotoLink, because i don't need that. I've copied all code i needed from entity.onEntityUpdate into my methods. --- I've tried, and your advise is not working.
  4. Hello there. While trying to smoothen my wagon's movement, i've commented almost all code in it's class, so now it just floats in the space, without doing any crazy math. As a result — it still jerks and glitches. http://www.youtube.com/watch?v=EeOUbHt1n14 Here are my sourcecodes: Cart class — http://pastebin.com/QcU1giuX# Locomotive class — http://pastebin.com/nrkmekG9# Any ideas on reducing jerkyness?
  5. Well, myitemclass.onLeftClickEntity() allows me to perform different stuff with the entity i clicked. But how do i know the position at wich player clicked? I.e. i want to know if player has clicked front/rear side of my entity. Any ways to do that?
  6. I do believe it isn't. However, i have not managed to make headlights for my locomotive
  7. Well, i make my blocks as usual, public static final Block pointer = new BlockPointer(503, Material.iron).setHardness(1.0F).setResistance(3F); public static final Block clockPole = new BlockClockPole(504, Material.iron).setHardness(1.0F).setResistance(2F); //in init event GameRegistry.registerBlock(pointer, "blockPointer"); GameRegistry.registerBlock(clockPole, "blockClockPole"); LanguageRegistry.addName(pointer, "Pointer"); LanguageRegistry.addName(clockPole, "Pole clock"); But... Idk why, both of them are named 'Pole clock', or 'Pointer' if i place addName(pointer, "Pointer") after addName(clockPole, "Pole clock")... Any ideas?
  8. I hope you were not going to advise me to make an infinite loop, and just forgot super. prefix. I've fixed it — the problem was in getCollisionBox(). Now i have @Override public AxisAlignedBB getCollisionBox(Entity par1Entity){ if (par1Entity != riddenByEntity && par1Entity.ridingEntity != this){ return par1Entity.boundingBox; } return null; } and it's fine.
  9. There are none of those calls in my code, and if i comment modelMy.render() game works fine...
  10. Press «Thank you» button on the post that helped then -.-
  11. Any time i try to render, i get «already tessellating» on modelMy.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); even if the whole render method is just public boolean renderWorldBlock(IBlockAccess world, int i, int j, int k, Block block, int modelId, RenderBlocks renderer){ if(modelId == this.renderStuffId){ modelMy.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); return true; } Any ideas? I do NOT want TE, because it consumes more resources, if my memory doesn't fail me.
  12. TileEntityGag tileGag = (TileEntityGag)world.getBlockTileEntity( x + shift[0], y, z + shift[1]); if(tileGag != null){ tileGag.primary_x = x; tileGag.primary_y = y; tileGag.primary_z = z; } I gonna update my tutorial...
  13. What is 64 line in ItemStoplightPlacer?
  14. No. If you use ("mod_id:folder_a/folder_b/file.png") textures will go into mcp/src/minecraft/assets/mod_id/folder_a/folder_b/file.png You are free to place them where you want, but remember about lower case.
  15. Check this thread. http://www.minecraftforge.net/forum/index.php/topic,10242.0.html
  16. No, i don't. But why?
  17. Yay, i finally found out how to do this. For those, who wondering, now you should just use this instead of loadTexture("texturePath") this.renderManager.renderEngine.func_110577_a( new ResourceLocation("modId:texturePath")); for entity renders, and this tileEntityRenderer.renderEngine.func_110577_a( new ResourceLocation("modId:texturePath")); for tile entity renders. Note, that both modId and texturePath should be in lower case, as well as names of the folders in which texture lays. Also, i'm not sure if that function will be named same in your MCP.
  18. Well, the title says. Before 1.6 i could easily have many separate models and textures to use in my renders, and that was like: this.loadTexture("texture_A"); this.model_A.render(par1, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); this.loadTexture("texture_B"); this.model_B.render(par1, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); this.loadTexture("texture_C"); this.model_C.render(par1, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //And so on... But, in 1.6.2 loadTexture("") is no more available, instead of it i get some idiotic protected ResourceLocation func_110775_a(Entity entity) that i don't even know how to use. And, as i guess, it won't allow me to load several textures... Wtf, Mojang?! Any ideas on this subject?
  19. I've tryed once more and now it's fine. Seems that it happened because i had no minecraft 1.6.2 installed itself, lol. Java sources are in there usual place — forge/mcp/src if everything went good.
  20. However, still thanks.
  21. I just did it as was written in tutorial... And what about glitches?
  22. Yay, thanks, diesieben07. That actually helped. I'm only wodering now, am i doing it right? And one more question. If i perform some changes to entity motion and position variables, that are later used in default moveEntity(), in onUpdate() and locomotive movement is a bit glitchy (it does not get teleported back, but twitches), is that also a packet problem or not?
×
×
  • Create New...

Important Information

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