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

The following examples show how to use net.minecraft.item.Item#Settings . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
@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
@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 Project: the-hallow   File: HallowedItems.java    License: MIT License 4 votes vote down vote up
static Item.Settings newSettings() {
	return new Item.Settings().group(TheHallow.GROUP);
}
 
Example 4
Source Project: the-hallow   File: HallowedBlocks.java    License: 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
@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
Item.Settings setNoRepair(); 
Example 7
Item.Settings addToolType(ToolType type, int level); 
Example 8
Item.Settings setTEISR(Supplier<Callable<BuiltinModelItemRenderer>> teisr);