Tabnine Logo
DimensionManager.isDimensionRegistered
Code IndexAdd Tabnine to your IDE (free)

How to use
isDimensionRegistered
method
in
net.minecraftforge.common.DimensionManager

Best Java code snippets using net.minecraftforge.common.DimensionManager.isDimensionRegistered (Showing top 7 results out of 315)

origin: jabelar/ExampleMod-1.12

@Nullable
private static Integer findFreeDimensionID()
{
  for (int i=2; i<Integer.MAX_VALUE; i++)
  {
    if (!DimensionManager.isDimensionRegistered(i))
    {
      // DEBUG
      System.out.println("Found free dimension ID = "+i);
      return i;
    }
  }
  
  // DEBUG
  System.out.println("ERROR: Could not find free dimension ID");
  return null;
}
origin: SquidDev-CC/plethora

@Nullable
public World getWorld(MinecraftServer server) {
  World world = this.world.get();
  if (world == null && DimensionManager.isDimensionRegistered(dimension)) {
    this.world = new WeakReference<>(world = server.getWorld(dimension));
  }
  return world;
}
origin: SleepyTrousers/EnderIO

public static @Nonnull String getDimenionName(int dim) {
 if (!DimensionManager.isDimensionRegistered(dim)) {
  return Integer.toString(dim);
 }
 DimensionType type = DimensionManager.getProviderType(dim);
 if (type == null) {
  return Integer.toString(dim);
 }
 String name = type.getName();
 int[] dims = DimensionManager.getDimensions(type);
 if (dims != null && dims.length > 1) {
  name += " " + dim;
 }
 return name;
}
origin: FTBTeam/FTB-Utilities

@Nullable
public ForgeChunkManager.Ticket requestTicket(MinecraftServer server, TicketKey key)
{
  ForgeChunkManager.Ticket ticket = ticketMap.get(key);
  if (ticket == null && DimensionManager.isDimensionRegistered(key.dimension))
  {
    WorldServer worldServer = server.getWorld(key.dimension);
    ticket = ForgeChunkManager.requestTicket(FTBUtilities.INST, worldServer, ForgeChunkManager.Type.NORMAL);
    if (ticket != null)
    {
      ticketMap.put(key, ticket);
      ticket.getModData().setString("Team", key.teamId);
    }
  }
  return ticket;
}
origin: CyclopsMC/IntegratedDynamics

  @Override
  public void fromNBT(NBTTagCompound tag) {
    NBTTagList list = tag.getTagList("list", MinecraftHelpers.NBTTag_Types.NBTTagCompound.ordinal());

    for(int i = 0; i < list.tagCount(); i++) {
      NBTTagCompound elementTag = list.getCompoundTagAt(i);
      int dimensionId = elementTag.getInteger("dimension");
      BlockPos pos = BlockPos.fromLong(elementTag.getLong("pos"));
      EnumFacing side = null;
      if (elementTag.hasKey("side", Constants.NBT.TAG_INT)) {
        side = EnumFacing.VALUES[elementTag.getInteger("side")];
      }

      if(!net.minecraftforge.common.DimensionManager.isDimensionRegistered(dimensionId)) {
        IntegratedDynamics.clog(Level.WARN, String.format("Skipped loading part from a network at the " +
            "invalid dimension id %s.", dimensionId));
      } else {
        World world = FMLCommonHandler.instance().getMinecraftServerInstance().getWorld(dimensionId);
        IPathElement pathElement = TileHelpers.getCapability(world, pos, side, PathElementConfig.CAPABILITY);
        if(pathElement == null) {
          IntegratedDynamics.clog(Level.WARN, String.format("Skipped loading part from a network at " +
              "position %s in world %s because it has no valid path element.", pos, dimensionId));
        } else {
          elements.add(SidedPathElement.of(pathElement, side));
        }
      }
    }
  }
}
origin: FTBTeam/FTB-Utilities

if (!DimensionManager.isDimensionRegistered(chunk.getPos().dim))
origin: CoFH/CoFHCore

    throw t;
  if (!DimensionManager.isDimensionRegistered(dimension)) {
    throw new CommandException("chat.cofh.command.world.notFound");
    throw t;
  if (!DimensionManager.isDimensionRegistered(dimension)) {
    throw new CommandException("chat.cofh.command.world.notFound");
  if (!DimensionManager.isDimensionRegistered(dimension)) {
    throw new CommandException("chat.cofh.command.world.notFound");
int dimension = CommandBase.parseInt(arguments[5]);
if (!DimensionManager.isDimensionRegistered(dimension)) {
  throw new CommandException("chat.cofh.command.world.notFound");
net.minecraftforge.commonDimensionManagerisDimensionRegistered

Popular methods of DimensionManager

  • getWorld
  • getCurrentSaveRootDirectory
  • registerDimension
  • getProviderType
  • getIDs
  • getWorlds
  • getDimensions
  • getNextFreeDimId
  • getProvider
  • initDimension
  • setWorld
  • unregisterDimension
  • setWorld,
  • unregisterDimension

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now