Codota Logo
MultiServantLogic.overrideMaster
Code IndexAdd Codota 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)

  • 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: 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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • String (java.lang)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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