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

[1.12.2] Strange errors after upgrading from 1.12


Recommended Posts

Hey guys,


I don't know what I did, but after upgrading my mod to 1.12.2 from 1.12, many things seem to have broken. Here's my steps:

  1. I updated my build.gradle file (you can see it below)
  2. I ran gradlew clean
  3. Ran gradlew setupDecompWorkspace
  4. Ran gradlew eclipse

buildscript {
    repositories {
        maven { url = "http://files.minecraftforge.net/maven" }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

version = "1.3.0"
group = "com.DragonFerocity.expanded" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "expanded"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'

minecraft {
    version = "1.12.2-"
    runDir = "run"
    // the mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   snapshot are built nightly.
    // stable_#            stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"
    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html


processResources {
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    // copy everything else except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'


Now things are broken.


Whenever I run my mod from eclipse, it keeps telling me that every single one of my items are being registered twice


[22:21:08] [main/WARN] [FML]: ****************************************
[22:21:08] [main/WARN] [FML]: * Registry Block: The object Block{expanded:gold_brick} has been registered twice for the same name expanded:gold_brick.
[22:21:08] [main/WARN] [FML]: *  at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:288)
[22:21:08] [main/WARN] [FML]: *  at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:269)
[22:21:08] [main/WARN] [FML]: *  at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:113)
[22:21:08] [main/WARN] [FML]: *  at com.DragonFerocity.expanded.handlers.BlockHandler.initBlocks(BlockHandler.java:1238)
[22:21:08] [main/WARN] [FML]: *  at com.DragonFerocity.expanded.handlers.RegistryHandler.registerBlocks(RegistryHandler.java:18)
[22:21:08] [main/WARN] [FML]: *  at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_RegistryHandler_registerBlocks_Register.invoke(.dynamic)...
[22:21:08] [main/WARN] [FML]: ****************************************


If I run gradlew build, it tells me that there a variable that I can clearly see doesn't exist:


R:\...\java\com\DragonFerocity\expanded\items\ModHoe.java:40: error: cannot find symbol
        this.speed = material.getDamageVsEntity() + 1.0F;
  symbol:   method getDamageVsEntity()
  location: variable material of type ToolMaterial
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Which is the 7th line in the following code

 public ModHoe(String name, ItemTool.ToolMaterial material)
        this.toolMaterial = material;
        this.maxStackSize = 1;
        this.speed = material.getDamageVsEntity() + 1.0F;
        setUnlocalizedName(Ref.MODID + ":" + name);
        setRegistryName(Ref.MODID + ":" + name);


As far as I know I didn't change anything significant between upgrading from 1.12.2 from 1.12. I can post more code, or a link to my github if needed.


Your help is appreciated.

Edited by DragonFerocity
Link to comment
Share on other sites

9 hours ago, MDW01 said:

I would try removing all the eclipse files and reimporting the project.

Are there eclipse files in the src directory? I couldn't see any.


One thing I did try was creating a new project from scratch using forge, then I edited the build.gradle file with the correct info and copied my src folder over to the new project. The same thing occured.

Link to comment
Share on other sites

That says your blocks are being registered twice, not your items.


If you look at the end of the initBlocks method:

for(Block block : blockList) {
for(Block block : blockList) {

That's why right there, you do that loop twice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • When i launch forge-1.16.5-36.2.23.jar eula.txt doesnt come but in older version like 1.12.2 it comes idk why. do you guys know how i can fix this ?
    • MegaMiner is just my playground mod. Here's the entire MegaMinerEvents class. It's just a static event receiver.   package nu.rydin.explodingarrows.common.events; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import nu.rydin.explodingarrows.common.Main; import nu.rydin.explodingarrows.common.enchantments.ModEnchantments; import java.util.LinkedList; @Mod.EventBusSubscriber(modid = Main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class MegaMinerEvents { private static final class BlockToBreak { private final BlockPos pos; private final Player player; public BlockToBreak(final BlockPos pos, final Player player) { this.pos = pos; this.player = player; } } private static final LinkedList<BlockToBreak> queue = new LinkedList<>(); @SubscribeEvent public static void onBreakBlock(final BlockEvent.BreakEvent e) { final LevelAccessor world = e.getWorld(); if (world.isClientSide()) { return; } for (final Tag t : e.getPlayer().getMainHandItem().getEnchantmentTags()) { final CompoundTag ct = (CompoundTag) t; if (ct.getString("id") .equals(ModEnchantments.MEGA_MINER.get().getRegistryName().toString())) { MegaMinerEvents.mineNeighborhood(e.getPos(), e.getPlayer(), e.getState().getBlock()); } } } @SubscribeEvent public static void onTick(final TickEvent.ServerTickEvent e) { if (MegaMinerEvents.queue.isEmpty()) { return; } final BlockToBreak b = MegaMinerEvents.queue.removeFirst(); final Level world = b.player.level; final BlockState bs = world.getBlockState(b.pos); bs.getBlock().playerDestroy(world, b.player, b.pos, bs, null, b.player.getMainHandItem()); world.removeBlock(b.pos, true); // MegaMinerEvents.mineNeighborhood(b.pos, b.player, bs.getBlock()); System.out.println(MegaMinerEvents.queue.size()); } private static void mineNeighborhood( final BlockPos pos, final Player player, final Block blockType) { final float x0 = pos.getX(); final float y0 = pos.getY(); final float z0 = pos.getZ(); for (float z = z0 - 1.0F; z <= z0 + 1; z += 1.0) { for (float y = y0 - 1.0F; y <= y0 + 1; y += 1.0) { for (float x = x0 - 1.0F; x <= x0 + 1; x += 1.0) { final BlockState b = player.getLevel().getBlockState(pos); if (b.is(blockType)) { MegaMinerEvents.queue.addLast(new BlockToBreak(pos, player)); } } } } } }  
    • i am playing modded and NOT ON A SERVER but everytime i join a world my game crashes and the error message is: Exception in server tick loop  
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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