如何在Minecraft Forge中为块控制杆添加事件处理程序?

时间:2016-02-19 08:42:49

标签: java events event-handling minecraft minecraft-forge

我想在玩家右键点击控制杆时添加一个事件处理,这意味着激活它。我该怎么做?

1 个答案:

答案 0 :(得分:1)

查看Material.LEVER并检查他点击的内容类型是否等于UIImage *img = ...; NSError *err; NSData *imgData = [imageSerialization animatedGIFDataWithImage:img error:&err]; NSLog(@"%@", err); NSArray *objectsToShare = @[imgData]; UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil]; NSArray *excludeActivities = @[UIActivityTypePrint, UIActivityTypeAssignToContact]; avc.excludedActivityTypes = excludeActivities; [self presentViewController:avc animated:YES completion:nil];