Codota Logo
MultiServantLogic.hasValidMaster
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using slimeknights.mantle.multiblock.MultiServantLogic.hasValidMaster (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

 protected boolean isValidSlave(World world, BlockPos pos) {
  if(!world.isBlockLoaded(pos)) {
   return false;
  }
  TileEntity te = world.getTileEntity(pos);

  // slave-blocks are only allowed if they already belong to this smeltery
  if(te instanceof MultiServantLogic) {
   MultiServantLogic slave = (MultiServantLogic) te;
   if(slave.hasValidMaster()) {
    if(!tile.getPos().equals(slave.getMasterPosition())) {
     return false;
    }
   }
  }

  return true;
 }
}
origin: SlimeKnights/Mantle

@Override
public void notifyMasterOfChange() {
 if(this.hasValidMaster()) {
  IMasterLogic logic = (IMasterLogic) this.world.getTileEntity(this.master);
  logic.notifyChange(this, this.pos);
 }
}
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.multiblockMultiServantLogichasValidMaster

Popular methods of MultiServantLogic

  • overrideMaster
  • getMasterPosition
  • onDataPacket
  • readCustomNBT
  • writeCustomNBT

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • JLabel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
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