Yarn: BlockEntity.setWorld named wrong

Created on 7 Dec 2019  路  2Comments  路  Source: FabricMC/yarn

It also sets position:

   public void setWorld(World world, BlockPos blockPos) {
      this.world = world;
      this.pos = blockPos.toImmutable();
   }
bug

Most helpful comment

I would prefer calling it (and also the one in Entity) setLocation. Position has a specific meaning and refers to a position in the world. We can use the more general word "location" to avoid using "position" for world + position.

All 2 comments

Looks functionally similar to Entity setPosition, both of which set up the (block) entity's initial state.

I would prefer calling it (and also the one in Entity) setLocation. Position has a specific meaning and refers to a position in the world. We can use the more general word "location" to avoid using "position" for world + position.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Runemoro picture Runemoro  路  4Comments

altrisi picture altrisi  路  4Comments

liach picture liach  路  4Comments

Boundarybreaker picture Boundarybreaker  路  3Comments

Runemoro picture Runemoro  路  4Comments