<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://mcbbs.wiki/index.php?action=history&amp;feed=atom&amp;title=FancyMenu_Wiki%2F%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0</id>
	<title>FancyMenu Wiki/自定义元素 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://mcbbs.wiki/index.php?action=history&amp;feed=atom&amp;title=FancyMenu_Wiki%2F%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0"/>
	<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=FancyMenu_Wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0&amp;action=history"/>
	<updated>2026-05-08T05:51:12Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.40.3</generator>
	<entry>
		<id>https://mcbbs.wiki/index.php?title=FancyMenu_Wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0&amp;diff=39978&amp;oldid=prev</id>
		<title>Litwak913：​// Edit via Wikiplus</title>
		<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=FancyMenu_Wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0&amp;diff=39978&amp;oldid=prev"/>
		<updated>2022-11-22T07:34:30Z</updated>

		<summary type="html">&lt;p&gt;// Edit via Wikiplus&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年11月22日 (二) 15:34的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l557&quot;&gt;第557行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第557行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在你可以使用你自己的布局元素了！&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在你可以使用你自己的布局元素了！&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[分类:FancyMenu]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mcbbs_wiki:diff::1.12:old-39976:rev-39978 --&gt;
&lt;/table&gt;</summary>
		<author><name>Litwak913</name></author>
	</entry>
	<entry>
		<id>https://mcbbs.wiki/index.php?title=FancyMenu_Wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0&amp;diff=39976&amp;oldid=prev</id>
		<title>Litwak913：​创建页面，内容为“== 关于 == 你可以通过FancyMenu API为FancyMenu编写拓展模组实现自定义元素。  == 准备开发环境 == 请参阅 准备工作区。  == 添加新元素 == 每个自定义元素（或item，因为元素在内部被称为此）都需要封装到&lt;code&gt;CustomizationItemContainer&lt;/code&gt;中。  在模组初始化时，这个容器需要注册到&lt;code&gt;CustomizationItemRegistry&lt;/code&gt;。 === 创建Item === 实际上…”</title>
		<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=FancyMenu_Wiki/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%85%83%E7%B4%A0&amp;diff=39976&amp;oldid=prev"/>
		<updated>2022-11-22T07:28:52Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“== 关于 == 你可以通过FancyMenu API为FancyMenu编写拓展模组实现自定义元素。  == 准备开发环境 == 请参阅 &lt;a href=&quot;/wiki/FancyMenu_Wiki/%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C%E5%8C%BA&quot; title=&quot;FancyMenu Wiki/准备工作区&quot;&gt;准备工作区&lt;/a&gt;。  == 添加新元素 == 每个自定义元素（或item，因为元素在内部被称为此）都需要封装到&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;中。  在模组初始化时，这个容器需要注册到&amp;lt;code&amp;gt;CustomizationItemRegistry&amp;lt;/code&amp;gt;。 === 创建Item === 实际上…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 关于 ==&lt;br /&gt;
