Build jar have a wrong in piamond2modelements.java

Started by mmmjjkx on

Topic category: Help with MCreator software

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Build jar have a wrong in piamond2modelements.java

log:
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:9: error: cannot find symbol import net.minecraftforge.fml.ModList;
^
symbol: class ModList
location: package net.minecraftforge.fml
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:26: error: cannot find symbol public final List<Supplier<Block>> blocks = new ArrayList<>();
^
symbol: class Block
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:27: error: cannot find symbol public final List<Supplier<Item>> items = new ArrayList<>();
^
symbol: class Item
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:28: error: cannot find symbol public final List<Supplier<Biome>> biomes = new ArrayList<>();
^
symbol: class Biome
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:29: error: cannot find symbol public final List<Supplier<EntityType<?>>> entities = new ArrayList<>();
^
symbol: class EntityType
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:30: error: cannot find symbol public final List<Supplier<Enchantment>> enchantments = new ArrayList<>();
^
symbol: class Enchantment
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:31: error: cannot find symbol public static Map<ResourceLocation, net.minecraft.util.SoundEvent> sounds = new HashMap<>();
^
symbol: class ResourceLocation
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:50: error: package RegistryEvent does not exist public void registerSounds(RegistryEvent.Register<net.minecraft.util.SoundEvent> event) {
^
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:55: error: cannot find symbol public <T> void addNetworkMessage(Class<T> messageType, BiConsumer<T, PacketBuffer> encoder, Function<PacketBuffer, T> decoder,
^
symbol: class PacketBuffer
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:55: error: cannot find symbol public <T> void addNetworkMessage(Class<T> messageType, BiConsumer<T, PacketBuffer> encoder, Function<PacketBuffer, T> decoder,
^
symbol: class PacketBuffer
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:56: error: package NetworkEvent does not exist BiConsumer<T, Supplier<NetworkEvent.Context>> messageConsumer) {
^
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:65: error: cannot find symbol public List<Supplier<Block>> getBlocks() {
^
symbol: class Block
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:69: error: cannot find symbol public List<Supplier<Item>> getItems() {
^
symbol: class Item
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:73: error: cannot find symbol public List<Supplier<Biome>> getBiomes() {
^
symbol: class Biome
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:77: error: cannot find symbol public List<Supplier<EntityType<?>>> getEntities() {
^
symbol: class EntityType
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:81: error: cannot find symbol public List<Supplier<Enchantment>> getEnchantments() {
^
symbol: class Enchantment
location: class Piamond2ModElements
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:98: error: cannot find symbol public void init(FMLCommonSetupEvent event) {
^
symbol: class FMLCommonSetupEvent
location: class ModElement
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:101: error: cannot find symbol public void serverLoad(FMLServerStartingEvent event) {
^
symbol: class FMLServerStartingEvent
location: class ModElement
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:105: error: cannot find symbol public void clientLoad(FMLClientSetupEvent event) {
^
symbol: class FMLClientSetupEvent
location: class ModElement
E:\piamond-2\build\sources\main\java\net\mcreator\piamond\Piamond2ModElements.java:104: error: cannot find symbol @OnlyIn(Dist.CLIENT)
^
symbol: class OnlyIn
location: class ModElement
20 errors
:compileJava FAILED
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 8s

Can you help me?

The solution to this problem…
Sun, 03/28/2021 - 11:37

The solution to this problem and many other problems can be found in our knowledge base: https://mcreator.net/support/knowledgebase Please check the knowledge base before opening a new topic on the issue which has a known fix.

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Methods in the knowledgebase…
Sun, 04/04/2021 - 06:42

Methods in the knowledgebase have been used, but still cannot be repaired