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


  • Content Count

  • Joined

  • Last visited

  • Days Won


SerpentDagger last won the day on May 20

SerpentDagger had the most liked content!

Community Reputation

22 Excellent

About SerpentDagger

  • Rank
    Creeper Killer


  • Location
    Whatsitsplace, Whoknowsforshire

Recent Profile Visitors

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

  1. This effect is hardcoded for the Nether portal only. If you wanted to recreate the effect, I think you could perform similar operations on the projection matrix before rendering, which would be done in the EntityViewRenderEvent.CameraSetup. Unfortunately, this event is fired after the projection matrix is already loaded into RenderSystem, and with no reference to the general-purpose new MatrixStack that is passed around for rendering. In order to modify it, then, you would use RenderSystem#multMatrix() with your effect matrix. This method is marked as deprecated, which means it's not supposed
  2. runData has an output folder that is specified by the build.gradle file. I think the default is src/generated. It will overwrite files that it's previously put there. The idea, I think, is that you move the files you need from the generated folder into your main resources folder, but the problem I found there is that the build.gradle file by default allows assets to be kept in the src/generated folder, and will look for them there, which causes weird conflicts if you don't delete everything from the generated folder and refresh the IDE. That's not very convenient, so I changed my build.gradle
  3. The Material specifies generic properties like whether or not the block can be collided with, how it interacts with pistons, whether it burns, etc. It won't solve your rendering problem, but will dictate some other relevant behaviors. Using the settings of PLANT is probably exactly what you want in this regard. In .minecraft/versions/[version_folder] there is a jar file, which you can extract somewhere convenient. In this extracted folder, there is an assets/minecraft folder, which contains the Minecraft assets which you can use as reference. A BlockState describes a combination o
  4. These sorts of properties are now part of the AbstractBlock.Properties object that you pass to the Block constructor. The methods you're probably interested in are noOcclusion and noCollission. The Material of the Properties is also relevant here, since they have the nonSolid building method. The reason your flower is rendered on the outside of a cube is that its model defines that to be the case. You should look at the model file of a block with the relevant model to determine how to change this. models/block/dead_bush.json, for example, uses the parent block/cross, which I think is what
  5. @SubscribeEvent public void onWorldTick(final TickEvent.WorldTickEvent event){ if(this.world == null){ this.world = event.world; } if(random.nextInt(2) == 0){ swapBlock(); } } My guess would be that this is the problem. You only ever set the World object once, and I don't think it's the same object between loads of the world, which means that you're trying to edit the old World when it is no longer being processed. It seems likely that yours is the last reference to that World object, since it should have been unloaded, which w
  6. You're welcome! ๐Ÿ™‚ I think that may also be fixable with a custom RenderType. They can specify layering, blending, masking, etc.
  7. I've finally got a solution to the positional problem. It turns out DrawHighlightEvent is fired before all the relevant batches are drawn, while RenderWorldLastEvent is fired after all the buffers have been drawn. (I would consider this a bug.) That means that while your buffer's waiting patiently to be drawn, other parts of the code can change the global projection matrix. Notably, GameRenderer#renderItemInHand starts mucking about with the projection matrix naught but 4 lines later. The result is all this unpredictable failure. The solution is to draw your buffer at the end of writing t
  8. First I need to apologize for the previous post. It looked to hold true while I was writing it, but with further testing it would seem I don't know what I'm talking about. Sorry about that mess. I'm working on a similar problem, and (apparently) haven't figured out how to solve it yet, but have a couple clues that might help... โ— TileEntityRenderers render in block-space, which means that their MatrixStack has to get that way somehow. GameRenderer#renderLevel calls WorldRender#renderLevel, which activates the TileEntityRendererDispatcher, which activates the TileEntityRenderers.
  9. EDIT: I'm wrong. These days, instead of manually interpolating between tick positions, there's a method Entity#getPosition(float), which returns an interpolated Vector3d. That is the vector which you should use to translate the MatrixStack back to world-space, from entity-space. Passing the last matrix pose in as a parameter to IVertexBuilder#vertex(Matrix4f, float, float, float) will transform from camera-space to entity-space (while using IVertexBuilder#vertex(float, float, float) operates in camera-space). Here is an example of rendering a translucent white quad near the
  10. That's a pretty nice way of doing it, thanks!
  11. I am putting together a spellcasting system, and the spells will have visual effects. I have a Capability which holds the player's active Spell, as well as whichever passive Spells may still be causing residual effects. I would like to access these Spells through a rendering event (I was thinking RenderWorldLastEvent), and perform the relevant rendering. The problem is that I would like to define these rendering methods in a neat way, rather than dumping them willy-nilly into the event class, especially as there are potentially many Spells, each with potentially different rendering s
  12. Hello, I recently got re-interested in modding, and have been going through the documentation to brush up my knowledge. I'm working on a BlockStateProvider to take care of mass-producing simple files. I have verified that its event code is being run, but BlockStateProvider#registerStatesAndModels() is never called (I am using runData). Any help would be appreciated. EventSubscriber and registration BlockStateProvider build.gradle
  13. This is checking from (x, y, z) to (x, y + 1, z), which is a box of width 0, depth 0, and height 1. It seems unlikely that an item would fit within that one. Beyond that... This will never be true. The ItemStack stored in this EntityItem will never == that new ItemStack() you created above. You need to compare the two by their ItemStack#getItem() methods.
  • Create New...

Important Information

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