java.lang.Object
com.gtnewhorizons.horizonqa.api.gt.Bus

public final class Bus extends Object
View of a single input or output bus tile. Obtained from Multiblock.
  • Method Details

    • insert

      public Bus insert(net.minecraft.item.ItemStack... stacks)
      Inserts each stack using InventoryHelper.insert(net.minecraft.inventory.IInventory, net.minecraft.item.ItemStack); fails if any stack is not fully accepted.
    • programmedCircuit

      public Bus programmedCircuit(int config)
      Sets the programmed circuit on this bus to config (0–24). Writes directly into the circuit slot to bypass the normal inventory insertion that skips that slot.
      Throws:
      IllegalArgumentException - if config is out of range or the circuit item is unavailable
      GameTestAssertException - if this bus does not support configuration circuits
    • assertContains

      public void assertContains(net.minecraft.item.ItemStack stack)
      Passes when at least one slot contains stack (item, damage, and NBT match; stack size ignored).
    • assertContains

      public void assertContains(ItemMatcher matcher)
      Passes when at least one slot matches matcher.
    • assertNotContains

      public void assertNotContains(net.minecraft.item.ItemStack stack)
      Passes when no slot contains stack (item, damage, and NBT match; stack size ignored).
    • assertNotContains

      public void assertNotContains(ItemMatcher matcher)
      Passes when no slot matches matcher.
    • assertEmpty

      public void assertEmpty()
    • slot

      public net.minecraft.item.ItemStack slot(int index)
      Stack in index, or null if empty.
      Throws:
      IndexOutOfBoundsException - if index is not in range
    • setSlot

      public Bus setSlot(int index, net.minecraft.item.ItemStack stack)
      Directly sets a bus slot for test setup, bypassing normal insertion rules.

      This is intended for fixture setup such as pre-filling an output bus. Use insert(ItemStack...) when the test needs to simulate normal item insertion.

    • fillAllSlots

      public Bus fillAllSlots(net.minecraft.item.ItemStack stack)
      Directly fills every slot with a copy of stack, bypassing normal insertion rules.
    • clear

      public Bus clear()
      Directly clears every slot, bypassing normal extraction rules.