大型掉落物实体(Large Item)

基本信息

属性 值
实体注册名 EntityItemLarge
实体类 EntityItemLarge(extends EntityItem)
实体 ID 0(EntityID.LargeItem(0))
更新频率 64
追踪距离 3
发送位置更新 true

功能

把大量物品装进一个实体里搬运。普通 EntityItem 堆叠上限很低, 大蓝图一次要搬几万个方块,只能靠这个实体成批运。

EntityItemLarge 覆写构造器把 motionX/motionY/motionZ 全部清零—— 它本身不移动,靠载具(列车/管道/船)拖动,所以位置更新频率 64 很宽松。

源码要点

  • 实体在 CommonProxy.init() 中通过 EntityItemLarge.registerCommon() 注册, 在 init 阶段而非 preInit(其它 mod 多在 preInit 注册),与本 mod 物品注册时机不同。
  • 客户端渲染为 RenderItem(@SideOnly(Side.CLIENT)),即沿用原版掉落物渲染。
  • ⚠️ 实体注册名写作 EntityItemLarge(帕斯卡命名), 而本 mod 的物品注册名是 kebab/驼峰混用(itemMatterManipulator0、metaitem), 模组内命名风格不统一。