你可以通过FancyMenu API为FancyMenu编写拓展模组实现自定义元素。&lt;br /&gt;
&lt;br /&gt;
== 准备开发环境 ==&lt;br /&gt;
请参阅 [[FancyMenu_Wiki/准备工作区|准备工作区]]。&lt;br /&gt;
&lt;br /&gt;
== 添加新元素 ==&lt;br /&gt;
每个自定义元素（或item，因为元素在内部被称为此）都需要封装到&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;中。&lt;br /&gt;
&lt;br /&gt;
在模组初始化时，这个容器需要注册到&amp;lt;code&amp;gt;CustomizationItemRegistry&amp;lt;/code&amp;gt;。&lt;br /&gt;
=== 创建Item ===&lt;br /&gt;
实际上item的类是&amp;lt;code&amp;gt;CustomizationItem&amp;lt;/code&amp;gt;。这个类是渲染它并存储其所有属性的项。&lt;br /&gt;
&lt;br /&gt;
给你的项创建一个&amp;lt;code&amp;gt;CustomizationItem&amp;lt;/code&amp;gt;的新子类，自己的孩子好好起名嗷。&lt;br /&gt;
&lt;br /&gt;
在这里，我会将我的演示用项类命名为&amp;lt;code&amp;gt;ExampleCustomizationItem&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
在这个类中有两个很重要的东西。&lt;br /&gt;
==== 构造方法(Constructor) ====&lt;br /&gt;
第一个就是这个类的构造方法。&lt;br /&gt;
&lt;br /&gt;
在这里，你需要反序列化 已保存/序列化 的项实例的属性。并需要把它设置为新的真实例。&lt;br /&gt;
&lt;br /&gt;
保存到布局时，项会被序列化为&amp;lt;code&amp;gt;PropertiesSections&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
你只关心（你自己）你的自定义项的值就行。每一项的基本的长宽高坐标部分啥的都默认让超类整完了。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
//The constuctor is used to de-serialize the PropertiesSection and set all of its values to the new real item instance.&lt;br /&gt;
//构造方法用于反序列化PropertiesSection并将其所有值设置为新的真项实例。&lt;br /&gt;
public ExampleCustomizationItem(CustomizationItemContainer parentContainer, PropertiesSection item) {&lt;br /&gt;
&lt;br /&gt;
    //The superclass will automatically get values like orientation, x pos, y pos, width and height and will set it to the real item instance.&lt;br /&gt;
    //超类会自动获取长宽高位置坐标等将它们设置到真项实例中。&lt;br /&gt;
    super(parentContainer, item);&lt;br /&gt;
&lt;br /&gt;
    //Getting a custom property from the serialized item instance and set it to the real instance&lt;br /&gt;
    //从序列化的项实例中获取自定义属性并将其设置为真实例。&lt;br /&gt;
    String someProperty = item.getEntryValue(&amp;quot;saved_property&amp;quot;);&lt;br /&gt;
    if (someProperty != null) {&lt;br /&gt;
        this.someField = someProperty;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== render() ====&lt;br /&gt;
还有一件事，你得渲染你的项。&lt;br /&gt;
&lt;br /&gt;
这个方法是你的项的灵魂，使用这个方法来改变你的项的可视部分，就那个一会你可以在菜单看见的。&lt;br /&gt;
&lt;br /&gt;
所以就在这里做你的事，知道吗？&lt;br /&gt;
&lt;br /&gt;
这里唯一真正必要的部分是将此方法中的所有内容封装到&amp;lt;code&amp;gt;shouldRender()&amp;lt;/code&amp;gt;中。&lt;br /&gt;
&lt;br /&gt;
这个方法检查可视化需求和其他重要内容，所以请别把这里忘了捏。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public void render(PoseStack matrix, Screen menu) throws IOException {&lt;br /&gt;
&lt;br /&gt;
    //This is really important and should be in every item render method, to check for visibility requirements and more.&lt;br /&gt;
    //为了检查可视化需求这应该在所有的项渲染方法中。&lt;br /&gt;
    if (this.shouldRender()) {&lt;br /&gt;
&lt;br /&gt;
        //Always use getPosX() and getPosY() to get the X and Y positions of the item.&lt;br /&gt;
        //就用getPosX()和getPosY()方法获取项的X、Y位置就行。&lt;br /&gt;
        //The fields posX and posY aren&amp;#039;t the final position, just the base pos without the orientation!&lt;br /&gt;
        //这里的posX和posY字段不是指最终位置，而只是没有方向的基本pos！&lt;br /&gt;
        int x = this.getPosX(menu);&lt;br /&gt;
        int y = this.getPosY(menu);&lt;br /&gt;
&lt;br /&gt;
        //We want to use placeholder text values for our &amp;#039;someField&amp;#039; string, so we use the DynamicValueHelper to convert them,&lt;br /&gt;
        //我们想为我们的&amp;quot;someField&amp;quot;字符串使用占位符文本值，使用DynamicValueHelper来转换即可，&lt;br /&gt;
        //but they should look like placeholders in the editor, so we only convert them when not in the editor.&lt;br /&gt;
        //但在编辑器中它们应该看着像占位符，所以我们不在编辑器中时转换它们。&lt;br /&gt;
        String text;&lt;br /&gt;
        if (!isEditorActive()) {&lt;br /&gt;
            text = DynamicValueHelper.convertFromRaw(this.someField);&lt;br /&gt;
        } else {&lt;br /&gt;
            text = StringUtils.convertFormatCodes(this.someField, &amp;quot;&amp;amp;&amp;quot;, &amp;quot;Â§&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        //Always try to make your items&amp;#039; opacity changeable by setting the &amp;#039;opacity&amp;#039; field!&lt;br /&gt;
        //你可以尝试设置&amp;quot;opacity&amp;quot;来改变项的不透明度。&lt;br /&gt;
        //This field is set by the &amp;quot;delay appearance&amp;quot; feature to control the fade-in opacity.&lt;br /&gt;
        //该字段由&amp;quot;delay appearance&amp;quot;功能设置以控制淡入不透明度。&lt;br /&gt;
        drawString(matrix, Minecraft.getInstance().font, text, x + 10, y + 10, -1 | Mth.ceil(this.opacity * 255.0F) &amp;lt;&amp;lt; 24);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== 完整示例 ====&lt;br /&gt;
这里是完整的自定义项示例。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package de.keksuccino.fancymenu.api.item.example;&lt;br /&gt;
&lt;br /&gt;
import com.mojang.blaze3d.systems.RenderSystem;&lt;br /&gt;
import com.mojang.blaze3d.vertex.PoseStack;&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.CustomizationItem;&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.CustomizationItemContainer;&lt;br /&gt;
import de.keksuccino.fancymenu.menu.fancy.DynamicValueHelper;&lt;br /&gt;
import de.keksuccino.konkrete.input.StringUtils;&lt;br /&gt;
import de.keksuccino.konkrete.properties.PropertiesSection;&lt;br /&gt;
import de.keksuccino.konkrete.rendering.RenderUtils;&lt;br /&gt;
import net.minecraft.client.Minecraft;&lt;br /&gt;
import net.minecraft.client.gui.screens.Screen;&lt;br /&gt;
import net.minecraft.util.Mth;&lt;br /&gt;
&lt;br /&gt;
import java.awt.*;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
&lt;br /&gt;
public class ExampleCustomizationItem extends CustomizationItem {&lt;br /&gt;
&lt;br /&gt;
    public String displayText = &amp;quot;placeholder&amp;quot;;&lt;br /&gt;
    public String backgroundColorString = &amp;quot;#38ff38&amp;quot;;&lt;br /&gt;
    public Color backgroundColor = new Color(56, 255, 56);&lt;br /&gt;
&lt;br /&gt;
    //The constuctor is used to de-serialize the PropertiesSection and set all of its values to the new real item instance.&lt;br /&gt;
    //构造方法用于反序列化PropertiesSection并将其所有值设置为新的真项实例。&lt;br /&gt;
    public ExampleCustomizationItem(CustomizationItemContainer parentContainer, PropertiesSection item) {&lt;br /&gt;
&lt;br /&gt;
        //The superclass will automatically get values like orientation, x pos, y pos, width and height and will set it to the real item instance.&lt;br /&gt;
        //超类会自动获取长宽高位置坐标等将它们设置到真项实例中。&lt;br /&gt;
        super(parentContainer, item);&lt;br /&gt;
&lt;br /&gt;
        //Getting the background HEX color from the serialized item&lt;br /&gt;
        //从序列化项中获取背景HEX颜色。&lt;br /&gt;
        String backColorHex = item.getEntryValue(&amp;quot;background_color&amp;quot;);&lt;br /&gt;
        if (backColorHex != null) {&lt;br /&gt;
            Color c = RenderUtils.getColorFromHexString(backColorHex);&lt;br /&gt;
            if (c != null) {&lt;br /&gt;
                this.backgroundColor = c;&lt;br /&gt;
                this.backgroundColorString = backColorHex;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        //Getting the display text string from the serialized item&lt;br /&gt;
        //从序列化项中获取显示文本字符串。&lt;br /&gt;
        String dText = item.getEntryValue(&amp;quot;display_text&amp;quot;);&lt;br /&gt;
        if (dText != null) {&lt;br /&gt;
            this.displayText = dText;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public void render(PoseStack matrix, Screen menu) throws IOException {&lt;br /&gt;
&lt;br /&gt;
        //This is really important and should be in every item render method, to check for visibility requirements and more.&lt;br /&gt;
        //为了检查可视化需求这应该在所有的项渲染方法中。&lt;br /&gt;
        if (this.shouldRender()) {&lt;br /&gt;
&lt;br /&gt;
            //Always use getPosX() and getPosY() to get the X and Y positions of the item.&lt;br /&gt;
            //就用getPosX()和getPosY()方法获取项的X、Y位置就行。&lt;br /&gt;
            //The fields posX and posY aren&amp;#039;t the final position, just the base pos without the orientation!&lt;br /&gt;
            //这里的posX和posY字段不是指最终位置，而只是没有方向的基本pos！&lt;br /&gt;
            int x = this.getPosX(menu);&lt;br /&gt;
            int y = this.getPosY(menu);&lt;br /&gt;
&lt;br /&gt;
            RenderSystem.enableBlend();&lt;br /&gt;
&lt;br /&gt;
            //Rendering the background color as background of the item.&lt;br /&gt;
            //将背景颜色渲染为项的背景。&lt;br /&gt;
            fill(matrix, x, y, x + this.getWidth(), y + this.getHeight(), this.backgroundColor.getRGB() | Mth.ceil(this.opacity * 255.0F) &amp;lt;&amp;lt; 24);&lt;br /&gt;
&lt;br /&gt;
            //Rendering the display text to the upper-left side of the item&lt;br /&gt;
            //将显示文本渲染到项的左上角。&lt;br /&gt;
            if (this.displayText != null) {&lt;br /&gt;
                //We want to use placeholder text values for the display text, so we use the DynamicValueHelper to convert them,&lt;br /&gt;
                //我们想使用占位符文本值作为显示文本，使用DynamicValueHelper来转换即可，&lt;br /&gt;
                //but they should look like placeholders in the editor, so we only convert them when not in the editor.&lt;br /&gt;
                //但在编辑器中它们应该看着像占位符，所以我们不在编辑器中时转换它们。&lt;br /&gt;
                String text;&lt;br /&gt;
                if (!isEditorActive()) {&lt;br /&gt;
                    text = DynamicValueHelper.convertFromRaw(this.displayText);&lt;br /&gt;
                } else {&lt;br /&gt;
                    text = StringUtils.convertFormatCodes(this.displayText, &amp;quot;&amp;amp;&amp;quot;, &amp;quot;Â§&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
                //The &amp;#039;opacity&amp;#039; field is used to set the fade-in opacity of the item when the &amp;quot;delay appearance&amp;quot; option is enabled for it.&lt;br /&gt;
                //&amp;#039;opacity&amp;#039;字段用于设置项在启用“delay appearance”选项时的淡入不透明度。&lt;br /&gt;
                //Always try to make your items&amp;#039; opacity changeable by setting the &amp;#039;opacity&amp;#039; field! (I also used it in the fill method for the background)&lt;br /&gt;
                ////你可以尝试设置&amp;quot;opacity&amp;quot;来改变项的不透明度。(我还在背景的填充方法中使用了它)&lt;br /&gt;
                drawString(matrix, Minecraft.getInstance().font, text, x + 10, y + 10, -1 | Mth.ceil(this.opacity * 255.0F) &amp;lt;&amp;lt; 24);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== 创建编辑器元素 ===&lt;br /&gt;
&amp;lt;code&amp;gt;LayoutEditorElements&amp;lt;/code&amp;gt;包含在布局编辑器中对你的项重要的所有内容。&lt;br /&gt;
&lt;br /&gt;
这包括与你的项相关的所有UI部分，例如说在编辑器中右键单击项时的右键菜单。&lt;br /&gt;
&lt;br /&gt;
给你的项起个合适的名字并创建一个&amp;lt;code&amp;gt;LayoutEditorElement&amp;lt;/code&amp;gt;的新子类。&lt;br /&gt;
&lt;br /&gt;
接下来，我会将我的样例编辑器元素类命名为&amp;lt;code&amp;gt;ExampleLayoutEditorElement&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
在这个类中有两种重要方法需要你留意一下。&lt;br /&gt;
==== init() ====&lt;br /&gt;
第一个，由编辑器调用以初始化你的编辑器元素(主要用于初始化UI)。&lt;br /&gt;
&lt;br /&gt;
每一个编辑器元素都有&amp;lt;code&amp;gt;rightclickMenu&amp;lt;/code&amp;gt;(右键菜单)字段。这是元素的右键右键菜单。&lt;br /&gt;
&lt;br /&gt;
这里的右键菜单已包含所有的默认内容，比如设置方向、删除元素等。&lt;br /&gt;
&lt;br /&gt;
要是你想在这编辑你的项的自定义值，那需要在添加一个新的&amp;lt;code&amp;gt;entries&amp;lt;/code&amp;gt;到那个右键菜单并链接到你的项。&lt;br /&gt;
&lt;br /&gt;
编辑器元素类的对象字段是你的实际&amp;lt;code&amp;gt;CustomizationItem&amp;lt;/code&amp;gt;实例，只需将其转换为你的项的子类(在本例中为&amp;lt;code&amp;gt;ExampleCustomizationItem&amp;lt;/code&amp;gt;)即可使用其自定义字段和方法。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public void init() {&lt;br /&gt;
&lt;br /&gt;
    //The superclass adds basic stuff to the right-click context menu, like visibility requirement controls, delete controls, orientation, etc.&lt;br /&gt;
    //这里的超类为右键菜单添加了些基础功能，比如可视化需求控件，删除控件，方向等。&lt;br /&gt;
    super.init();&lt;br /&gt;
&lt;br /&gt;
    //The &amp;#039;object&amp;#039; field holds the CustomizationItem instance of this element.&lt;br /&gt;
    //&amp;quot;object&amp;quot;字段包含这个元素的CustomizationItem实例。&lt;br /&gt;
    //Cast it to your own item class, to get and set your own fields.&lt;br /&gt;
    //把他转换成你自己的项类，以便于获取/设置你自己的字段。&lt;br /&gt;
    ExampleCustomizationItem i = ((ExampleCustomizationItem)this.object);&lt;br /&gt;
&lt;br /&gt;
    //This button will be part of the right-click context menu of the element and is used to change the &amp;#039;someField&amp;#039; field of the CustomizationItem subclass.&lt;br /&gt;
    //这个按钮将会成为元素右键菜单的一部分，以便于更改CustomizationItem子类的&amp;#039;someField&amp;#039;字段。&lt;br /&gt;
    AdvancedButton someFieldButton = new AdvancedButton(0, 0, 0, 0, &amp;quot;Set Some Field&amp;quot;, (press) -&amp;gt; {&lt;br /&gt;
        //This is the basic input popup for text content, used in many parts of FancyMenu.&lt;br /&gt;
        //这是文本内容的基本输入弹出框，在FancyMenu的很多部分都有使用。&lt;br /&gt;
        FMTextInputPopup pop = new FMTextInputPopup(new Color(0, 0, 0, 0), &amp;quot;Set Some Field Content&amp;quot;, null, 240, (callback) -&amp;gt; {&lt;br /&gt;
            //The callback of popups will be null, when pressing ESC in it to force-close it.&lt;br /&gt;
            //当按下ESC强制关闭窗口时，窗口回调值为空。&lt;br /&gt;
            if (callback != null) {&lt;br /&gt;
                if (!callback.equals(i.someField)) {&lt;br /&gt;
                    //Create a snapshot before every change, so you can undo the change in the editor (using CTRL + Z)&lt;br /&gt;
                    //在每次更改前生成一个快照，顺便你也可以回退在编辑器中的更改(Ctrl+Z)&lt;br /&gt;
                    this.handler.history.saveSnapshot(this.handler.history.createSnapshot());&lt;br /&gt;
                    //Now set the new value to the item instance&lt;br /&gt;
                    //现在捏，给项实例设置新值。&lt;br /&gt;
                    i.someField = callback;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        //Set the current value as default text of the text input popup&lt;br /&gt;
        //设置现有的值为文本输入框的默认文本。&lt;br /&gt;
        if (i.someField != null) {&lt;br /&gt;
            pop.setText(i.someField);&lt;br /&gt;
        }&lt;br /&gt;
        //Open the popup&lt;br /&gt;
        PopupHandler.displayPopup(pop);&lt;br /&gt;
    });&lt;br /&gt;
    someFieldButton.setDescription(&amp;quot;This is just an example button tooltip.&amp;quot;);&lt;br /&gt;
    //Add the button to the right-click context menu content&lt;br /&gt;
    //添加按钮到右键菜单内容中。&lt;br /&gt;
    this.rightclickMenu.addContent(someFieldButton);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== serializeItem() ====&lt;br /&gt;
简单但也重要，第二个重要方法在保存布局时被调用。&lt;br /&gt;
&lt;br /&gt;
在这里，你的项实例(对象字段)被序列化为&amp;lt;code&amp;gt;SimplePropertiesSection&amp;lt;/code&amp;gt;以将其属性保存在布局文件中。&lt;br /&gt;
&lt;br /&gt;
你只关心（你自己）你的自定义项的值就行。每一项的基本的长宽高坐标部分啥的都默认添加到了序列化实例中。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public SimplePropertiesSection serializeItem() {&lt;br /&gt;
&lt;br /&gt;
    ExampleCustomizationItem i = ((ExampleCustomizationItem)this.object);&lt;br /&gt;
&lt;br /&gt;
    SimplePropertiesSection sec = new SimplePropertiesSection();&lt;br /&gt;
&lt;br /&gt;
    //Add your custom item values here, so they get saved and can later be de-serialized again.&lt;br /&gt;
    //在这添加你的自定义项的值，以至于它们被保存后可以再次反序列化。&lt;br /&gt;
    sec.addEntry(&amp;quot;saved_property&amp;quot;, i.someField);&lt;br /&gt;
&lt;br /&gt;
    return sec;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== 完整样例 ====&lt;br /&gt;
这里是&amp;lt;code&amp;gt;LayoutEditorElement&amp;lt;/code&amp;gt;的完整样例。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package de.keksuccino.fancymenu.api.item.example;&lt;br /&gt;
&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.LayoutEditorElement;&lt;br /&gt;
import de.keksuccino.fancymenu.menu.fancy.helper.DynamicValueInputPopup;&lt;br /&gt;
import de.keksuccino.fancymenu.menu.fancy.helper.layoutcreator.LayoutEditorScreen;&lt;br /&gt;
import de.keksuccino.fancymenu.menu.fancy.helper.ui.popup.FMTextInputPopup;&lt;br /&gt;
import de.keksuccino.konkrete.gui.content.AdvancedButton;&lt;br /&gt;
import de.keksuccino.konkrete.gui.screens.popup.PopupHandler;&lt;br /&gt;
import de.keksuccino.konkrete.rendering.RenderUtils;&lt;br /&gt;
&lt;br /&gt;
import java.awt.*;&lt;br /&gt;
&lt;br /&gt;
public class ExampleLayoutEditorElement extends LayoutEditorElement {&lt;br /&gt;
&lt;br /&gt;
    public ExampleLayoutEditorElement(ExampleCustomizationItemContainer parentContainer, ExampleCustomizationItem customizationItemInstance, LayoutEditorScreen handler) {&lt;br /&gt;
        super(parentContainer, customizationItemInstance, true, handler, true);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public void init() {&lt;br /&gt;
&lt;br /&gt;
        //The superclass adds basic stuff to the right-click context menu, like visibility requirement controls, delete controls, orientation, etc.&lt;br /&gt;
        //这里的超类为右键菜单添加了些基础功能，比如可视化需求控件，删除控件，方向等。&lt;br /&gt;
        super.init();&lt;br /&gt;
&lt;br /&gt;
        //The &amp;#039;object&amp;#039; field holds the CustomizationItem instance of this element.&lt;br /&gt;
        //&amp;quot;object&amp;quot;字段包含这个元素的CustomizationItem实例。&lt;br /&gt;
        //Cast it to your own item class, to get and set your own fields.&lt;br /&gt;
        //把他转换成你自己的项类，以便于获取/设置你自己的字段。&lt;br /&gt;
        ExampleCustomizationItem i = ((ExampleCustomizationItem)this.object);&lt;br /&gt;
&lt;br /&gt;
        //This button will be part of the right-click context menu of the element and is uses to change the background color value of the item.&lt;br /&gt;
        //这个按钮将成为元素右键菜单的一部分，用于更改项的背景颜色值。&lt;br /&gt;
        AdvancedButton backgroundColorButton = new AdvancedButton(0, 0, 0, 0, &amp;quot;Background Color&amp;quot;, (press) -&amp;gt; {&lt;br /&gt;
            //This is the basic input popup for text content, used in many parts of FancyMenu.&lt;br /&gt;
            //这是文本内容的基本输入弹出框，在FancyMenu的很多部分都有使用。&lt;br /&gt;
            FMTextInputPopup pop = new FMTextInputPopup(new Color(0, 0, 0, 0), &amp;quot;Background Color HEX&amp;quot;, null, 240, (callback) -&amp;gt; {&lt;br /&gt;
                //The callback of popups will be null, when pressing ESC in it to force-close it.&lt;br /&gt;
                //当按下ESC强制关闭窗口时，窗口回调值为空。&lt;br /&gt;
                if (callback != null) {&lt;br /&gt;
                    if (!callback.equals(i.backgroundColorString)) {&lt;br /&gt;
                        Color c = RenderUtils.getColorFromHexString(callback);&lt;br /&gt;
                        if (c != null) {&lt;br /&gt;
                            //Create a snapshot before every change, so you can undo the change in the editor (using CTRL + Z)&lt;br /&gt;
                            //在每次更改前生成一个快照，顺便你也可以回退在编辑器中的更改(Ctrl+Z)&lt;br /&gt;
                            this.handler.history.saveSnapshot(this.handler.history.createSnapshot());&lt;br /&gt;
                            //Now set the new values to the item instance&lt;br /&gt;
                            //现在捏，给项实例设置新值。&lt;br /&gt;
                            i.backgroundColorString = callback;&lt;br /&gt;
                            i.backgroundColor = c;&lt;br /&gt;
                        }&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
            //Set the current value as default text of the text input popup&lt;br /&gt;
            //设置现有的值为文本输入框的默认文本。&lt;br /&gt;
            if (i.backgroundColorString != null) {&lt;br /&gt;
                pop.setText(i.backgroundColorString);&lt;br /&gt;
            }&lt;br /&gt;
            //Open the popup&lt;br /&gt;
            //打开弹出框。&lt;br /&gt;
            PopupHandler.displayPopup(pop);&lt;br /&gt;
        });&lt;br /&gt;
        backgroundColorButton.setDescription(&amp;quot;This is just an example button tooltip.&amp;quot;);&lt;br /&gt;
        //Add the button to the right-click context menu content&lt;br /&gt;
        //添加按钮到右键菜单内容中。&lt;br /&gt;
        this.rightclickMenu.addContent(backgroundColorButton);&lt;br /&gt;
&lt;br /&gt;
        //This is the button to change the display text of the item. Will also be part of the right-click context menu.&lt;br /&gt;
        //这个是更改项显示的文本的按钮，也会成为右键菜单的一部分。&lt;br /&gt;
        AdvancedButton displayTextButton = new AdvancedButton(0, 0, 0, 0, &amp;quot;Display Text&amp;quot;, (press) -&amp;gt; {&lt;br /&gt;
            //This is also a text input popup, but with placeholder text value support (the little icon at the right side of the input field)&lt;br /&gt;
            //这也是文本弹出框，但是支持占位符文本值。&lt;br /&gt;
            DynamicValueInputPopup pop = new DynamicValueInputPopup(new Color(0, 0, 0, 0), &amp;quot;Set Display Text&amp;quot;, null, 240, (callback) -&amp;gt; {&lt;br /&gt;
                if (callback != null) {&lt;br /&gt;
                    if (!callback.equals(i.displayText)) {&lt;br /&gt;
                        //Again, save a snapshot before changing something!&lt;br /&gt;
                        //再来一次，在改变之前保存快照。&lt;br /&gt;
                        this.handler.history.saveSnapshot(this.handler.history.createSnapshot());&lt;br /&gt;
                        //Setting the new display text value&lt;br /&gt;
                        //设置新的显示文本值。&lt;br /&gt;
                        i.displayText = callback;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            });&lt;br /&gt;
            if (i.displayText != null) {&lt;br /&gt;
                pop.setText(i.displayText);&lt;br /&gt;
            }&lt;br /&gt;
            PopupHandler.displayPopup(pop);&lt;br /&gt;
        });&lt;br /&gt;
        this.rightclickMenu.addContent(displayTextButton);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public SimplePropertiesSection serializeItem() {&lt;br /&gt;
&lt;br /&gt;
        ExampleCustomizationItem i = ((ExampleCustomizationItem)this.object);&lt;br /&gt;
&lt;br /&gt;
        SimplePropertiesSection sec = new SimplePropertiesSection();&lt;br /&gt;
&lt;br /&gt;
        //Add your custom item values here, so they get saved and can later be de-serialized again.&lt;br /&gt;
        sec.addEntry(&amp;quot;background_color&amp;quot;, i.backgroundColorString);&lt;br /&gt;
        sec.addEntry(&amp;quot;display_text&amp;quot;, i.displayText);&lt;br /&gt;
&lt;br /&gt;
        return sec;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== 创建Container ===&lt;br /&gt;
我们需要的最后的类是&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;的子类。&lt;br /&gt;
&lt;br /&gt;
这个容器是&amp;lt;code&amp;gt;CustomizationItems&amp;lt;/code&amp;gt;和&amp;lt;code&amp;gt;LayoutEditorElements&amp;lt;/code&amp;gt;的基础实例Builder。&lt;br /&gt;
&lt;br /&gt;
给你的项创建&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;子类并起合适的名字。&lt;br /&gt;
&lt;br /&gt;
接下来，我会将我的示例容器类命名为&amp;lt;code&amp;gt;ExampleCustomizationItemContainer&amp;lt;/code&amp;gt;。&lt;br /&gt;
==== Item Identifier ====&lt;br /&gt;
项容器的构造方法需要唯一的标识符。(像是sfz)&lt;br /&gt;
&lt;br /&gt;
至于怎么让你的标识符唯一，我也不赘述了。&lt;br /&gt;
&lt;br /&gt;
你应该在子类构造方法里直接设置标识符。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public ExampleCustomizationItemContainer() {&lt;br /&gt;
    super(&amp;quot;example_item_identifier&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Instance Builders ====&lt;br /&gt;
项容器用于构建你的&amp;lt;code&amp;gt;CustomizationItem&amp;lt;/code&amp;gt;子类和&amp;lt;code&amp;gt;LayoutEditorElement&amp;lt;/code&amp;gt;子类的实例。&lt;br /&gt;
&lt;br /&gt;
你需要设置Builder的方法，以便容器可以构建子类的实例。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
//This will construct a default instance of your CustomizationItem without any customizations made to it.&lt;br /&gt;
//这里将会构造一个你的CustomizationItem默认实例，而且不对其进行任何自定义。&lt;br /&gt;
@Override&lt;br /&gt;
public CustomizationItem constructDefaultItemInstance() {&lt;br /&gt;
    //Just use an empty properties section here.&lt;br /&gt;
    //这里只是用了空属性section。&lt;br /&gt;
    //Make sure that your CustomizationItem accepts empty sections without throwing errors!&lt;br /&gt;
    //请确保你的CustomizationItem能接受空section还不报错。&lt;br /&gt;
    ExampleCustomizationItem i = new ExampleCustomizationItem(this, new PropertiesSection(&amp;quot;dummy&amp;quot;));&lt;br /&gt;
    //The default size of 10x10 would be a bit too small for the item, so I set a new default size of 100x100 to the default instance.&lt;br /&gt;
    //默认10*10的大小可能对于项来说有点过小了，所以我把10*10拉到了100*100。&lt;br /&gt;
    //This means that now every new item of this type will have a size of 100x100 by default.&lt;br /&gt;
    //就是说，咱现在所有这类型的新项默认大小都是100*100了。&lt;br /&gt;
    i.width = 100;&lt;br /&gt;
    i.height = 100;&lt;br /&gt;
    return i;&lt;br /&gt;
}&lt;br /&gt;
//This will construct a customized instance of your CustomizationItem, using the given PropertiesSection (serialized item) to set all customizations.&lt;br /&gt;
//这将构造您的CustomizationItem 的自定义实例，使用给定的PropertiesSection（序列化项）来设置所有自定义项。&lt;br /&gt;
@Override&lt;br /&gt;
public CustomizationItem constructCustomizedItemInstance(PropertiesSection serializedItem) {&lt;br /&gt;
    return new ExampleCustomizationItem(this, serializedItem);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//This will construct a new instance of your LayoutEditorElement, used in the layout editor.&lt;br /&gt;
//这里将会为你的LayoutEditorElement构建用在布局编辑器的实例。&lt;br /&gt;
@Override&lt;br /&gt;
public LayoutEditorElement constructEditorElementInstance(CustomizationItem item, LayoutEditorScreen handler) {&lt;br /&gt;
    return new ExampleLayoutEditorElement(this, (ExampleCustomizationItem) item, handler);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Display Name ====&lt;br /&gt;
你应该为你的项设置显示名称。&lt;br /&gt;
&lt;br /&gt;
这个显示名会用在布局编辑器中。&lt;br /&gt;
&lt;br /&gt;
这个方法允许你填入本地化键作为显示名称。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public String getDisplayName() {&lt;br /&gt;
    return &amp;quot;Example Item&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== 描述 ====&lt;br /&gt;
将鼠标悬停在按钮上以在布局编辑器中添加此类型的新项时，会显示项的描述。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public String[] getDescription() {&lt;br /&gt;
    return new String[] {&lt;br /&gt;
        &amp;quot;This is a description&amp;quot;,&lt;br /&gt;
        &amp;quot;with 2 lines of text.&amp;quot;&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== 完整示例 ====&lt;br /&gt;
这里是&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;的一个完整样例。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package de.keksuccino.fancymenu.api.item.example;&lt;br /&gt;
&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.CustomizationItem;&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.CustomizationItemContainer;&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.LayoutEditorElement;&lt;br /&gt;
import de.keksuccino.fancymenu.menu.fancy.helper.layoutcreator.LayoutEditorScreen;&lt;br /&gt;
import de.keksuccino.konkrete.properties.PropertiesSection;&lt;br /&gt;
&lt;br /&gt;
//This needs to be registered to the CustomizationItemRegistry at mod init&lt;br /&gt;
//在模组初始化这里需要被注册到CustomizationItemRegistry。&lt;br /&gt;
public class ExampleCustomizationItemContainer extends CustomizationItemContainer {&lt;br /&gt;
&lt;br /&gt;
    public ExampleCustomizationItemContainer() {&lt;br /&gt;
        super(&amp;quot;example_item_identifier&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public CustomizationItem constructDefaultItemInstance() {&lt;br /&gt;
        ExampleCustomizationItem i = new ExampleCustomizationItem(this, new PropertiesSection(&amp;quot;dummy&amp;quot;));&lt;br /&gt;
        //The default size of 10x10 would be a bit too small for the item, so I set a new default size of 100x100 to the default instance.&lt;br /&gt;
        //默认10*10的大小可能对于项来说有点过小了，所以我把10*10拉到了100*100。&lt;br /&gt;
        //This means that now every new item of this type will have a size of 100x100 by default.&lt;br /&gt;
        //就是说，咱现在所有这类型的新项默认大小都是100*100了。&lt;br /&gt;
        i.width = 100;&lt;br /&gt;
        i.height = 100;&lt;br /&gt;
        return i;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public CustomizationItem constructCustomizedItemInstance(PropertiesSection serializedItem) {&lt;br /&gt;
        return new ExampleCustomizationItem(this, serializedItem);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public LayoutEditorElement constructEditorElementInstance(CustomizationItem item, LayoutEditorScreen handler) {&lt;br /&gt;
        return new ExampleLayoutEditorElement(this, (ExampleCustomizationItem) item, handler);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public String getDisplayName() {&lt;br /&gt;
        return &amp;quot;Example Item&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public String[] getDescription() {&lt;br /&gt;
        return new String[] {&lt;br /&gt;
                &amp;quot;This is a description&amp;quot;,&lt;br /&gt;
                &amp;quot;with 2 lines of text.&amp;quot;&lt;br /&gt;
        };&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 注册Container ===&lt;br /&gt;
你就快完成了，嗯...最后一步，人类的一大步。&lt;br /&gt;
&lt;br /&gt;
FancyMenu需要认识你的自定义项，所以你需要让你的拓展模组初始化时注册你的&amp;lt;code&amp;gt;CustomizationItemContainer&amp;lt;/code&amp;gt;到&amp;lt;code&amp;gt;CustomizationItemRegistery&amp;lt;/code&amp;gt;。&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package de.keksuccino.fancymenu;&lt;br /&gt;
&lt;br /&gt;
import net.minecraftforge.fml.common.Mod;&lt;br /&gt;
import de.keksuccino.fancymenu.api.item.CustomizationItemRegistry;&lt;br /&gt;
&lt;br /&gt;
@Mod(&amp;quot;modid&amp;quot;)&lt;br /&gt;
public class ExampleModMainClass {&lt;br /&gt;
&lt;br /&gt;
    public ExampleModMainClass() {&lt;br /&gt;
        try {&lt;br /&gt;
&lt;br /&gt;
            //Register your CustomizationItemContainer to the CustomizationItemRegistry at mod init.&lt;br /&gt;
            //初始化时注册你的CustomizationItemContainer到CustomizationItemRegistery。&lt;br /&gt;
            CustomizationItemRegistry.registerItem(new ExampleCustomizationItemContainer());&lt;br /&gt;
&lt;br /&gt;
        } catch (Exception e) {&lt;br /&gt;
            e.printStackTrace();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
现在你可以使用你自己的布局元素了！&lt;/div&gt;</summary>
		<author><name>Litwak913</name></author>
	</entry>
</feed>