protected void add(E obj, int hash) { ensureCapacityInternal(size + 1); elementData[size++] = obj; insert(new Entry(obj, hash)); rehashIfNecessary(); }
public void config() { String category = "Block.OreFluid"; String comment = "If TRUE, Clathrates will create fluid when broken."; enableBreakFluid = ThermalFoundation.CONFIG.get(category, "FluidOnBreaking", enableBreakFluid, comment); }
@Override public E get(int index) { checkElementIndex(index); return index(index); }
@Override public E remove(int index) { checkElementIndex(index); E oldValue = index(index); delete(seek(oldValue, hash(oldValue))); fastRemove(index); return oldValue; }
protected void processOff() { isActive = false; wasActive = true; tracker.markTime(world); }
/** * Increases the capacity of this <tt>ArrayHashList</tt> instance, if necessary, to ensure that it can hold at least the number of elements specified by the * minimum capacity argument. * * @param minCapacity the desired minimum capacity */ public void ensureCapacity(int minCapacity) { if (minCapacity > 0) { ensureCapacityInternal(minCapacity); } }
public ArrayHashList(int size) { elementData = new Object[size]; size = roundUpToPowerOf2(size) >> 1; hashTable = new Entry[size]; mask = size - 1; }
private void ensureCapacityInternal(int minCapacity) { ++modCount; // overflow-conscious code if (minCapacity - elementData.length > 0) { grow(minCapacity); } }
@Override public int hashCode() { return (metadata & 65535) | getId() << 16; }
@Override public Iterator<E> iterator() { return new Itr(); }
@Override public ListIterator<E> listIterator(int index) { return new ListItr(index); }
@Override public boolean equals(Object o) { return o instanceof BlockWrapper && isEqual((BlockWrapper) o); }
public static void config() { String category = "Device.WaterGen"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); String comment = "If TRUE, the Aqueous Accumulator will act as an Infinite Source and will also function in the Nether."; infiniteSource = ThermalExpansion.CONFIG.get(category, "Infinite", infiniteSource, comment); comment = "If TRUE, the Aqueous Accumulator will produce water very slowly even without adjacent source blocks."; passiveGen = ThermalExpansion.CONFIG.get(category, "PassiveGeneration", passiveGen, comment); // comment = "If TRUE, the Aqueous Accumulator will only function in Rivers and Oceans."; // biomeRestriction = ThermalExpansion.CONFIG.get(category, "BiomeRestriction", biomeRestriction, comment); }
public static void config() { String category = "Device"; String comment = "If TRUE, Devices are securable."; enableSecurity = ThermalExpansion.CONFIG.get(category, "Securable", true, comment); comment = "If TRUE, most Devices will no longer have Auto-Input functionality. Not recommended, but knock yourself out."; disableAutoInput = ThermalExpansion.CONFIG.get(category, "DisableAutoInput", disableAutoInput, comment); comment = "If TRUE, most Devices will no longer have Auto-Output functionality. Not recommended, but knock yourself out."; disableAutoOutput = ThermalExpansion.CONFIG.get(category, "DisableAutoOutput", disableAutoOutput, comment); }
public static void config() { String category = "Device.ItemBuffer"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); }
public static void config() { String category = "Storage.Strongbox"; String comment = "If TRUE, Strongboxes are enabled."; BlockStrongbox.enable = ThermalExpansion.CONFIG.get(category, "Enable", BlockStrongbox.enable, comment); comment = "If TRUE, Strongboxes may be turned into Creative versions using a Creative Conversion Kit."; BlockStrongbox.enableCreative = ThermalExpansion.CONFIG.get(category, "Creative", BlockStrongbox.enableCreative, comment); comment = "If TRUE, Strongboxes are securable."; BlockStrongbox.enableSecurity = ThermalExpansion.CONFIG.get(category, "Securable", BlockStrongbox.enableSecurity, comment); comment = "If TRUE, 'Classic' Crafting is enabled - Non-Creative Upgrade Kits WILL NOT WORK in a Crafting Grid."; BlockStrongbox.enableClassicRecipes = ThermalExpansion.CONFIG.get(category, "ClassicCrafting", BlockStrongbox.enableClassicRecipes, comment); comment = "If TRUE, Strongboxes can be upgraded in a Crafting Grid using Kits. If Classic Crafting is enabled, only the Creative Conversion Kit may be used in this fashion."; BlockStrongbox.enableUpgradeKitCrafting = ThermalExpansion.CONFIG.get(category, "UpgradeKitCrafting", BlockStrongbox.enableUpgradeKitCrafting, comment); }
public static void config() { String category = "Device.Lexicon"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); }
public static void config() { String category = "Device.FluidBuffer"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); }