Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Elix_x
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)

Elix_x

Members
 View Profile  See their activity
  • Content count

    878
  • Joined

    January 26, 2014
  • Last visited

    December 2, 2017

Community Reputation

75 Excellent

1 Follower

  • vrackfall

About Elix_x

  • Rank
    Dragon Slayer

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

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

  1. vrackfall started following Elix_x November 4, 2017
  2. Elix_x

    Best option for rendering a modular block?

    Elix_x replied to AnZaNaMa's topic in Modder Support

    But getExtendedState is called on the same thread, and right before getQuads... So, would it not change anything?
    • October 3, 2017
    • 16 replies
  3. Elix_x

    Best option for rendering a modular block?

    Elix_x replied to AnZaNaMa's topic in Modder Support

    I understand that concurrency is an issue that can occur at any time. But what's the other way of passing required information to the model? You could compile everything you need into immutable objects to be passed, and that work on that in tessellation, but that creates compilation (+decompilation) overhead.
    • October 3, 2017
    • 16 replies
  4. Elix_x

    Best option for rendering a modular block?

    Elix_x replied to AnZaNaMa's topic in Modder Support

    Hmmm.... Doesn't look like this thread exists anymore. It seems like it was long ago enough for it to vanish somewhere... And me to forget what exactly was it about.
    • October 2, 2017
    • 16 replies
  5. Elix_x

    Best option for rendering a modular block?

    Elix_x replied to AnZaNaMa's topic in Modder Support

    Yep, you have to declare them in block class to make MC know about them, and actually provide/update them. FYI: This is similar for saved, actual and extended props. The declaration of all 3 is in createBlockState, saved props are handled by meta<->state methods, actuals by getActualState and extended - by getExtendedState. The difference between actual and extended, is that actual is used on server and client, has a limited number of serializeable values it can take and can be used in state mapping (~json model). Extended state is used only on client, can take any values of any type, and cannot be used for state mapping - aka only custom IBaked models. FYI 2: Actually, if you can create a single unlisted property for tile entity and pass it directly, instead of world and position. I'm just using 2 separate props, because i'm using them for other blocks too, which don't always have a tile entity, or i simply don't need it.
    • October 2, 2017
    • 16 replies
  6. Elix_x started following How to rotate OBJ around specific point always? and Best option for rendering a modular block? September 30, 2017
  7. Elix_x

    Best option for rendering a modular block?

    Elix_x replied to AnZaNaMa's topic in Modder Support

    If you won't be animating, use custom IBakedModel. If you do want to animate, as Draco said, use Fast TESR. By creating custom implementation of IBakedModel, you can override getQuads. In order to provide tile's data to get quads, pass unlisted properties from your block to model (override unlisted prop methods in your block class). getQuads is called each time model is drawn (item / in-world render update). So, in there, get baked models for all your parts, stream all the quads transforming accordingly, collect into a list and that list (considering your frame is rather a non-full block, you should do it only when side arg is null - side arg is for adjacency culling - ). Example (might be too many files to all link here) : IBaked, Helper, Uses client baked lib and client baked pipeline (and here), Model reg manager for using loaded & mapped json/obj/baked models for custom stuff, and a lot more...
    • September 30, 2017
    • 16 replies
  8. Elix_x

    How to rotate OBJ around specific point always?

    Elix_x replied to ctbe's topic in Modder Support

    Just as Draco said, you have to translate the lid such that it's origin is world origin, rotate, then translate it back. Notice GlStateManager.translate(x, y, z) in the beginning of the method. This method translates tile entity in the world view space. Now the origin (0,0,0) is "actually" the XYZ of the tile entity, AKA you're working in local coordinates - coordinates relative to the origin of tile/model. So you have to translate the lid by it's local model coordinates to local origin and back. Ex: GL.trans(-lidModelCoords).rot(rot).trans(lidModelCoords).
    • September 19, 2017
    • 10 replies
  9. Elix_x

    How to rotate OBJ around specific point always?

    Elix_x replied to ctbe's topic in Modder Support

    This is the definition of matrices. Understanding matrices will definitely help you solve this. I recommend watching this: Linear transformations and matrices | Essence of linear algebra, chapter 3* As for how to rotate around an axis, in 3D, you can look at how utility method is implemented in JOML: https://github.com/JOML-CI/JOML/blob/c312304fefbe757e3d37cba866f5742b3448a85c/src/org/joml/Matrix4f.java#L11379 This is generic use case, but now i have to correct you. What you put in the "What is happening" is not correct. Because in both translation, rotation and scaling, coordinates do "the same" what the model does (it is actually the opposite - model does whatever you do to the coordinate system). That said, the transformations you apply further down in the stack, actually apply to the already transformed coordinates as a whole, so
    • September 17, 2017
    • 10 replies
      • 1
      • Like
  10. Elix_x

    How to rotate OBJ around specific point always?

    Elix_x replied to ctbe's topic in Modder Support

    Uhm... Draco..?
    • September 17, 2017
    • 10 replies
      • 1
      • Like
  11. Elix_x

    [1.12] Adjusting BakedQuads

    Elix_x replied to mysticalherobine's topic in Modder Support

    The texture UVs you have are actually the global UV coordinates on the texture atlas. So what you will need is figure out a way to access the texture atlas sprite that was used to bake the quad. In the sprite, you will find min & max global UV coordinates. Now just do some math, and apply the values. Note: if you're trying to reduce the resolution of the texture, you have to do it completely differently. As for manipulating quads data, you can't just do it on that raw data. Because quads for blocks and quads for items are in a different VertexFormat - the index defining each format element is different. You'll have unpack the quad first (into forge's UnpackedBakedQuad), then manipulate the more conveniently, but still not very, stored vertex data. Take a look at the VertexFormat class to see how it is constructed. PS: I have a library i use to unpack models, quads & vertices into Java friendly format (easy get&set operations). If you want, you can check it out here.
    • August 16, 2017
    • 1 reply
      • 1
      • Like
  12. Elix_x

    [1.11.2] Gui drawScreen not with FPS

    Elix_x replied to SuperHB's topic in Modder Support

    Considering above, there is a way to render based on ticks, and it is used by Vanilla entities, chests, etc... Very often in the render/draw method, you get a float parameter partialTick. It is between 0 and 1 and it represents how much in-between 2 ticks the current frame is. Use it to interpolate between previous and next tick and you get smooth transitions / animations.
    • July 21, 2017
    • 8 replies
  13. Elix_x

    [1.12] New Registry System and where to call the registry event

    Elix_x replied to GooberGunter's topic in Modder Support

    Registry events work as any other Forge event - you subscribe it to the event bus, and that's it. Forge will call it when stuff will be registered.
    • July 20, 2017
    • 6 replies
      • 1
      • Like
  14. Elix_x

    [SOLVED] [1.12] Obfuscated Field Name for Reflection Use?

    Elix_x replied to IceMetalPunk's topic in Modder Support

    0_o Just use MCP Mappings Viewer by bspkrs.
    • July 9, 2017
    • 2 replies
  15. Elix_x

    [SOLVED... KIND OF]Stencil buffer cuts everything

    Elix_x replied to Lucius Q. User's topic in Modder Support

    When stencils don't work for me right away, i usually enable the color write and draw the stencil'ed region with colors, then i go into debug mode and play with it until i get it to work.
    • July 2, 2017
    • 5 replies
  16. Elix_x

    [SOLVED... KIND OF]Stencil buffer cuts everything

    Elix_x replied to Lucius Q. User's topic in Modder Support

    Make sure that you enabled (created) stencil buffer. By default, MC does not create one. Alternatively, because you're in 2D, use scissors.
    • July 1, 2017
    • 5 replies
  17. Elix_x

    [1.10.2] FastTESR rendering BakedQuads oddly

    Elix_x replied to Matryoshika's topic in Modder Support

    First, ICustomModelLoader has nothing to do with this. Custom IBakedModels should be replaced in the registry in the ModelBake event. Second, to provide data to custom unbaked you can use IUnlistedProperties. Just like block has properties, it also has unlisted properties. While normal properties are both server and client, can be use for logic and require fixed amount of allowed values, unlisted properties are only used for rendering and can hold absolutely any values (even Worlds!). You have to implement (similarly named methods) getUnlistedState&Container in the block class and cast IBlockState to unlisted state container (don't remember exact class name, sorry) to be able to retrieve unlisted properties.
    • April 23, 2017
    • 5 replies
  • All Activity
  • Home
  • Elix_x
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community