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

Xumuk

Members
  • Posts

    36
  • Joined

  • Last visited

Recent Profile Visitors

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

Xumuk's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. And I can advise the author of the topic to see what methods the IDE offers from ModelBiped and ModelRenderer. Perhaps there are methods that will add support for changing the movement of the hand.
  2. I also made a armor with custom model, but the texture is very incorrectly displayed. In order not to create new threads, I'll ask my question here.
  3. There is no registration in the minecraft init class method, there is just a new object created by the FomtRenderer indicating the path. Similarly, I create a new object in ClientProxy, and call it in the render.
  4. Sorry, I don't know what you mean.
  5. On top of the letter "B" should be a black square, if it was my texture. @SideOnly(Side.CLIENT) public class SovTileEntitySignRender extends TileEntitySpecialRenderer<TileEntitySovSign> { private static final ResourceLocation SIGN_TEXTURE = new ResourceLocation("soviet:textures/entity/walltile_1.png"); private final SovSignModel model = new SovSignModel(); Minecraft mc = Minecraft.getMinecraft(); public FontRenderer getFR() { FontRenderer fr = new FontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, true); return fr; } public void render(TileEntitySovSign te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { Block block = te.getBlockType(); GlStateManager.pushMatrix(); float f = 0.6666667F; if (block == Blocks.STANDING_SIGN) { GlStateManager.translate((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); float f1 = (float)(te.getBlockMetadata() * 360) / 16.0F; GlStateManager.rotate(-f1, 0.0F, 1.0F, 0.0F); } else { int k = te.getBlockMetadata(); float f2 = 0.0F; if (k == 2) { f2 = 180.0F; } if (k == 4) { f2 = 90.0F; } if (k == 5) { f2 = -90.0F; } GlStateManager.translate((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F); GlStateManager.rotate(-f2, 0.0F, 1.0F, 0.0F); GlStateManager.translate(0.0F, -0.3125F, -0.4375F); } if (destroyStage >= 0) { this.bindTexture(DESTROY_STAGES[destroyStage]); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(4.0F, 2.0F, 1.0F); GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); GlStateManager.matrixMode(5888); } else { this.bindTexture(SIGN_TEXTURE); } GlStateManager.enableRescaleNormal(); GlStateManager.pushMatrix(); GlStateManager.scale(0.6666667F, -0.6666667F, -0.6666667F); model.bone.render(0.0625F); model.bone2.render(0.0625F); GlStateManager.popMatrix(); FontRenderer fr = this.getFR(); float f3 = 0.010416667F; GlStateManager.translate(0.0F, 0.33333334F, 0.046666667F); GlStateManager.scale(0.010416667F, -0.010416667F, 0.010416667F); GlStateManager.glNormal3f(0.0F, 0.0F, -0.010416667F); GlStateManager.depthMask(false); int i = 0; if (destroyStage < 0) { for (int j = 0; j < te.signText.length; ++j) { if (te.signText[j] != null) { ITextComponent itextcomponent = te.signText[j]; List<ITextComponent> list = GuiUtilRenderComponents.splitText(itextcomponent, 40, fr, false, true); String s = list != null && !list.isEmpty() ? ((ITextComponent)list.get(0)).getFormattedText() : ""; if (j == te.lineBeingEdited) { s = "[" + s + "]"; fr.drawString(s, -fr.getStringWidth(s) / 2, j * 10 - te.signText.length * 8, 0); } else { fr.drawString(s, -fr.getStringWidth(s) / 2, j * 10 - te.signText.length * 8, 0xc90014); } } } } GlStateManager.depthMask(true); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix(); if (destroyStage >= 0) { GlStateManager.matrixMode(5890); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); } } }
  6. Understood, it was necessary to do this in the render. But for some reason it still does not load my picture
  7. Thank you, I almost understood. When I create a new object like this: Minecraft mc = Minecraft.getMinecraft(); FontRenderer fr = new FontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, false); I get null in locationTexture in mc.renderEngine. This is strange, because the path is correct.
  8. But I need my own font, and not the same as in vanilla. You said that I need to register Fontrenderer. How do I need to do this?
  9. Well, the fonts are contained in the game as a png image. And processed by Fontrenderer.I mean, if I don't need to create my class Fontrenderer. So how can I register it correctly?
  10. Thanks. And how do I properly register my picture with chars?
  11. Hi. I'm making my sign. In General it is quite successful, I made it, but the only thing that I can't do it - I want to upload your own image with fonts. But why is it still loaded in vanilla. Do I need to register as my FontRenderer? If necessary, how to do it? My FontRenderer public class SovFontRenderer extends FontRenderer { public SovFontRenderer(GameSettings gameSettingsIn, ResourceLocation location, TextureManager textureManagerIn, boolean unicode) { super(gameSettingsIn, location, textureManagerIn, unicode); } } This is part code TESR GlStateManager.popMatrix(); Minecraft mc = Minecraft.getMinecraft(); SovFontRenderer fontrenderer = new SovFontRenderer(mc.gameSettings, new ResourceLocation("soviet:textures/font/soviet_font.png"), mc.renderEngine, true); float f3 = 0.010416667F; GlStateManager.translate(0.0F, 0.33333334F, 0.046666667F); GlStateManager.scale(0.010416667F, -0.010416667F, 0.010416667F); GlStateManager.glNormal3f(0.0F, 0.0F, -0.010416667F); GlStateManager.depthMask(false); int i = 0; if (destroyStage < 0) { for (int j = 0; j < te.signText.length; ++j) { if (te.signText[j] != null) { ITextComponent itextcomponent = te.signText[j]; List<ITextComponent> list = GuiUtilRenderComponents.splitText(itextcomponent, 90, fontrenderer, false, true); String s = list != null && !list.isEmpty() ? ((ITextComponent)list.get(0)).getFormattedText() : ""; if (j == te.lineBeingEdited) { s = "[" + s + "]"; fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - te.signText.length * 6, 0); } else { fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - te.signText.length * 6, 0); } } } } GlStateManager.depthMask(true); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix();
  12. I solved it. In my JSON there just wasn't enough points during the animation
  13. I found a bug! I was looking at the wrong JSON file! But I have still nothing works, not moving. I understand AnimationTESR just makes blockstate change depending on time? Is the intermediate animation done automatically?
  14. Thanks..Yes, everything is the same as everywhere. Here is a problem that for some reason writes to me when I put the block that clip "open" is not found though it exists. I don't understand why he can't find it. ?. So if I click on the block itself, "closing\opening", as the debug shows me in my TileEntity is working.
  15. Do you know if I need a java entity model for this animation or not? You are a Forge developer, maybe you know)
×
×
  • Create New...

Important Information

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