Codota Logo
com.enderio.core.common
Code IndexAdd Codota to your IDE (free)

How to use com.enderio.core.common

Best Java code snippets using com.enderio.core.common (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: SleepyTrousers/EnderCore

/**
 * The <b>localized</b> title of this config screen
 */
protected String getTitle() {
 return EnderCore.lang.localize("config.title");
}
origin: SleepyTrousers/EnderCore

/**
 * Returns the {@link Scheduler} instance for the current side.
 *
 * @see #schedule(int, Runnable)
 *
 * @return The {@link Scheduler} instance.
 */
public static Scheduler instance() {
 return EnderCore.proxy.getScheduler();
}
origin: SleepyTrousers/EnderCore

/**
 * Call this with an interval (in ticks) to find out if the current tick is the one you want to do some work. This is staggered so the work of different TEs
 * is stretched out over time.
 *
 * @see #shouldDoWorkThisTick(int, int) If you need to offset work ticks
 */
protected boolean shouldDoWorkThisTick(int interval) {
 return shouldDoWorkThisTick(interval, 0);
}
origin: SleepyTrousers/EnderCore

/**
 * Localizes the string passed, first appending the prefix stored in this instance of the class.
 *
 * @param unloc
 *          The unlocalized string.
 *
 * @return A localized string.
 */
public @Nonnull String localize(@Nonnull String unloc) {
 return localizeExact(addPrefix(unloc));
}
origin: SleepyTrousers/EnderCore

/**
 * Splits the localized text on "|" into a String[].
 *
 * @param unloc
 *          The unlocalized string.
 * @return A localized list of strings.
 */
public @Nonnull String[] localizeList(@Nonnull String unloc) {
 return splitList(localize(unloc));
}
origin: SleepyTrousers/EnderCore

/**
 * Checks if the passed string (plus the prefix) has a localization mapped.
 *
 * @param unloc
 *          The unlocalized suffix
 * @return True if there is a localization mapped, false otherwise.
 */
public boolean canLocalize(@Nonnull String unloc) {
 return canLocalizeExact(addPrefix(unloc));
}
origin: SleepyTrousers/EnderCore

@Override
public final void update() {
 if (!hasWorld() || isInvalid() || !world.isBlockLoaded(getPos()) || world.getTileEntity(getPos()) != this) {
  // we can get ticked after being removed from the world, ignore this
  return;
 }
 if (ConfigHandler.allowExternalTickSpeedup || world.getTotalWorldTime() != lastUpdate) {
  lastUpdate = world.getTotalWorldTime();
  doUpdate();
  sendProgressIf();
 }
}
origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getLocalizedName() {
 return EnderIO.lang.localizeExact(unlocalizedName + ".name");
}
origin: SleepyTrousers/EnderIO

@Override
@Nonnull
public String getUnlocalizedName() {
 return EnderIOMachines.lang.addPrefix("block_powered_spawner.note." + langStr);
}
origin: SleepyTrousers/EnderCore

@Override
public final void onBlockPlacedBy(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull EntityLivingBase placer,
  @Nonnull ItemStack stack) {
 onBlockPlaced(worldIn, pos, state, placer, stack);
 T te = getTileEntity(worldIn, pos);
 if (te != null) {
  te.readCustomNBT(stack);
  onBlockPlaced(worldIn, pos, state, placer, te);
 }
}
origin: SleepyTrousers/EnderCore

@Override
public final @Nonnull BlockFaceShape getBlockFaceShape(@Nonnull IBlockAccess worldIn, @Nonnull IBlockState state, @Nonnull BlockPos pos,
  @Nonnull EnumFacing face) {
 if (shape != null) {
  T te = getTileEntitySafe(worldIn, pos);
  if (te != null) {
   return shape.getBlockFaceShape(worldIn, state, pos, face, te);
  } else {
   return shape.getBlockFaceShape(worldIn, state, pos, face);
  }
 }
 return super.getBlockFaceShape(worldIn, state, pos, face);
}
origin: SleepyTrousers/EnderCore

protected boolean shouldDoWorkThisTick(@Nonnull World world, @Nonnull BlockPos pos, int interval) {
 T te = getTileEntity(world, pos);
 if (te == null) {
  return world.getTotalWorldTime() % interval == 0;
 } else {
  return te.shouldDoWorkThisTick(interval);
 }
}
origin: SleepyTrousers/EnderIO

@Override
public @Nonnull List<String> getTooltipLines() {
 return EnderIOMachines.lang.localizeAll(unlocTooltips);
}
origin: SleepyTrousers/EnderCore

 default @Nonnull BlockFaceShape getBlockFaceShape(@Nonnull IBlockAccess worldIn, @Nonnull IBlockState state, @Nonnull BlockPos pos,
   @Nonnull EnumFacing face, @Nonnull T te) {
  return getBlockFaceShape(worldIn, state, pos, face);
 }
}
origin: SleepyTrousers/EnderCore

