• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

metadaddy/Forcecraft: Visualization of Salesforce Data in Minecraft

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

metadaddy/Forcecraft

开源软件地址(OpenSource Url):

https://github.com/metadaddy/Forcecraft

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

Forcecraft

This Minecraft mod visualizes Salesforce Accounts, Opportunities and Contacts. Forcecraft adds a new dimension to Minecraft, where each Account in your Salesforce environment (aka 'org') is represented by a building, comprising a level for each Opportunity associated with that Account.

Forcecraft

Levers on each level represent and control the Opportunity Stage Name; updating an Opportunity's Stage Name outside Minecraft will cause the lever state to update within the Minecraft world, while throwing the lever in Minecraft will update the Opportunity's Stage Name.

Opportunity Levers

Each Salesforce Contact is represented by a Villager-derived entity, with the Contact name shown as a custom name tag above the entity's head.

Contact

Interacting with a Contact (right-click, by default) will show the Chatter feed for that Contact and allow you to post to the feed. Similarly, Account and Opportunity signs give access to the respective Chatter feeds.

Contact Feed

If an Opportunity's Stage Name is updated to 'Closed Won', a Contact from the associated Account will teleport to the player and give the player items to the 'value' of the opportunity. If, on the other hand, an Opportunity's Stage Name is updated to 'Closed Lost', the weather will take a turn for the worse!

Take a look at the mod in action:

YouTube video

UPDATE (version 0.2.1) : if you define a custom object, Vegetable, in your Salesforce environment, the corresponding item will appear in the game when a record is created. The Vegetable object must include the following fields:

  • A picklist field named Type with values Flower, Carrot and Potato
  • A number field named Quantity

If the Vegetable object exists, Forcecraft will automatically listen for updates.

Running the mod

Pre-requisites

  • Minecraft 1.7.2. Download the Minecraft Launcher, edit your profile, and select version 1.7.2.
  • Minecraft Forge - I've been using 10.12.1.1060 - later versions may also work. Download the Forge Installer and run it (select 'Install Client') to create a Forge profile in the Minecraft launcher. Select the Forge profile.
  • The mod binary - Download it and drop it into the Minecraft mods directory. On a Mac, this is ~/Library/Application Support/minecraft/mods; on Windows it is %appdata%/.minecraft/mods.
  • A Salesforce org. Create a free Force.com Developer Edition if you are new to Salesforce and want to try out Forcecraft.

IMPORTANT You MUST create a configuration file with your account credentials so that Forcecraft can authenticate to Salesforce. Use this as a template:

# Configuration file

####################
# general
####################

general {
    I:dimensionId=7
    S:loginHost=login.salesforce.com
    S:[email protected]    
    S:password=p455w0rd
}

Edit this, and save it as

  • Mac: ~/Library/Application Support/minecraft/config/Forcecraft.cfg
  • Windows: %appdata%/.minecraft/config/Forcecraft.cfg

You MUST edit the username and password entries. If you are using a Salesforce sandbox, change the loginHost to test.salesforce.com.

Run Minecraft and select the Forge profile. If all is well, you should see Forcecraft listed on the Mods screen. Start Minecraft as a single player and create a new world, in creative mode.

Create New World

Once the game starts, you can type /login to teleport to the Forcecraft dimension. Type /logout to return to the default 'Overworld' dimension.

Note - if you're demoing the mod, you probably want to stop the game from pausing when you switch away to the browser or another app. To do this, edit options.txt

  • If you're running via Eclipse (see below), it's at <forge dir>/eclipse/options.txt
  • If you're running 'standalone' on a Mac, it's at ~/Library/Application Support/minecraft/options.txt. On Windows, it's at %appdata%\.minecraft.

Look for the line that reads

pauseOnLostFocus:true

Change true to false.

Building the mod

Pre-requisites

Minecraft, etc, as listed above, under 'Running the mod'. You will need the Minecraft Forge 10.12.1.1060 source distribution. Follow the installation process.

Getting the source

Fetch the Forcecraft repo into the Forge root directory (the forge/ directory created during zip extraction) like this:

cd forge
git init
git remote add origin https://github.com/metadaddy/Forcecraft.git
git fetch
rm build.gradle src/main/resources/mcmod.info
git checkout -t origin/master

Building the mod

gradle build

The build process creates build/distributions/Forcecraft-1.7.2-0.2.3-mod.jar. This is an uber-jar including all the mod's dependencies, packaged so that Forge will load it correctly.

You should be able to drop this into the mods directory to play the mod with Minecraft + Forge.

Debugging the mod

Create the Eclipse project:

gradle eclipse

Build the mod jar (see above). In the Eclipse Project Explorer, open the build/libs folder, select Forcecraft-1.7.2-0.2.2-dep.jar, right click, and select 'Build Path | Add to Build Path'. This jar file contains all the dependencies that Eclipse needs.

Follow the instructions in the 'Running the mod' section above to configure the mod, except that the configuration file needs to be at /<forge dir>/eclipse/config/Forcecraft.cfg.

In Eclipse, you can use the 'Run' or 'Debug' button as appropriate.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap