Jump to content




Peripheral changes in 1.6 - questions


  • You cannot reply to this topic
1 reply to this topic

#1 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 30 March 2014 - 07:41 AM

In CC 1.6 IPeripheral now has a new method:
	/**
	  * TODO: Document me
	  */
	public boolean equals(IPeripheral other);

Obviously, the documentation isn't helpful. What is it used for and how is it expected to be implemented?

I would expect that it's the same as Object.equals, but if that's the case, then there's no need for it to be in IPeripheral. The fact that it's in IPeripheral suggests it needs special behaviour, not just
@Override
public boolean equals(IPeripheral other) {
	return other == this;
}


Also, are we now required to use IPeripheralProvider for peripherals that can only connect on one side all peripherals?

Edited by immibis, 30 March 2014 - 08:50 AM.


#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 21 April 2014 - 10:55 AM

Yes, we do have to implement our own peripherals with IPeripheralHandler, this is confirmed over in the beta-bug section where I though Dan plainly forgot it. Turns out it's intentional for some reason.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users