0
我有一個Java類,我正嘗試將其重寫到Scala中。它有3個構造函數,即使我只使用1,但需要可用。帶有多個構造函數的Java到Scala
public class EntityNet extends EntityThrowable {
@SuppressWarnings("unused")
public EntityNet(World world) {
super(world);
renderDistanceWeight = 10.0D;
}
@SuppressWarnings("unused")
public EntityNet(World world, double x, double y, double z) {
super(world, x, y, z);
renderDistanceWeight = 10.0D;
}
public EntityNet(World world, EntityLivingBase shooter) {
super(world, shooter);
renderDistanceWeight = 10.0D;
}
任何建議或方向將不勝感激。
您可以顯示EntityThrowable? –