Java Code Examples for net.minecraft.item.Item#Settings

The following examples show how to use net.minecraft.item.Item#Settings . 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: MixinItemSettings.java    From patchwork-api with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public Item.Settings setTEISR(Supplier<Callable<BuiltinModelItemRenderer>> teisr) {
	try {
		this.teisr = teisr.get().call();
	} catch (Exception e) {
		throw new RuntimeException(e);
	}

	return (Item.Settings) (Object) this;
}
 
Example 2
Source File: MixinItem.java    From patchwork-api with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Inject(at = @At("RETURN"), method = "<init>")
private void onConstruct(Item.Settings settings, CallbackInfo info) {
	final PatchworkItemSettingsExtensions extension = (PatchworkItemSettingsExtensions) settings;

	canRepair = extension.canRepair();

	toolClasses = Maps.newHashMap();
	toolClasses.putAll(extension.getToolClasses());
}
 
Example 3
Source File: HallowedItems.java    From the-hallow with MIT License 4 votes vote down vote up
static Item.Settings newSettings() {
	return new Item.Settings().group(TheHallow.GROUP);
}
 
Example 4
Source File: HallowedBlocks.java    From the-hallow with MIT License 4 votes vote down vote up
static <T extends Block> T register(String name, T block, Item.Settings settings) {
	return register(name, block, new BlockItem(block, settings));
}
 
Example 5
Source File: MixinItem.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Inject(at = @At("RETURN"), method = "<init>")
private void onConstruct(Item.Settings settings, CallbackInfo info) {
	final PatchworkItemSettingsExtensions extension = (PatchworkItemSettingsExtensions) settings;

	this.teisr = extension.getTeisr();
}
 
Example 6
Source File: PatchworkItemSettingsExtensions.java    From patchwork-api with GNU Lesser General Public License v2.1 votes vote down vote up
Item.Settings setNoRepair(); 
Example 7
Source File: PatchworkItemSettingsExtensions.java    From patchwork-api with GNU Lesser General Public License v2.1 votes vote down vote up
Item.Settings addToolType(ToolType type, int level); 
Example 8
Source File: PatchworkItemSettingsExtensions.java    From patchwork-api with GNU Lesser General Public License v2.1 votes vote down vote up
Item.Settings setTEISR(Supplier<Callable<BuiltinModelItemRenderer>> teisr);