Tabnine Logo
MultiServantLogic.overrideMaster
Code IndexAdd Tabnine to your IDE (free)

How to use
overrideMaster
method
in
slimeknights.mantle.multiblock.MultiServantLogic

Best Java code snippets using slimeknights.mantle.multiblock.MultiServantLogic.overrideMaster (Showing top 3 results out of 315)

origin: SlimeKnights/TinkersConstruct

 public static void assignMultiBlock(World world, BlockPos master, List<BlockPos> servants) {
  TileEntity masterBlock = world.getTileEntity(master);
  if(!(masterBlock instanceof IMasterLogic)) {
   throw new IllegalArgumentException("Master must be of IMasterLogic");
  }

  // assign master to each servant
  for(BlockPos pos : servants) {
   if(world.isBlockLoaded(pos)) {
    TileEntity slave = world.getTileEntity(pos);
    if(slave instanceof MultiServantLogic && slave.getWorld() != null) {
     ((MultiServantLogic) slave).overrideMaster(master);
     IBlockState state = world.getBlockState(pos);
     world.notifyBlockUpdate(pos, state, state, 3);
    }
   }
  }
 }
}
origin: SlimeKnights/Mantle

@Deprecated
public boolean setMaster(BlockPos pos) {
 if(!this.hasMaster || this.world.getBlockState(this.master) != this.state || (this.world
                                            .getBlockState(this.master)
                                            .getBlock() != this.masterBlock)) {
  this.overrideMaster(pos);
  return true;
 }
 else {
  return false;
 }
}
origin: SlimeKnights/Mantle

@Override
public boolean verifyMaster(IMasterLogic logic, World world, BlockPos pos) {
 if(this.hasMaster) {
  return this.hasValidMaster();
 }
 else {
  this.overrideMaster(pos);
  return true;
 }
}
slimeknights.mantle.multiblockMultiServantLogicoverrideMaster

Popular methods of MultiServantLogic

  • hasValidMaster
  • getMasterPosition
  • onDataPacket
  • readCustomNBT
  • writeCustomNBT

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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