當前位置: 首頁>>代碼示例>>Java>>正文


Java RobotRenderEvent類代碼示例

本文整理匯總了Java中li.cil.oc.api.event.RobotRenderEvent的典型用法代碼示例。如果您正苦於以下問題:Java RobotRenderEvent類的具體用法?Java RobotRenderEvent怎麽用?Java RobotRenderEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RobotRenderEvent類屬於li.cil.oc.api.event包,在下文中一共展示了RobotRenderEvent類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: render

import li.cil.oc.api.event.RobotRenderEvent; //導入依賴的package包/類
/**
 * Render the specified upgrade on a robot.
 * <p/>
 * The GL state has not been adjusted to the mount points position, so
 * that you can perform rotations without having to revert the translation.
 * It is your responsibility to position the rendered model to fit the
 * specified mount point. The state will be such that the origin is the
 * center of the robot. This is what the offset of the mount-point is
 * relative to.
 * <p/>
 * If the stack cannot be rendered, the renderer should indicate so in
 * {@link #computePreferredMountPoint}, otherwise it will still consume a mount
 * point.
 * <p/>
 * You usually won't need the robot parameter, but in case you <em>do</em>
 * need some contextual information, this should provide you with anything
 * you could need.
 *
 * @param stack      the item stack of the upgrade to render.
 * @param mountPoint the mount-point to render the upgrade at.
 * @param robot      the robot the upgrade is rendered on.
 * @param pt         partial tick time, e.g. for animations.
 */
void render(ItemStack stack, RobotRenderEvent.MountPoint mountPoint, Robot robot, float pt);
 
開發者ID:Herobone,項目名稱:HeroUtils,代碼行數:25,代碼來源:UpgradeRenderer.java


注:本文中的li.cil.oc.api.event.RobotRenderEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。