Codota Logo
BaseContainer.sameGui
Code IndexAdd Codota to your IDE (free)

How to use
sameGui
method
in
slimeknights.mantle.inventory.BaseContainer

Best Java code snippets using slimeknights.mantle.inventory.BaseContainer.sameGui (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: SlimeKnights/TinkersConstruct

@Override
public void handleServerSafe(NetHandlerPlayServer netHandler) {
 Container container = netHandler.player.openContainer;
 if(container instanceof ContainerStencilTable) {
  ((ContainerStencilTable) container).setOutput(output);
  // find all people who also have the same gui open and update them too
  WorldServer server = netHandler.player.getServerWorld();
  for(EntityPlayer player : server.playerEntities) {
   if(player == netHandler.player) {
    continue;
   }
   if(player.openContainer instanceof ContainerStencilTable) {
    if(((BaseContainer) container).sameGui((BaseContainer) player.openContainer)) {
     ((ContainerStencilTable) player.openContainer).setOutput(output);
     // same gui, send him an update
     TinkerNetwork.sendTo(this, (EntityPlayerMP) player);
    }
   }
  }
 }
}
origin: SlimeKnights/TinkersConstruct

@Override
public void handleServerSafe(NetHandlerPlayServer netHandler) {
 Container container = netHandler.player.openContainer;
 if(container instanceof ContainerToolStation) {
  ((ContainerToolStation) container).setToolSelection(tool, activeSlots);
  // find all people who also have the same gui open and update them too
  WorldServer server = netHandler.player.getServerWorld();
  for(EntityPlayer player : server.playerEntities) {
   if(player == netHandler.player) {
    continue;
   }
   if(player.openContainer instanceof ContainerToolStation) {
    if(((BaseContainer) container).sameGui((BaseContainer) player.openContainer)) {
     ((ContainerToolStation) player.openContainer).setToolSelection(tool, activeSlots);
     // same gui, send him an update
     TinkerNetwork.sendTo(this, (EntityPlayerMP) player);
    }
   }
  }
 }
}
origin: SlimeKnights/Mantle

public void syncOnOpen(EntityPlayerMP playerOpened) {
 // find another player that already has the gui for this tile open
 WorldServer server = playerOpened.getServerWorld();
 for(EntityPlayer player : server.playerEntities) {
  if(player == playerOpened) {
   continue;
  }
  if(player.openContainer instanceof BaseContainer) {
   if(this.sameGui((BaseContainer<T>) player.openContainer)) {
    syncWithOtherContainer((BaseContainer<T>) player.openContainer, playerOpened);
    return;
   }
  }
 }
 // no player has a container open for the tile
 syncNewContainer(playerOpened);
}
slimeknights.mantle.inventoryBaseContainersameGui

Popular methods of BaseContainer

  • getInventoryDisplayName
  • getTile
  • mergeItemStackMove
  • mergeItemStackRefill
  • syncNewContainer
    Called when the container is opened and no other player has it open. Set the default state here.
  • syncOnOpen
  • syncWithOtherContainer
    Called when the container is opened and another player already has a container for this tile open Sy

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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