@Override
public IMessage onMessage(CraftMessage message, MessageContext ctx)
{
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
// Try crafting recipes first:
List<IRecipe> matching_recipes = CraftingHelper.getRecipesForRequestedOutput(message.parameters);
for (IRecipe recipe : matching_recipes)
{
if (CraftingHelper.attemptCrafting(player, recipe))
return null;
}
// Now try furnace recipes:
ItemStack input = CraftingHelper.getSmeltingRecipeForRequestedOutput(message.parameters);
if (input != null)
{
if (CraftingHelper.attemptSmelting(player, input))
return null;
}
return null;
}
SimpleCraftCommandsImplementation.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:Proyecto-DASI
作者:
评论列表
文章目录