Codota Logo
TileEntityBase.hasWorld
Code IndexAdd Codota to your IDE (free)

How to use
hasWorld
method
in
com.enderio.core.common.TileEntityBase

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: SleepyTrousers/EnderCore

public boolean canPlayerAccess(EntityPlayer player) {
 return hasWorld() && !isInvalid() && player.getDistanceSqToCenter(getPos()) <= 64D;
}
origin: SleepyTrousers/EnderCore

protected boolean isPoweredRedstone() {
 return hasWorld() && world.isBlockLoaded(getPos()) ? world.isBlockIndirectlyGettingPowered(getPos()) > 0 : false;
}
origin: SleepyTrousers/EnderCore

protected void updateBlock() {
 if (hasWorld() && world.isBlockLoaded(getPos())) {
  IBlockState bs = world.getBlockState(getPos());
  world.notifyBlockUpdate(pos, bs, bs, 3);
 }
}
origin: SleepyTrousers/EnderCore

@Override
public void markDirty() {
 if (hasWorld() && world.isBlockLoaded(getPos())) { // we need the loaded check to make sure we don't trigger a chunk load while the chunk is loaded
  world.markChunkDirty(pos, this);
  IBlockState state = world.getBlockState(pos);
  if (state.hasComparatorInputOverride()) {
   world.updateComparatorOutputLevel(pos, state.getBlock());
  }
 }
}
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/EnderCore

@SuppressWarnings({ "null", "unused" })
@Override
public final void render(@Nonnull T te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
 if (te != null && te.hasWorld() && !te.isInvalid()) {
  final IBlockState blockState = te.getWorld().getBlockState(te.getPos());
  final int renderPass = MinecraftForgeClient.getRenderPass();
  if ((block == null || block == blockState.getBlock()) && shouldRender(te, blockState, renderPass)) {
   GlStateManager.disableLighting();
   if (renderPass == 0) {
    GlStateManager.disableBlend();
    GlStateManager.depthMask(true);
   } else {
    GlStateManager.enableBlend();
    GlStateManager.depthMask(false);
    GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
   }
   RenderUtil.bindBlockTexture();
   GlStateManager.pushMatrix();
   GlStateManager.translate(x, y, z);
   renderTileEntity(te, blockState, partialTicks, destroyStage);
   GlStateManager.popMatrix();
  }
 } else if (te == null) {
  renderItem();
 }
}
com.enderio.core.commonTileEntityBasehasWorld

Popular methods of TileEntityBase

  • getWorld
  • getPos
  • doUpdate
  • getUpdatePacket
    SERVER: Called when block data is sent (client receiving blocks from server, via notifyBlockUpdate).
  • init
    Called directly after the TE is constructed. This is the place to call non-final methods. Note: This
  • invalidate
  • isInvalid
  • onChunkUnload
  • readCustomNBT
  • sendProgressIf
  • setGhostSlotContents
    Called server-side when a GhostSlot is changed. Check that the given slot number really is a ghost s
  • setWorld
  • setGhostSlotContents,
  • setWorld,
  • setWorldCreate,
  • shouldDoWorkThisTick,
  • updateBlock,
  • writeCustomNBT

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
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