Tabnine Logo
MultiServantLogic.hasValidMaster
Code IndexAdd Tabnine 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)

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

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Github Copilot alternatives
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