Java Code Examples for net.minecraft.init.Items#PAPER

The following examples show how to use net.minecraft.init.Items#PAPER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TileEntityTicketMachine.java    From OpenPeripheral-Addons with MIT License 5 votes vote down vote up
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
	if (itemstack == null) return false;

	switch (i) {
		case SLOT_PAPER:
			return itemstack.getItem() == Items.paper;
		case SLOT_INK: {
			Set<ColorMeta> color = ColorUtils.stackToColor(itemstack);
			return color != null && color.contains(ColorMeta.BLACK);
		}
		default:
			return false;
	}
}