Tabnine Logo
ComponentInventorySlots.markDirty
Code IndexAdd Tabnine to your IDE (free)

How to use
markDirty
method
in
binnie.core.machines.inventory.ComponentInventorySlots

Best Java code snippets using binnie.core.machines.inventory.ComponentInventorySlots.markDirty (Showing top 5 results out of 315)

origin: ForestryMC/Binnie

@Override
public void clear() {
  for (InventorySlot slot : this.inventory.values()) {
    slot.setContent(ItemStack.EMPTY);
  }
  this.markDirty();
}
origin: ForestryMC/Binnie

@Override
public ItemStack decrStackSize(final int index, final int amount) {
  InventorySlot slot = getInternalSlot(index);
  ItemStack stack = slot.decrStackSize(amount);
  if (!stack.isEmpty()) {
    this.markDirty();
  }
  return stack;
}
origin: ForestryMC/Binnie

@Override
public ItemStack removeStackFromSlot(int index) {
  InventorySlot slot = getInternalSlot(index);
  if (slot.isFake()) {
    return ItemStack.EMPTY;
  }
  ItemStack content = slot.getItemStack();
  slot.setContent(ItemStack.EMPTY);
  this.markDirty();
  return content;
}
origin: ForestryMC/Binnie

@Override
public void setInventorySlotContents(int index, ItemStack itemStack) {
  InventorySlot slot = getInternalSlot(index);
  if (!slot.isFake() && (itemStack.isEmpty() || slot.isValid(itemStack))) {
    slot.setContent(itemStack);
    this.markDirty();
  }
}
origin: ForestryMC/Binnie

@Override
public void readFromNBT(final NBTTagCompound compound) {
  super.readFromNBT(compound);
  NBTUtil.readFromList(compound, INVENTORY_KEY, (slotNBT) -> {
    int index = slotNBT.getInteger(INDEX_KEY);
    InventorySlot slot = getInternalSlot(index);
    slot.readFromNBT(slotNBT);
  });
  this.markDirty();
}
binnie.core.machines.inventoryComponentInventorySlotsmarkDirty

Popular methods of ComponentInventorySlots

  • addSlot
  • <init>
  • addSlotArray
  • getInternalSlot
  • getMachine
  • getSlot
  • isItemValidForSlot
  • isReadOnly
  • readFromNBT
  • writeToNBT

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFrame (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best IntelliJ plugins
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