Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/21 in all areas

  1. Probably not, it was exposed using access transformers most likely. I would say that TelepathicGrunt has a good explanation on how to do this. This should be lax enough so you don't have to copy anything directly but provide enough information on what certain methods do and how to properly use them.
    1 point
  2. That grabs the name from the NetworkPlayerInfo which is separate. You would need to set it from the ClientPlayerEntity in a sided-safe manner.
    1 point
  3. Supply the property used to determine if the push is grown via BlockState#with and set it to the max age most likely.
    1 point
  4. The only thing you should click on adfocus is the skip button in the top right, but if that prevents you from getting Forge entirely there are direct links in the "All Versions" section, just click on the circle-i next to the file you want.
    1 point
  5. I have literally done this a few hours ago. Here's what to do. There's a bit of linear algebra involved, so make sure to look that up. Check out 3Blue1Brown's videos. Especially the ones on 3d. They're a 10-minute watch away. After that, you have two steps to take into consideration: 1. Rotation, which is a simple linear transform (this should be represented by a 3x3 matrix). 2. Displacement, which is an "offset" so-to-speak which you must apply to your vectors, to make up displaced quads. This is necessary because rotating quads using this method will rotate them around the 0 axis of the block (be it in the direction of x, y, or z. It depends on what you need) Here's a pic of how I messed up the displacement, so you can understand why it's necessary: The transparent-blueish spots are where the block is, and as you can see the quads are displaced incorrectly. This was however easily fixed once I went over the maths one more time. I don't think the mojang Vector3d has a transform function, you'll need to write that yourself. But here's my take on it, so it's easier for you: // The CustomVector3D class extends mojang's Vector3d, so the class fields x, y, z are available public CustomVector3D linearTransform(double[][] mat) { if (mat.length != 3 || mat[0].length != 3 || mat[1].length != 3 || mat[2].length != 3) { throw new IllegalArgumentException("Transformation matrix needs to be 3x3x3 in size."); } double xx = mat[0][0] * this.x + mat[0][1] * this.y + mat[0][2] * this.z; double yy = mat[1][0] * this.x + mat[1][1] * this.y + mat[1][2] * this.z; double zz = mat[2][0] * this.x + mat[2][1] * this.y + mat[2][2] * this.z; return new CustomVector3D(xx, yy, zz); } There are some rotation methods, but I haven't taken a good look at them because I feel more comfortable (at the moment) with doing my own maths. If you have any questions, please let me know.
    1 point
  6. I took a look at RedstoneWireBlock and placed some dust in Minecraft to see what's up (you can press F3 and look at the dust to see properties). There's a RedstoneSide enum that can be either NONE, SIDE, or UP. Each side of the block (north, south, east, west) has an associated RedstoneSide value. These side properties are mapped to these enum values in a BlockState (field_235543_o_). Consider a block of redstone dust, Block A. If Block A was not surrounded by any blocks and the dust was pointing in all directions, the NORTH, SOUTH, EAST, and WEST properties would all be SIDE. If there was another redstone dust to the north of Block A, then Block A's NORTH and SOUTH properties would be SIDE, and its EAST and WEST properties would be NONE. If there was a solid block to the north of Block A with a dust on top, then Block A's NORTH property would be UP, its SOUTH property would be SIDE, and its EAST and WEST properties would be NONE. From a quick look it seems like func_235554_l_ builds a shape for each valid block state. You can probably look at the blocks adjacent to yours and set these properties accordingly, then use the properties to change the block state.
    1 point
  7. What did you not understand of those classes you looked at?
    1 point
  8. This is not applicable for 1.16.2+ as the system was changed. First, you will need to register your Configured Feature within the associated WorldGenRegistries. I would suggest looking at how the Features class does the registering and borrow the method. Note that this should be deferred until FMLCommonSetupEvent. For reference, the register event is not thread-safe, so it should be wrapped using the synchronous work queue provided in the event (e.g. enqueueWork). From there, you can attach the feature to the biome(s) of your choice using BiomeLoadingEvent. You can grab the generation settings builder there and add a feature during a specific point in the generation process, in your case most likely UNDERGROUND_ORES.
    1 point
  9. Animefan8888 is right about creating a scrolling image by changing the start,height. I wrote most of my guis like that, But if you were wanting to have a bunch of images and text and dont want to write all the logic for that. Than I have used GL Scissor to do what your asking. I've used it to draw scroll-able guis inside other guis. Anything outside the borders will get cut off. It really depends on what you trying to do. As this can be a bit much for a simple scrolling window. You will still have to handle all the key inputs & mouse inputs. This only handles the rendering. Also This was written for mc1.12.2.
    1 point
×
×
  • Create New...

Important Information

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