Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/18 in all areas

  1. Well, you've shown you can't infact make blocks without knowing how to code in Java. Making a thread every hour is not a good thing, you need to learn how to read errors, basic Java, how to research into problems. Hell, you can't even understand the straightforward error your JDK was probably yelling at you. I think there's a point where you can use it even if you are inexperienced, and I think you could use other APIs or use Spigot if you like MInecraft coding, but Forge is not good at all for newcomers. I tried when I first started Java, didn't understand it at all, went and learned Java, now I don't need to follow step by step tutorials. I'd suggest you do the same.
    1 point
  2. You need to add to, not overwrite, the loot table
    1 point
  3. Maybe I can enlighten a you a bit when it comes to blend functions. How it works: Before a face with an alpha value is rendered let there be already existing background on your screen. We'll call the screenplane which openGL paints on "destination pane" (normally you don't speak of a plane but of a framebuffer but you can think of it as a canvas). What happens now is that openGL doesn't directly paint ontop of the already existing stuff. Instead think about taking a new canvas and paint you face on this one. Let's call it "source pane". For the computer of course colors aren't colors. They are Integers and are represented in the "rgb"-colorscheme (red, green, blue). To add transparancy we need a forth number, the alpha-value. For every pixel on value is saved for red, green, blue and alpha (rgba). The effectiva range is [0...1] from "not there" to "all of it". But now you have two different planes! How does this get merged into one? This is where the blending-function blends in. You call GL11.glBlendFunc(sScale, dScale). The function takes two arguments of the exact same "type" (openGL-constants of a specific type, for you they appear as ints but openGL interprets them). When you look at the documentation ( https://www.opengl.org/sdk/docs/man4/xhtml/glBlendFunc.xml ) you see that you can actually pass any of GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA. GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA What now happens is that the colors on the destination plane are mulitplied by a factor related to the GL-constant you passed, the dScale. For GL_ONE this factor is 1. For GL_ONE_MINUS_SRC_ALPHA this factor is (1-alphaOnSourcePlane) etc. This is done for the source-plane, too, but with the sScale parameter instead of dScale. Then the resulting source-values just get add ontop of the existing destination colors. Here you can see why GL_ONE is a bit worse than GL_ONE_MINUS_SRC_ALPHA but doesn't look bad after all: If you can reacall if you use GL_ONE the color after painting the plane would be something like dColor*1+sColor*sValue. This value will always be greater than before and the world "behind the glass/transparent whatever" would not get filtered any bit. With GL_ONE_MINUS_SRC_ALPHA the equation is about dColor*(1-sValue)+sColor*sValue meaning that the dColor (existing color) gets reduced by a little bit as much as the material you draw is NOT transparent. I hope this can help you figuring it out in your mind Keep up the modding, the pipes look awesome.
    1 point
×
×
  • Create New...

Important Information

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