We have a school project to make a mod for the popular video game Minecraft. I decided to make my own version of the 1.9.4 client. When I decompile it and put into an intelliJ project a few errors come. Most of them are easy to find out and can be fixed by reimporting a few files, but 1 stayed behind. The error was a single line of code in the DragonFightManager Class
. Code was: this.gateways.addAll((Collection<? extends Integer>) ContiguousSet.create(Range.<C>closedOpen(valueOf, 20, DiscreteDomain.integers())));
. When I hit run/decompile the error: Error:(106, 106) java: cannot find symbol symbol: variable valueOf location: class net.minecraft.world.end.DragonFightManager<C>
, comes. I did a bit of research and find that the "Cannot Find Symbol" error means I haven't used the variable correctly, in this case the valueOf
variable. I thought maybe it was an import that I am missing so here are all the imports
import java.io.*;
import com.google.common.collect.*;
import net.minecraft.block.state.BlockWorldState;
import net.minecraft.block.state.pattern.BlockMatcher;
import net.minecraft.block.state.pattern.BlockPattern;
import net.minecraft.block.state.pattern.FactoryBlockPattern;
import net.minecraft.entity.Entity;
import net.minecraft.entity.boss.EntityDragon;
import net.minecraft.entity.boss.dragon.phase.PhaseList;
import net.minecraft.entity.item.EntityEnderCrystal;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagInt;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityEndPortal;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntitySelectors;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.BossInfo;
import net.minecraft.world.BossInfoServer;
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.BiomeEndDecorator;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.gen.feature.WorldGenEndGateway;
import net.minecraft.world.gen.feature.WorldGenEndPodium;
import net.minecraft.world.gen.feature.WorldGenSpikes;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.annotation.Nullable;
import java.util.*;
import java.util.function.Predicate;
import static java.lang.Integer.*;
So what is the fix to this error and if you need more detail please say so in the comments.
EXTRA INFO** Tutorial I used for the valueOf. And for some reason when I import java.io.*; it doesn't have a color like any of the other imports, so maybe that's it. Idk:/