public V put( byte key, V value ) { synchronized( mutex ) { return m.put( key, value ); } } public V remove( byte key ) {
/** * Inserts a key/value pair into the map. * * @param key an <code>Byte</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or <tt>null</tt> if none was found. */ public V put( Byte key, V value ) { byte k; if ( key == null ) { k = _map.getNoEntryKey(); } else { k = unwrapKey( key ); } return _map.put( k, value ); }
/** * * @param root The root block URI of the family * @param definition The definition of the block family as passed down from the engine * @param blockBuilder The block builder to make the blocks in the family * @param name The name of the section of the block to be registered, ex: "no_connections" * @param sides A byte representing the sides which should be connected for this block * @param rotations All of the ways the block should be rotated * @return All of the rotations possible for the block with the given sides */ public Set<Block> registerBlock(BlockUri root, BlockFamilyDefinition definition, BlockBuilderHelper blockBuilder, String name, byte sides, Iterable<Rotation> rotations) { Set<Block> result = Sets.newLinkedHashSet(); for (Rotation rotation: rotations) { byte sideBits = 0; for (Side side : SideBitFlag.getSides(sides)) { sideBits += SideBitFlag.getSide(rotation.rotate(side)); } Block block = blockBuilder.constructTransformedBlock(definition, name, rotation, new BlockUri(root, new Name(String.valueOf(sideBits))), this); blocks.put(sideBits, block); result.add(block); } return result; }
/** * * @param root The root block URI of the family * @param definition The definition of the block family as passed down from the engine * @param blockBuilder The block builder to make the blocks in the family * @param sides A byte representing the sides which should be connected for this block * @param rotations All of the ways the block should be rotated * @return All of the rotations possible for the block with the given sides */ public Set<Block> registerBlock(BlockUri root, BlockFamilyDefinition definition, final BlockBuilderHelper blockBuilder, byte sides, Iterable<Rotation> rotations) { Set<Block> result = Sets.newLinkedHashSet(); for (Rotation rotation: rotations) { byte sideBits = 0; for (Side side : SideBitFlag.getSides(sides)) { sideBits += SideBitFlag.getSide(rotation.rotate(side)); } BlockUri uri = new BlockUri(root, new Name(String.valueOf(sideBits))); Block block = blockBuilder.constructTransformedBlock(definition, rotation, uri, this); block.setUri(uri); blocks.put(sideBits, block); result.add(block); } return result; }
public V put( byte key, V value ) { synchronized( mutex ) { return m.put( key, value ); } } public V remove( byte key ) {
@Override public V put( byte key, V value ) { synchronized( mutex ) { return m.put( key, value ); } } @Override
public RecipeMap<R> setSlotOverlay(boolean isOutput, boolean isFluid, boolean isLast, TextureArea slotOverlay) { this.slotOverlays.put((byte) ((isOutput ? 2 : 0) + (isFluid ? 1 : 0) + (isLast ? 4 : 0)), slotOverlay); return this; }
public V put( byte key, V value ) { synchronized( mutex ) { return m.put( key, value ); } } public V remove( byte key ) {
public Region putRegion(byte regionCode, Region region) { return regions.put(regionCode, region); }
public V put( byte key, V value ) { synchronized( mutex ) { return m.put( key, value ); } } public V remove( byte key ) {
/** * Inserts a key/value pair into the map. * * @param key an <code>Byte</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or <tt>null</tt> if none was found. */ @Override public V put( Byte key, V value ) { byte k = unwrapKey( key ); return _map.put( k, value ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Byte</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or <tt>null</tt> if none was found. */ public V put( Byte key, V value ) { byte k; if ( key == null ) { k = _map.getNoEntryKey(); } else { k = unwrapKey( key ); } return _map.put( k, value ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Byte</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or <tt>null</tt> if none was found. */ public V put( Byte key, V value ) { byte k; if ( key == null ) { k = _map.getNoEntryKey(); } else { k = unwrapKey( key ); } return _map.put( k, value ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Byte</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or <tt>null</tt> if none was found. */ public V put( Byte key, V value ) { byte k; if ( key == null ) { k = _map.getNoEntryKey(); } else { k = unwrapKey( key ); } return _map.put( k, value ); }