-
Posts
18 -
Joined
-
Last visited
Recent Profile Visitors
844 profile views
idev's Achievements

Tree Puncher (2/8)
0
Reputation
-
I don't know how, but setting: mappings channel: 'snapshot', version: '20210309-1.16.5' build.gradlew helped me. In short, I deployed the project on a new one and it all worked. I thought it was a bug or a flaw, maybe it is
-
Is this even possible with forge? Maybe I'm waiting in vain for an answer and I need to come up with a workaround
-
Hello, I have been suffering for 6 hours and cannot find a good, working solution. I need the text above the creature to always face the camera. I went through a lot of code examples and even tried to find the source code of the tag item in the game and render it. But I didn't find anything I needed. As far as I understand, the new version does not have MatrixStack.rotate, I need it judging by the examples. I tried GlStateManager and don't know how to pass the required matrixStack to fontRenderer.draw (matrixStack, ...) What should I do? Now I stopped at the option that is shown in the code below, but it does not do what I need. @Mod.EventBusSubscriber(modid = XCraft.MODID, value = Dist.CLIENT) public class ClientEventHandler { @SubscribeEvent public static void potion(RenderLivingEvent.Post<? extends LivingEntity, ? extends EntityModel<?>> event) { HealthBar.renderInWorld(event.getMatrixStack(), event.getEntity()); } } public class HealthBar { public static void renderInWorld(MatrixStack matrixStack, LivingEntity entity) { ClientPlayerEntity playerEntity = Minecraft.getInstance().player; assert playerEntity != null; FontRenderer fontRenderer = Minecraft.getInstance().font; assert fontRenderer != null; ITextComponent name = entity.getName(); fontRenderer.draw(matrixStack, name, 0, 0, 0xffffff); } }
-
[1.16.5] Trying to add a screen before uploading to the world.
idev replied to idev's topic in Modder Support
@Mod.EventBusSubscriber(modid = XCraft.MODID, value = Dist.CLIENT) public class ListenGuiOpenEvent{ @SubscribeEvent(priority = EventPriority.HIGHEST) public static void guiOpen(GuiOpenEvent event) { if (event.getGui() instanceof DemoScreen) { System.out.println("Gui Demo open scene"); } } } Oh, I'm sorry, but I'm not talking about that a bit. I calmly added the events themselves. You wrote above about canceling the closure, I thought it was something like a method, most likely I was looking in the wrong place -
[1.16.5] Trying to add a screen before uploading to the world.
idev replied to idev's topic in Modder Support
Unfortunately, I have not found a more or less detailed description. Climbing in the GuiOpenEvent itself, I found only a description. That, in general, was clear before. I quote: This event is called before any Gui will open. If you don't want this to happen, cancel the event. If you want to override this Gui, simply set the gui variable to your own Gui. That is, I need to redefine the open screen anyway? I found nothing about the other. You said about canceling the closure, and I tried to reproduce it, but I did not find anything I needed. Maybe I misunderstood -
[1.16.5] Trying to add a screen before uploading to the world.
idev replied to idev's topic in Modder Support
I do not understand. I started listening to GuiOpenEvent But what will make it not close? -
[1.16.5] Trying to add a screen before uploading to the world.
idev posted a topic in Modder Support
Trying to add a screen before uploading to the world. I did not find examples anywhere, I had to write something of my own. I'm not sure if this approach is correct, I'm not very sure. However, this works more or less. The screen appears but disappears immediately. And I need to wait for the buttons to be pressed before it disappears. How can I implement this? @Mod.EventBusSubscriber(modid = XCraft.MODID, value = Dist.CLIENT) public class ListenEntityJoinWorldEvent { @SubscribeEvent public static void joinEntity(EntityJoinWorldEvent event) { if (event.getEntity() instanceof ClientPlayerEntity) { Minecraft.getInstance().forceSetScreen(new DemoScreen()); System.out.println("PlayerEntity join in WORLD"); } } } I would be glad if you point out mistakes. -
Hello. Faced such a problem. I don't even know where to start. I rendered a new screen, when using the item I open it (temporarily). There are two buttons on this screen. Type one and type two. (this is the essence of the player so to speak), I need to somehow extend the base class of the player to add a new player type with a new change (the choice takes place on the buttons), but since a lot of functionality will be tied to this change, I do not know what to do. For example, in the future I will need to ignore the damage of other players with the same player type. Maximum simple screen with two buttons. What is the best way for me to expand the base character class in minecraft. It didn’t work with coremod and I think it’s better to somehow do without it if necessary, in extreme cases it’s not essential, but I don’t know how to work with it and I don’t even know how, I think it’s worth reading a lot. So how do you call this screen with the buttons for choosing the type of player when you enter the world / server? This is a must for everyone who logs into the world or the server. Thanks a lot in advance for any help and advice I apologize for my english. If something is not clear, please ask. I am not a native speaker of this language
-
I don't even know, I thought it changed in version 16.5, so I went to the forum. The IDE can be said to be clean, like a clean installation of MC Forge, I even created an almost clean mod, removing all unnecessary, and I used PacketSpawn for tests
-
There are a few things I tried to do for rendering. In the Networking and PacketSpawn class, but I'm not sure if this was needed at all. Took from an example https://github.com/idev-hub/DangerMod
-
I duplicated GranateEntity above with the place where I entered createSpawnPacket, but got an error.