Place Anywhere Core
基础模组,允许 Minecraft 方块存在于任意十进制坐标和任意 3D 旋转中,完全绕过原版整数网格。从底层重写区块存储、碰撞、渲染、射线投射、邻居更新、红石逻辑以及 NBT 序列化。
工作原理
每个自由方块都存储在一个覆盖在原版区块之上的并行数据层中——采用紧凑的调色板 + 面向数组结构(Structure-of-Arrays)格式,每 16³ 区块段独立处理。方块携带 DecimalBlockPos(双精度坐标)和四元数旋转,支持在任意角度和任意子方块位置放置与旋转。
该模组通过 Mixin 注入 22 个 Minecraft 内部类,使自由方块具备完整交互能力:它们使用正确的光照和方块实体模型进行渲染,利用 OBB(定向包围盒)碰撞检测与玩家及实体发生碰撞,响应用于挖掘和交互的射线投射,传播并接收邻居更新,传导红石信号,打开容器 GUI,并与原版区块数据一起持久化保存/加载。
功能特性
任意十进制放置
- 可在任意
(x, y, z)坐标放置方块——不再局限于整数位置。 - 方块位置以双精度值存储,并在保存/加载后保持不变。
基于四元数的旋转
- 每个自由方块均可使用四元数数学运算旋转至任意方向——不受限于原版的 4 种或 24 种旋转状态。
- 旋转应用于碰撞形状、渲染和命中框。
完整碰撞系统
- OBB(定向包围盒)碰撞:针对旋转方块使用 SAT(分离轴定理)。
- 二分搜索移动裁剪:按轴二分,迭代 10 次,实现约 0.001 方块的精度。
- 坡度自动踏步:实体可沿倾斜的旋转表面行走(最高可达 0.6 方块高度)。
- 残余穿透解析:将实体从小型重叠区域推出,防止卡模。
- 提供完整的 GJK + EPA 实现,用于复杂凸形形状的碰撞检测。
- 正确计算速度倍增器、跳跃速度倍增器以及在自由方块上行走时的移动摩擦系数。
- 自动跳跃支持:应对自由方块障碍物。
渲染
- 完整的烘焙模型渲染,支持四元数旋转、根据方块类型应用正确的 RenderLayer,以及光照贴图采样。
- 方块实体渲染:使用反序列化缓存,避免每帧 NBT 开销(箱子、桶、潜影盒、信标等)。
- 在
AFTER_TRANSLUCENT阶段渲染,以实现正确的透明度混合(兼容 Iris/Sodium)。 - 方块轮廓(选择框):观察自由方块时,以青色 OBB 线框形式渲染。
- 64 方块渲染距离(相对于摄像机)。
红石
- 自由方块发射和接收红石信号——包括弱力和强力。
- 红石导线连接:针对自由方块位置重新计算连接,包括 SIDE(侧面)、UP(上方)及依赖方向的连接(中继器、侦测器等)。
- 完整的导线功率传播带衰减效果,遵循原版导线间规则。
- 四个注入的红石方法确保与所有红石组件兼容。
邻居更新
- 原版邻居变更会传播到附近的自由方块,反之亦然。
- 捕获-恢复模式:自由方块临时放置在整数网格上进行状态更新,随后被捕获并恢复——支持门、活塞及其他对状态敏感的方块。
交互与 GUI
- 左键点击:挖掘自由方块(附带粒子效果和掉落物)。
- 右键点击:进行交互——打开箱子、使用工作台、切换门/按钮/拉杆。
- 容器 GUI 支持:方块实体临时放置于网格上以打开 GUI,关闭时保存回 NBT。
- 落体方块支持:铁砧获得临时支撑方块,以防止在使用 GUI 期间掉落。
指令
| 指令 | 描述 |
|---|---|
/placefree <x> <y> <z> <block[state]> [qx qy qz qw] |
放置一个自由方块,可选旋转参数 |
/removefree <x> <y> <z> |
移除最近的自由方块 |
/listfree |
列出 32 方块范围内的所有自由方块 |
/padebug info |
显示位置和碰撞状态 |
/padebug obb |
列出附近旋转方块的 OBB 详情 |
/padebug ground |
检查脚部是否位于自由方块上方 |
/padebug test <x> <y> <z> <sx> <sy> <sz> |
测试 AABB-OBB 相交 |
/padebug movetest <dx> <dy> <dz> |
模拟裁剪后的移动 |
持久化与网络同步
- NBT 保存格式:嵌入区块数据中(
placeanywhere_free复合标签),向后兼容缺少四元数数据的存档。 - S2C 区块同步:当数据变化或玩家加入时,向所有追踪中的玩家发送完整的区块自由方块数据。
- C2S 交互数据包:服务器权威的放置与交互操作。
架构
- 存储:每个区块、每个区块段的
FreeBlockLayer,带有调色板去重和 SoA 并行数组。删除采用交换移除法。稀疏分配(仅包含自由方块的区块段消耗内存)。 - 12 个通用 Mixin + 2 个客户端 Mixin——占用极小,精准注入。
- HUD 模组兼容:拦截
World.getBlockState()允许 Jade 等模组读取自由方块状态。
依赖项
- Fabric API
- Java 21+
活跃版本
仅 1.21.1 Fabric 构建处于积极维护状态。 适用于 Fabric 和 Forge 的旧版本(1.18.2 至 1.20.6)作为历史版本提供,但不会再收到进一步更新。
许可证
LGPL-3
Place Anywhere Core
The foundational mod that allows Minecraft blocks to exist at arbitrary decimal positions and arbitrary 3D rotations, completely bypassing the vanilla integer grid. Rewrites chunk storage, collision, rendering, raycasting, neighbor updates, redstone, and NBT serialization from the ground up.
How It Works
Every free block is stored in a parallel data layer overlaid on vanilla chunks — a compact palette + Structure-of-Arrays format per 16³ section. Blocks carry a DecimalBlockPos (double-precision coordinates) and a quaternion rotation, enabling placement and rotation at any angle and any sub-block position.
The mod injects into 22 Minecraft internals via mixins to make free blocks fully interactive: they render with correct lighting and block entity models, collide with players and entities using OBB collision detection, respond to raycasting for mining and interaction, propagate and receive neighbor updates, conduct redstone signals, open container GUIs, and save/load persistently alongside vanilla chunk data.
Features
Arbitrary Decimal Placement
- Place blocks at any
(x, y, z)coordinate — no longer limited to integer positions. - Block positions are stored as double-precision values and survive save/load.
Quaternion-Based Rotation
- Every free block can be rotated to any orientation using quaternion math — not limited to vanilla's 4 or 24 rotation states.
- Rotation is applied to collision shapes, rendering, and hitboxes.
Full Collision System
- OBB (Oriented Bounding Box) collision for rotated blocks using SAT (Separating Axis Theorem).
- Binary search movement clipping — per-axis bisection with 10 iterations for ~0.001 block precision.
- Slope auto-step — entities can walk up sloped rotated surfaces (up to 0.6 blocks).
- Residual penetration resolution — entities pushed out of small overlaps to prevent clipping.
- Full GJK + EPA implementation available for complex convex shape collision.
- Correct velocity multiplier, jump velocity multiplier, and travel friction for walking on free blocks.
- Auto-jump support for free block obstacles.
Rendering
- Full baked model rendering with quaternion rotation, correct RenderLayer per block type, and lightmap sampling.
- Block entity rendering with a deserialization cache to avoid per-frame NBT overhead (chests, barrels, shulker boxes, beacons, etc.).
- Rendered in the
AFTER_TRANSLUCENTpass for correct transparency blending (Iris/Sodium compatible). - Block outline (selection box) rendered as a cyan OBB wireframe when looking at a free block.
- 64-block render distance from camera.
Redstone
- Free blocks emit and receive redstone signals — both weak and strong power.
- Redstone wire connections are recomputed for free block positions, including SIDE, UP, and direction-dependent connections (repeaters, observers).
- Full wire power propagation with decay, respecting vanilla wire-to-wire rules.
- Four injected redstone methods ensure compatibility with all redstone components.
Neighbor Updates
- Vanilla neighbor changes propagate to nearby free blocks and vice versa.
- Capture-restore pattern: free blocks are temporarily placed on the integer grid for state updates, then captured and restored — supporting doors, pistons, and other state-reactive blocks.
Interaction & GUI
- Left-click to mine free blocks (with particles and drops).
- Right-click to interact — open chests, use crafting tables, toggle doors/buttons/levers.
- Container GUI support — BlockEntities are temporarily placed on the grid for GUI opening, NBT is saved back on close.
- Falling block support — anvils get temporary support blocks to prevent falling during GUI use.
Commands
| Command | Description |
|---|---|
/placefree <x> <y> <z> <block[state]> [qx qy qz qw] |
Place a free block with optional rotation |
/removefree <x> <y> <z> |
Remove the nearest free block |
/listfree |
List all free blocks within 32 blocks |
/padebug info |
Show position and collision state |
/padebug obb |
List nearby rotated block OBB details |
/padebug ground |
Check if feet are above a free block |
/padebug test <x> <y> <z> <sx> <sy> <sz> |
Test AABB-OBB intersection |
/padebug movetest <dx> <dy> <dz> |
Simulate clipped movement |
Persistence & Networking
- NBT save format embedded in chunk data (
placeanywhere_freecompound), backward compatible with saves missing quaternion data. - S2C chunk sync — full chunk free block data sent to all tracking players on change and on join.
- C2S interaction packets — server-authoritative placement and interaction.
Architecture
- Storage: Per-chunk, per-section
FreeBlockLayerwith palette deduplication and SoA parallel arrays. Swap-remove deletion. Sparse allocation (only sections with free blocks consume memory). - 12 common mixins + 2 client mixins — minimal footprint, targeted injection.
- HUD mod compatible —
World.getBlockState()interception allows Jade and similar mods to read free block states.
Requires
- Fabric API
- Java 21+
Active Version
Only the 1.21.1 Fabric build is actively maintained. Legacy versions (1.18.2 through 1.20.6) for both Fabric and Forge are available as historical releases but will not receive further updates.
License
LGPL-3
下载 Place Anywhere Core
下载 Place Anywhere Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Place Anywhere Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Place Anywhere Core
下载 Place Anywhere Core
下载 Place Anywhere Core
下载 Place Anywhere Core
下载 Place Anywhere Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Place Anywhere Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Place Anywhere Core
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