warjort
Members-
Posts
5420 -
Joined
-
Last visited
-
Days Won
175
Everything posted by warjort
-
Apply effect to all player when they enter the game 18 lts version
warjort replied to lucastormreig's topic in Modder Support
Modifying vanilla blocks is a bad idea and it is unnecessary for your use case. You just need an event - which could be PlayerLoggedInEvent from what you say above or something more generic like PlayerTickEvent (called every 0.05 secs) then do your logic. -
Apply effect to all player when they enter the game 18 lts version
warjort replied to lucastormreig's topic in Modder Support
Fire is different to most mob effects. You can see an example of how to do it in Entity.lavaHurt() For others you LivingEntity.addEffect() using a MobEffect(Instance), see for example WitherSkeleton.doHurtTarget() -
I had a go at implementing something like what you are doing, this is what I came up with based on your code: public static void highlightBlock(DrawSelectionEvent.HighlightBlock event) { Minecraft instance = Minecraft.getInstance(); BlockHitResult hit = event.getTarget(); Vec3 pos = hit.getLocation(); Component text = new TextComponent("test"); PoseStack matrixStack = event.getPoseStack(); matrixStack.pushPose(); Vec3 cameraPosition = event.getCamera().getPosition(); Quaternion rotation = event.getCamera().rotation(); matrixStack.translate((double) pos.x - cameraPosition.x, (double) pos.y - cameraPosition.y, (double) pos.z - cameraPosition.z); matrixStack.scale(-0.025F, -0.025F, -0.025F); matrixStack.mulPose(rotation); Font font = instance.font; float f2 = (float)(-font.width(text) / 2); MultiBufferSource bufferSource = event.getMultiBufferSource(); int packedLight = instance.getEntityRenderDispatcher().getPackedLightCoords(instance.player, event.getPartialTicks()); instance.font.drawInBatch(text, f2, 0f, -1, false, matrixStack.last().pose(), bufferSource, false, 0, packedLight); matrixStack.popPose(); } This is not perfect since it actually draws the text kind of inside the block. Something you can see is especially a problem when you look at solid block from above. I'm sure you can fix this and other shortcomings. 🙂
-
You shouldn't just post "it does not work" after you change something. We need to see the full logs/debug.log You might have fixed the reported problem and now have a different error. But, since you don't have the latest version of forge for 1.19.2 - 43.0.8, you can try downloading that: https://files.minecraftforge.net/net/minecraftforge/forge/index_1.19.2.html You should also try without any mods. If that works, it would indicate that it is one of your mods that is the broken jar.
-
It isn't what was asked for, but it does contain this error. You have an incompletely downloaded jar file. The error message doesn't say which one, but I would guess from the context it is one of the forge jars? When you installed forge, did it say it completed normally? Try reinstalling forge.
-
Optifine for 1.16.5 isn't going to work with 1.19.2 According to their download page, they don't yet support 1.19.2 (not even a preview version): https://optifine.net/downloads
-
Most likely you have a very old version of java installed on your machine and curseforge is using it because it is the java in your operating system path . This comes up multiple times a week in relation to the Forge installer. e.g. https://forums.minecraftforge.net/topic/113778-version-119-41098-not-installing-due-to-javaxnetsslsslhandshakeexceptionsunsecurityvalidatorvalidatorexception/ If that doesn't fix it, you will need to speak to curseforge: https://support.curseforge.com/en/support/home
-
If you have a dimension then you must have a chunk generator and that must have a biome source. The biome source is what decides which biomes to use. You can do all this with json as well if you want: https://minecraft.fandom.com/wiki/Custom_dimension You only need to write code if the vanilla options/behaviour are not what you want.
-
As I said above, this is not my area of expertise. There is something of the blind leading the blind here. 🙂
-
Forget the EntityRenderer (it was EntityRendererDispatcher anyway). I was just using that to explain the translation is in 2 steps. * Step 1 - translate to the relative entity/block position * Step 2 - do additional block/entity specific changes like moving the name plate upwards (inside the Renderer) It is done this way so people that write BlockEntityRenderers or EntityRenderers don't have to deal with step 1. It is done for them. You have neither, so you need to do both steps. As I said above, an example of the code you want is in the LevelRenderer for the BlockEntityRenderDispatcher (d0, d1, d2 are the x,y,z of the camera) If you are going to force me to feed it to you on a spoon...
-
Server not starting, I've tried everything
warjort replied to Niko247's topic in Support & Bug Reports
https://forums.minecraftforge.net/topic/114183-error-de-inicio-de-servidor/#comment-507027 -
The latest release has a reference to the change in this method name in its change log. https://www.curseforge.com/minecraft/mc-mods/ambientsounds/files/3876483
-
Then it is an issue with ambientsounds that is using that mod. Make sure you have the latest version then contact the mod author.
-
You are missing the creativecore mod. That's because you are doing it wrong. The way to do modded minecraft is not to dump a set of random mods in your mods folder and hope it works. It most likely won't. If you don't know how to read/understand the error messages, you will have to ask questions here and wait for answers for every problem (which can be many). The way to do it is install mods individually and then check it works. If it doesn't work, you know which mod is the problem. No waiting for answers. If you use a launcher that tracks mod dependencies like curseforge, you get less problems like the one reported above. Without such a feature, you have to carefully read the mod's documentation to see which other mods the mod requires or wait for us to tell you.
-
It moves it up by the height of the entity model + half a block and it also does the mulPose and scale. You are missing the part where it initially translates to the block position, see my comments above. This doesn't make sense to me. This is just the value of camera.rotation() in the last call to EntityRenderDispatcher().prepare() I doubt this is intended to be used outside the entity rendering calls themselves. Also, if you use the HighlightBlock event you will be given a buffer source in the event state. You also get a camera. See this thread for tools/info to help translate old mods to the newer versions. https://forums.minecraftforge.net/topic/115137-1192-translating-classesmethods-from-1165/
-
If it just for the block being looked at, you might find subscribing for DrawSelectionEvent.HightlightBlock more useful?
-
This isn't really my area of expertise but.. You will need to do more than just drawing the text, you also need to change the pose (translate, rotate, etc.) to match where to draw it in the world. e.g. for the entity rendering this is done in the EntityRendererDispatcher.render(). But renderNameTag() makes some additional changes so the text is correctly aligned to the camera. For blocks I guess you can get the basic logic by looking at where it calls BlockEntityRendererDispatcher.render() in LevelRenderer.render().
-
For 1.18? See OverlayRegistry for how to register an IIngameOverlay as part of the in game gui. e.g. see ForgeInGameGui.HUD_TEXT that draws the debug text when you press F3 (amongst other things). If you really do want to draw text in the world, look at the some vanilla code that does this, e.g. EntityRenderer.renderNameTag()
-
i got a crash report while creating a world
warjort replied to Propain's topic in Support & Bug Reports
Remove rubidium extras until they fix it. https://github.com/TeamDeusVult/MagnesiumExtras/issues/26 -
Minecraft says "loading wood" than crashes
warjort replied to Ear_thy's topic in Support & Bug Reports
Issue with let sleeping dogs lie mod not updating for the stable release. -
i keep getting a crash report when i try to play a modpack i made
warjort replied to Propain's topic in Support & Bug Reports
Issue with illuminations, make sure you have the latest version then contact the mod author. -
it crashes and i cant see the reason why
warjort replied to TiffyStorm's topic in Support & Bug Reports
-
when it is loading the datapack