@Handler
public class ClientHandler {

 private static int ticksElapsed;

 public static int getTicksElapsed() {
  return ticksElapsed;
 }

 @SubscribeEvent
 public static void onClientTick(@Nonnull ClientTickEvent event) {
  if (event.phase == Phase.END) {
   ticksElapsed++;
  }
 }

 private ClientHandler() {
 }

}

origin: SleepyTrousers/EnderCore

@Override
public void setGhostSlotContents(int slot, @Nonnull ItemStack stack, int realsize) {
 if (te instanceof TileEntityBase) {
  ((TileEntityBase) te).setGhostSlotContents(slot, stack, realsize);
 }
}
origin: SleepyTrousers/EnderCore

/**
 * Splits the localized text on "|" into a String[].
 *
 * @param unloc
 *          The unlocalized string.
 * @param args
 *          The args to format the localized text with.
 * @return A localized list of strings.
 */
public @Nonnull String[] localizeList(@Nonnull String unloc, @Nonnull String... args) {
 return splitList(localize(unloc, (Object[]) args));
}
origin: SleepyTrousers/EnderIO

public static @Nonnull String getDisplayNameForEntity(@Nonnull String mobName) {
 return EnderIO.lang.localizeExact("entity." + mobName + ".name");
}
origin: SleepyTrousers/EnderCore

protected boolean shouldDoWorkThisTick(@Nonnull World world, @Nonnull BlockPos pos, int interval, int offset) {
 T te = getTileEntity(world, pos);
 if (te == null) {
  return (world.getTotalWorldTime() + offset) % interval == 0;
 } else {
  return te.shouldDoWorkThisTick(interval, offset);
 }
}
origin: SleepyTrousers/EnderCore

@Handler
public class FluidSpawnHandler {

 @SubscribeEvent
 public static void onEntitySpawn(LivingSpawnEvent.CheckSpawn evt) {
  if (evt.getResult() != Result.DENY
    && EntitySpawnPlacementRegistry
      .getPlacementForEntity(evt.getEntity().getClass()) == EntityLiving.SpawnPlacementType.IN_WATER
    && evt.getWorld().getBlockState(evt.getEntityLiving().getPosition()).getBlock() instanceof BlockFluidEnder) {
   evt.setResult(Result.DENY);
  }
  return;
 }

 private FluidSpawnHandler() {
 }

}

com.enderio.core.common

Most used classes

  • NNList
  • NullHelper
  • Lang
  • ThreadedNetworkWrapper
  • NNList$NNIterator
  • MessageTileEntity,
  • NetworkUtil,
  • BlockCoord,
  • ItemUtil,
  • BlockEnder,
  • FluidWrapper,
  • IFluidWrapper,
  • SmartTank,
  • InventorySlot,
  • DyeColor,
  • FluidUtil,
  • ForgeDirectionOffsets,
  • Util,
  • Things
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now