<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=API%2Fsides%2Fzh</id>
	<title>API/sides/zh - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=API%2Fsides%2Fzh"/>
	<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=API/sides/zh&amp;action=history"/>
	<updated>2026-08-24T15:14:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://ocr.michiyo.me/w/index.php?title=API/sides/zh&amp;diff=1049&amp;oldid=prev</id>
		<title>imported&gt;OCDoc Import: Imported from legacy OpenComputers documentation at ocdoc.cil.li</title>
		<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=API/sides/zh&amp;diff=1049&amp;oldid=prev"/>
		<updated>2026-08-24T08:08:27Z</updated>

		<summary type="html">&lt;p&gt;Imported from legacy OpenComputers documentation at ocdoc.cil.li&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Sides(方向) API =&lt;br /&gt;
&lt;br /&gt;
此“API”提供了一份全局表，以便你通过名称来引用相对/绝对方向，而无需使用它们的编号。底层的编号值与Minecraft内部的编号（即名为`ForgeDirection`的Enum）完全一致。此表提供了双向查询，因此你既可以将名称解析为编号，也可以通过编号反查适合人类阅读的名称。例如，`sides.top`对应数字值`1`，而`sides[1]`的值为字符串`top`。每个方向都有数个别名，因此不太可能意外写错。以下是基本值：&lt;br /&gt;
&lt;br /&gt;
* 底面 (`bottom`), 数字: 0 - 顶面 (`top`), 数字: 1 - 背面 (`back`), 数字: 2 - 前面 (`front`), 数字: 3 - 右面 (`right`), 数字: 4 - 左面 (`left`), 数字: 5&lt;br /&gt;
&lt;br /&gt;
默认情况下定义了如下别名：&lt;br /&gt;
&lt;br /&gt;
* 底面: `down`, `negy` - 顶面: `up`, `posy` - 背面: `north`, `negz` - 前面: `south`, `posz`, `forward` - 右面: `west`, `negx` - 左面: `east`, `posx`&lt;br /&gt;
&lt;br /&gt;
方向在读写红石信号时很有用，例如： ```lua local component = require(&amp;quot;component&amp;quot;) local sides = require(&amp;quot;sides&amp;quot;) local rs = component.redstone rs.setOutput(sides.back, rs.getInput(sides.left)) ```&lt;br /&gt;
&lt;br /&gt;
== 目录 ==&lt;br /&gt;
&lt;br /&gt;
{{:API/contents/zh}}&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;OCDoc Import</name></author>
	</entry>
</feed>