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

Silverminer

Members
  • Content Count

    9
  • Joined

  • Last visited

Everything posted by Silverminer

  1. Look the Forge's source code. In BedBlock, minecrafts uses PlayerEntity#displayClientMessage to display sleep result (which can be success or failure, so "You can only sleep at night"). Just give an ITextComponent (StringTextComponent or TranslationTextComponent in most cases) and set the second boolean to true to send an state text instead of sending it to the chat. So: PlayerEntity player = //Get player here player.displayClientMessage(new StringTextComponent(""), true); I havn't check that, but it should be somthing like that
  2. I've search a bit around and found this: https://gitlab.com/modding-legacy/lava-monster/-/blob/1.16.x/src/main/java/com/legacy/lava_monster/entity/LavaMonsterEntity.java It looks like they do what you want to do. Hope this helps. Do you have an implementation of #aiStep? Check if you call the super method. May i can help more when i see more code
  3. I don't know how i can thank you enough. It does work now! Thanks also for the tip with line width. The only problem is, that i can't see my box through water, but i think i should start a new topic for that.
  4. You should register your goals in #registerGoals instead of your constructor. I'm not sure, but i think you should have an attack goal too (In zombie it is ZombieAttackGoal). If it still doesn't work, please post more code (or a github link). Hope i can help
  5. I'm not sure what you try with FAKE_WITHER, but here is the an link to an old topic about spawn eggs. There is also an up to date implementation of mine: https://github.com/Silverminer007/MoreOre-1.16/blob/master/src/main/java/com/silverminer/moreore/common/objects/items/ModSpawnEggItem.java If this isn't what you were looking for post a github or so for code to get an idea of what you've tried
  6. Looks like it is an issue with FOV, because when disabling FOV effects the box is rendered fine. Changing fov in options screen, does move the world but not my box, when i use worldrender last event. It looks like #renderWorld does implement fov anywhere, but i can't figure out where. Do i need to implement fov myself and if yes how to do it? Or do i need something else, what BlockHighlight Event already implements? Anybody an idea, or an idea where to look? An working example would help too. Thanks in advance
  7. Thanks for the replys. I was using the same translation as minecraft, but i've tried yours too and it still does not work. The lines are still moving while flying and so on, but now sneaking does affect it too. The lines were also in the middle of the block instead of beeing at the side. Vector3d vec = mc.gameRenderer.getMainCamera().getPosition(); double renderPosX = vec.x(); double renderPosY = vec.y(); double renderPosZ = vec.z(); ms.pushPose(); ms.translate(-renderPosX, -renderPosY, -renderPosZ); Right now i was using this translation and i've checked, the Minecraft function (WorldR
  8. I just need to translate the matrixstack back to the world coordinates. How should i do it instead? Were is the difference between the MatrixStacks of the two events? To me it looks like Minecraft does some translations in #renderLevel, but i can see which ones. Am i wrong? Is the translation using render entities position and partial ticks better? Or is the translation completly useless?
  9. Hello, this is my first post, so please be considerate of errors The whole code is on my github too: https://github.com/Silverminer007/Shrines/blob/experimental/src/main/java/com/silverminer/shrines/events/ClientEvents.java So, i want to draw boxes to the world which don't depent on any block/tileentity in the world. I've written a method that should draw the lines. I'm calling it from RenderWorldLastEvent event. Here is my code: public static void renderBounds(MatrixStack ms) { // Enable depth test first RenderSystem.depthMask(false); // Get Minecraft and store it
×
×
  • Create New...

Important Information

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