@Mod.EventBusSubscriber(modid = "guitest", bus = Mod.EventBusSubscriber.Bus.MOD) public class CloseHealth {
@SubscribeEvent public static void Barradefomebar(RenderGuiOverlayEvent.Pre event) { if (event.getElementType() == RenderGuiOverlayEvent.ElementType.HEALTH ) { event.setCanceled(true); } } } ошибка Executing Gradle task: runClient Build info: MCreator 2023.4.51615, forge-1.19.4, 64-bit, 32606 MB, Windows 10, JVM 17.0.9, JAVA_HOME: C:\Program Files\Pylo\MCreator2023.4\jdk, started on: 2024-01-28-01:33:16
> Configure project : The code of this workspace uses official obfuscation mappings provided by Mojang. These mappings fall under their associated license you should be fully aware of. (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula .
> Task :compileJava FAILED C:\Users\Gigabyte\MCreatorWorkspaces\guitest\src\main\java\net\mcreator\guitest\CloseHealth.java:12: error: cannot find symbol if (event.getElementType.Pre() == RenderGuiOverlayEvent.ElementType.HEALTH ) { ^ symbol: variable getElementType location: variable event of type Pre C:\Users\Gigabyte\MCreatorWorkspaces\guitest\src\main\java\net\mcreator\guitest\CloseHealth.java:12: error: cannot find symbol if (event.getElementType.Pre() == RenderGuiOverlayEvent.ElementType.HEALTH ) { ^ symbol: variable ElementType location: class RenderGuiOverlayEvent 2 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1s 1 actionable task: 1 executed
package net.mcreator.guitest;
import net.minecraftforge.client.event.RenderGuiOverlayEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod.EventBusSubscriber(modid = "guitest", bus = Mod.EventBusSubscriber.Bus.MOD)
public class CloseHealth {
@SubscribeEvent
public static void Barradefomebar(RenderGuiOverlayEvent.Pre event) {
if (event.getElementType() == RenderGuiOverlayEvent.ElementType.HEALTH ) {
event.setCanceled(true);
}
}
}
ошибка
Executing Gradle task: runClient
Build info: MCreator 2023.4.51615, forge-1.19.4, 64-bit, 32606 MB, Windows 10, JVM 17.0.9, JAVA_HOME: C:\Program Files\Pylo\MCreator2023.4\jdk, started on: 2024-01-28-01:33:16
> Configure project :
The code of this workspace uses official obfuscation mappings provided by Mojang. These mappings fall under their associated license you should be fully aware of.
(c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes,
but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here.
Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available
at https://account.mojang.com/documents/minecraft_eula .
> Task :compileJava FAILED
C:\Users\Gigabyte\MCreatorWorkspaces\guitest\src\main\java\net\mcreator\guitest\CloseHealth.java:12: error: cannot find symbol
if (event.getElementType.Pre() == RenderGuiOverlayEvent.ElementType.HEALTH ) {
^
symbol: variable getElementType
location: variable event of type Pre
C:\Users\Gigabyte\MCreatorWorkspaces\guitest\src\main\java\net\mcreator\guitest\CloseHealth.java:12: error: cannot find symbol
if (event.getElementType.Pre() == RenderGuiOverlayEvent.ElementType.HEALTH ) {
^
symbol: variable ElementType
location: class RenderGuiOverlayEvent
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
BUILD FAILED
Task completed in 12 seconds